source: flair-src/trunk/tools/FlairGCS/src/TabWidget.cpp @ 9

Last change on this file since 9 was 9, checked in by Sanahuja Guillaume, 5 years ago

gcs

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