TerminalStripItem add pdfRefs
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m53s

This commit is contained in:
Laurent Trinques
2026-10-12 16:02:26 +02:00
parent cce75f4306
commit b8dd03923a
5 changed files with 95 additions and 0 deletions
+9
View File
@@ -23,6 +23,7 @@
#include "qetgraphicsitem/dynamicelementtextitem.h"
#include "qetgraphicsitem/element.h"
#include "qetgraphicsitem/elementtextitemgroup.h"
#include "TerminalStrip/GraphicsItem/terminalstripitem.h"
// Private Qt PDF engine for drawHyperlink() — not public API.
// Availability of Qt::GuiPrivate is verified at configure time in CMakeLists.txt.
@@ -150,6 +151,14 @@ void injectCrossRefLinks(QPdfEngine *engine, Diagram *diagram,
continue;
}
// --- Terminal strip plan: the xref of each terminal leads to its element ---
if (auto *strip_item = dynamic_cast<TerminalStripItem*>(item)) {
for (const TerminalStripItem::PdfRef &ref : strip_item->pdfRefs()) {
injectLinkTo(ref.here, ref.diagram, ref.there);
}
continue;
}
// --- Folio report links (DynamicElementTextItem) ---
if (auto *deti = dynamic_cast<DynamicElementTextItem*>(item)) {
Element *parent = deti->parentElement();