aboutsummaryrefslogtreecommitdiff
path: root/VMProtect/message_dialog.h
diff options
context:
space:
mode:
authorjmpoep <OriginalEntryPoint@qq.com>2023-12-07 16:51:07 +0800
committerjmpoep <OriginalEntryPoint@qq.com>2023-12-07 16:51:07 +0800
commit28008a746a31abb7909dd86cb0cd413ac8943b0b (patch)
treea30b74b8cad548048c3c1551d652828ab76fa9bd /VMProtect/message_dialog.h
downloadvmprotect-3.5.1-master.tar
vmprotect-3.5.1-master.tar.gz
vmprotect-3.5.1-master.tar.bz2
vmprotect-3.5.1-master.zip
first commitHEADmaster
Diffstat (limited to 'VMProtect/message_dialog.h')
-rw-r--r--VMProtect/message_dialog.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/VMProtect/message_dialog.h b/VMProtect/message_dialog.h
new file mode 100644
index 0000000..520fc00
--- /dev/null
+++ b/VMProtect/message_dialog.h
@@ -0,0 +1,31 @@
+#ifndef MESSAGE_DIALOG_H
+#define MESSAGE_DIALOG_H
+
+class MessageDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ MessageDialog(QMessageBox::Icon icon, const QString &text,
+ QMessageBox::StandardButtons buttons = QMessageBox::NoButton, QWidget *parent = 0);
+ static QMessageBox::StandardButton information(QWidget *parent,
+ const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
+ static QMessageBox::StandardButton question(QWidget *parent,
+ const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
+ static QMessageBox::StandardButton warning(QWidget *parent,
+ const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
+ static QMessageBox::StandardButton critical(QWidget *parent,
+ const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
+ QAbstractButton *clickedButton() const { return clickedButton_; }
+ void setDefaultButton(QPushButton *button);
+ QAbstractButton *defaultButton() const { return defaultButton_; }
+private slots:
+ void buttonClicked(QAbstractButton *button);
+private:
+ static QMessageBox::StandardButton showMessageBox(QWidget *parent, QMessageBox::Icon icon,
+ const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton);
+ QDialogButtonBox *buttonBox_;
+ QAbstractButton *clickedButton_;
+ QAbstractButton *defaultButton_;
+};
+
+#endif \ No newline at end of file