Changeset 15 in flair-src for trunk/tools/FlairGCS/src/PushButton.cpp


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (5 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/FlairGCS/src/PushButton.cpp

    r10 r15  
    77#include <QPushButton>
    88
    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);
     9PushButton::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);
    1313
    14     SetValue("0");
     14  SetValue("0");
    1515
    16     connect(button, SIGNAL(clicked(bool)),this, SLOT(button_clicked(bool)));
     16  connect(button, SIGNAL(clicked(bool)), this, SLOT(button_clicked(bool)));
    1717}
    1818
    19 PushButton::~PushButton()
    20 {
    21     delete button;
     19PushButton::~PushButton() { delete button; }
     20
     21void PushButton::button_clicked(bool state) {
     22  SetValue("1");
     23  connectionLayout()->XmlToSend(XmlDoc());
     24  SetValue("0");
    2225}
    23 
    24 void PushButton::button_clicked(bool state)
    25 {
    26     SetValue("1");
    27     connectionLayout()->XmlToSend(XmlDoc());
    28     SetValue("0");
    29 }
Note: See TracChangeset for help on using the changeset viewer.