Last change
on this file since 426 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
File size:
837 bytes
|
Rev | Line | |
---|
[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 "TextEdit.h"
|
---|
| 6 | #include "Layout.h"
|
---|
| 7 | #include <QPushButton>
|
---|
| 8 | #include <QGridLayout>
|
---|
| 9 | #include <QTextEdit>
|
---|
| 10 |
|
---|
| 11 | TextEdit::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 |
|
---|
| 29 | TextEdit::~TextEdit() {}
|
---|
| 30 |
|
---|
| 31 | void TextEdit::XmlEvent(QDomElement *dom) {
|
---|
| 32 | text->append(dom->attribute("value"));
|
---|
| 33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.