summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelistitem.h
blob: b128f0d743e0b233c8f4148917989b1be5e90332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef PK_LISTITEM_H
#define PK_LISTITEM_H

#include "package.h"

#include <qstring.h>
#include <qlistview.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qdict.h>

#include "pksettings.h"

class PackageListItem
: public QCheckListItem
{
public:
  PackageListItem(QListViewItem*, Package*, PackageManagerSettings*);
  PackageListItem(QListView*, Package*, PackageManagerSettings*);
  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; } ;
  QString getName() { return package->name(); } ;
  bool isInstalled(){ return package->installed(); };
  virtual void setOn ( bool );
  void displayDetails();

private:
  void init(Package*, PackageManagerSettings*);
	QCheckListItem *nameItem;
	QCheckListItem *destItem;
	QCheckListItem *linkItem;
  PackageManagerSettings *settings;
  Package *package;
};


#endif