16class LIBDTKWIDGETSHARED_EXPORT
DAlertControl :
public QObject,
public DTK_CORE_NAMESPACE::DObject
21 Q_PROPERTY(
bool alert READ isAlert WRITE setAlert NOTIFY alertChanged)
22 Q_PROPERTY(QColor alertColor READ alertColor WRITE setAlertColor)
25 explicit
DAlertControl(QWidget *target, QObject *parent =
nullptr);
28 void setAlert(
bool isAlert);
30 void setAlertColor(QColor c);
31 QColor alertColor() const;
32 QColor defaultAlertColor() const;
33 void setMessageAlignment(Qt::Alignment alignment);
34 Qt::Alignment messageAlignment() const;
35 void showAlertMessage(const QString &text,
int duration = 3000);
36 void showAlertMessage(const QString &text, QWidget *follower,
int duration = 3000);
37 void hideAlertMessage();
40 void alertChanged(
bool alert) const;
44 bool eventFilter(QObject *watched, QEvent *event) override;