Subversion Repositories Scribus

Rev

Rev 4038 | Rev 4783 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 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
*/
4028 cbradney 7
/***************************************************************************
8
*   Copyright (C) 2005 by Craig Bradney                                   *
9
*   cbradney@zip.com.au                                                   *
10
*                                                                         *
11
*   This program is free software; you can redistribute it and/or modify  *
12
*   it under the terms of the GNU General Public License as published by  *
13
*   the Free Software Foundation; either version 2 of the License, or     *
14
*   (at your option) any later version.                                   *
15
*                                                                         *
16
*   This program is distributed in the hope that it will be useful,       *
17
*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
18
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
19
*   GNU General Public License for more details.                          *
20
*                                                                         *
21
*   You should have received a copy of the GNU General Public License     *
22
*   along with this program; if not, write to the                         *
23
*   Free Software Foundation, Inc.,                                       *
24
*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
25
***************************************************************************/
26
 
27
#ifndef MULTIPROGRESSDIALOG_H
28
#define MULTIPROGRESSDIALOG_H
29
 
30
#include "multiprogressdialogbase.h"
31
 
32
#include <qprogressbar.h>
33
#include <qpushbutton.h>
34
#include <qlabel.h>
35
#include <qlayout.h>
36
#include <qstringlist.h>
37
#include <qstring.h>
38
#include <qdialog.h>
39
#include <qmap.h>
40
 
41
class MultiProgressDialog : public MultiProgressDialogBase
42
{
43
        Q_OBJECT
44
 
45
        public:
46
                MultiProgressDialog(QWidget* parent=0, const char*name=0, bool modal=false, WFlags f=0);
47
                MultiProgressDialog(const QString& titleText, const QString & cancelButtonText, QWidget* parent=0, const char*name=0, bool modal=true, WFlags f=0);
48
                ~MultiProgressDialog();
49
 
50
                void removeExtraProgressBars();
51
                bool addExtraProgressBars(const QStringList &barsList, const QStringList &barsTexts);
52
                bool setLabel(const QString &barName, const QString & newLabel);
53
                bool setTotalSteps(const QString &barName, int totalSteps);
54
                bool setProgress(const QString &barName, int progress);
55
                bool setProgress(const QString &barName, int progress, int totalSteps);
4038 cbradney 56
                void setOverallTotalSteps(int totalSteps);
57
                void setOverallProgress(int progress);
58
                void setOverallProgress(int progress, int totalSteps);
4028 cbradney 59
                bool setupBar(const QString &barName, const QString &barText, int progress, int totalSteps);
60
                void setCancelButtonText(const QString & cancelButtonText);
61
 
62
        protected:
63
                QStringList progressBarTitles;
64
                QMap<QString, QProgressBar*> progressBars;
65
                QMap<QString, QLabel*> progressLabels;
66
};
67
 
68
#endif