Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

packagelist.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   This program is free software; you can redistribute it and/or modify  *
00004  *   it under the terms of the GNU General Public License as published by  *
00005  *   the Free Software Foundation; either version 2 of the License, or     *
00006  *   (at your option) any later version.                                   *
00007  *                                                                         *
00008  ***************************************************************************/
00009 // (c) 2002 Patrick S. Vogt <tille@handhelds.org>
00010 #ifndef PACKAGELIST_H
00011 #define PACKAGELIST_H
00012 
00013 #include <qdict.h>
00014 #include "package.h"
00015 #include "pksettings.h"
00016 #include "debug.h"
00017 
00018 class PackageList : public QObject
00019 {
00020   Q_OBJECT
00021 public:
00022 //      static QString all = QObject::tr("All");
00023 
00024   PackageList (QObject *parent=0, const char *name=0);
00025   PackageList( PackageManagerSettings *s, QObject *parent=0, const char *name=0);
00026         virtual ~PackageList();
00027   void insertPackage( OipkgPackage* );
00028   OipkgPackage* find( QString );
00029   OipkgPackage* next();
00030   OipkgPackage* first();
00031 
00032   QStringList getSections();
00033   QStringList getSubSections();
00034   void setSettings( PackageManagerSettings* );
00035   void filterPackages( QString );
00036   OipkgPackage* getByName( QString );
00037   void clear();
00038   void allPackages();
00039 
00040   QDict<OipkgPackage> *versions;
00041 
00042 public slots:
00043   void setSection(QString);
00044   void setSubSection(QString);
00045  // virtual void update();
00046 
00047 protected:
00048   int currentPackage;
00049   int packageCount;
00050 
00051   PackageManagerSettings     *settings;
00052   QDict<OipkgPackage>         packageList;
00053   QDict<OipkgPackage>         origPackageList;
00054   QDictIterator<OipkgPackage> packageIter;
00055 
00056   bool empty;
00057   QString            aktSection;
00058   QString            aktSubSection;
00059   QStringList        sections;
00060   QDict<QStringList> subSections;
00061   QDict<bool> sectionsDict;
00062 
00063 
00064   void updateSections( OipkgPackage* );
00065   void readFileEntries( QString file, QString dest="" );
00066 };
00067 
00068 
00069 #endif

Generated on Sat Nov 5 16:18:10 2005 for OPIE by  doxygen 1.4.2