ref
This commit is contained in:
1 parent
b663a4d79d
commit
1c8277f7e9
1 file changed
+3
-4
@@ -173,7 +173,7 @@ struct Chapter {
|
|||||||
- `QString lastError()` — error description after failed open
|
- `QString lastError()` — error description after failed open
|
||||||
- `int chapterCount()`
|
- `int chapterCount()`
|
||||||
- `Chapter loadChapter(int index)` — loads one chapter on demand
|
- `Chapter loadChapter(int index)` — loads one chapter on demand
|
||||||
- `QList<TocEntry> tableOfContents()` — empty list if format has no TOC (e.g., TXT)
|
- `QList<TocEntry> tableOfContents()` — empty list if a format has no TOC (e.g., TXT)
|
||||||
- `QString title()`, `QString author()` — metadata
|
- `QString title()`, `QString author()` — metadata
|
||||||
|
|
||||||
Chapter mapping by format: TXT = 1 chapter (whole file). FB2 = `<section>` elements. EPUB = spine items. PDF = outline entries or individual pages.
|
Chapter mapping by format: TXT = 1 chapter (whole file). FB2 = `<section>` elements. EPUB = spine items. PDF = outline entries or individual pages.
|
||||||
@@ -188,7 +188,7 @@ Chapter mapping by format: TXT = 1 chapter (whole file). FB2 = `<section>` eleme
|
|||||||
|
|
||||||
### Async Book Opening
|
### Async Book Opening
|
||||||
|
|
||||||
`BookController::openBook(path)` runs reader creation + metadata loading in `QtConcurrent::run()`. Emits `bookReady()` or `bookError(QString)` when done. Chapter loading starts synchronous (single chapter from open zip is fast) and can go async later if profiling warrants it.
|
`BookController::openBook(path)` runs reader creation + metadata loading in `QtConcurrent::run()`. Emits `bookReady()` or `bookError(QString)` when done.
|
||||||
|
|
||||||
### Error Handling
|
### Error Handling
|
||||||
|
|
||||||
@@ -272,7 +272,6 @@ Dark theme only. Derived from asteria-bookreader:
|
|||||||
| Dim / clock text | `#71738c` |
|
| Dim / clock text | `#71738c` |
|
||||||
| Counter text | `#606175` |
|
| Counter text | `#606175` |
|
||||||
|
|
||||||
Sidebar drawer width: `240` logical pixels.
|
|
||||||
|
|
||||||
All colors are defined in `src/qml/Theme.qml` (a QML singleton registered via `qmldir`). All QML files reference colors as `Theme.surface`, `Theme.backgroundDefault`, etc. Do not hardcode hex values in QML components. Do not use Qt Quick Styles (Material/Universal) — the singleton gives full control over the custom theme.
|
All colors are defined in `src/qml/Theme.qml` (a QML singleton registered via `qmldir`). All QML files reference colors as `Theme.surface`, `Theme.backgroundDefault`, etc. Do not hardcode hex values in QML components. Do not use Qt Quick Styles (Material/Universal) — the singleton gives full control over the custom theme.
|
||||||
|
|
||||||
@@ -284,4 +283,4 @@ All colors are defined in `src/qml/Theme.qml` (a QML singleton registered via `q
|
|||||||
- `QSettings` for persistent state
|
- `QSettings` for persistent state
|
||||||
- Qt naming: `camelCase` properties/methods, `PascalCase` QML component names
|
- Qt naming: `camelCase` properties/methods, `PascalCase` QML component names
|
||||||
- `Q_INVOKABLE` for QML-callable methods; signals for C++→QML notifications
|
- `Q_INVOKABLE` for QML-callable methods; signals for C++→QML notifications
|
||||||
- **Never use timers to wait for state to settle** — always use signals (`onRunningChanged`, `onCompleted`, etc.) or direct synchronous calls. Timeouts are fragile and mask real sequencing problems.
|
- **Never use timers to wait for state to settle** — always use signals (`onRunningChanged`, `onCompleted`, etc.) or direct synchronous calls. Timeouts are fragile and mask real sequencing problems.
|
||||||
Reference in new issue
Block a user