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

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

lic

File size: 629 bytes
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5#include "Tab.h"
6#include "TabWidget.h"
7#include <QGridLayout>
8
9Tab::Tab(TabWidget* parent,QString name,int position): Layout(new QWidget(),parent,name,"Tab") {
10 parent_tab=parent;
11 onglet = getQGridLayout()->parentWidget();
12 onglet->setObjectName(name);
13 if(position==-1) {
14 parent->tab->addTab(onglet, name);
15 } else {
16 parent->tab->insertTab(position,onglet, name);
17 }
18}
19
20Tab::~Tab() {
21 parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet));
22}
Note: See TracBrowser for help on using the repository browser.