forked from vell001/VFeiQ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MessageDialog.h
49 lines (41 loc) · 1.12 KB
/
MessageDialog.h
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
45
46
47
48
49
#ifndef MESSAGEDIALOG_H
#define MESSAGEDIALOG_H
#include <QDialog>
#include <QTimer>
#include <QShowEvent>
#include <QIcon>
#include <QDesktopWidget>
#include <QDebug>
#include <QTime>
#include <QHash>
#include <QUuid>
namespace Ui {
class MessageDialog;
}
class MessageDialog : public QDialog
{
Q_OBJECT
public:
explicit MessageDialog(QWidget *parent = 0);
explicit MessageDialog(const QString & title, const QString & message, const QIcon &icon = QIcon(),
int millisecondsTimeoutHint = 3000, const QUuid &uuid = QUuid::createUuid(), QWidget *parent = 0);
~MessageDialog();
QUuid getUuid();
void setUuid(const QUuid &uuid);
protected:
virtual void showEvent ( QShowEvent * event );
// virtual void closeEvent ( QCloseEvent * e );
signals:
void accepted(QUuid);
void rejected(QUuid);
private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
private:
Ui::MessageDialog *ui;
QTimer mTimer;
int millisecondsTimeoutHint;
QUuid uuid;
void setPosition();
};
#endif // MESSAGEDIALOG_H