Last change
on this file since 118 was 15, checked in by Bayard Gildas, 9 years ago |
sources reformatted with flair-format-dir script
|
File size:
675 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 "PushButton.h"
|
---|
| 6 | #include "ConnectionLayout.h"
|
---|
| 7 | #include <QPushButton>
|
---|
| 8 |
|
---|
[15] | 9 | PushButton::PushButton(Layout *parent, int row, int col, QString name)
|
---|
| 10 | : XmlWidget(name, "PushButton", parent) {
|
---|
| 11 | button = new QPushButton(name);
|
---|
| 12 | parent->addWidget(button, row, col);
|
---|
[9] | 13 |
|
---|
[15] | 14 | SetValue("0");
|
---|
[9] | 15 |
|
---|
[15] | 16 | connect(button, SIGNAL(clicked(bool)), this, SLOT(button_clicked(bool)));
|
---|
[9] | 17 | }
|
---|
| 18 |
|
---|
[15] | 19 | PushButton::~PushButton() { delete button; }
|
---|
[9] | 20 |
|
---|
[15] | 21 | void PushButton::button_clicked(bool state) {
|
---|
| 22 | SetValue("1");
|
---|
| 23 | connectionLayout()->XmlToSend(XmlDoc());
|
---|
| 24 | SetValue("0");
|
---|
[9] | 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.