2#include <State/MessageListSerialization.hpp>
3#include <State/Widgets/AddressValidator.hpp>
5#include <score/model/Skin.hpp>
6#include <score/widgets/ValidationPalette.hpp>
8#include <Explorer/Explorer/DeviceExplorerModel.hpp>
11#include <QGuiApplication>
23template <
class Val
idator_T,
class Parent_T>
33 connect(
this, &QLineEdit::textChanged,
this, &AddressLineEditBase::updatePalette);
36 void updatePalette(
const QString& str)
41 if(m_validator.validate(s, i) == QValidator::State::Acceptable)
46 auto addr = State::parseAddressAccessor(s);
48 if(!Device::try_getNodeFromAddress(m_model->rootNode(), addr->address))
54 validity = score::InputValidity::Invalid;
60 void dragEnterEvent(QDragEnterEvent* ev)
override
62 static_cast<Parent_T*
>(parent())->dragEnterEvent(ev);
64 void dropEvent(QDropEvent* ev)
override
66 static_cast<Parent_T*
>(parent())->dropEvent(ev);
69 Validator_T m_validator;
73template <
typename Parent_T>
81template <
typename Parent_T>
Definition NodeBasedItemModel.hpp:18
Definition AddressLineEdit.hpp:84
The AddressLineEdit class.
Definition AddressLineEdit.hpp:25
Definition AddressLineEdit.hpp:76
Definition AddressValidator.hpp:28
The AddressValidator class.
Definition AddressValidator.hpp:18
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
void setInputValidity(QWidget &w, InputValidity v)
Tint a widget to flag what it holds, and keep the tint skin-aware.
Definition ValidationPalette.cpp:36
@ Valid
No tint: the widget inherits the application palette.
@ Unknown
Well-formed but does not resolve to anything.