sneedmc/launcher/dialogs/NotificationDialog.h

45 lines
778 B
C
Raw Normal View History

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