diff options
Diffstat (limited to 'smglobals.h')
-rw-r--r-- | smglobals.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/smglobals.h b/smglobals.h index 06d7b43..b994b53 100644 --- a/smglobals.h +++ b/smglobals.h @@ -10,17 +10,41 @@ #include <QHash> #include <QSize> +#include <QPair> class QAbstractItemModel; class PictureViewer; +class QPixmap; class SmGlobals : public QObject { Q_OBJECT public: + class FrameCache : public QObject { + public: + FrameCache(QObject *parent = 0); + ~FrameCache(); + void readConfig(); + const QPixmap entry(const QString &sourcePath, const QString &when = QString()); + + private: + void readCache(); + void grabFrame(const QString &sourceFile, QString when); + QHash<QPair<QString, QString>, QString> mFrameCache; + const qint32 mMagic; + const QString mCacheSubDir; + const QString mCacheFileName; + QString mCacheDir; + QString mCacheFile; + QString mWhen; + QString mFfMpegPath; + + }; + ~SmGlobals(); static SmGlobals *instance(); QAbstractItemModel *model(const QString &which); PictureViewer *pictureViewer(); + FrameCache *frameCache(); QSize cursorSize(); private: @@ -30,6 +54,7 @@ class SmGlobals : public QObject { static SmGlobals *mInstance; QHash<QString, QAbstractItemModel*> mModels; PictureViewer *mPictureViewer; + SmGlobals::FrameCache *mFrameCache; QSize mCursorSize; }; |