Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
VariableWidgetBase.h
Go to the documentation of this file.
1#pragma once
2#include <QFrame>
3#include <QtUiPlugin/QDesignerExportWidget>
4#include <gii/qt/Namespace.h>
6
7namespace sf
8{
9
13class Variable;
14
19 : public QWidget
20 , public ObjectExtension
21{
22 Q_OBJECT
23 Q_PROPERTY(qulonglong idVariable READ getId WRITE setId)
24 Q_PROPERTY(bool converted READ getConverted WRITE setConverted)
25 Q_PROPERTY(bool readOnly READ getReadOnly WRITE setReadOnly)
26 Q_PROPERTY(bool useTemporary READ isTemporary WRITE setTemporary)
27
28 public:
32 explicit VariableWidgetBase(QWidget* parent, QObject* self);
33
37 ~VariableWidgetBase() override;
38
42 void addPropertyPages(PropertySheetDialog* sheet) override;
43
47 void setId(gii::IdType id);
48
52 gii::IdType getId() const;
53
57 Variable& getVariable() const;
58
62 void setConverted(bool) const;
63
67 bool getConverted() const;
68
72 void setReadOnly(bool);
73
77 bool getReadOnly() const;
78
82 bool isTemporary() const;
83
87 void setTemporary(bool);
88
92 bool isRequiredProperty(const QString& name) override;
93
98 static const char* propertyNameEditorObject();
99
100 Q_SIGNALS:
104 void valueChange(QWidget* widget);
105
106 protected:
111 virtual void applyReadOnly(bool yn) = 0;
112
116 class PrivateBase;
120 PrivateBase* _p{nullptr};
121
122 private:
123 typedef QWidget base_type;
124};
125
126}// namespace sf
Interface class to multiple inherit when the sf::FormWriter class needs to be restricted in writing o...
Definition ObjectExtension.h:17
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
Base class for sf::Variable based widgets.
Definition VariableWidgetBase.h:21
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
#define _GII_CLASS
Definition gii/global.h:38
@ Variable
Type of the id is a variable.
Definition gii/qt/Namespace.h:25
Definition Application.h:10