Logo Search packages:      
Sourcecode: qcomicbook version File versions  Download package

QComicBook::ImgArchiveSink Class Reference

#include <imgarchivesink.h>

Inheritance diagram for QComicBook::ImgArchiveSink:

QComicBook::ImgDirSink

List of all members.


Detailed Description

Comic book archive sink.

Allows opening different kind of archives containing image files.

Definition at line 31 of file imgarchivesink.h.


Public Types

enum  ArchiveType {
  RAR_ARCHIVE = 1, ZIP_ARCHIVE = 2, ACE_ARCHIVE = 4, TARGZ_ARCHIVE = 8,
  TARBZ2_ARCHIVE = 16, UNKNOWN_ARCHIVE = 2<<31
}

Public Slots

virtual void requestThumbnail (int num)
 Requestes thumbnail to be loaded in separate thread.
virtual void requestThumbnails (int first, int n)

Signals

void progress (int current, int total)
 Emited to report progress of comic book reading.
void sinkError (int code)
 Emited on error.
void sinkReady (const QString &path)
 Emited when comic book is ready for reading.

Public Member Functions

virtual void close ()
 Closes this comic book sink cleaning resources.
virtual QStringList getAlldirs () const
virtual QStringList getAllfiles () const
virtual QStringList getAllimgfiles () const
virtual QStringList getDescription () const
virtual QString getFullFileName (int page) const
virtual QString getFullName () const
virtual ImlibImage * getImage (unsigned int num, int &result)
 Returns an image for specifiled page.
virtual QString getName (int maxlen=50)
virtual QString getNext () const
 Returns the next filename to open.
virtual QString getPrevious () const
virtual Thumbnail * getThumbnail (int num, bool thumbcache=true)
 Returns thumbnail image for specified page.
virtual bool hasModifiedFiles () const
 ImgArchiveSink (const ImgDirSink &sink)
 ImgArchiveSink (const QString &path)
virtual int numOfImages () const
virtual int open (const QString &path)
 Opens this comic book sink with specifiled path.
virtual void preload (unsigned int num)
virtual bool supportsNext () const
virtual ThumbnailLoaderThread & thumbnailLoader ()
 Returns the instance of thumbnail loader.
virtual bool timestampDiffers (int page) const

Static Public Member Functions

static void autoconfArchivers ()
static QString getKnownImageExtension (const QString &path)
static bool knownImageExtension (const QString &path)
static QString makeTempDir ()
static void removeThumbnails (int days)
 Removes old thumbnails.
static int supportedArchives ()
static QValueList
< ImgArchiveSink::ArchiveTypeInfo > 
supportedArchivesInfo ()
static QString supportedOpenExtensions ()
static QString supportedSaveExtensions ()
static bool supportsOpen (ArchiveType t)
static bool supportsSave (ArchiveType t)

Protected Slots

void extractExited ()
void extractStdoutReady ()
void infoExited ()
void infoStdoutReady ()

Protected Member Functions

virtual void doCleanup ()
int extract (const QString &filename, const QString &destdir)
void init ()
void recurseDir (const QString &s)
 Scans directories recursively for image and text files.
void setComicBookName (const QString &name)

Static Protected Member Functions

static ArchiveType archiveType (const QString &filename)
 Determines archive type.
static void autoconfACE ()
static void autoconfRAR ()
static void autoconfTARBZ2 ()
static void autoconfTARGZ ()
static void autoconfZIP ()
static QString memPrefix (int &s)

Protected Attributes

QStringList archdirs
 list of archive dirs
QStringList archfiles
 list of archive files
QString archivename
 archive file name, without path
QString archivepath
 full path, including archive name
ArchiveType archivetype
 the type of currently opened archive
int extcnt
 extracted files counter for progress bar
int filesnum
 number of files gathered from parsing archiver output, used for progress bar
QProcess * pext
 extracting process
QProcess * pinf
 file list extracing process
QString tmppath
 path to extracted archive

Static Protected Attributes

static QValueList
< ArchiveTypeInfo > 
archinfo
static const int MAX_TEXTFILE_SIZE = 65535
static QString openext
 supported archives extensions (for open)
static QString saveext
 supported archives extensions (for save)
static int suppopen
static int suppsave

Classes

struct  ArchiveTypeInfo

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index