From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/modules/kjofol-skin/parser.h | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 noatun/modules/kjofol-skin/parser.h (limited to 'noatun/modules/kjofol-skin/parser.h') diff --git a/noatun/modules/kjofol-skin/parser.h b/noatun/modules/kjofol-skin/parser.h new file mode 100644 index 00000000..97e20d99 --- /dev/null +++ b/noatun/modules/kjofol-skin/parser.h @@ -0,0 +1,49 @@ +#ifndef PARSER_H +#define PARSER_H + +// system includes +#include +#include +#include +#include + +class Parser : public QDict +{ + class ImagePixmap + { + public: + ImagePixmap() : mImage(0), mPixmap(0) {} + ~ImagePixmap() {} + QImage mImage; + QPixmap mPixmap; + }; + + public: + Parser(); + + void conserveMemory(); + void open(const QString &file); + + QString dir() const; + QPixmap pixmap(const QString &pixmap) const + { return getPair(pixmap)->mPixmap; } + QImage image(const QString &image) const + { return getPair(image)->mImage; } + QString about() const { return mSkinAbout; }; + + QString fileItem(const QString &file) const; + + bool exist(const QString &i) const; + + public: + QStringList& operator[](const QString &l) { return *find(l);} + + private: + ImagePixmap *getPair(const QString &i) const; + + private: + mutable QDict mImageCache; + QString mDir; + QString mSkinAbout; +}; +#endif // PARSER_H -- cgit v1.2.1