summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelistitem.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/oipkg/packagelistitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.cpp44
1 files changed, 43 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp
index 5d08bb1..149ba35 100644
--- a/noncore/unsupported/oipkg/packagelistitem.cpp
+++ b/noncore/unsupported/oipkg/packagelistitem.cpp
@@ -3,2 +3,5 @@
3#include <qpe/resource.h> 3#include <qpe/resource.h>
4#include <qobject.h>
5
6#include "debug.h"
4 7
@@ -9,3 +12,3 @@ static QPixmap *pm_install=0;
9 12
10PackageListItem::PackageListItem(QListView* lv, Package *pi) 13PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSettings *s)
11 :QCheckListItem(lv,pi->name(),CheckBox) 14 :QCheckListItem(lv,pi->name(),CheckBox)
@@ -13,2 +16,24 @@ PackageListItem::PackageListItem(QListView* lv, Package *pi)
13 package = pi; 16 package = pi;
17 settings = s;
18 setExpandable( true );
19 QCheckListItem *item;
20#ifndef NEWLAYOUT
21 item = new QCheckListItem( this, QObject::tr("Name") );
22 item->setText(1,pi->name());
23 item = new QCheckListItem( this, QObject::tr("Description") );
24 item->setText(1,pi->desc()+"\ntest multi\nline");
25 item = new QCheckListItem( this, QObject::tr("Size") );
26 item->setText(1,pi->size());
27 item = new QCheckListItem( this, QObject::tr("Destination") );
28 item->setText(1,pi->getDest());
29#endif
30#ifdef NEWLAYOUT
31 item = new QCheckListItem( this, QObject::tr("Name: ")+pi->name() );
32 item = new QCheckListItem( this, QObject::tr("Description: ")+pi->desc() );
33 item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() );
34 destItem = new QCheckListItem( this, "" );
35 linkItem = new QCheckListItem( this, "" );
36 displayDetails();
37#endif
38
14 if (!pm_uninstalled) { 39 if (!pm_uninstalled) {
@@ -19,4 +44,6 @@ PackageListItem::PackageListItem(QListView* lv, Package *pi)
19 } 44 }
45#ifndef NEWLAYOUT
20 setText(1, package->shortDesc() ); 46 setText(1, package->shortDesc() );
21 setText(2, package->size() ); 47 setText(2, package->size() );
48#endif
22} 49}
@@ -95,2 +122,17 @@ void PackageListItem::setOn( bool b )
95 package->toggleProcess(); 122 package->toggleProcess();
123// if ( b )
124// {
125// if ((package->dest()).isEmpty)
126 // package->setDest( settings->getDestinationName() );
127// }else{
128// package->setDest( QObject::tr("not installed"));
129// }
130 package->setLink( settings->createLinks() );
131 displayDetails();
132}
133
134void PackageListItem::displayDetails()
135{
136 linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) );
137 destItem->setText( 0, QObject::tr("Destination: ")+package->dest() );
96 repaint(); 138 repaint();