![]() |
QElectroTech 0.200.1-dev
|
Classes | |
| struct | PageGeometry |
| struct | ComponentInfo |
Functions | |
| void | injectCrossRefLinks (QPdfEngine *engine, Diagram *diagram, const PageGeometry &geom, const QMap< Diagram *, int > &pageMap, const QString &outputFileName) |
| void | convertUriToGoTo (const QString &pdfPath) |
| void | convertComponentInfoAnnotations (const QString &pdfPath, const QList< ComponentInfo > &annotations) |
Shared helper that turns a project's cross-references and folio reports into clickable internal hyperlinks in a Qt-generated PDF. Used by both the GUI print path (ProjectPrintWindow) and the headless CLI export, each of which builds its own page geometry and passes it in — this code never computes the scene-to-page mapping itself.
| void PdfLinks::convertComponentInfoAnnotations | ( | const QString & | pdfPath, |
| const QList< ComponentInfo > & | annotations ) |
Post-process a Qt-generated PDF file: convert component-info placeholder link annotations (http://componentinfo.local/<N>) into invisible text annotations with the actual component info as /Contents.

| void PdfLinks::convertUriToGoTo | ( | const QString & | pdfPath | ) |
Post-process a Qt-generated PDF file: rewrite every "/S /URI" link annotation into a native internal "/S /GoTo" action (page + /FitR or /Fit destination) and rebuild the xref table. No-op if the file has no such annotations.

| void PdfLinks::injectCrossRefLinks | ( | QPdfEngine * | engine, |
| Diagram * | diagram, | ||
| const PageGeometry & | geom, | ||
| const QMap< Diagram *, int > & | pageMap, | ||
| const QString & | outputFileName ) |
Inject clickable cross-reference / folio-report hyperlinks for diagram into the current page of engine. Each link is emitted as a URI annotation encoding the target page and a /FitR rectangle; convertUriToGoTo() then rewrites those into native internal GoTo actions.

