superkaramba
themefile.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef THEMEFILE_H
00025 #define THEMEFILE_H
00026
00027 #include <KUrl>
00028
00029 #include <QTextStream>
00030 #include <QDir>
00031
00032 #include "superkaramba_export.h"
00033 class LineParser;
00034 class ThemeLocale;
00035 class ZipFile;
00036
00041 class SUPERKARAMBA_EXPORT ThemeFile
00042 {
00043 public:
00044 typedef QVector<ThemeFile> List;
00045
00046 ThemeFile(const KUrl& url = KUrl());
00047 ~ThemeFile();
00048
00049 bool isZipTheme() const;
00050 const QString& name() const;
00051 const QString& version() const;
00052 const QString& license() const;
00053 const QString& id() const;
00054 const QString& mo() const;
00055 const QString& file() const;
00056 const QString& scriptModule() const;
00057 bool scriptModuleExists() const;
00058 const QString& path() const;
00059 const QString& description() const;
00060 const QString& author() const;
00061 const QString& authorEmail() const;
00062 const QString& homepage() const;
00063 QPixmap icon() const;
00064 bool exists() const;
00065 bool isThemeFile(const QString& filename) const;
00066 bool isValid() const;
00067 QByteArray readThemeFile(const QString& filename) const;
00068 bool fileExists(const QString& filename) const;
00069 const ThemeLocale* locale() const;
00070 bool canUninstall() const;
00071 KUrl getUrlPath();
00072
00073 bool set(const KUrl& url);
00074 bool open();
00075 bool nextLine(LineParser& parser);
00076 bool close();
00077
00078 QString extractArchive() const;
00079
00080 static bool isZipFile(const QString& filename);
00081 static QString canonicalFile(const QString& file);
00082
00083 private:
00084 void parseXml();
00085 void mkdir(QDir dir);
00086
00087 class Private;
00088 Private* const d;
00089 };
00090
00091 #endif