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