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 <QObject>
4#include <QtUiPlugin/QDesignerExportWidget>
5#include <gii/qt/Namespace.h>
7
8namespace sf
9{
10
14class Variable;
15
19class QDESIGNER_WIDGET_EXPORT VariableWidgetBase
20 : public QWidget
21 , public ObjectExtension
22{
23 Q_OBJECT
24 Q_PROPERTY(qulonglong idVariable READ getId WRITE setId)
25 Q_PROPERTY(bool converted READ getConverted WRITE setConverted)
26 Q_PROPERTY(bool readOnly READ getReadOnly WRITE setReadOnly)
27 Q_PROPERTY(bool useTemporary READ isTemporary WRITE setTemporary)
28
29 public:
33 explicit VariableWidgetBase(QWidget* parent, QObject* self);
34
38 ~VariableWidgetBase() override;
39
43 void addPropertyPages(sf::PropertySheetDialog* sheet) override;
44
48 void setId(gii::IdType id);
49
53 [[nodiscard]] gii::IdType getId() const;
54
58 [[nodiscard]] Variable& getVariable() const;
59
63 void setConverted(bool) const;
64
68 [[nodiscard]] bool getConverted() const;
69
73 void setReadOnly(bool);
74
78 [[nodiscard]] bool getReadOnly() const;
79
83 [[nodiscard]] bool isTemporary() const;
84
88 void setTemporary(bool);
89
93 bool isRequiredProperty(const QString& name) override;
94
99 static const char* propertyNameEditorObject();
100
101 protected:
106 virtual void applyReadOnly(bool yn) = 0;
107
111 struct PrivateBase;
115 PrivateBase* _p{nullptr};
116
117 private:
118 typedef QWidget base_type;
119};
120
121}// 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:14
Base class for sf::Variable based widgets.
Definition VariableWidgetBase.h:22
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
@ Variable
Definition gii/qt/Namespace.h:24
Definition Application.h:10