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 "TabWidget.h"
|
---|
| 6 | #include "Tab.h"
|
---|
| 7 | #include <stdio.h>
|
---|
| 8 | #include "Layout.h"
|
---|
| 9 |
|
---|
| 10 | //#include "qledindicator.h"
|
---|
| 11 |
|
---|
| 12 | TabWidget::TabWidget(Layout* parent,int row,int col,QString name,QTabWidget::TabPosition position):XmlWidget(name,"TabWidget",parent)
|
---|
| 13 | {
|
---|
| 14 | tab=new QTabWidget();
|
---|
| 15 | //tab->setTabShape(QTabWidget::Triangular);
|
---|
| 16 | //tab->setDocumentMode(true);
|
---|
| 17 | parent->addWidget(tab,row,col);
|
---|
| 18 | tab->setTabPosition(position);
|
---|
| 19 | SetIsContainer(true);
|
---|
| 20 | SetIsExpandable(true);
|
---|
| 21 | visible_widget=tab;
|
---|
| 22 |
|
---|
| 23 | //QLedIndicator* led=new QLedIndicator(tab);
|
---|
| 24 | //tab->setCornerWidget(led,Qt::TopLeftCorner);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | TabWidget::~TabWidget()
|
---|
| 28 | {
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | void TabWidget::XmlEvent(QDomElement dom)
|
---|
| 32 | {
|
---|
| 33 | QString type=dom.tagName();
|
---|
| 34 | QString name=dom.attribute("name");
|
---|
| 35 | int position=dom.attribute("position").toInt();
|
---|
| 36 |
|
---|
| 37 | if(type=="Tab")
|
---|
| 38 | {
|
---|
| 39 | Tab* layout = new Tab(this,name,position);
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | bool TabWidget::IsUptodate(void)
|
---|
| 44 | {
|
---|
| 45 | for(int i=0;i<childs->count();i++)
|
---|
| 46 | {
|
---|
| 47 | if(childs->at(i)->IsUptodate()==false) return false;
|
---|
| 48 | }
|
---|
| 49 | return true;
|
---|
| 50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.