Last change
on this file since 418 was 324, checked in by Sanahuja Guillaume, 5 years ago |
removing opencv dependency
|
File size:
675 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 "PushButton.h"
|
---|
| 6 | #include "ConnectionLayout.h"
|
---|
| 7 | #include <QPushButton>
|
---|
| 8 |
|
---|
| 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);
|
---|
| 13 |
|
---|
| 14 | SetValue("0");
|
---|
| 15 |
|
---|
| 16 | connect(button, SIGNAL(clicked(bool)), this, SLOT(button_clicked(bool)));
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | PushButton::~PushButton() { delete button; }
|
---|
| 20 |
|
---|
| 21 | void PushButton::button_clicked(bool state) {
|
---|
| 22 | SetValue("1");
|
---|
| 23 | connectionLayout()->XmlToSend(XmlDoc());
|
---|
| 24 | SetValue("0");
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.