2014-03-15 18:48:29 +05:30
|
|
|
#ifndef NOTIFICATIONDIALOG_H
|
|
|
|
#define NOTIFICATIONDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
2015-02-09 06:21:14 +05:30
|
|
|
#include "notifications/NotificationChecker.h"
|
2014-03-15 18:48:29 +05:30
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class NotificationDialog;
|
|
|
|
}
|
|
|
|
|
|
|
|
class NotificationDialog : public QDialog
|
|
|
|
{
|
2018-07-15 18:21:05 +05:30
|
|
|
Q_OBJECT
|
2014-03-15 18:48:29 +05:30
|
|
|
|
|
|
|
public:
|
2018-07-15 18:21:05 +05:30
|
|
|
explicit NotificationDialog(const NotificationChecker::NotificationEntry &entry, QWidget *parent = 0);
|
|
|
|
~NotificationDialog();
|
2014-03-15 18:48:29 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
enum ExitCode
|
|
|
|
{
|
|
|
|
Normal,
|
|
|
|
DontShowAgain
|
|
|
|
};
|
2014-03-15 18:48:29 +05:30
|
|
|
|
|
|
|
protected:
|
2018-07-15 18:21:05 +05:30
|
|
|
void timerEvent(QTimerEvent *event);
|
2014-03-15 18:48:29 +05:30
|
|
|
|
|
|
|
private:
|
2018-07-15 18:21:05 +05:30
|
|
|
Ui::NotificationDialog *ui;
|
2014-03-15 18:48:29 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
int m_dontShowAgainTime = 10;
|
|
|
|
int m_closeTime = 5;
|
2014-03-15 18:48:29 +05:30
|
|
|
|
2018-07-15 18:21:05 +05:30
|
|
|
QString m_dontShowAgainText;
|
|
|
|
QString m_closeText;
|
2014-03-15 18:48:29 +05:30
|
|
|
|
|
|
|
private
|
|
|
|
slots:
|
2018-07-15 18:21:05 +05:30
|
|
|
void on_dontShowAgainBtn_clicked();
|
|
|
|
void on_closeBtn_clicked();
|
2014-03-15 18:48:29 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NOTIFICATIONDIALOG_H
|