Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
InformationIdEdit.h
Go to the documentation of this file.
1#pragma once
2#include <QLineEdit>
3#include <QtUiPlugin/QDesignerExportWidget>
5#include <gii/global.h>
7#include <gii/qt/Namespace.h>
9
10namespace sf
11{
12
17 : public QLineEdit
18 , public ObjectExtension
19{
20 public:
21 // Declarations in these macros are made private.
22 Q_OBJECT
23 // Need full namespace for this property macro.
25
26 public:
30 explicit InformationIdEdit(QWidget* parent = nullptr);
31
36
41
48 bool selectDialog(QWidget* parent = nullptr);
49
53 bool isRequiredProperty(const QString& name) override;
54
59
63 [[nodiscard]] gii::TypeId getTypeId() const;
64
65 protected:
69 void focusOutEvent(QFocusEvent* event) override;
70
71 protected:
75 void resizeEvent(QResizeEvent*) override;
76
77 private:
81 QToolButton* btnOpenDialog;
85 gii::TypeId _typeId;
86};
87
88}// namespace sf
bool isRequiredProperty(const QString &name) override
Overridden from base class sf::ObjectExtension.
void setTypeId(gii::TypeId typeId)
Set the type of id set with setId().
gii::IdType getId()
Gets the id from the text in the line edit.
void focusOutEvent(QFocusEvent *event) override
overridden from base class.
InformationIdEdit(QWidget *parent=nullptr)
void setId(gii::IdType id)
Sets the id in the line edit.
sf::gii::TypeId typeId
Definition InformationIdEdit.h:24
gii::TypeId getTypeId() const
Gets the type of id set with setId().
void resizeEvent(QResizeEvent *) override
Overridden from base class QLineEdit.
bool selectDialog(QWidget *parent=nullptr)
Opens the id selection dialog.
ObjectExtension(QObject *object)
Protected constructor only. Inlined so no external libs are need for designer.
#define _GII_CLASS
Definition gii/global.h:38
TypeId
Types of id's.
Definition gii/qt/Namespace.h:22
InformationTypes::id_type IdType
Short type definition for Qt code.
Definition gii/qt/Namespace.h:16
Definition Application.h:10