#include <CustomLineEdit.hpp>
Definition at line 9 of file CustomLineEdit.hpp.
◆ CustomLineEdit()
dbe::CustomLineEdit::CustomLineEdit |
( |
QWidget * | parent = 0, |
|
|
bool | IsNull = true, |
|
|
bool | IsMulti = false ) |
|
explicit |
Include Qt Headers.
Include DBE
Definition at line 10 of file CustomLineEdit.cpp.
11 : QLineEdit ( parent ),
22{
23 connect ( this, SIGNAL ( textChanged ( QString ) ), this,
25 this->setFixedHeight ( 30 );
26
27}
void TryValidate(QString Dummy)
◆ ~CustomLineEdit()
dbe::CustomLineEdit::~CustomLineEdit |
( |
| ) |
|
◆ contextMenuEvent()
void dbe::CustomLineEdit::contextMenuEvent |
( |
QContextMenuEvent * | Event | ) |
|
|
protected |
◆ CreateActions()
void dbe::CustomLineEdit::CreateActions |
( |
| ) |
|
Definition at line 93 of file CustomLineEdit.cpp.
94{
95 Dec =
new QAction ( tr (
"Dec" ),
this );
96 Dec->setShortcutContext ( Qt::WidgetShortcut );
97 connect (
Dec, SIGNAL ( triggered() ),
this, SLOT (
EmitDecSlot() ) );
98 Dec->setCheckable (
true );
99 Dec->setChecked (
false );
101
102 Oct =
new QAction ( tr (
"Oct" ),
this );
103 Oct->setShortcutContext ( Qt::WidgetShortcut );
104 connect (
Oct, SIGNAL ( triggered() ),
this, SLOT (
EmitOctSlot() ) );
105 Oct->setCheckable (
true );
106 Oct->setChecked (
false );
108
109 Hex =
new QAction ( tr (
"Hex" ),
this );
110 Hex->setShortcutContext ( Qt::WidgetShortcut );
111 Hex->setCheckable (
true );
112 Hex->setChecked (
false );
113 connect (
Hex, SIGNAL ( triggered() ),
this, SLOT (
EmitHexSlot() ) );
115}
◆ DecChange
void dbe::CustomLineEdit::DecChange |
( |
| ) |
|
|
signal |
◆ EmitDecSlot
void dbe::CustomLineEdit::EmitDecSlot |
( |
| ) |
|
|
slot |
Definition at line 169 of file CustomLineEdit.cpp.
170{
171 Dec->setChecked (
true );
172 Oct->setChecked (
false );
173 Hex->setChecked (
false );
175}
◆ EmitHexSlot
void dbe::CustomLineEdit::EmitHexSlot |
( |
| ) |
|
|
slot |
Definition at line 185 of file CustomLineEdit.cpp.
186{
187 Dec->setChecked (
false );
188 Oct->setChecked (
false );
189 Hex->setChecked (
true );
191}
◆ EmitOctSlot
void dbe::CustomLineEdit::EmitOctSlot |
( |
| ) |
|
|
slot |
Definition at line 177 of file CustomLineEdit.cpp.
178{
179 Dec->setChecked (
false );
180 Oct->setChecked (
true );
181 Hex->setChecked (
false );
183}
◆ HexChange
void dbe::CustomLineEdit::HexChange |
( |
| ) |
|
|
signal |
◆ IsNullCheck()
bool dbe::CustomLineEdit::IsNullCheck |
( |
| ) |
|
◆ IsValid()
bool dbe::CustomLineEdit::IsValid |
( |
| ) |
|
◆ OctChange
void dbe::CustomLineEdit::OctChange |
( |
| ) |
|
|
signal |
◆ SetCheckDefault()
void dbe::CustomLineEdit::SetCheckDefault |
( |
bool | Default | ) |
|
◆ SetDefaultValue()
void dbe::CustomLineEdit::SetDefaultValue |
( |
QString | ValueDefault | ) |
|
◆ SetLoadedDefaultFlag()
void dbe::CustomLineEdit::SetLoadedDefaultFlag |
( |
bool | Loaded | ) |
|
Definition at line 78 of file CustomLineEdit.cpp.
79{
80 setProperty ( "loadedDefaults", Loaded );
81}
◆ SetMultiCheck()
void dbe::CustomLineEdit::SetMultiCheck |
( |
bool | IsMulti | ) |
|
◆ SetNullCheck()
void dbe::CustomLineEdit::SetNullCheck |
( |
bool | IsNull | ) |
|
Definition at line 37 of file CustomLineEdit.cpp.
38{
40
42 {
43 setPalette ( QApplication::palette ( this ) );
44 }
45}
◆ SetPopupMenu()
void dbe::CustomLineEdit::SetPopupMenu |
( |
| ) |
|
◆ SetValidator()
void dbe::CustomLineEdit::SetValidator |
( |
QValidator * | ValidatorSet | ) |
|
◆ StringValidated
void dbe::CustomLineEdit::StringValidated |
( |
| ) |
|
|
signal |
◆ TryValidate
void dbe::CustomLineEdit::TryValidate |
( |
QString | Dummy | ) |
|
|
slot |
Definition at line 117 of file CustomLineEdit.cpp.
118{
119 Q_UNUSED ( Dummy )
120
121 QString tmp_st = this->text();
122 int i = 0;
123
125 {
127
129 {
131 setToolTip ( QString ( "Field cannot be empty!" ) );
132 }
133
135 }
137 {
138 if ( (
Validator->validate ( tmp_st, i ) ) == QValidator::Acceptable )
139 {
141 this->setPalette ( QApplication::palette ( this ) );
142 setToolTip ( QString ( "This new object ID is unique" ) );
143 }
144 else if ( (
Validator->validate ( tmp_st, i ) ) == QValidator::Intermediate )
145 {
148 setToolTip ( QString ( "This UID is already used" ) );
149 }
150 }
152 {
154 setPalette ( QApplication::palette ( this ) );
155
157 {
159 }
160 else
161 {
162 this->setPalette ( QApplication::palette ( this ) );
163 }
164
166 }
167}
static QPalette AlertStatusBarPallete
static QPalette LoadedDefault
static QPalette WarningStatusBarPallete
◆ ValidateText()
void dbe::CustomLineEdit::ValidateText |
( |
| ) |
|
◆ ValueChanged
void dbe::CustomLineEdit::ValueChanged |
( |
| ) |
|
|
signal |
◆ CheckDefault
bool dbe::CustomLineEdit::CheckDefault |
|
private |
◆ ContextMenu
QMenu* dbe::CustomLineEdit::ContextMenu |
|
private |
◆ Dec
QAction* dbe::CustomLineEdit::Dec |
|
private |
◆ DefaultValue
QString dbe::CustomLineEdit::DefaultValue |
|
private |
◆ Hex
QAction* dbe::CustomLineEdit::Hex |
|
private |
◆ IsMultiValue
bool dbe::CustomLineEdit::IsMultiValue |
|
private |
◆ NullCheck
bool dbe::CustomLineEdit::NullCheck |
|
private |
◆ Oct
QAction* dbe::CustomLineEdit::Oct |
|
private |
◆ PopupMenu
bool dbe::CustomLineEdit::PopupMenu |
|
private |
◆ Valid
bool dbe::CustomLineEdit::Valid |
|
private |
◆ Validator
QValidator* dbe::CustomLineEdit::Validator |
|
private |
The documentation for this class was generated from the following files: