33 lines
807 B
C++
33 lines
807 B
C++
#pragma once
|
|||
|
|
#include <QWidget>
|
||
|
|
#include <QObject>
|
||
|
|
#include <QHBoxLayout>
|
||
|
|
#include <QApplication>
|
||
|
|
#include <iostream>
|
||
|
|
#include <QLabel>
|
||
|
|
#include <QPushButton>
|
||
|
|
#include <QTextEdit>
|
||
|
|
#include <QScopedPointer>
|
||
|
|
#pragma execution_character_set("utf-8")
|
||
|
|
|
||
|
|
class HMessageBox : public QWidget
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
HMessageBox(QWidget* parent = 0);
|
||
|
|
~HMessageBox();
|
||
|
|
|
||
|
|
void initWidget(QString info, int windowMode);
|
||
|
|
int static showMyMessageBox(QWidget* parent, const QString& contentText, int windowMode, bool isModelWindow = false);
|
||
|
|
private slots:
|
||
|
|
void clickOkButton();
|
||
|
|
void clickNoButton();
|
||
|
|
private:
|
||
|
|
int exec();
|
||
|
|
void closeEvent(QCloseEvent* event);
|
||
|
|
QTextEdit* infoLabel;
|
||
|
|
QPushButton* okButton;
|
||
|
|
QPushButton* noButton;
|
||
|
|
QEventLoop* m_eventLoop;
|
||
|
|
int clickResult;
|
||
|
|
};
|