Fix navigation in twoPagesSpread mode
[qcomicbook-oblomov] / src / imlibloader.h
1 #ifndef __IMLIBLOADER_H
2 #define __IMLIBLOADER_H
3
4 /*! \file imlibloader.h */
5
6 #include <qthread.h>
7 #include <qstringlist.h>
8
9 namespace QComicBook
10 {
11         //! Thread-based image loader.
12         class ImlibLoaderThread: public QThread
13         {
14                 protected:
15                         volatile QThread::Priority prio; //!<thread priority
16                         QMutex mtx; //!<mutex for serialization of class attributes
17                         QStringList requests; //!<the list of requested pages
18                         volatile bool stopped;
19
20                         virtual void run();
21
22                 public:
23                         ImlibLoaderThread();
24                         virtual ~ImlibLoaderThread();
25                         
26                         virtual void setPriority(QThread::Priority p);
27
28                         virtual void request(const QString &file);
29
30                         //! Stops processing requests and exits thread execution.
31                         virtual void stop();
32         };
33 }
34
35 #endif
36