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

QComicBook::ImgDirSink Class Reference

#include <imgdirsink.h>

Inheritance diagram for QComicBook::ImgDirSink:


List of all members.

Detailed Description

Comic book directory sink.

Allows opening directories containing image files.

Definition at line 52 of file imgdirsink.h.

Public Slots

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


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
 ImgDirSink (const ImgDirSink &sink)
 ImgDirSink (const QString &path, bool dirs=false)
 ImgDirSink (bool dirs=false)
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 QString getKnownImageExtension (const QString &path)
static bool knownImageExtension (const QString &path)
static void removeThumbnails (int days)
 Removes old thumbnails.

Protected Member Functions

void recurseDir (const QString &s)
 Scans directories recursively for image and text files.
void setComicBookName (const QString &name)

Static Protected Member Functions

static QString memPrefix (int &s)

Static Protected Attributes

static const int MAX_TEXTFILE_SIZE = 65535

Private Attributes

QString cbname
 comic book name (directory path by default)
QStringList desc
QString dirpath
 path to directory
QStringList dirs
bool dirsfirst
 visit directories first, then files
QStringList imgfiles
 list of images files in directory
ImlibLoaderThread imgloader
QMutex listmtx
 mutex for imgfiles
QStringList otherfiles
 list of other files
ThumbnailLoaderThread thloader
QMap< QString, FileStatus > timestamps
 last modifications timestamps for all pages
QStringList txtfiles
 text files (.nfo, file_id.diz)

Static Private Attributes

static const QString imgext [] = {".jpg", ".jpeg", ".png", ".gif", ".xpm", ".bmp", NULL}


class  FileStatus

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

Generated by  Doxygen 1.6.0   Back to index