1 | /**************************************************************************** |
---|---|
2 | ** |
3 | ** Copyright (C) 2010 Ralf Habacker ralf.habacker@freenet.de |
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 INSTALLERDIALOG_H |
24 | #define INSTALLERDIALOG_H |
25 | |
26 | #include "ui_installerdialog.h" |
27 | |
28 | #include "installerenginesinglepackage.h" |
29 | |
30 | #include "../shared/package.h" |
31 | #include "../shared/postprocessing.h" |
32 | |
33 | |
34 | |
35 | #include <QDialog> |
36 | |
37 | class QPixmap; |
38 | class QTextEdit; |
39 | |
40 | class InstallerDialog : public QDialog |
41 | { |
42 | Q_OBJECT |
43 | |
44 | public: |
45 | InstallerDialog(); |
46 | ~InstallerDialog(); |
47 | |
48 | protected slots: |
49 | void setupEngine(); |
50 | void downloadPackages(); |
51 | void downloadPackagesStage1(); |
52 | void downloadPackagesStage2(); |
53 | void installPackages(); |
54 | void postProcessing(); |
55 | void finished(); |
56 | |
57 | protected: |
58 | Ui::InstallerDialog ui; |
59 | InstallerEngineSinglePackage m_engine; |
60 | void closeEvent(QCloseEvent *e); |
61 | |
62 | protected slots: |
63 | void addHint(const QString &hint); |
64 | void setSubLabelHint(const QString &hint); |
65 | void showLog(bool checked); |
66 | void stop(); |
67 | |
68 | private: |
69 | void initItems(); |
70 | void setItem(int pagenum); |
71 | void setError(int pagenum); |
72 | |
73 | QStringList m_packages; |
74 | QList<Package *> m_packagesToInstall; |
75 | PostProcessing m_postProcessing; |
76 | int page; |
77 | QPixmap next; |
78 | QPixmap okay; |
79 | QPixmap error; |
80 | int m_counter; |
81 | QTextEdit *m_log; |
82 | }; |
83 | |
84 | #endif |
85 |