Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

packagelistitem.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  ***************************************************************************/
00009 // (c) 2002 Patrick S. Vogt <tille@handhelds.org>
00010 #ifndef PK_LISTITEM_H
00011 #define PK_LISTITEM_H
00012 
00013 
00014 #include <qstring.h>
00015 //#include <qlistview.h>
00016 #include <qpainter.h>
00017 #include <qpixmap.h>
00018 #include <qdict.h>
00019 
00020 #include "listviewitemoipkg.h"
00021 #include "package.h"
00022 #include "pksettings.h"
00023 
00024 class QPopupMenu;
00025 
00026 class PackageListItem : public ListViewItemOipkg
00027 {
00028 public:
00029   PackageListItem(ListViewItemOipkg *parent, QString name, Type ittype);
00030   PackageListItem(
00031                   ListViewItemOipkg *parent, 
00032                   OipkgPackage *pack, 
00033                   PackageManagerSettings *s);
00034   PackageListItem(QListView*, OipkgPackage*, PackageManagerSettings*);
00035   ~PackageListItem();
00036   void paintCell( QPainter*, const QColorGroup&, int, int, int );
00037   void paintFocus( QPainter*, const QColorGroup&, const QRect&  );
00038   QPixmap statePixmap() const;
00039   QString key( int, bool ) const;
00040   OipkgPackage* getPackage() { return package; } ;
00041   QString getName() { return package->name(); } ;
00042   bool isInstalled(){ return package->installed(); };
00043   virtual void setOn ( bool );
00044   void displayDetails();
00045 
00046 private:
00047   QPopupMenu *popupMenu;
00048   QPopupMenu *destsMenu;
00049   void init(OipkgPackage*, PackageManagerSettings*);
00050   virtual QPopupMenu* getPopupMenu();
00051   static QPopupMenu *_destsMenu;
00052         QCheckListItem *nameItem;
00053         QCheckListItem *destItem;
00054         QCheckListItem *linkItem;
00055         QCheckListItem *statusItem;
00056   PackageManagerSettings *settings;
00057   OipkgPackage *package;
00058 protected slots:
00059  // void toggleProcess();
00060   virtual void menuAction( int );
00061 };
00062 
00063 
00064 #endif

Generated on Sat Nov 5 16:18:10 2005 for OPIE by  doxygen 1.4.2