CNumericValueWidget.h
Go to the documentation of this file.
1 #ifndef iqtmeas_CNumericValueWidget_included
2 #define iqtmeas_CNumericValueWidget_included
3 
4 
5 // Qt includes
6 #include<QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QWidget>
9 #else
10 #include <QtGui/QWidget>
11 #endif
12 
13 // ACF includes
14 #include <imath/IUnitInfo.h>
15 
16 #include <GeneratedFiles/iqtmeas/ui_CNumericValueWidget.h>
17 
18 
19 namespace iqtmeas
20 {
21 
22 
24  public QWidget,
25  protected Ui::CNumericValueWidget
26 {
27  Q_OBJECT
28 
29 public:
31  {
32  SF_NONE = 0,
35  SF_SINGLE_ROW = 8 // can be ORed
36  };
37 
39  QWidget* parentPtr = NULL,
40  int sliderFlags = SF_SLIDER_BUTTONS,
41  int inputPolicy = 0,
42  int maxPrecision = 2,
43  bool isPostValidationEnabled = false);
44 
45  void SetUnitInfo(const QString& name, const QString& description, const imath::IUnitInfo* unitInfoPtr);
46 
47  double GetValue() const;
48  void SetValue(double value);
49 
50 Q_SIGNALS:
54  void ValueChanged();
55 
56 protected Q_SLOTS:
57  void on_ValueSB_valueChanged(double value);
59  void on_ValueSlider_valueChanged(int value);
60  void on_ValueSlider_sliderMoved(int value);
62  void on_MinButton_clicked();
63  void on_MaxButton_clicked();
64 
65 private:
66  bool m_ignoreEvents;
67  double m_unitMultiplicationFactor;
68  double m_sliderScaleFactor;
69  int m_maxEditPrecision;
70  bool m_isPostValidationEnabled;
71 
72  istd::CRange m_valueRange;
73 };
74 
75 
76 } // namespace iqtmeas
77 
78 
79 #endif // !iqtmeas_CNumericValueWidget_included
80 
81 
82 
void on_ValueSlider_sliderMoved(int value)
void on_ValueSB_valueChanged(double value)
void on_ValueSlider_valueChanged(int value)
CNumericValueWidget(QWidget *parentPtr=NULL, int sliderFlags=SF_SLIDER_BUTTONS, int inputPolicy=0, int maxPrecision=2, bool isPostValidationEnabled=false)
void SetUnitInfo(const QString &name, const QString &description, const imath::IUnitInfo *unitInfoPtr)
void SetValue(double value)
void ValueChanged()
Will be emitted when user changed value.

© 2007-2017 Witold Gantzke and Kirill Lepskiy