1/****************************************************************************
2**
3** Copyright (C) 2005-2007 Ralf Habacker. All rights reserved.
4**
5** This file is part of the KDE installer for windows
6**
7** This library is free software; you can redistribute it and/or
8** modify it under the terms of the GNU Library General Public
9** License version 2 as published by the Free Software Foundation.
10**
11** This library is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14** Library General Public License for more details.
15**
16** You should have received a copy of the GNU Library General Public License
17** along with this library; see the file COPYING.LIB. If not, write to
18** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19** Boston, MA 02110-1301, USA.
20**
21****************************************************************************/
22
23#ifndef INSTALLERPROGRESS_H
24#define INSTALLERPROGRESS_H
25
26#include "downloaderprogress.h"
27
28#ifdef USE_GUI
29
30class InstallerProgress : public GenericProgress
31{
32public:
33 InstallerProgress(QWidget *parent, bool showProgress=true);
34 virtual ~InstallerProgress();
35 void setTitle(const QString &title);
36 void setPackageName(const QString &packageName);
37 void setFileName(const QString &fileName);
38 void setPackageCount(int value);
39 void setPackageNumber(int value);
40 void show();
41private:
42 void updateDisplay();
43 QProgressBar *m_progress;
44 QLabel *m_fileNameLabel;
45 QString m_packageName;
46 QString m_fileName;
47};
48
49#else
50class InstallerProgress
51{
52public:
53 InstallerProgress(QObject *parent);
54 void hide();
55 void setTitle(const QString &title);
56 void setPackageName(const QString &packageName);
57 void setFileName(const QString &fileName);
58 void setStatus(const QString &status);
59 void setMaximum(int value);
60 void setValue(int value);
61 void show();
62
63private:
64 int oldunit;
65 bool visible;
66};
67#endif
68
69
70#endif
71