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

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

lic

File size: 1.2 KB
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 "TabWidget.h"
6#include "Tab.h"
7#include <stdio.h>
8#include "Layout.h"
9
10//#include "qledindicator.h"
11
12TabWidget::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
27TabWidget::~TabWidget()
28{
29}
30
31void 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
43bool 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.