[2] | 1 | // %flair:license{
|
---|
[13] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[2] | 4 | // %flair:license}
|
---|
| 5 | /*!
|
---|
| 6 | * \file Vector3DSpinBox.h
|
---|
| 7 | * \brief Class displaying 3 QDoubleSpinBox for x,y,z 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 VECTOR3DSPINBOX_H
|
---|
| 14 | #define VECTOR3DSPINBOX_H
|
---|
| 15 |
|
---|
| 16 | #include <Box.h>
|
---|
| 17 | #include <Vector3D.h>
|
---|
| 18 |
|
---|
[13] | 19 | namespace flair {
|
---|
| 20 | namespace gui {
|
---|
| 21 | class Layout;
|
---|
[2] | 22 |
|
---|
[13] | 23 | /*! \class Vector3DSpinBox
|
---|
| 24 | *
|
---|
| 25 | * \brief Class displaying 3 QDoubleSpinBox for x,y,z on the ground station
|
---|
| 26 | *
|
---|
| 27 | */
|
---|
| 28 | class Vector3DSpinBox : public Box {
|
---|
| 29 | public:
|
---|
| 30 | /*!
|
---|
| 31 | * \brief Constructor
|
---|
| 32 | *
|
---|
| 33 | * Construct a Vector3DSpinBox at given position. \n
|
---|
| 34 | * Each DoubleSpinBox is saturated to min and max values.
|
---|
| 35 | *
|
---|
| 36 | * \param position position to display the Vector3DSpinBox
|
---|
| 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 | Vector3DSpinBox(const LayoutPosition *position, std::string name, double min,
|
---|
| 45 | double max, double step, int decimals = 2,
|
---|
[50] | 46 | core::Vector3Df default_value = core::Vector3Df(0, 0, 0));
|
---|
[2] | 47 |
|
---|
[13] | 48 | /*!
|
---|
| 49 | * \brief Destructor
|
---|
| 50 | *
|
---|
| 51 | */
|
---|
| 52 | ~Vector3DSpinBox();
|
---|
[2] | 53 |
|
---|
[13] | 54 | /*!
|
---|
| 55 | * \brief Value
|
---|
| 56 | *
|
---|
| 57 | * \return value
|
---|
| 58 | */
|
---|
[50] | 59 | core::Vector3Df Value(void) const;
|
---|
[13] | 60 | // operator core::Vector3D() const;
|
---|
| 61 | private:
|
---|
| 62 | /*!
|
---|
| 63 | * \brief XmlEvent from ground station
|
---|
| 64 | *
|
---|
| 65 | * Reimplemented from Widget.
|
---|
| 66 | *
|
---|
| 67 | */
|
---|
| 68 | void XmlEvent(void);
|
---|
[2] | 69 |
|
---|
[50] | 70 | core::Vector3Df box_value;
|
---|
[13] | 71 | };
|
---|
[2] | 72 |
|
---|
| 73 | } // end namespace gui
|
---|
| 74 | } // end namespace flair
|
---|
| 75 |
|
---|
| 76 | #endif // VECTOR3DSPINBOX_H
|
---|