-
Notifications
You must be signed in to change notification settings - Fork 0
/
msgbox.h
34 lines (30 loc) · 871 Bytes
/
msgbox.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
#ifndef MSGBOX_H
#define MSGBOX_H
#include <QWidget>
#include <QString>
class QEventLoop;
class QGridLayout;
class MsgBox : public QWidget
{
Q_OBJECT
public:
explicit MsgBox(const QString &text,QWidget *parent = 0,int nMsgId = -1);
~MsgBox();
int exec();
static int Tip(QWidget * pParent,const QString &tittle,const QString &text);
static int Error(QWidget * pParent,const QString &tittle,const QString &text,int nErrorId);
static int Warning(QWidget * pParent,const QString &tittle,const QString &text);
void setVisible(bool visible);
QGridLayout * getContentLayout(){
return m_pContentLayout;
}
signals:
private:
static QList<int> * m_msgIdList;//to avoid multi popup same messageboxs.
int m_nMsgId;
public slots:
private:
QEventLoop * m_loop;
QGridLayout * m_pContentLayout;
};
#endif // MSGBOX_H