#include <QString>
#include <QStringList>
#include <QHash>
-#include <QIcon>
+#include <QImage>
#include <QMetaType>
#include <QObject>
#include <QTemporaryFile>
+class QPixmap;
+
/** A book. */
class Book: public QObject
{
}
};
- /** Construct a book from an EPUB file in path. */
- Book(const QString &path, QObject *parent = 0);
+ /** Construct a book from an EPUB file. */
+ Book(const QString &fileName, QObject *parent = 0);
- /** Default constructor. */
- Book();
+ /** Destructor. */
+ ~Book();
/** Load book meta-data from persistent storage. */
void load();
*/
QString name();
+ /** Get cover image. */
+ QImage coverImage();
+
/** Get short friendly name: title or file name. */
QString shortName();
/** Get location of OPS file in EPUB archive. */
QString opsPath();
+ /** Make a cover image from a file. */
+ QImage makeCover(const QString &fileName);
+
+ /** Make a cover image from an pixmap. */
+ QImage makeCover(const QPixmap &pixmap);
+
QString mPath; //< Path to EPUB file.
Bookmark mLastBookmark; //< Last position read.
QList<Bookmark> mBookmarks; //< List of bookmarks.