Subversion Repositories Scribus

Rev

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

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