123456789101112131415161718192021222324252627282930313233343536373839 |
- #pragma once
- #include <QObject>
- class Notification : public QObject
- {
- Q_PROPERTY(NotificationType type READ type WRITE setType NOTIFY typeChanged)
- Q_OBJECT
- public:
- enum NotificationType {
- Stackable,
- Progress,
- BackgroundProgress,
- WarningLog
- };
- explicit Notification(QObject *parent = nullptr);
- NotificationType type() const
- {
- return m_type;
- }
- signals:
- void typeChanged(NotificationType type);
- public slots:
- void setType(NotificationType type)
- {
- if (m_type == type)
- return;
- m_type = type;
- emit typeChanged(m_type);
- }
- private:
- NotificationType m_type;
- };
|