Back to index

scribus-ng  1.3.4.dfsg+svn20071115
multiprogressdialog.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 *   Copyright (C) 2005 by Craig Bradney                                   *
00009 *   cbradney@zip.com.au                                                   *
00010 *                                                                         *
00011 *   This program is free software; you can redistribute it and/or modify  *
00012 *   it under the terms of the GNU General Public License as published by  *
00013 *   the Free Software Foundation; either version 2 of the License, or     *
00014 *   (at your option) any later version.                                   *
00015 *                                                                         *
00016 *   This program is distributed in the hope that it will be useful,       *
00017 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00019 *   GNU General Public License for more details.                          *
00020 *                                                                         *
00021 *   You should have received a copy of the GNU General Public License     *
00022 *   along with this program; if not, write to the                         *
00023 *   Free Software Foundation, Inc.,                                       *
00024 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00025 ***************************************************************************/
00026 
00027 #ifndef MULTIPROGRESSDIALOG_H
00028 #define MULTIPROGRESSDIALOG_H
00029 
00030 #include "scribusapi.h"
00031 #include "multiprogressdialogbase.h"
00032 
00033 #include "scprogressbar.h"
00034 #include <qdialog.h>
00035 
00036 #include <qlabel.h>
00037 #include <qlayout.h>
00038 #include <qmap.h>
00039 #include <qpushbutton.h>
00040 #include <qstringlist.h>
00041 #include <qstring.h>
00042 #include <qvaluelist.h>
00043 
00044 
00045 class SCRIBUS_API MultiProgressDialog : public MultiProgressDialogBase
00046 {
00047        Q_OBJECT
00048 
00049        public:
00050               MultiProgressDialog(QWidget* parent=0, const char*name=0, bool modal=false, WFlags f=0);
00062               MultiProgressDialog(const QString& titleText, const QString & cancelButtonText, QWidget* parent=0, const char*name=0, bool modal=true, WFlags f=0);
00063               ~MultiProgressDialog();
00064               
00068               void removeExtraProgressBars();
00080               bool addExtraProgressBars(const QStringList &barsList, const QStringList &barsTexts, const QValueList<bool>& barsNumerical);
00087               bool setLabel(const QString &barName, const QString & newLabel);
00094               bool setTotalSteps(const QString &barName, int totalSteps);
00101               bool setProgress(const QString &barName, int progress);
00109               bool setProgress(const QString &barName, int progress, int totalSteps);
00114               void setOverallTotalSteps(int totalSteps);
00119               void setOverallProgress(int progress);
00125               void setOverallProgress(int progress, int totalSteps);
00134               bool setupBar(const QString &barName, const QString &barText, int progress, int totalSteps);
00139               void setCancelButtonText(const QString & cancelButtonText);
00140               
00141        protected:
00142               QStringList progressBarTitles;
00143               QMap<QString, ScProgressBar*> progressBars;
00144               QMap<QString, QLabel*> progressLabels;
00145 };
00146 
00147 #endif