author | tille <tille> | 2002-11-10 22:50:50 (UTC) |
---|---|---|
committer | tille <tille> | 2002-11-10 22:50:50 (UTC) |
commit | 9337c912158da3ad2fcda7ee1120c9357faddf8b (patch) (unidiff) | |
tree | c5800efad3f90cfc9901db0337039eb883c0cf28 /noncore/unsupported/oipkg/packagelistitem.h | |
parent | f6cabaaa364ee6d894462c0902734e434715fc58 (diff) | |
download | opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.zip opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.tar.gz opie-9337c912158da3ad2fcda7ee1120c9357faddf8b.tar.bz2 |
here it's...
Diffstat (limited to 'noncore/unsupported/oipkg/packagelistitem.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.h | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.h b/noncore/unsupported/oipkg/packagelistitem.h index dba44f7..ca0cf17 100644 --- a/noncore/unsupported/oipkg/packagelistitem.h +++ b/noncore/unsupported/oipkg/packagelistitem.h | |||
@@ -1,50 +1,64 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | * This program is free software; you can redistribute it and/or modify * |
4 | * it under the terms of the GNU General Public License as published by * | 4 | * it under the terms of the GNU General Public License as published by * |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * (at your option) any later version. * | 6 | * (at your option) any later version. * |
7 | * * | 7 | * * |
8 | ***************************************************************************/ | 8 | ***************************************************************************/ |
9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> | 9 | // (c) 2002 Patrick S. Vogt <tille@handhelds.org> |
10 | #ifndef PK_LISTITEM_H | 10 | #ifndef PK_LISTITEM_H |
11 | #define PK_LISTITEM_H | 11 | #define PK_LISTITEM_H |
12 | 12 | ||
13 | #include "package.h" | ||
14 | 13 | ||
15 | #include <qstring.h> | 14 | #include <qstring.h> |
16 | #include <qlistview.h> | 15 | //#include <qlistview.h> |
17 | #include <qpainter.h> | 16 | #include <qpainter.h> |
18 | #include <qpixmap.h> | 17 | #include <qpixmap.h> |
19 | #include <qdict.h> | 18 | #include <qdict.h> |
20 | 19 | ||
20 | #include "listviewitemoipkg.h" | ||
21 | #include "package.h" | ||
21 | #include "pksettings.h" | 22 | #include "pksettings.h" |
22 | 23 | ||
23 | class PackageListItem | 24 | class QPopupMenu; |
24 | : public QCheckListItem | 25 | |
26 | class PackageListItem : public ListViewItemOipkg | ||
25 | { | 27 | { |
26 | public: | 28 | public: |
27 | PackageListItem(QListViewItem*, Package*, PackageManagerSettings*); | 29 | PackageListItem(ListViewItemOipkg *parent, QString name, Type ittype); |
28 | PackageListItem(QListView*, Package*, PackageManagerSettings*); | 30 | PackageListItem( |
31 | ListViewItemOipkg *parent, | ||
32 | OipkgPackage *pack, | ||
33 | PackageManagerSettings *s); | ||
34 | PackageListItem(QListView*, OipkgPackage*, PackageManagerSettings*); | ||
35 | ~PackageListItem(); | ||
29 | void paintCell( QPainter*, const QColorGroup&, int, int, int ); | 36 | void paintCell( QPainter*, const QColorGroup&, int, int, int ); |
30 | void paintFocus( QPainter*, const QColorGroup&, const QRect& ); | 37 | void paintFocus( QPainter*, const QColorGroup&, const QRect& ); |
31 | QPixmap statePixmap() const; | 38 | QPixmap statePixmap() const; |
32 | QString key( int, bool ) const; | 39 | QString key( int, bool ) const; |
33 | Package* getPackage() { return package; } ; | 40 | OipkgPackage* getPackage() { return package; } ; |
34 | QString getName() { return package->name(); } ; | 41 | QString getName() { return package->name(); } ; |
35 | bool isInstalled(){ return package->installed(); }; | 42 | bool isInstalled(){ return package->installed(); }; |
36 | virtual void setOn ( bool ); | 43 | virtual void setOn ( bool ); |
37 | void displayDetails(); | 44 | void displayDetails(); |
38 | 45 | ||
39 | private: | 46 | private: |
40 | void init(Package*, PackageManagerSettings*); | 47 | QPopupMenu *popupMenu; |
48 | QPopupMenu *destsMenu; | ||
49 | void init(OipkgPackage*, PackageManagerSettings*); | ||
50 | virtual QPopupMenu* getPopupMenu(); | ||
51 | static QPopupMenu *_destsMenu; | ||
41 | QCheckListItem *nameItem; | 52 | QCheckListItem *nameItem; |
42 | QCheckListItem *destItem; | 53 | QCheckListItem *destItem; |
43 | QCheckListItem *linkItem; | 54 | QCheckListItem *linkItem; |
44 | QCheckListItem *statusItem; | 55 | QCheckListItem *statusItem; |
45 | PackageManagerSettings *settings; | 56 | PackageManagerSettings *settings; |
46 | Package *package; | 57 | OipkgPackage *package; |
58 | protected slots: | ||
59 | // void toggleProcess(); | ||
60 | virtual void menuAction( int ); | ||
47 | }; | 61 | }; |
48 | 62 | ||
49 | 63 | ||
50 | #endif | 64 | #endif |