Flair
Framework Libre Air
ListWidget.h
Go to the documentation of this file.
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}
13 #ifndef LISTWIDGET_H
14 #define LISTWIDGET_H
15 
16 #include <Widget.h>
17 
18 namespace flair {
19 namespace gui {
20 
21 class LayoutPosition;
22 
33 class ListWidget : public Widget {
34 public:
43  ListWidget(const LayoutPosition *position, std::string name);
44 
49  ~ListWidget();
50 
58  void AddItem(std::string name);
59 
67  void RemoveItem(void);
68 
69  const std::vector<std::string> &GetItemList() const;
70 
71 private:
78  void XmlEvent(void);
79 
83  std::vector<std::string> items;
87  uint16_t selectedItemRow;
91  bool selectedItemChanged;
92 };
93 
94 } // end namespace gui
95 } // end namespace flair
96 
97 #endif // LISTWIDGET_H
namespace of the flair Framework
Definition: Ahrs.h:19
Abstract class for all Framework's widget classes.
void AddItem(std::string name)
Add an item.
void RemoveItem(void)
Remove an item.
ListWidget(const LayoutPosition *position, std::string name)
Constructor.
Abstract class for all Framework's widget classes.
Definition: Widget.h:38
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
~ListWidget()
Destructor.
Class displaying a QListWidget on the ground station.
Definition: ListWidget.h:33