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

Last change on this file since 468 was 368, checked in by Sanahuja Guillaume, 4 years ago

ajout d'ascenseurs dans la gcs

File size: 803 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#include <QScrollArea>
9
10Tab::Tab(TabWidget *parent, QString name, int position)
11 : Layout(new QWidget(), parent, name, "Tab") {
12 parent_tab = parent;
13 QWidget *onglet = getQGridLayout()->parentWidget();
14 onglet->setObjectName(name);
15
16 scroll = new QScrollArea;
17 scroll->setWidget(onglet);
18 scroll->setWidgetResizable(true);
19 scroll->setFrameShape(QFrame::NoFrame);
20
21 if (position == -1) {
22 parent->tab->addTab(scroll, name);
23 } else {
24 parent->tab->insertTab(position, scroll, name);
25 }
26}
27
28Tab::~Tab() {
29 parent_tab->tab->removeTab(parent_tab->tab->indexOf(scroll));
30}
Note: See TracBrowser for help on using the repository browser.