File indexing completed on 2025-01-26 04:24:56
0001 /* Copyright 2015 Robert Schroll 0002 * 0003 * This file is part of Beru and is distributed under the terms of 0004 * the GPL. See the file COPYING for full details. 0005 */ 0006 0007 #ifndef CBZREADER_H 0008 #define CBZREADER_H 0009 0010 #include <QObject> 0011 #include <QDomDocument> 0012 #include <QVariant> 0013 #include "quazip/quazip.h" 0014 0015 class CBZReader : public QObject 0016 { 0017 Q_OBJECT 0018 Q_PROPERTY(QString hash READ hash) 0019 Q_PROPERTY(QString title READ title) 0020 public: 0021 explicit CBZReader(QObject *parent = 0); 0022 QString hash(); 0023 QString title(); 0024 Q_INVOKABLE bool load(const QString &filename); 0025 Q_INVOKABLE QVariantMap getCoverInfo(int thumbsize, int fullsize); 0026 0027 Q: 0028 void contentsReady(QVariantList contents); 0029 0030 private: 0031 bool parse(); 0032 QVariantList getContents(); 0033 0034 QuaZip* zip; 0035 QString _hash; 0036 QStringList spine; 0037 0038 }; 0039 0040 #endif // CBZREADER_H