9 #include "ui_validationindicator.h"
18 namespace swift::gui::editors
30 m_resetTimer.
start(ResetInterval);
38 this->setBackgroundColor(
"green");
39 ui->lbl_Icon->setPixmap(CIcons::tick16());
45 this->setBackgroundColor(
"red");
46 ui->lbl_Icon->setPixmap(CStatusMessage::convertToIcon(CStatusMessage::SeverityError));
52 this->setBackgroundColor(
"yellow");
53 ui->lbl_Icon->setPixmap(CStatusMessage::convertToIcon(CStatusMessage::SeverityWarning));
58 this->setBackgroundColor(
"");
59 ui->lbl_Icon->clear();
82 void CValidationIndicator::setBackgroundColor(
const QString &colorName)
88 const QString s(
"background-color: %1; background-image: url(:/own/icons/own/transparent1px.png);");
90 m_resetTimer.
start(ResetInterval);
static bool useStyleSheetInDerivedWidget(QWidget *derivedWidget, QStyle::PrimitiveElement element=QStyle::PE_Widget)
Use style sheets in derived widgets.
Indication state of validation.
void setState(bool ok)
Ok or failed validation?
void passed()
Validation passed.
void warnings()
Passed with warnings.
void failed()
Validation failed.
virtual void paintEvent(QPaintEvent *paintEvent)
void clear()
Cleared state.
~CValidationIndicator()
Destructor.
Status messages, e.g. from Core -> GUI.
bool hasWarningMessages() const
Warning messages.
bool hasErrorMessages() const
Error messages.
Free functions in swift::misc.
void setFrameShadow(QFrame::Shadow)
void setFrameStyle(int style)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
void setObjectName(QAnyStringView name)
bool isEmpty() const const