-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmessagewindow.h
56 lines (44 loc) · 1.11 KB
/
messagewindow.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
50
51
52
53
54
55
56
#ifndef MESSAGEWINDOW_H
#define MESSAGEWINDOW_H
#include "basewindow.h"
class TitleBar;
class Content;
class StatusBar;
class MessageWindow : public BaseWindow
{
Q_OBJECT
public:
static MessageWindow& GetInstance();
~MessageWindow();
TitleBar* GetTitleBar();
Content* GetContent();
StatusBar* GetStatusBar();
bool ShowMessage(QString title, QString content, bool isOkCancel = false);
protected:
void paintEvent(QPaintEvent *event);
bool eventFilter(QObject *obj, QEvent *event);
bool nativeEvent(const QByteArray &eventType, void *message, long *result);
void closeEvent(QCloseEvent * event);
private:
MessageWindow(QFrame *parent = 0);
void InitControl();
void LoadIniData();
void SaveIniData();
bool exec();
TitleBar *m_pTitleBar;
Content *m_pContent;
StatusBar *m_pStatusBar;
QEventLoop m_loop;
bool m_isAccept;
QLabel *m_pMessageLabel;
QLabel *m_pImageLabel;
QPushButton *m_pOKButton;
QPushButton *m_pCancelBbutton;
private slots:
void accept();
void reject();
signals:
void okMessageHidden(bool is_checked);
void msgChecked(bool is_checked, bool is_ok);
};
#endif //MESSAGEWINDOW_H