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 );
100 ContextMenu->addAction ( Dec );
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 );
107 ContextMenu->addAction ( Oct );
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() ) );
114 ContextMenu->addAction ( Hex );
121 QString tmp_st = this->text();
124 if ( tmp_st.isEmpty() && NullCheck )
131 setToolTip ( QString (
"Field cannot be empty!" ) );
134 emit StringValidated();
136 else if ( Validator != 0 )
138 if ( ( Validator->validate ( tmp_st, i ) ) == QValidator::Acceptable )
141 this->setPalette ( QApplication::palette (
this ) );
142 setToolTip ( QString (
"This new object ID is unique" ) );
144 else if ( ( Validator->validate ( tmp_st, i ) ) == QValidator::Intermediate )
148 setToolTip ( QString (
"This UID is already used" ) );
151 else if ( Validator == 0 )
154 setPalette ( QApplication::palette (
this ) );
156 if ( tmp_st == DefaultValue && CheckDefault )
162 this->setPalette ( QApplication::palette (
this ) );
165 emit StringValidated();