Last change
on this file since 382 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
File size:
619 bytes
|
Rev | Line | |
---|
[324] | 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 |
|
---|
| 9 | Tab::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 |
|
---|
| 21 | Tab::~Tab() { parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet)); }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.