summaryrefslogtreecommitdiff
path: root/noncore/unsupported/oipkg/packagelistitem.cpp
authortille <tille>2002-04-27 13:06:45 (UTC)
committer tille <tille>2002-04-27 13:06:45 (UTC)
commitdb90999f6298c1107888f062f2c25cb8817b528a (patch) (side-by-side diff)
tree020ebe65beb9286f3c63e4329fc3a0f298d34460 /noncore/unsupported/oipkg/packagelistitem.cpp
parente2f3288d468508f2cf7c0a327044963ca4b1b54a (diff)
downloadopie-db90999f6298c1107888f062f2c25cb8817b528a.zip
opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.gz
opie-db90999f6298c1107888f062f2c25cb8817b528a.tar.bz2
added popup menu to choose inst dest (and more...)
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
@@ -1,24 +1,51 @@
#include "packagelistitem.h"
#include <qpe/resource.h>
+#include <qobject.h>
+
+#include "debug.h"
static QPixmap *pm_uninstalled=0;
static QPixmap *pm_installed=0;
static QPixmap *pm_uninstall=0;
static QPixmap *pm_install=0;
-PackageListItem::PackageListItem(QListView* lv, Package *pi)
+PackageListItem::PackageListItem(QListView* lv, Package *pi, PackageManagerSettings *s)
: QCheckListItem(lv,pi->name(),CheckBox)
{
package = pi;
+ settings = s;
+ setExpandable( true );
+ QCheckListItem *item;
+#ifndef NEWLAYOUT
+ item = new QCheckListItem( this, QObject::tr("Name") );
+ item->setText(1,pi->name());
+ item = new QCheckListItem( this, QObject::tr("Description") );
+ item->setText(1,pi->desc()+"\ntest multi\nline");
+ item = new QCheckListItem( this, QObject::tr("Size") );
+ item->setText(1,pi->size());
+ item = new QCheckListItem( this, QObject::tr("Destination") );
+ item->setText(1,pi->getDest());
+#endif
+#ifdef NEWLAYOUT
+ item = new QCheckListItem( this, QObject::tr("Name: ")+pi->name() );
+ item = new QCheckListItem( this, QObject::tr("Description: ")+pi->desc() );
+ item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() );
+ destItem = new QCheckListItem( this, "" );
+ linkItem = new QCheckListItem( this, "" );
+ displayDetails();
+#endif
+
if (!pm_uninstalled) {
pm_uninstalled = new QPixmap(Resource::loadPixmap("oipkg/uninstalled"));
pm_installed = new QPixmap(Resource::loadPixmap("oipkg/installed"));
pm_install = new QPixmap(Resource::loadPixmap("oipkg/install"));
pm_uninstall = new QPixmap(Resource::loadPixmap("oipkg/uninstall"));
}
+#ifndef NEWLAYOUT
setText(1, package->shortDesc() );
setText(2, package->size() );
+#endif
}
void PackageListItem::paintCell( QPainter *p, const QColorGroup & cg,
@@ -93,5 +120,20 @@ void PackageListItem::setOn( bool b )
{
QCheckListItem::setOn( b );
package->toggleProcess();
+// if ( b )
+// {
+// if ((package->dest()).isEmpty)
+// package->setDest( settings->getDestinationName() );
+// }else{
+// package->setDest( QObject::tr("not installed"));
+// }
+ package->setLink( settings->createLinks() );
+ displayDetails();
+}
+
+void PackageListItem::displayDetails()
+{
+ linkItem->setText( 0, QObject::tr("Link: ")+QString(package->link()?QObject::tr("Yes"):QObject::tr("No")) );
+ destItem->setText( 0, QObject::tr("Destination: ")+package->dest() );
repaint();
}