Scribus
Open source desktop publishing at your fingertips
ScMessageBox Class Reference

This class provides alternate versions of QMessageBox functions that write to log files when Scribus does not have a GUI. This class is identical to QMessageBox except that provides an optional default batch button. In batch mode, functions return the default batch button when it is not NoButton, otherwise they return the default button when it is not NoButton, otherwise they return one of the standard buttons. If a dialog asks "Are you sure that you want to do this?", the default button can be No to keep users from accidentally destroying data, while the batch button can be Yes to allow scripts to do what they need. This class does not include QMessageBox functions marked obsolete in Qt5. Use non-obsolete functions instead. More...

#include <scmessagebox.h>

Inheritance diagram for ScMessageBox:
Collaboration diagram for ScMessageBox:

Public Member Functions

 ScMessageBox (QWidget *parent=0)
 
 ScMessageBox (QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::NoButton, QWidget *parent=0, Qt::WindowFlags flags=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint)
 
int exec ()
 
QAbstractButton * clickedButton () const
 
void setDefaultBatchButton (QPushButton *button)
 
void setDefaultBatchButton (StandardButton button)
 

Static Public Member Functions

static QMessageBox::StandardButton information (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton, StandardButton defaultBatchButton=NoButton)
 
static QMessageBox::StandardButton question (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=StandardButtons(Yes|No), StandardButton defaultButton=NoButton, StandardButton defaultBatchButton=NoButton)
 
static QMessageBox::StandardButton warning (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton, StandardButton defaultBatchButton=NoButton)
 
static QMessageBox::StandardButton critical (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton, StandardButton defaultBatchButton=NoButton)
 
static void about (QWidget *parent, const QString &title, const QString &text)
 
static void aboutQt (QWidget *parent, const QString &title=QString())
 

Detailed Description

This class provides alternate versions of QMessageBox functions that write to log files when Scribus does not have a GUI. This class is identical to QMessageBox except that provides an optional default batch button. In batch mode, functions return the default batch button when it is not NoButton, otherwise they return the default button when it is not NoButton, otherwise they return one of the standard buttons. If a dialog asks "Are you sure that you want to do this?", the default button can be No to keep users from accidentally destroying data, while the batch button can be Yes to allow scripts to do what they need. This class does not include QMessageBox functions marked obsolete in Qt5. Use non-obsolete functions instead.


The documentation for this class was generated from the following files: