Last change
on this file since 394 was 368, checked in by Sanahuja Guillaume, 4 years ago |
ajout d'ascenseurs dans la gcs
|
File size:
803 bytes
|
Rev | Line | |
---|
[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>
|
---|
[368] | 8 | #include <QScrollArea>
|
---|
[9] | 9 |
|
---|
[15] | 10 | Tab::Tab(TabWidget *parent, QString name, int position)
|
---|
| 11 | : Layout(new QWidget(), parent, name, "Tab") {
|
---|
| 12 | parent_tab = parent;
|
---|
[368] | 13 | QWidget *onglet = getQGridLayout()->parentWidget();
|
---|
[15] | 14 | onglet->setObjectName(name);
|
---|
[368] | 15 |
|
---|
| 16 | scroll = new QScrollArea;
|
---|
| 17 | scroll->setWidget(onglet);
|
---|
| 18 | scroll->setWidgetResizable(true);
|
---|
| 19 | scroll->setFrameShape(QFrame::NoFrame);
|
---|
| 20 |
|
---|
[15] | 21 | if (position == -1) {
|
---|
[368] | 22 | parent->tab->addTab(scroll, name);
|
---|
[15] | 23 | } else {
|
---|
[368] | 24 | parent->tab->insertTab(position, scroll, name);
|
---|
[15] | 25 | }
|
---|
[9] | 26 | }
|
---|
| 27 |
|
---|
[368] | 28 | Tab::~Tab() {
|
---|
| 29 | parent_tab->tab->removeTab(parent_tab->tab->indexOf(scroll));
|
---|
| 30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.