-rw-r--r-- | noncore/unsupported/oipkg/TODO | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 5 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 9 |
4 files changed, 14 insertions, 2 deletions
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 @@ -1,14 +1,13 @@ * Settings Class * tr() ;) * Dialog to display ipkg output live * parse "to install" and "to remove" from status * install local file dialog * qcop * error handling * manage links * 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 @@ -352,12 +352,17 @@ void Package::parseIpkgFile( QString file) // else return _packageName; //} void Package::instalFromFile(bool iff) { _useFileName = iff; } void Package::setName(QString n) { _displayName = n; } + +QDict<QString>* 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 @@ -40,24 +40,25 @@ class Package //: public QObject bool toProcess(); bool toInstall(); bool toRemove(); void processed(); QString dest(); void setDest( QString d ); void setOn(); bool link(); void setLink(bool); void parseIpkgFile( QString ); void instalFromFile(bool iff=true); void setName(QString); + QDict<QString>* getFields(); public slots: void toggleProcess(); private: PackageManagerSettings *settings; QString _displayName; QString _name; QString _fileName; bool _toProcess; bool _link; QString _status; QString _size; 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 @@ -20,28 +20,35 @@ PackageListItem::PackageListItem(QListViewItem *lvi, Package *pi, PackageManager : QCheckListItem(lvi,pi->name(),CheckBox) { init(pi,s); } void PackageListItem::init( Package *pi, PackageManagerSettings *s) { package = pi; settings = 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<QString> *fields = pi->getFields(); + QDictIterator<QString> it( *fields ); + while ( it.current() ) { + item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); + ++it; + } displayDetails(); 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")); } } void PackageListItem::paintCell( QPainter *p, const QColorGroup & cg, |