ICF 3.1.1.10
Technical documentation of ICF Libraries
CNumericValueWidget.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iqtmeas_CNumericValueWidget_included
7#define iqtmeas_CNumericValueWidget_included
8
9
10// Qt includes
11#include<QtCore/QtGlobal>
12#include <QtWidgets/QWidget>
13
14// ICF includes
15#include <imath/IUnitInfo.h>
16#include <imeas/INumericValue.h>
17
18#include <GeneratedFiles/imeasgui/ui_CNumericValueWidget.h>
19
20
21namespace imeasgui
22{
23
24
26 public QWidget,
27 protected Ui::CNumericValueWidget
28{
29 Q_OBJECT
30
31public:
33 {
37 SF_SINGLE_ROW = 8 // can be ORed
38 };
39
41 QWidget* parentPtr,
43 int sliderFlags = SF_SLIDER_BUTTONS,
44 int inputPolicy = 0,
45 int maxPrecision = 2,
46 bool isPostValidationEnabled = false);
47
48 void SetUnitInfo(const QString& name, const QString& description, const imath::IUnitInfo* unitInfoPtr);
49
51 double GetValue() const;
52 void SetValue(double value);
53
54Q_SIGNALS:
59
60protected Q_SLOTS:
61 void on_ValueSB_valueChanged(double value);
68
69private:
71 bool m_ignoreEvents;
72 double m_unitMultiplicationFactor;
73 double m_sliderScaleFactor;
74 int m_maxEditPrecision;
75 bool m_isPostValidationEnabled;
76
77 istd::CRange m_valueRange;
78};
79
80
81} // namespace imeasgui
82
83
84#endif // !iqtmeas_CNumericValueWidget_included
85
86
87
Common interface to get information about a measurement unit.
Definition IUnitInfo.h:27
INumericConstraints::ValueTypeId ValueTypeId
void on_ValueSlider_valueChanged(int value)
void ValueChanged()
Will be emitted when user changed value.
void on_ValueSlider_sliderMoved(int value)
const imeas::INumericValue::ValueTypeId & GetTypeId() const
void SetValue(double value)
void on_ValueSB_valueChanged(double value)
void SetUnitInfo(const QString &name, const QString &description, const imath::IUnitInfo *unitInfoPtr)
CNumericValueWidget(QWidget *parentPtr, const imeas::INumericValue::ValueTypeId &typeId, int sliderFlags=SF_SLIDER_BUTTONS, int inputPolicy=0, int maxPrecision=2, bool isPostValidationEnabled=false)
This package contains Qt based implementations of measurement components.

© Witold Gantzke and Kirill Lepskiy