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>
4
#include <
gii/gen/InformationBase.h
>
5
#include <
gii/global.h
>
6
#include <
gii/qt/InformationSelectDialog.h
>
7
#include <
gii/qt/Namespace.h
>
8
#include <
misc/qt/ObjectExtension.h
>
9
10
namespace
sf
11
{
12
16
class
QDESIGNER_WIDGET_EXPORT
InformationIdEdit
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.
24
Q_PROPERTY(
sf::gii::TypeId
typeId READ getTypeId WRITE setTypeId)
25
26
public
:
30
explicit
InformationIdEdit
(QWidget* parent =
nullptr
);
31
35
void
setId
(
gii::IdType
id
);
36
40
gii::IdType
getId
();
41
48
bool
selectDialog
(QWidget* parent =
nullptr
);
49
53
bool
isRequiredProperty
(
const
QString& name)
override
54
{
55
return
true
;
56
};
57
61
void
setTypeId
(
gii::TypeId
typeId);
62
66
[[nodiscard]]
gii::TypeId
getTypeId
()
const
;
67
68
protected
:
72
void
focusOutEvent
(QFocusEvent* event)
override
;
73
74
protected
:
78
void
resizeEvent
(QResizeEvent*)
override
;
79
80
private
:
84
QToolButton* btnOpenDialog;
88
gii::TypeId
_typeId;
89
};
90
91
}
// namespace sf
InformationBase.h
InformationSelectDialog.h
Namespace.h
ObjectExtension.h
sf::InformationIdEdit
Line edit having a button.
Definition
InformationIdEdit.h:19
sf::InformationIdEdit::isRequiredProperty
bool isRequiredProperty(const QString &name) override
Overridden from base class sf::ObjectExtension.
Definition
InformationIdEdit.h:53
sf::InformationIdEdit::setTypeId
void setTypeId(gii::TypeId typeId)
Set the type of id set with setId().
sf::InformationIdEdit::getId
gii::IdType getId()
Gets the Id from the text in the line edit.
sf::InformationIdEdit::focusOutEvent
void focusOutEvent(QFocusEvent *event) override
overridden from base class.
sf::InformationIdEdit::InformationIdEdit
InformationIdEdit(QWidget *parent=nullptr)
sf::InformationIdEdit::setId
void setId(gii::IdType id)
Sets the id in the line edit.
sf::InformationIdEdit::getTypeId
gii::TypeId getTypeId() const
Gets the type of id set with setId().
sf::InformationIdEdit::resizeEvent
void resizeEvent(QResizeEvent *) override
Overridden from base class QLineEdit.
sf::InformationIdEdit::selectDialog
bool selectDialog(QWidget *parent=nullptr)
Opens the Id selection dialog.
sf::ObjectExtension
Interface class to multiple inherit when the sf::FormWriter class needs to be restricted in writing o...
Definition
ObjectExtension.h:17
global.h
sf::gii::IdType
InformationTypes::id_type IdType
Short type definition for Qt code.
Definition
Namespace.h:16
sf::gii::TypeId
TypeId
Types of id's.
Definition
Namespace.h:22
sf
Definition
Application.h:10
src
com
gii
qt
InformationIdEdit.h
Generated by
1.9.8