blob: 65e97111f973c7d7d9a618e2972f8798fd22bc72 (
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
41
|
#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;
QCheckListItem *statusItem;
PackageManagerSettings *settings;
Package *package;
};
#endif
|