OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PropertyInputString.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// OpenTwin header
10
11// Qt header
12#include <QtCore/qstring.h>
13
14namespace ot {
15
16 class LineEdit;
17
19 Q_OBJECT
21 public:
22 PropertyInputString(const QString& _text = QString());
23 virtual ~PropertyInputString();
24
25 virtual void addPropertyInputValueToJson(ot::JsonValue& _object, const char* _memberNameValue, ot::JsonAllocator& _allocator) override;
26 virtual QVariant getCurrentValue(void) const override;
27 virtual QWidget* getQWidget(void) override;
28 virtual const QWidget* getQWidget(void) const override;
29 virtual Property* createPropertyConfiguration(void) const override;
30 virtual bool setupFromConfiguration(const Property* _configuration) override;
31 virtual void focusPropertyInput(void) override;
32
33 void setText(const QString& _text);
34 const QString& getCurrentText(void) const { return m_text; };
35
36 private Q_SLOTS:
37 void lclValueChanged(void);
38
39 private:
40 LineEdit* m_lineEdit;
41 QString m_text;
42 };
43
44}
#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 PropertyInputString.h:18
const QString & getCurrentText(void) const
Definition PropertyInputString.h:34
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