source: flair-src/branches/mavlink/lib/FlairCore/src/ListWidget.h @ 53

Last change on this file since 53 was 53, checked in by Thomas Fuhrmann, 5 years ago

Default xml configuration is working with ListWidget?

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/*!
6 * \file ListWidget.h
7 * \brief Class displaying a QListWidget on the ground station
8 * \author Thomas Fuhrmann, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2016/07/26
10 * \version 1.0
11 */
12
13#ifndef LISTWIDGET_H
14#define LISTWIDGET_H
15
16#include <Widget.h>
17
18namespace flair {
19namespace gui {
20
21class LayoutPosition;
22
23/*! \class ListWidget
24*
25* \brief Class displaying a QListWidget on the ground station
26*
27*/
28class ListWidget : public Widget {
29public:
30  /*!
31  * \brief Constructor
32  *
33  * Construct a QListWidget at given position.
34  *
35  * \param position position to display the QListWidget
36  * \param name name
37  */
38  ListWidget(const LayoutPosition *position, std::string name);
39
40  /*!
41  * \brief Destructor
42  *
43  */
44  ~ListWidget();
45
46  /*!
47 * \brief Add an item
48 *
49 * Add an item to the end of the list.
50 *
51 * \param name item nam
52 */
53  void AddItem(std::string name);
54
55  /*!
56  * \brief Remove an item
57  *
58  * Remove the currently selected item.
59  */
60  void RemoveItem(void);
61
62private:
63  /*!
64  * \brief XmlEvent from ground station
65  *
66  * Reimplemented from Widget.
67  *
68  */
69  void XmlEvent(void);
70
71  //store the items
72  std::vector<std::string> items;
73};
74
75} // end namespace gui
76} // end namespace flair
77
78#endif // LISTWIDGET_H
Note: See TracBrowser for help on using the repository browser.