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


Ignore:
Timestamp:
Apr 8, 2016, 3:40:57 PM (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/Box.cpp

    r2 r15  
    2121using std::string;
    2222
    23 namespace flair
    24 {
    25 namespace gui
    26 {
     23namespace flair {
     24namespace gui {
    2725
    28 Box::Box(const LayoutPosition* position,string name,string type): Widget(position->getLayout(),name,type)
    29 {
    30     value_changed=true;
    31     SetVolatileXmlProp("row",position->Row());
    32     SetVolatileXmlProp("col",position->Col());
    33     delete position;
     26Box::Box(const LayoutPosition *position, string name, string type)
     27    : Widget(position->getLayout(), name, type) {
     28  value_changed = true;
     29  SetVolatileXmlProp("row", position->Row());
     30  SetVolatileXmlProp("col", position->Col());
     31  delete position;
    3432}
    3533
    36 Box::~Box()
    37 {
    38 core::Object::ObjectName();
     34Box::~Box() { core::Object::ObjectName(); }
     35
     36bool Box::ValueChanged(void) {
     37  bool ret;
     38
     39  GetMutex();
     40  if (value_changed == true) {
     41    value_changed = false;
     42    ret = true;
     43  } else {
     44    ret = false;
     45  }
     46  ReleaseMutex();
     47
     48  return ret;
    3949}
    4050
    41 bool Box::ValueChanged(void)
    42 {
    43     bool ret;
     51void Box::SetValueChanged(void) { value_changed = true; }
    4452
    45     GetMutex();
    46     if(value_changed==true)
    47     {
    48        value_changed=false;
    49        ret=true;
    50     }
    51     else
    52     {
    53         ret=false;
    54     }
    55     ReleaseMutex();
     53void Box::GetMutex(void) const { ((Layout *)Parent())->mutex->GetMutex(); }
    5654
    57     return ret;
    58 }
    59 
    60 void Box::SetValueChanged(void)
    61 {
    62     value_changed=true;
    63 }
    64 
    65 void Box::GetMutex(void) const
    66 {
    67     ((Layout*)Parent())->mutex->GetMutex();
    68 }
    69 
    70 void Box::ReleaseMutex(void) const
    71 {
    72     ((Layout*)Parent())->mutex->ReleaseMutex();
     55void Box::ReleaseMutex(void) const {
     56  ((Layout *)Parent())->mutex->ReleaseMutex();
    7357}
    7458
Note: See TracChangeset for help on using the changeset viewer.