diff options
Diffstat (limited to 'krusader/Queue/queue.h')
-rw-r--r-- | krusader/Queue/queue.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/krusader/Queue/queue.h b/krusader/Queue/queue.h new file mode 100644 index 0000000..093998a --- /dev/null +++ b/krusader/Queue/queue.h @@ -0,0 +1,32 @@ +#ifndef QUEUE_H +#define QUEUE_H + +#include <qobject.h> +#include <kio/jobclasses.h> +#include <qptrlist.h> + +/** + * Queue can hold anything which inherits KIO::Job, and schedule it, start it, stop etc... + * the main reason to hold the Job itself (at least for phase 1) is to keep the code + * in krusader relatively unchaged, and allow to create the job as usual and choose if + * to start it, or queue it. + * + */ +class Queue: public QObject +{ + Q_OBJECT +public: + Queue(const QString& name); + virtual ~Queue(); + + inline const QString& name() const { return _name; } + void enqueue(KIO::Job *job); + +protected: + void dumpQueue(); + + QString _name; + QPtrList<KIO::Job> _jobs; +}; + +#endif // QUEUE_H |