Changeset 15 in flair-src for trunk/tools/FlairGCS/src/TabWidget.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/TabWidget.cpp

    r10 r15  
    1010//#include "qledindicator.h"
    1111
    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;
     12TabWidget::TabWidget(Layout *parent, int row, int col, QString name,
     13                     QTabWidget::TabPosition position)
     14    : XmlWidget(name, "TabWidget", parent) {
     15  tab = new QTabWidget();
     16  // tab->setTabShape(QTabWidget::Triangular);
     17  // tab->setDocumentMode(true);
     18  parent->addWidget(tab, row, col);
     19  tab->setTabPosition(position);
     20  SetIsContainer(true);
     21  SetIsExpandable(true);
     22  visible_widget = tab;
    2223
    23     //QLedIndicator* led=new QLedIndicator(tab);
    24     //tab->setCornerWidget(led,Qt::TopLeftCorner);
     24  // QLedIndicator* led=new QLedIndicator(tab);
     25  // tab->setCornerWidget(led,Qt::TopLeftCorner);
    2526}
    2627
    27 TabWidget::~TabWidget()
    28 {
     28TabWidget::~TabWidget() {}
     29
     30void TabWidget::XmlEvent(QDomElement dom) {
     31  QString type = dom.tagName();
     32  QString name = dom.attribute("name");
     33  int position = dom.attribute("position").toInt();
     34
     35  if (type == "Tab") {
     36    Tab *layout = new Tab(this, name, position);
     37  }
    2938}
    3039
    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     }
     40bool TabWidget::IsUptodate(void) {
     41  for (int i = 0; i < childs->count(); i++) {
     42    if (childs->at(i)->IsUptodate() == false)
     43      return false;
     44  }
     45  return true;
    4146}
    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 TracChangeset for help on using the changeset viewer.