OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertyInputInt.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10
11namespace ot {
12
13 class SpinBox;
14 class LineEdit;
15
17 Q_OBJECT
19 public:
21 virtual ~PropertyInputInt();
22
23 virtual void addPropertyInputValueToJson(ot::JsonValue& _object, const char* _memberNameValue, ot::JsonAllocator& _allocator) override;
24 virtual QVariant getCurrentValue(void) const override;
25 virtual QWidget* getQWidget(void) override;
26 virtual Property* createPropertyConfiguration(void) const override;
27 virtual bool setupFromConfiguration(const Property* _configuration) override;
28 virtual void focusPropertyInput(void) override;
29
30 void setValue(int _value);
31 int getValue(void) const;
32
33 bool hasInputError(void) const;
34
35 private Q_SLOTS:
36 void lclValueChanged(int);
37 void lclTextChanged(void);
38 void lclEditingFinishedChanged(void);
39
40 private:
41 int m_min;
42 int m_max;
43 SpinBox* m_spinBox;
44 LineEdit* m_lineEdit;
45 };
46
47}
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
#define OT_WIDGETS_API_EXPORT
Definition OTWidgetsAPIExport.h:12
Definition LineEdit.h:17
The Property class is used as a base class for all Properties that can be displayed and modified in t...
Definition Property.h:21
Definition PropertyInput.h:23
Definition PropertyInputInt.h:16
Definition SpinBox.h:20
Definition Connector.h:8
rapidjson::Value JsonValue
Writable JSON value.
Definition JSON.h:27
rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > JsonAllocator
Allocator used for writing to JSON values.
Definition JSON.h:30