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

Last change on this file since 291 was 269, checked in by Sanahuja Guillaume, 6 years ago

flairgcs:
speed up processing time when receiving datas from uav
triger watchdog while receiving datas from uav
(avoids connection lost in uav)

File size: 1.2 KB
RevLine 
[10]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[10]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
[15]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;
[9]23
[15]24 // QLedIndicator* led=new QLedIndicator(tab);
25 // tab->setCornerWidget(led,Qt::TopLeftCorner);
[9]26}
27
[15]28TabWidget::~TabWidget() {}
[9]29
[269]30void TabWidget::XmlEvent(QDomElement *dom) {
31 QString type = dom->tagName();
32 QString name = dom->attribute("name");
33 int position = dom->attribute("position").toInt();
[9]34
[15]35 if (type == "Tab") {
36 Tab *layout = new Tab(this, name, position);
37 }
[9]38}
39
[15]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;
[9]46}
Note: See TracBrowser for help on using the repository browser.