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: 2016/07/26
|
---|
6 | // filename: ListWidget.cpp
|
---|
7 | //
|
---|
8 | // author: Thomas Fuhrmann
|
---|
9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
10 | //
|
---|
11 | // version: $Id: $
|
---|
12 | //
|
---|
13 | // purpose: Class displaying a QListWidget on the ground station
|
---|
14 | //
|
---|
15 | //
|
---|
16 | /*********************************************************************/
|
---|
17 | #include "ListWidget.h"
|
---|
18 | #include "Layout.h"
|
---|
19 | #include "LayoutPosition.h"
|
---|
20 |
|
---|
21 | using std::string;
|
---|
22 |
|
---|
23 | namespace flair {
|
---|
24 | namespace gui {
|
---|
25 |
|
---|
26 | ListWidget::ListWidget(const LayoutPosition *position, string name)
|
---|
27 | : Widget(position->getLayout(), name, string("ListWidget")) {
|
---|
28 |
|
---|
29 | // value_changed = true;
|
---|
30 | SetVolatileXmlProp("row", position->Row());
|
---|
31 | SetVolatileXmlProp("col", position->Col());
|
---|
32 | delete position;
|
---|
33 | SendXml();
|
---|
34 | }
|
---|
35 |
|
---|
36 | ListWidget::~ListWidget() { core::Object::ObjectName(); }
|
---|
37 |
|
---|
38 | void ListWidget::AddItem(string name) {
|
---|
39 | SetVolatileXmlProp("item", name);
|
---|
40 | SendXml();
|
---|
41 | }
|
---|
42 |
|
---|
43 | void ListWidget::RemoveItem(void) {
|
---|
44 | SetVolatileXmlProp("delete", 0);
|
---|
45 | SendXml();
|
---|
46 | }
|
---|
47 |
|
---|
48 | void ListWidget::XmlEvent(void) {
|
---|
49 | // GetMutex();
|
---|
50 | // if (GetPersistentXmlProp("value", box_value))
|
---|
51 | // SetValueChanged();
|
---|
52 | // ReleaseMutex();
|
---|
53 | }
|
---|
54 |
|
---|
55 | } // end namespace gui
|
---|
56 | } // end namespace flair
|
---|
Note:
See
TracBrowser
for help on using the repository browser.