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

Last change on this file since 168 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 619 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)
10 : Layout(new QWidget(), parent, name, "Tab") {
11 parent_tab = parent;
12 onglet = getQGridLayout()->parentWidget();
13 onglet->setObjectName(name);
14 if (position == -1) {
15 parent->tab->addTab(onglet, name);
16 } else {
17 parent->tab->insertTab(position, onglet, name);
18 }
19}
20
21Tab::~Tab() { parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet)); }
Note: See TracBrowser for help on using the repository browser.