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 "PushButton.h"
|
---|
6 | #include "ConnectionLayout.h"
|
---|
7 | #include <QPushButton>
|
---|
8 |
|
---|
9 | PushButton::PushButton(Layout* parent,int row, int col,QString name):XmlWidget(name,"PushButton",parent)
|
---|
10 | {
|
---|
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()
|
---|
20 | {
|
---|
21 | delete button;
|
---|
22 | }
|
---|
23 |
|
---|
24 | void PushButton::button_clicked(bool state)
|
---|
25 | {
|
---|
26 | SetValue("1");
|
---|
27 | connectionLayout()->XmlToSend(XmlDoc());
|
---|
28 | SetValue("0");
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.