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

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

sources reformatted with flair-format-dir script

File size: 619 bytes
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]4// %flair:license}
[9]5#include "Tab.h"
6#include "TabWidget.h"
7#include <QGridLayout>
8
[15]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 }
[9]19}
20
[15]21Tab::~Tab() { parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet)); }
Note: See TracBrowser for help on using the repository browser.