Diffstat (limited to 'noncore/settings/aqpkg/installdlgimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.h | 38 |
1 files changed, 28 insertions, 10 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.h b/noncore/settings/aqpkg/installdlgimpl.h index 2f80f08..4c9f087 100644 --- a/noncore/settings/aqpkg/installdlgimpl.h +++ b/noncore/settings/aqpkg/installdlgimpl.h | |||
@@ -11,57 +11,75 @@ | |||
11 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #ifndef INSTALLDLGIMPL_H | 17 | #ifndef INSTALLDLGIMPL_H |
18 | #define INSTALLDLGIMPL_H | 18 | #define INSTALLDLGIMPL_H |
19 | 19 | ||
20 | #include <vector> | 20 | #include <vector> |
21 | using namespace std; | 21 | using namespace std; |
22 | 22 | ||
23 | #include <qwidget.h> | ||
23 | #include <qstring.h> | 24 | #include <qstring.h> |
24 | 25 | ||
25 | #include "ipkg.h" | 26 | class QComboBox; |
26 | #include "install.h" | 27 | class QLabel; |
28 | class QMultiLineEdit; | ||
29 | class QPushButton; | ||
30 | |||
31 | class DataManager; | ||
32 | class Destination; | ||
33 | class Ipkg; | ||
27 | 34 | ||
28 | class InstallData | 35 | class InstallData |
29 | { | 36 | { |
30 | public: | 37 | public: |
31 | QString option; // I - install, D - delete, R- reinstall U - upgrade | 38 | QString option; // I - install, D - delete, R- reinstall U - upgrade |
32 | QString packageName; | 39 | QString packageName; |
33 | Destination *destination; | 40 | Destination *destination; |
34 | bool recreateLinks; | 41 | bool recreateLinks; |
35 | }; | 42 | }; |
36 | 43 | ||
37 | class InstallDlgImpl : public InstallDlg | 44 | class InstallDlgImpl : public QWidget |
38 | { | 45 | { |
46 | Q_OBJECT | ||
39 | public: | 47 | public: |
40 | InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, QWidget * parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); | 48 | InstallDlgImpl( vector<InstallData> &packageList, DataManager *dataManager, const char *title = 0 ); |
41 | InstallDlgImpl( Ipkg *ipkg, QString initialText, QWidget * parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); | 49 | InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title = 0 ); |
42 | ~InstallDlgImpl(); | 50 | ~InstallDlgImpl(); |
43 | 51 | ||
44 | bool showDlg(); | ||
45 | bool upgradeServer( QString &server ); | 52 | bool upgradeServer( QString &server ); |
46 | 53 | ||
47 | |||
48 | protected: | 54 | protected: |
49 | 55 | ||
50 | private: | 56 | private: |
51 | DataManager *dataMgr; | 57 | DataManager *dataMgr; |
52 | vector<InstallData> installList; | 58 | vector<InstallData> installList; |
53 | vector<InstallData> removeList; | 59 | vector<InstallData> removeList; |
54 | vector<InstallData> updateList; | 60 | vector<InstallData> updateList; |
55 | int flags; | 61 | int flags; |
56 | Ipkg *pIpkg; | 62 | Ipkg *pIpkg; |
57 | bool upgradePackages; | 63 | bool upgradePackages; |
64 | |||
65 | QComboBox *destination; | ||
66 | QPushButton *btnInstall; | ||
67 | QPushButton *btnOptions; | ||
68 | QMultiLineEdit *output; | ||
69 | QLabel *txtAvailableSpace; | ||
58 | 70 | ||
59 | bool runIpkg( QString &option, const QString& package, const QString& dest, int flags ); | 71 | void init( bool ); |
72 | |||
73 | bool runIpkg( QString &option, const QString& package, const QString& dest, int flags ); | ||
60 | 74 | ||
61 | void optionsSelected(); | 75 | signals: |
62 | void installSelected(); | 76 | void reloadData( InstallDlgImpl * ); |
77 | |||
78 | public slots: | ||
79 | void optionsSelected(); | ||
80 | void installSelected(); | ||
63 | void displayText(const QString &text ); | 81 | void displayText(const QString &text ); |
64 | void displayAvailableSpace( const QString &text); | 82 | void displayAvailableSpace( const QString &text); |
65 | }; | 83 | }; |
66 | 84 | ||
67 | #endif | 85 | #endif |