summaryrefslogtreecommitdiffstats
path: root/application/dialogs/NotificationDialog.h
blob: e1cbb9fa1c805dc670fe9726404c6ad0014819a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef NOTIFICATIONDIALOG_H
#define NOTIFICATIONDIALOG_H

#include <QDialog>

#include "notifications/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