| 1 | // For license of this file, see <project-root-folder>/LICENSE.md. |
| 2 | |
| 3 | #ifndef SINGLENOTIFICATIONEDITOR_H |
| 4 | #define SINGLENOTIFICATIONEDITOR_H |
| 5 | |
| 6 | #include "miscellaneous/notification.h" |
| 7 | |
| 8 | #include "ui_singlenotificationeditor.h" |
| 9 | |
| 10 | #include <QGroupBox> |
| 11 | |
| 12 | class SingleNotificationEditor : public QGroupBox { |
| 13 | Q_OBJECT |
| 14 | |
| 15 | public: |
| 16 | explicit SingleNotificationEditor(const Notification& notification, QWidget* parent = nullptr); |
| 17 | |
| 18 | Notification notification() const; |
| 19 | |
| 20 | signals: |
| 21 | void notificationChanged(); |
| 22 | |
| 23 | private slots: |
| 24 | void selectSoundFile(); |
| 25 | void playSound(); |
| 26 | |
| 27 | private: |
| 28 | void loadNotification(const Notification& notification); |
| 29 | |
| 30 | private: |
| 31 | Ui::SingleNotificationEditor m_ui; |
| 32 | Notification::Event m_notificationEvent; |
| 33 | }; |
| 34 | |
| 35 | #endif // SINGLENOTIFICATIONEDITOR_H |