diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-03-19 22:28:04 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-03-19 22:28:04 +0100 |
commit | 1705832febb86181e52222fdbfe87d8d2d0ba5b7 (patch) | |
tree | 6b289c02868a7d5a88703eee0042c419a8afeca4 /gui/dialogs/NotificationDialog.h | |
parent | 4623c1b34f35dd896a9ccacd9b982bca9dc0b880 (diff) | |
parent | 55e4cb6fb5ea59958ac0bc386b9df06476c1ddb4 (diff) | |
download | MultiMC-1705832febb86181e52222fdbfe87d8d2d0ba5b7.tar MultiMC-1705832febb86181e52222fdbfe87d8d2d0ba5b7.tar.gz MultiMC-1705832febb86181e52222fdbfe87d8d2d0ba5b7.tar.lz MultiMC-1705832febb86181e52222fdbfe87d8d2d0ba5b7.tar.xz MultiMC-1705832febb86181e52222fdbfe87d8d2d0ba5b7.zip |
Merge remote-tracking branch 'origin/feature_notif_65449324' into develop
Diffstat (limited to 'gui/dialogs/NotificationDialog.h')
-rw-r--r-- | gui/dialogs/NotificationDialog.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/gui/dialogs/NotificationDialog.h b/gui/dialogs/NotificationDialog.h new file mode 100644 index 00000000..b7980a98 --- /dev/null +++ b/gui/dialogs/NotificationDialog.h @@ -0,0 +1,44 @@ +#ifndef NOTIFICATIONDIALOG_H +#define NOTIFICATIONDIALOG_H + +#include <QDialog> + +#include "logic/updater/NotificationChecker.h" + +namespace Ui { +class NotificationDialog; +} + +class NotificationDialog : public QDialog +{ + Q_OBJECT + +public: + explicit NotificationDialog(const NotificationChecker::NotificationEntry &entry, QWidget *parent = 0); + ~NotificationDialog(); + + enum ExitCode + { + Normal, + DontShowAgain + }; + +protected: + void timerEvent(QTimerEvent *event); + +private: + Ui::NotificationDialog *ui; + + int m_dontShowAgainTime = 10; + int m_closeTime = 5; + + QString m_dontShowAgainText; + QString m_closeText; + +private +slots: + void on_dontShowAgainBtn_clicked(); + void on_closeBtn_clicked(); +}; + +#endif // NOTIFICATIONDIALOG_H |