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
28 public:
32 explicit VariableWidgetBase(QWidget* parent, QObject* self);
33
37 ~VariableWidgetBase() override;
38
42 void addPropertyPages(sf::PropertySheetDialog* sheet) override;
43
47 void setId(gii::IdType id);
48
52 [[nodiscard]] gii::IdType getId() const;
53
57 [[nodiscard]] Variable& getVariable() const;
58
62 void setConverted(bool) const;
63
67 [[nodiscard]] bool getConverted() const;
68
72 void setReadOnly(bool);
73
77 [[nodiscard]] bool getReadOnly() const;
78
82 bool isRequiredProperty(const QString& name) override;
83
89 static const char* propertyNameEditorObject();
90
91 protected:
96 virtual void applyReadOnly(bool yn) = 0;
97
101 struct PrivateBase;
105 PrivateBase* _p{nullptr};
106
107 private:
108 typedef QWidget base_type;
109};
110
111}// 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 Namespace.h:24
Definition Application.h:10