56 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate)
57 Q_PROPERTY(QQuickItem *layout READ layout WRITE setLayout)
58 Q_PROPERTY(
int capacity READ capacity WRITE setCapacity)
59 Q_PROPERTY(
int count READ count NOTIFY countChanged)
60#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
61 QML_UNCREATABLE(
"MessageManager Attached.")
69 QQuickWindow *window()
const;
70 QQmlComponent *delegate()
const;
71 void setDelegate(QQmlComponent *delegate);
72 QQuickItem *layout()
const;
73 void setLayout(QQuickItem * layout);
75 void setCapacity(
int capacity);
77 QList<FloatingMessageContainer *> messages(
const QString &msgId)
const;
82 bool sendMessage(
const QString &content,
const QString &iconName = QString(),
int duration = 4000,
const QString &msgId = QString());
83 bool sendMessage(QQmlComponent *delegate,
const QVariant &message,
int duration = 4000,
const QString &msgId = QString());
84 void close(DTK_QUICK_NAMESPACE::FloatingMessageContainer *message);
85 void close(
const QString &msgId);
91 virtual void timerEvent(QTimerEvent *e)
override;
95 void ensureDelegate();
96 bool reachedUpperLimit()
const;
98 void stackBeforeMessage(QQuickItem *message);
103 QQmlComponent *m_delegate;
104 QQuickItem *m_layout;
105 QList<QPair<int, FloatingMessageContainer *>> m_timers;