From da12e60078563ef6e10ddcc1edeb931f765b8b6d Mon Sep 17 00:00:00 2001 From: tille Date: Wed, 01 May 2002 16:14:36 +0000 Subject: more fields in detailed view --- (limited to 'noncore/unsupported/oipkg') diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO index fc2e8a4..9d9a650 100644 --- a/noncore/unsupported/oipkg/TODO +++ b/noncore/unsupported/oipkg/TODO @@ -9,6 +9,5 @@ * dependency checking * create dest if it does not exist * allow reinstalling -* handle different versions * different types of filters and searches i.e. name, desc, files etc \ No newline at end of file diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 0787ece..f992641 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -361,3 +361,8 @@ void Package::setName(QString n) { _displayName = n; } + +QDict* Package::getFields() +{ + return &_values; +} diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h index 2ca966d..fc725bc 100644 --- a/noncore/unsupported/oipkg/package.h +++ b/noncore/unsupported/oipkg/package.h @@ -49,6 +49,7 @@ class Package //: public QObject void parseIpkgFile( QString ); void instalFromFile(bool iff=true); void setName(QString); + QDict* getFields(); public slots: void toggleProcess(); diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index b7af9a6..2f81714 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp @@ -29,10 +29,17 @@ void PackageListItem::init( Package *pi, PackageManagerSettings *s) setExpandable( true ); QCheckListItem *item; nameItem = new QCheckListItem( this, "" ); - 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, "" ); + QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); + item = new QCheckListItem( otherItem, QObject::tr("Description: ")+pi->desc() ); + QDict *fields = pi->getFields(); + QDictIterator it( *fields ); + while ( it.current() ) { + item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); + ++it; + } displayDetails(); if (!pm_uninstalled) -- cgit v0.9.0.2