source: flair-src/trunk/tools/FlairGCS/src/Tab.cpp@ 9

Last change on this file since 9 was 9, checked in by Sanahuja Guillaume, 8 years ago

gcs

File size: 489 bytes
Line 
1#include "Tab.h"
2#include "TabWidget.h"
3#include <QGridLayout>
4
5Tab::Tab(TabWidget* parent,QString name,int position): Layout(new QWidget(),parent,name,"Tab") {
6 parent_tab=parent;
7 onglet = getQGridLayout()->parentWidget();
8 onglet->setObjectName(name);
9 if(position==-1) {
10 parent->tab->addTab(onglet, name);
11 } else {
12 parent->tab->insertTab(position,onglet, name);
13 }
14}
15
16Tab::~Tab() {
17 parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet));
18}
Note: See TracBrowser for help on using the repository browser.