source: flair-src/trunk/tools/FlairGCS/src/TextEdit.cpp @ 269

Last change on this file since 269 was 269, checked in by Sanahuja Guillaume, 3 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: 837 bytes
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 "TextEdit.h"
6#include "Layout.h"
7#include <QPushButton>
8#include <QGridLayout>
9#include <QTextEdit>
10
11TextEdit::TextEdit(Layout *parent, int row, int col, QString name)
12    : XmlWidget(name, "TextEdit", parent) {
13
14  visible_widget = new QWidget();
15  visible_widget->setObjectName(name);
16
17  layout = new QGridLayout(visible_widget);
18  clear = new QPushButton("Effacer");
19  text = new QTextEdit();
20
21  layout->addWidget(text, 0, 0);
22  layout->addWidget(clear, 1, 0);
23
24  connect(clear, SIGNAL(clicked(bool)), text, SLOT(clear()));
25
26  parent->addWidget(visible_widget, row, col);
27}
28
29TextEdit::~TextEdit() {}
30
31void TextEdit::XmlEvent(QDomElement *dom) {
32  text->append(dom->attribute("value"));
33}
Note: See TracBrowser for help on using the repository browser.