Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

scmessagebox.h

Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008     begin                : Oct 2005
00009     copyright            : (C) 2005 by Craig Bradney
00010     email                : cbradney@zip.com.au
00011  ***************************************************************************/
00012 
00013 /***************************************************************************
00014  *                                                                         *
00015  *   This program is free software; you can redistribute it and/or modify  *
00016  *   it under the terms of the GNU General Public License as published by  *
00017  *   the Free Software Foundation; either version 2 of the License, or     *
00018  *   (at your option) any later version.                                   *
00019  *                                                                         *
00020  ***************************************************************************/
00021 #ifndef SCMESSAGEBOX_H
00022 #define SCMESSAGEBOX_H
00023 
00024 #include <QMessageBox>
00025 
00026 #include "scribusapi.h"
00027 
00028 class SCRIBUS_API ScMessageBox : public QMessageBox
00029 {
00030     Q_OBJECT
00031 public:
00032     //Basic copies of the normal constructors
00033     static int information ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 );
00034     static int information ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 );
00035     static int question ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 );
00036     static int question ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 );
00037     static int warning ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 );
00038     static int warning ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 );
00039     static int critical ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 );
00040     static int critical ( QWidget * parent, const QString & caption, const QString & text, const QString & button0Text = QString::null, const QString & button1Text = QString::null, const QString & button2Text = QString::null, int defaultButtonNumber = 0, int escapeButtonNumber = -1 );
00041     
00042     //Swap the values the buttons are passing in, return the number of buttons used
00043     static int swapButtonValues(int &b0, int &b1, int &b2);
00044     static int swapButtonValues(QString &b0Text, QString &b1Text, QString &b2Text, int &defaultButton, int &escapeButton);
00045     //Swap the return values attained from the QMessageBox class so in main code we dont have to check for swapped buttons.
00046     static int swapReturnValues(const int, const int, const int, const int, const int);
00047 };
00048 
00049 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.