Initial UI
This commit is contained in:
1 parent
4d52c8cc60
commit
3c0037cfc9
29 files changed
+1367
-2
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#ifndef FORMATREADER_H
|
||||
#define FORMATREADER_H
|
||||
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
struct TocEntry {
|
||||
QString title;
|
||||
int chapterIndex;
|
||||
int depth; // 0 = top level
|
||||
};
|
||||
|
||||
struct Chapter {
|
||||
int index;
|
||||
QString title;
|
||||
QString contentHtml;
|
||||
};
|
||||
|
||||
class FormatReader {
|
||||
public:
|
||||
virtual ~FormatReader() = default;
|
||||
|
||||
virtual bool open(const QString &filePath) = 0;
|
||||
virtual QString lastError() = 0;
|
||||
virtual int chapterCount() = 0;
|
||||
virtual Chapter loadChapter(int index) = 0;
|
||||
virtual QList<TocEntry> tableOfContents() = 0;
|
||||
virtual QString title() = 0;
|
||||
virtual QString author() = 0;
|
||||
};
|
||||
|
||||
#endif // FORMATREADER_H
|
||||
Reference in new issue
Block a user