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 | #ifndef VECTOR3DSPINBOX_H
|
---|
6 | #define VECTOR3DSPINBOX_H
|
---|
7 |
|
---|
8 | #include "XmlWidget.h"
|
---|
9 | #include <QDoubleSpinBox>
|
---|
10 |
|
---|
11 | class Layout;
|
---|
12 | class QGroupBox;
|
---|
13 | class QGridLayout;
|
---|
14 |
|
---|
15 | class Vector3DSpinBox: public XmlWidget
|
---|
16 | {
|
---|
17 | Q_OBJECT
|
---|
18 |
|
---|
19 | public:
|
---|
20 | //handle value as string, becouse double value are not exact
|
---|
21 | Vector3DSpinBox(Layout* parent,int row, int col,QString name,QString value[3],float min,float max,float step,int decimals);
|
---|
22 | ~Vector3DSpinBox();
|
---|
23 |
|
---|
24 | private:
|
---|
25 | QGridLayout* qgridlayout;
|
---|
26 | QGroupBox* box;
|
---|
27 | QDoubleSpinBox doublespinbox[3];
|
---|
28 | QString doublespinbox_value[3];
|
---|
29 | void AddElement(QString name,int index);
|
---|
30 | void SetUptodate(void);
|
---|
31 | void SetValues(QString value[3]);
|
---|
32 | void Reset(void);
|
---|
33 | void LoadEvent(QDomElement dom);
|
---|
34 | void ui_to_var(void);
|
---|
35 | void ui_to_xml(void);
|
---|
36 | bool eventFilter(QObject *o, QEvent *e);
|
---|
37 | void adjust_decimals(QString value[3]);
|
---|
38 | bool IsUptodate(void);
|
---|
39 |
|
---|
40 | private slots:
|
---|
41 | void valuechanged(const QString &value);
|
---|
42 | };
|
---|
43 |
|
---|
44 | #endif // VECTOR3DSPINBOX_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.