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