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 @@ -10,40 +10,54 @@ #ifndef PK_LISTITEM_H #define PK_LISTITEM_H -#include "package.h" #include <qstring.h> -#include <qlistview.h> +//#include <qlistview.h> #include <qpainter.h> #include <qpixmap.h> #include <qdict.h> +#include "listviewitemoipkg.h" +#include "package.h" #include "pksettings.h" -class PackageListItem -: public QCheckListItem +class QPopupMenu; + +class PackageListItem : public ListViewItemOipkg { public: - PackageListItem(QListViewItem*, Package*, PackageManagerSettings*); - PackageListItem(QListView*, Package*, PackageManagerSettings*); + PackageListItem(ListViewItemOipkg *parent, QString name, Type ittype); + PackageListItem( + ListViewItemOipkg *parent, + OipkgPackage *pack, + PackageManagerSettings *s); + PackageListItem(QListView*, OipkgPackage*, PackageManagerSettings*); + ~PackageListItem(); void paintCell( QPainter*, const QColorGroup&, int, int, int ); void paintFocus( QPainter*, const QColorGroup&, const QRect& ); QPixmap statePixmap() const; QString key( int, bool ) const; - Package* getPackage() { return package; } ; + OipkgPackage* getPackage() { return package; } ; QString getName() { return package->name(); } ; bool isInstalled(){ return package->installed(); }; virtual void setOn ( bool ); void displayDetails(); private: - void init(Package*, PackageManagerSettings*); + QPopupMenu *popupMenu; + QPopupMenu *destsMenu; + void init(OipkgPackage*, PackageManagerSettings*); + virtual QPopupMenu* getPopupMenu(); + static QPopupMenu *_destsMenu; QCheckListItem *nameItem; QCheckListItem *destItem; QCheckListItem *linkItem; QCheckListItem *statusItem; PackageManagerSettings *settings; - Package *package; + OipkgPackage *package; +protected slots: + // void toggleProcess(); + virtual void menuAction( int ); }; |