2 #include "AddressValidator.hpp"
4 #include <State/MessageListSerialization.hpp>
5 #include <State/Widgets/AddressValidator.hpp>
19 template <
class Val
idator_T,
class Parent_T>
28 connect(
this, &QLineEdit::textChanged,
this, [&](
const QString& str) {
31 QPalette palette{this->palette()};
32 if(m_validator.validate(s, i) == QValidator::State::Acceptable)
34 palette.setColor(QPalette::Base, QColor{
"#161514"});
35 palette.setColor(QPalette::Light, QColor{
"#c58014"});
36 palette.setColor(QPalette::Midlight, QColor{
"#161514"});
40 palette.setColor(QPalette::Base, QColor{
"#300000"});
41 palette.setColor(QPalette::Light, QColor{
"#660000"});
42 palette.setColor(QPalette::Midlight, QColor{
"#500000"});
44 this->setPalette(palette);
49 void dragEnterEvent(QDragEnterEvent* ev)
override
51 static_cast<Parent_T*
>(parent())->dragEnterEvent(ev);
53 void dropEvent(QDropEvent* ev)
override
55 static_cast<Parent_T*
>(parent())->dropEvent(ev);
58 Validator_T m_validator;
61 template <
typename Parent_T>
68 template <
typename Parent_T>
Definition: AddressLineEdit.hpp:71
The AddressLineEdit class.
Definition: AddressLineEdit.hpp:21
Definition: AddressLineEdit.hpp:63
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33