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