Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.h b/noncore/unsupported/oipkg/packagelist.h index 7c326ca..acea3b9 100644 --- a/noncore/unsupported/oipkg/packagelist.h +++ b/noncore/unsupported/oipkg/packagelist.h | |||
@@ -1,70 +1,58 @@ | |||
1 | #ifndef PACKAGELIST_H | 1 | #ifndef PACKAGELIST_H |
2 | #define PACKAGELIST_H | 2 | #define PACKAGELIST_H |
3 | 3 | ||
4 | #include <qdict.h> | 4 | #include <qdict.h> |
5 | #include "package.h" | 5 | #include "package.h" |
6 | #include "pksettings.h" | 6 | #include "pksettings.h" |
7 | #include "debug.h" | 7 | #include "debug.h" |
8 | 8 | ||
9 | #define HACK | ||
10 | #ifdef HACK | ||
11 | static QString listsDir="/usr/lib/ipkg/"; | ||
12 | static QString statusDir="/usr/lib/ipkg/"; | ||
13 | #endif | ||
14 | |||
15 | class PackageList //:QObject | 9 | class PackageList //:QObject |
16 | { | 10 | { |
17 | // Q_OBJECT | 11 | // Q_OBJECT |
18 | public: | 12 | public: |
19 | //static QString all = QObject::tr("All"); | 13 | //static QString all = QObject::tr("All"); |
20 | 14 | ||
21 | PackageList(); | 15 | PackageList(); |
22 | PackageList( PackageManagerSettings* ); | 16 | PackageList( PackageManagerSettings* ); |
23 | ~PackageList(); | 17 | virtual ~PackageList(); |
24 | void insertPackage( Package* ); | 18 | void insertPackage( Package* ); |
25 | Package* find( QString ); | 19 | Package* find( QString ); |
26 | Package* next(); | 20 | Package* next(); |
27 | Package* first(); | 21 | Package* first(); |
28 | 22 | ||
29 | QStringList getSections(); | 23 | QStringList getSections(); |
30 | QStringList getSubSections(); | 24 | QStringList getSubSections(); |
31 | void setSettings( PackageManagerSettings* ); | 25 | void setSettings( PackageManagerSettings* ); |
32 | void filterPackages( QString ); | 26 | void filterPackages( QString ); |
33 | Package* getByName( QString ); | 27 | Package* getByName( QString ); |
34 | void clear(); | 28 | void clear(); |
35 | void allPackages(); | 29 | void allPackages(); |
36 | 30 | ||
37 | public slots: | 31 | public slots: |
38 | void setSection(QString); | 32 | void setSection(QString); |
39 | void setSubSection(QString); | 33 | void setSubSection(QString); |
40 | void update(); | 34 | // virtual void update(); |
41 | 35 | ||
42 | private: | 36 | protected: |
43 | int currentPackage; | 37 | int currentPackage; |
44 | int packageCount; | 38 | int packageCount; |
45 | 39 | ||
46 | PackageManagerSettings *settings; | 40 | PackageManagerSettings *settings; |
47 | QDict<Package> packageList; | 41 | QDict<Package> packageList; |
48 | QDict<Package> origPackageList; | 42 | QDict<Package> origPackageList; |
49 | QDictIterator<Package> packageIter; | 43 | QDictIterator<Package> packageIter; |
50 | 44 | ||
51 | bool empty; | 45 | bool empty; |
52 | #ifndef HACK | ||
53 | QString listsDir; | ||
54 | QString statusDir; | ||
55 | #endif | ||
56 | QString aktSection; | 46 | QString aktSection; |
57 | QString aktSubSection; | 47 | QString aktSubSection; |
58 | QStringList sections; | 48 | QStringList sections; |
59 | QDict<QStringList> subSections; | 49 | QDict<QStringList> subSections; |
60 | QDict<bool> sectionsDict; | 50 | QDict<bool> sectionsDict; |
61 | 51 | ||
62 | 52 | ||
63 | void updateSections( Package* ); | 53 | void updateSections( Package* ); |
64 | void parseStatus(); | 54 | void readFileEntries( QString file, QString dest="" ); |
65 | void parseList(); | ||
66 | void readFileEntries( QString file, QString dest ); | ||
67 | }; | 55 | }; |
68 | 56 | ||
69 | 57 | ||
70 | #endif | 58 | #endif |