source: flair-src/trunk/lib/FlairCore/src/DoubleSpinBox.h@ 4

Last change on this file since 4 was 2, checked in by Sanahuja Guillaume, 9 years ago

flaircore

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