source: flair-src/trunk/lib/FlairCore/src/Box.cpp@ 420

Last change on this file since 420 was 147, checked in by Sanahuja Guillaume, 7 years ago

modif euler/lowpass

File size: 1.3 KB
RevLine 
[2]1// %flair:license{
[15]2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
[2]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
21using std::string;
22
[15]23namespace flair {
24namespace gui {
[2]25
[15]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;
[2]32}
33
[15]34Box::~Box() { core::Object::ObjectName(); }
[2]35
[15]36bool Box::ValueChanged(void) {
37 bool ret;
[2]38
[15]39 GetMutex();
40 if (value_changed == true) {
41 value_changed = false;
42 ret = true;
43 } else {
44 ret = false;
45 }
46 ReleaseMutex();
[2]47
[15]48 return ret;
[2]49}
50
[147]51void Box::SetValueChanged(void) {value_changed = true; }
[2]52
[15]53void Box::GetMutex(void) const { ((Layout *)Parent())->mutex->GetMutex(); }
[2]54
[15]55void Box::ReleaseMutex(void) const {
56 ((Layout *)Parent())->mutex->ReleaseMutex();
[2]57}
58
59} // end namespace gui
60} // end namespace flair
Note: See TracBrowser for help on using the repository browser.