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

Last change on this file since 57 was 57, checked in by Thomas Fuhrmann, 8 years ago

Management of lists using red/black colors

File size: 1.4 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 //selected item row, starting from 0
74 uint16_t selected_item_row;
75 bool selected_item_changed;
76};
77
78} // end namespace gui
79} // end namespace flair
80
81#endif // LISTWIDGET_H
Note: See TracBrowser for help on using the repository browser.