Changeset 15 in flair-src for trunk/lib/FlairCore/src/PushButton.cpp


Ignore:
Timestamp:
04/08/16 15:40:57 (8 years ago)
Author:
Bayard Gildas
Message:

sources reformatted with flair-format-dir script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/PushButton.cpp

    r2 r15  
    2222using std::string;
    2323
    24 namespace flair
    25 {
    26 namespace gui
    27 {
     24namespace flair {
     25namespace gui {
    2826
    29 PushButton::PushButton(const LayoutPosition* position,string name): Widget(position->getLayout(),name,"PushButton")
    30 {
    31     SetVolatileXmlProp("row",position->Row());
    32     SetVolatileXmlProp("col",position->Col());
    33     delete position;
     27PushButton::PushButton(const LayoutPosition *position, string name)
     28    : Widget(position->getLayout(), name, "PushButton") {
     29  SetVolatileXmlProp("row", position->Row());
     30  SetVolatileXmlProp("col", position->Col());
     31  delete position;
    3432
    35     SendXml();
     33  SendXml();
    3634
    37     clicked=false;
     35  clicked = false;
    3836}
    3937
    40 PushButton::~PushButton()
    41 {
     38PushButton::~PushButton() {}
    4239
     40void PushButton::XmlEvent(void) {
     41  int clic = 0;
     42  GetPersistentXmlProp("value", clic);
     43
     44  if (clic == 1)
     45    clicked = true;
    4346}
    4447
    45 void PushButton::XmlEvent(void)
    46 {
    47     int clic=0;
    48     GetPersistentXmlProp("value",clic);
    49 
    50     if(clic==1) clicked=true;
    51 }
    52 
    53 bool PushButton::Clicked(void)
    54 {
    55     if(clicked==true)
    56     {
    57        clicked=false;
    58        return true;
    59     }
    60     else
    61     {
    62         return false;
    63     }
     48bool PushButton::Clicked(void) {
     49  if (clicked == true) {
     50    clicked = false;
     51    return true;
     52  } else {
     53    return false;
     54  }
    6455}
    6556
Note: See TracChangeset for help on using the changeset viewer.