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

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

lic

File size: 839 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):XmlWidget(name,"TextEdit",parent)
12{
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{
31
32}
33
34void TextEdit::XmlEvent(QDomElement dom)
35{
36 text->append(dom.attribute("value"));
37}
Note: See TracBrowser for help on using the repository browser.