Changeset 368 in flair-src for trunk/tools/FlairGCS/src
- Timestamp:
- Nov 12, 2020, 6:01:17 PM (4 years ago)
- Location:
- trunk/tools/FlairGCS/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/FlairGCS/src/Tab.cpp
r15 r368 6 6 #include "TabWidget.h" 7 7 #include <QGridLayout> 8 #include <QScrollArea> 8 9 9 10 Tab::Tab(TabWidget *parent, QString name, int position) 10 11 : Layout(new QWidget(), parent, name, "Tab") { 11 12 parent_tab = parent; 12 onglet = getQGridLayout()->parentWidget();13 QWidget *onglet = getQGridLayout()->parentWidget(); 13 14 onglet->setObjectName(name); 15 16 scroll = new QScrollArea; 17 scroll->setWidget(onglet); 18 scroll->setWidgetResizable(true); 19 scroll->setFrameShape(QFrame::NoFrame); 20 14 21 if (position == -1) { 15 parent->tab->addTab( onglet, name);22 parent->tab->addTab(scroll, name); 16 23 } else { 17 parent->tab->insertTab(position, onglet, name);24 parent->tab->insertTab(position, scroll, name); 18 25 } 19 26 } 20 27 21 Tab::~Tab() { parent_tab->tab->removeTab(parent_tab->tab->indexOf(onglet)); } 28 Tab::~Tab() { 29 parent_tab->tab->removeTab(parent_tab->tab->indexOf(scroll)); 30 } -
trunk/tools/FlairGCS/src/Tab.h
r15 r368 9 9 10 10 class TabWidget; 11 class QScrollArea; 11 12 12 13 class Tab : public Layout { … … 18 19 private: 19 20 TabWidget *parent_tab; 20 Q Widget *onglet;21 QScrollArea *scroll; 21 22 }; 22 23
Note:
See TracChangeset
for help on using the changeset viewer.