Skip to content

[1171] 点击目录跳转到 PDF 对应页码 - #4188

Merged
da-liii merged 11 commits into
MoganLab:mainfrom
HGUFlyingDog:main
Aug 5, 2026
Merged

da-liii merged 11 commits into
MoganLab:mainfrom
HGUFlyingDog:main

Conversation

@HGUFlyingDog

Copy link
Copy Markdown
Contributor

No description provided.

HGUFlyingDog and others added 11 commits August 4, 2026 15:22
- 新增 OutlineWidget(QDockWidget + QTreeWidget),支持 PDF 大纲和文档章节两种模式
- PDFReaderWidget 新增 extractOutline(),使用 fz_load_outline + fz_resolve_link 提取大纲树
- 新增 text-outline.scm Scheme 模块,提供 document-outline 函数获取文档章节结构
- qt_tm_widget 集成 outline dock,PDF 模式/编辑器模式按内容非空显示
- 单元测试:test_outlineLoaded_noOutlineEmitsEmpty / test_outlineLoaded_withOutline

Co-Authored-By: Claude <[email protected]>
- 编辑器模式下调用 loadDocumentOutline() 加载文档大纲
- 修复 PDF 目录跳转页码偏差(0-based→1-based 修正)

Co-Authored-By: Claude <[email protected]>
- buildTree 中 PdfOutlineItem::page 由 0-based 转为 1-based(goToPage 使用 1-based)
- 新增 outlineActivated → goToPage 信号连接,点击大纲条目跳转到对应页

Co-Authored-By: Claude <[email protected]>

@da-liii da-liii left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@da-liii
da-liii merged commit 6ae3c26 into MoganLab:main Aug 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants