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

package.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 PK_ITEM_H
00011 #define PK_ITEM_H
00012 
00013 #include <qstring.h>
00014 #include <qlistview.h>
00015 #include <qpainter.h>
00016 #include <qpixmap.h>
00017 #include <qdict.h>
00018 #include <qobject.h>
00019 
00020 #include "pksettings.h"
00021 
00022 class OipkgPackage : public QObject
00023 {
00024         Q_OBJECT
00025  public:
00026   OipkgPackage(QObject *parent=0, const char *name=0);
00027   OipkgPackage(PackageManagerSettings *s, QObject *parent=0, const char *name=0);
00028  ~OipkgPackage();
00029   OipkgPackage( QStringList, PackageManagerSettings *s, QObject *parent=0, const char *name=0 );
00030   OipkgPackage( QString, PackageManagerSettings *s, QObject *parent=0, const char *name=0 );
00031   OipkgPackage( OipkgPackage*s, QObject *parent=0, const char *name=0 );
00032         
00033   void    setValue( QString, QString );
00034   void    copyValues( OipkgPackage* );
00035 
00036   QString name();
00037   QString installName();
00038   QString packageName();
00039   bool    installed();
00040   bool    otherInstalled();
00041 
00042   void    setDesc( QString );
00043   QString shortDesc();
00044   QString desc();
00045   QString size();
00046   QString sizeUnits();
00047   QString version();
00048   void    setSection( QString );
00049   QString section();
00050   QString subSection();
00051   QString details();
00052   bool    toProcess();
00053   bool    toInstall();
00054   bool    toRemove();
00055   void processed();
00056   QString dest();
00057   void setDest( QString d );
00058   void setOn();
00059   bool link();
00060   void setLink(bool);
00061   bool isOld();
00062   bool hasVersions();
00063   void parseIpkgFile( QString );
00064   void instalFromFile(bool iff=true);
00065   void setName(QString);
00066   QDict<QString>* getFields();
00067   QString status();
00068 
00069         QDict<OipkgPackage>* getOtherVersions();
00070         void setOtherVersions(QDict<OipkgPackage>*);
00071 
00072 public slots:
00073   void toggleProcess();
00074 
00075 private:
00076   PackageManagerSettings *settings;
00077   QString _displayName;
00078   QString _name;
00079   QString _fileName;
00080   bool    _old;
00081   bool    _hasVersions;
00082   bool    _toProcess;
00083   bool    _link;
00084   QString _status;
00085   QString _size;
00086   QString _section;
00087   QString _subsection;
00088   QString _shortDesc;
00089   QString _desc;
00090   QString _version;
00091   QString _dest;
00092   QDict<QString> _values;
00093   QDict<OipkgPackage> *_versions;
00094   bool _useFileName;
00095   void parsePackage( QStringList );
00096   void init();
00097   //  void init(PackageManagerSettings*);
00098 };
00099 
00100 
00101 #endif

Generated on Sat Nov 5 16:17:47 2005 for OPIE by  doxygen 1.4.2