ComicImageView now uses an array of ImlibImageList instead of an array of ImlibImage...
[qcomicbook-oblomov] / src / imgarchiver.h
1 /*
2  * This file is a part of QComicBook.
3  *
4  * Copyright (C) 2005-2006 Pawel Stolowski <yogin@linux.bydg.org>
5  *
6  * QComicBook is free software; you can redestribute it and/or modify it
7  * under terms of GNU General Public License by Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY. See GPL for more details.
11  */
12
13 #ifndef __IMGARCHIVER
14 #define __IMGARCHIVER
15
16 /*! \file imgarchiver.h */
17
18 #include "imgarchivesink.h"
19 #include <qvaluelist.h>
20
21 namespace QComicBook
22 {
23         class ImgArchiver: public ImgArchiveSink
24         {
25                 Q_OBJECT
26
27                 signals:
28                         void createProgress(int current, int total);
29                         void createReady();
30                         void createError(int code);
31                         
32                 protected:
33                         QProcess *pomp; ///< archiving process
34                         QString tmpcreatpath;
35                         QStringList newfiles; ///< list of new archive files
36                         int newfilesnum; ///< newfiles count
37                         int cmpcnt; ///< archiver output counter
38
39                         virtual void doCleanup();
40
41                 protected slots:
42                         void compressExited();
43                         void compressStdoutReady();
44
45                 public:
46                         ImgArchiver(const ImgDirSink &sink);
47                         virtual ~ImgArchiver();
48                         
49                         virtual void create(const QString &destname, ArchiveType type, QValueList<int> pages);
50         };
51 }
52
53 #endif
54