Diffstat (limited to 'noncore/settings/packagemanager/installdlg.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/installdlg.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/noncore/settings/packagemanager/installdlg.h b/noncore/settings/packagemanager/installdlg.h new file mode 100644 index 0000000..8075f1d --- a/dev/null +++ b/noncore/settings/packagemanager/installdlg.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | This file is part of the OPIE Project | ||
3 | |||
4 | =. Copyright (c) 2003 Dan Williams <drw@handhelds.org> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This file is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
29 | |||
30 | #ifndef INSTALLDLG_H | ||
31 | #define INSTALLDLG_H | ||
32 | |||
33 | #include <qwidget.h> | ||
34 | |||
35 | #include <opie/oprocess.h> | ||
36 | |||
37 | #include "opackage.h" | ||
38 | |||
39 | class QComboBox; | ||
40 | class QLabel; | ||
41 | class QMultiLineEdit; | ||
42 | class QPushButton; | ||
43 | |||
44 | class OPackageManager; | ||
45 | |||
46 | class InstallDlg : public QWidget | ||
47 | { | ||
48 | Q_OBJECT | ||
49 | |||
50 | public: | ||
51 | InstallDlg( QWidget *parent = 0x0, OPackageManager *pm = 0x0, const QString &caption = QString::null, | ||
52 | bool showDestInfo = true, | ||
53 | OPackage::Command command1 = OPackage::NotDefined, QStringList *packages1 = 0x0, | ||
54 | OPackage::Command command2 = OPackage::NotDefined, QStringList *packages2 = 0x0, | ||
55 | OPackage::Command command3 = OPackage::NotDefined, QStringList *packages3 = 0x0 ); | ||
56 | ~InstallDlg(); | ||
57 | |||
58 | private: | ||
59 | OPackageManager *m_packman; // Pointer to application instance of package manager | ||
60 | |||
61 | // UI controls | ||
62 | QComboBox *m_destination; // Destination selection list | ||
63 | QLabel *m_availSpace; // Text label to display available space on selected destination | ||
64 | QMultiLineEdit *m_output; // Multi-line edit to display status | ||
65 | QPushButton *m_btnStart; // Start/abort/close button | ||
66 | QPushButton *m_btnOptions; // Installation options button | ||
67 | |||
68 | // Commands and packages to execute | ||
69 | int m_numCommands; // Number of commands to be executed | ||
70 | int m_currCommand; // Number of currently executing command | ||
71 | OPackage::Command m_command[3]; // List of commands to be executed | ||
72 | QStringList *m_packages[3]; // Lists of package names associated to commands (m_command[]) | ||
73 | |||
74 | private slots: | ||
75 | // UI control slots | ||
76 | void slotDisplayAvailSpace( const QString &destination ); | ||
77 | void slotBtnStart(); | ||
78 | void slotBtnOptions(); | ||
79 | |||
80 | // Execution slots | ||
81 | void slotOutput( OProcess *process, char *buffer, int buffLen ); | ||
82 | void slotErrors( OProcess *process, char *buffer, int buffLen ); | ||
83 | void slotFinished( OProcess *process ); | ||
84 | |||
85 | signals: | ||
86 | void closeInstallDlg(); | ||
87 | }; | ||
88 | |||
89 | #endif | ||