23#include <QtWidgets/QMessageBox>
25#define MB_SAVEDISCARDCANCEL 0x00000009L
27class CFxMessageBoxImpl;
40 CFxMessageBox(QMessageBox::Icon icon,
const QString &title,
const QString &text,
41 QMessageBox::StandardButtons buttons = NoButton, QWidget *parent = 0,
42 Qt::WindowFlags
f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
43 CFxMessageBox(
const QString &title,
const QString &text, QMessageBox::Icon icon,
44 int button0,
int button1,
int button2,
46 Qt::WindowFlags
f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
56 void addButton(QAbstractButton *button, QMessageBox::ButtonRole role);
67 QPushButton *
addButton(
const QString &text, QMessageBox::ButtonRole role);
77 QPushButton *
addButton(QMessageBox::StandardButton button);
86 void setStandardButtons(StandardButtons buttons, QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
100 static QMessageBox::StandardButton
information(QWidget *parent,
const QString &title,
101 const QString &text, QMessageBox::StandardButtons buttons = Ok,
102 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
115 static QMessageBox::StandardButton
question(QWidget *parent,
const QString &title,
116 const QString &text, QMessageBox::StandardButtons buttons = Ok,
117 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
131 static QMessageBox::StandardButton
warning(QWidget *parent,
const QString &title,
132 const QString &text, QMessageBox::StandardButtons buttons = Ok,
133 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
147 static QMessageBox::StandardButton
critical(QWidget *parent,
const QString &title,
148 const QString &text, QMessageBox::StandardButtons buttons = Ok,
149 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
160 bool nativeEvent(
const QByteArray& eventType,
void *msg,
long *result )
override;
163 static QMessageBox::StandardButton showMessageBox(QMessageBox::Icon icon, QString title, QString text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton, QWidget *parent);
165 virtual void showEvent(QShowEvent *);
166 virtual void hideEvent(QHideEvent *);
168 QCursor m_PreviousCursor;
169 CFxMessageBoxImpl* m_pImpl;
static QMessageBox::StandardButton question(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)
QPushButton * addButton(QMessageBox::StandardButton button)
static QMessageBox::StandardButton critical(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)
bool event(QEvent *e) override
static QMessageBox::StandardButton information(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)
CFxMessageBox(const QString &title, const QString &text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget *parent=0, Qt::WindowFlags f=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint)
void setStandardButtons(StandardButtons buttons, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)
QPushButton * addButton(const QString &text, QMessageBox::ButtonRole role)
static QMessageBox::StandardButton warning(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=Ok, QMessageBox::StandardButton defaultButton=QMessageBox::NoButton)
CFxMessageBox(QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=NoButton, QWidget *parent=0, Qt::WindowFlags f=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint)
void addButton(QAbstractButton *button, QMessageBox::ButtonRole role)
CFxMessageBox(QWidget *parent=0)
bool nativeEvent(const QByteArray &eventType, void *msg, long *result) override