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 DoubleSpinBox.h
|
---|
7 | * \brief Class displaying a QDoubleSpinBox 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 DOUBLESPINBOX_H
|
---|
14 | #define DOUBLESPINBOX_H
|
---|
15 |
|
---|
16 | #include <Box.h>
|
---|
17 |
|
---|
18 | namespace flair {
|
---|
19 | namespace gui {
|
---|
20 |
|
---|
21 | class Layout;
|
---|
22 |
|
---|
23 | /*! \class DoubleSpinBox
|
---|
24 | *
|
---|
25 | * \brief Class displaying a QDoubleSpinBox on the ground station
|
---|
26 | *
|
---|
27 | */
|
---|
28 | class DoubleSpinBox : public Box {
|
---|
29 | public:
|
---|
30 | /*!
|
---|
31 | * \brief Constructor
|
---|
32 | *
|
---|
33 | * Construct a QDoubleSpinBox at given position. \n
|
---|
34 | * The QDoubleSpinBox is saturated to min and max values.
|
---|
35 | *
|
---|
36 | * \param position position to display the QDoubleSpinBox
|
---|
37 | * \param name name
|
---|
38 | * \param min minimum value
|
---|
39 | * \param max maximum value
|
---|
40 | * \param step step
|
---|
41 | * \param decimals number of decimals
|
---|
42 | * \param default_value default value if not in the xml config file
|
---|
43 | */
|
---|
44 | DoubleSpinBox(const LayoutPosition *position, std::string name, double min,
|
---|
45 | double max, double step, uint16_t decimals = 2,
|
---|
46 | double default_value = 0);
|
---|
47 |
|
---|
48 | /*!
|
---|
49 | * \brief Constructor
|
---|
50 | *
|
---|
51 | * Construct a QDoubleSpinBox at given position. \n
|
---|
52 | * The QDoubleSpinBox is saturated to min and max values.
|
---|
53 | *
|
---|
54 | * \param position position to display the QDoubleSpinBox
|
---|
55 | * \param name name
|
---|
56 | * \param suffix suffix for the value (eg unit)
|
---|
57 | * \param min minimum value
|
---|
58 | * \param max maximum value
|
---|
59 | * \param step step
|
---|
60 | * \param decimals number of decimals
|
---|
61 | * \param default_value default value if not in the xml config file
|
---|
62 | */
|
---|
63 | DoubleSpinBox(const LayoutPosition *position, std::string name,
|
---|
64 | std::string suffix, double min, double max, double step,
|
---|
65 | uint16_t decimals = 2, double default_value = 0);
|
---|
66 |
|
---|
67 | /*!
|
---|
68 | * \brief Destructor
|
---|
69 | *
|
---|
70 | */
|
---|
71 | ~DoubleSpinBox();
|
---|
72 |
|
---|
73 | /*!
|
---|
74 | * \brief Value
|
---|
75 | *
|
---|
76 | * \return value
|
---|
77 | */
|
---|
78 | double Value(void) const;
|
---|
79 |
|
---|
80 | private:
|
---|
81 | /*!
|
---|
82 | * \brief XmlEvent from ground station
|
---|
83 | *
|
---|
84 | * Reimplemented from Widget.
|
---|
85 | *
|
---|
86 | */
|
---|
87 | void XmlEvent(void);
|
---|
88 |
|
---|
89 | double box_value;
|
---|
90 | };
|
---|
91 |
|
---|
92 | } // end namespace gui
|
---|
93 | } // end namespace flair
|
---|
94 |
|
---|
95 | #endif // DOUBLESPINBOX_H
|
---|