source: flair-src/branches/sanscv/tools/FlairGCS/src/TabWidget.cpp@ 383

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

removing opencv dependency

File size: 1.2 KB
RevLine 
[324]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,
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;
23
24 // QLedIndicator* led=new QLedIndicator(tab);
25 // tab->setCornerWidget(led,Qt::TopLeftCorner);
26}
27
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 }
38}
39
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;
46}
Note: See TracBrowser for help on using the repository browser.