Rev | Line | |
---|
[10] | 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}
|
---|
[9] | 5 | #include "Tab.h"
|
---|
| 6 | #include "TabWidget.h"
|
---|
| 7 | #include <QGridLayout>
|
---|
| 8 |
|
---|
| 9 | Tab::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 |
|
---|
| 20 | Tab::~Tab() {
|
---|
| 21 | parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet));
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.