Last change
on this file since 197 was 147, checked in by Sanahuja Guillaume, 8 years ago |
modif euler/lowpass
|
File size:
1.3 KB
|
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 | // created: 2011/10/28
|
---|
6 | // filename: Box.cpp
|
---|
7 | //
|
---|
8 | // author: Guillaume Sanahuja
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Abstract class to display a box on the ground station
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 | #include "Box.h"
|
---|
18 | #include "Layout.h"
|
---|
19 | #include "LayoutPosition.h"
|
---|
20 |
|
---|
21 | using std::string;
|
---|
22 |
|
---|
23 | namespace flair {
|
---|
24 | namespace gui {
|
---|
25 |
|
---|
26 | Box::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;
|
---|
32 | }
|
---|
33 |
|
---|
34 | Box::~Box() { core::Object::ObjectName(); }
|
---|
35 |
|
---|
36 | bool 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;
|
---|
49 | }
|
---|
50 |
|
---|
51 | void Box::SetValueChanged(void) {value_changed = true; }
|
---|
52 |
|
---|
53 | void Box::GetMutex(void) const { ((Layout *)Parent())->mutex->GetMutex(); }
|
---|
54 |
|
---|
55 | void Box::ReleaseMutex(void) const {
|
---|
56 | ((Layout *)Parent())->mutex->ReleaseMutex();
|
---|
57 | }
|
---|
58 |
|
---|
59 | } // end namespace gui
|
---|
60 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.