21 #ifndef SCMESSAGEBOX_H
22 #define SCMESSAGEBOX_H
24 #include <QMessageBox>
26 #include "scribusapi.h"
48 ScMessageBox(QMessageBox::Icon icon,
const QString &title,
const QString &text,
49 QMessageBox::StandardButtons buttons = QMessageBox::NoButton, QWidget *parent = 0,
50 Qt::WindowFlags flags = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
52 QAbstractButton *clickedButton()
const;
53 void setDefaultBatchButton(QPushButton *button);
54 void setDefaultBatchButton(StandardButton button);
57 static QMessageBox::StandardButton information(QWidget *parent,
const QString &title,
const QString &text,
58 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton, StandardButton defaultBatchButton = NoButton);
60 static QMessageBox::StandardButton question(QWidget *parent,
const QString &title,
const QString &text,
61 StandardButtons buttons = StandardButtons(Yes | No), StandardButton defaultButton = NoButton, StandardButton defaultBatchButton = NoButton);
63 static QMessageBox::StandardButton warning(QWidget *parent,
const QString &title,
const QString &text,
64 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton, StandardButton defaultBatchButton = NoButton);
66 static QMessageBox::StandardButton critical(QWidget *parent,
const QString &title,
const QString &text,
67 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton, StandardButton defaultBatchButton = NoButton);
69 static void about(QWidget *parent,
const QString &title,
const QString &text);
70 static void aboutQt(QWidget *parent,
const QString &title = QString());
75 QPushButton *defaultBatchPushButton;
76 StandardButton defaultBatchStandardButton;
79 void initScMessageBox(
void);
82 static QMessageBox::StandardButton findDefaultButton(QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton, StandardButton defaultBatchButton);
This class provides alternate versions of QMessageBox functions that write to log files when Scribus ...
Definition: scmessagebox.h:41