home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scmessagebox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-07-23  |  3.5 KB  |  50 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. /***************************************************************************
  8.     begin                : Oct 2005
  9.     copyright            : (C) 2005 by Craig Bradney
  10.     email                : cbradney@zip.com.au
  11.  ***************************************************************************/
  12.  
  13. /***************************************************************************
  14.  *                                                                         *
  15.  *   This program is free software; you can redistribute it and/or modify  *
  16.  *   it under the terms of the GNU General Public License as published by  *
  17.  *   the Free Software Foundation; either version 2 of the License, or     *
  18.  *   (at your option) any later version.                                   *
  19.  *                                                                         *
  20.  ***************************************************************************/
  21. #ifndef SCMESSAGEBOX_H
  22. #define SCMESSAGEBOX_H
  23.  
  24. #include <QMessageBox>
  25.  
  26. #include "scribusapi.h"
  27.  
  28. class SCRIBUS_API ScMessageBox : public QMessageBox
  29. {
  30.     Q_OBJECT
  31. public:
  32.     //Basic copies of the normal constructors
  33.     static int information ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 );
  34.     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 );
  35.     static int question ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1 = 0, int button2 = 0 );
  36.     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 );
  37.     static int warning ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 );
  38.     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 );
  39.     static int critical ( QWidget * parent, const QString & caption, const QString & text, int button0, int button1, int button2 = 0 );
  40.     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 );
  41.     
  42.     //Swap the values the buttons are passing in, return the number of buttons used
  43.     static int swapButtonValues(int &b0, int &b1, int &b2);
  44.     static int swapButtonValues(QString &b0Text, QString &b1Text, QString &b2Text, int &defaultButton, int &escapeButton);
  45.     //Swap the return values attained from the QMessageBox class so in main code we dont have to check for swapped buttons.
  46.     static int swapReturnValues(const int, const int, const int, const int, const int);
  47. };
  48.  
  49. #endif
  50.