Diffstat (limited to 'noncore/unsupported/oipkg/packagelistitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index c743a49..55047d5 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp | |||
@@ -12,54 +12,55 @@ static QPixmap *pm_installed_old=0; | |||
12 | static QPixmap *pm_uninstall=0; | 12 | static QPixmap *pm_uninstall=0; |
13 | static QPixmap *pm_install=0; | 13 | static QPixmap *pm_install=0; |
14 | static QPixmap *pm_uninstalled_old_installed_new=0; | 14 | static QPixmap *pm_uninstalled_old_installed_new=0; |
15 | static QPixmap *pm_uninstalled_installed_old=0; | 15 | static QPixmap *pm_uninstalled_installed_old=0; |
16 | 16 | ||
17 | PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSettings *s) | 17 | PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSettings *s) |
18 | :QCheckListItem(lv,pi->name(),CheckBox) | 18 | :QCheckListItem(lv,pi->name(),CheckBox) |
19 | { | 19 | { |
20 | init(pi,s); | 20 | init(pi,s); |
21 | } | 21 | } |
22 | 22 | ||
23 | PackageListItem::PackageListItem(QListViewItem *lvi, Package *pi, PackageManagerSettings *s) | 23 | PackageListItem::PackageListItem(QListViewItem *lvi, Package *pi, PackageManagerSettings *s) |
24 | :QCheckListItem(lvi,pi->name(),CheckBox) | 24 | :QCheckListItem(lvi,pi->name(),CheckBox) |
25 | { | 25 | { |
26 | init(pi,s); | 26 | init(pi,s); |
27 | } | 27 | } |
28 | 28 | ||
29 | void PackageListItem::init( Package *pi, PackageManagerSettings *s) | 29 | void PackageListItem::init( Package *pi, PackageManagerSettings *s) |
30 | { | 30 | { |
31 | package = pi; | 31 | package = pi; |
32 | settings = s; | 32 | settings = s; |
33 | setExpandable( true ); | 33 | setExpandable( true ); |
34 | QCheckListItem *item; | 34 | QCheckListItem *item; |
35 | nameItem = new QCheckListItem( this, "" ); | 35 | nameItem = new QCheckListItem( this, "" ); |
36 | item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); | 36 | item = new QCheckListItem( this, QObject::tr("Description: ")+pi->desc() ); |
37 | item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); | ||
37 | destItem = new QCheckListItem( this, "" ); | 38 | destItem = new QCheckListItem( this, "" ); |
38 | linkItem = new QCheckListItem( this, "" ); | 39 | linkItem = new QCheckListItem( this, "" ); |
39 | statusItem = new QCheckListItem( this, "" ); | 40 | statusItem = new QCheckListItem( this, "" ); |
40 | QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); | 41 | QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); |
41 | item = new QCheckListItem( otherItem, QObject::tr("Description: ")+pi->desc() ); | 42 | item = new QCheckListItem( otherItem, QObject::tr("Install Name: ")+pi->installName() ); |
42 | QDict<QString> *fields = pi->getFields(); | 43 | QDict<QString> *fields = pi->getFields(); |
43 | QDictIterator<QString> it( *fields ); | 44 | QDictIterator<QString> it( *fields ); |
44 | while ( it.current() ) { | 45 | while ( it.current() ) { |
45 | item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); | 46 | item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); |
46 | ++it; | 47 | ++it; |
47 | } | 48 | } |
48 | displayDetails(); | 49 | displayDetails(); |
49 | 50 | ||
50 | if (!pm_uninstalled) | 51 | if (!pm_uninstalled) |
51 | { | 52 | { |
52 | pm_uninstalled = new QPixmap(Resource::loadPixmap("oipkg/uninstalled")); | 53 | pm_uninstalled = new QPixmap(Resource::loadPixmap("oipkg/uninstalled")); |
53 | pm_uninstalled_old = new QPixmap(Resource::loadPixmap("oipkg/uninstalledOld")); | 54 | pm_uninstalled_old = new QPixmap(Resource::loadPixmap("oipkg/uninstalledOld")); |
54 | pm_uninstalled_old_installed_new = new QPixmap(Resource::loadPixmap("oipkg/uninstalledOldinstalledNew")); | 55 | pm_uninstalled_old_installed_new = new QPixmap(Resource::loadPixmap("oipkg/uninstalledOldinstalledNew")); |
55 | pm_uninstalled_installed_old = new QPixmap(Resource::loadPixmap("oipkg/uninstalledInstalledOld")); | 56 | pm_uninstalled_installed_old = new QPixmap(Resource::loadPixmap("oipkg/uninstalledInstalledOld")); |
56 | pm_installed = new QPixmap(Resource::loadPixmap("oipkg/installed")); | 57 | pm_installed = new QPixmap(Resource::loadPixmap("oipkg/installed")); |
57 | pm_installed_old = new QPixmap(Resource::loadPixmap("oipkg/installedOld")); | 58 | pm_installed_old = new QPixmap(Resource::loadPixmap("oipkg/installedOld")); |
58 | pm_install = new QPixmap(Resource::loadPixmap("oipkg/install")); | 59 | pm_install = new QPixmap(Resource::loadPixmap("oipkg/install")); |
59 | pm_uninstall = new QPixmap(Resource::loadPixmap("oipkg/uninstall")); | 60 | pm_uninstall = new QPixmap(Resource::loadPixmap("oipkg/uninstall")); |
60 | } | 61 | } |
61 | } | 62 | } |
62 | 63 | ||
63 | void PackageListItem::paintCell( QPainter *p, const QColorGroup & cg, | 64 | void PackageListItem::paintCell( QPainter *p, const QColorGroup & cg, |
64 | int column, int width, int alignment ) | 65 | int column, int width, int alignment ) |
65 | { | 66 | { |