Replace treemodel-structure.png with an svg in simpletreemodel.qdoc

Task-number: QTBUG-137747
Pick-to: 6.10
Change-Id: I88ce7c5291f7f4c915a34a937f536ce4f1f6d8da
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
This commit is contained in:
Mate Barany 2025-07-08 18:23:19 +02:00
parent 7b50971aa4
commit 84adb0076e
4 changed files with 95 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -0,0 +1,93 @@
<svg
preserveAspectRatio="none"
width="192"
height="350"
viewBox="-25 -30 153.6 280"
version="1.1"
xmlns="http://www.w3.org/2000/svg">
<!-- Root node -->
<g transform="translate(0, 0)">
<path fill="none" stroke="#333" stroke-dasharray="4" d="M -10 -10 l 20 0 l 0 20 l -20 0 z" />
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="left" dominant-baseline="central" font-weight="bold">
Root item (empty)
</text>
</g>
<!-- Root spine vertical line solid part -->
<path fill="none" stroke="#333" d="M 0 10 l 0 190" />
<!-- Root spine vertical line dotted continuation -->
<path fill="none" stroke="#333" stroke-dasharray="4" d="M 0 200 l 0 30" />
<!-- Horizontal lines from Root spine to children A, E, F -->
<path fill="none" stroke="#333" d="M 0 40 l 20 0" />
<path fill="none" stroke="#333" d="M 0 160 l 20 0" />
<path fill="none" stroke="#333" d="M 0 185 l 20 0" />
<!-- Node A with label [0] -->
<g transform="translate(30, 40)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="0" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="middle" dominant-baseline="central">
A
</text>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 0
</text>
</g>
<!-- Vertical line from A to its children -->
<path fill="none" stroke="#333" d="M 30 50 l 0 80" />
<!-- Horizontal lines from A's spine to B, C, D -->
<path fill="none" stroke="#333" d="M 30 70 l 20 0" />
<path fill="none" stroke="#333" d="M 30 100 l 20 0" />
<path fill="none" stroke="#333" d="M 30 130 l 20 0" />
<!-- Node B -->
<g transform="translate(60, 70)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 0
</text>
</g>
<!-- Node C -->
<g transform="translate(60, 100)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="0" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="middle" dominant-baseline="central">
B
</text>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 1
</text>
</g>
<!-- Node D -->
<g transform="translate(60, 130)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 2
</text>
</g>
<!-- Node E -->
<g transform="translate(30, 160)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="0" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="middle" dominant-baseline="central">
C
</text>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 1
</text>
</g>
<!-- Node F -->
<g transform="translate(30, 185)">
<path fill="none" stroke="#333" d="M -10 -10 l 20 0 l 0 20 l -20 0 z"/>
<text x="15" y="0" font-size="12" font-family="Arial" fill="#333" text-anchor="start" dominant-baseline="central">
row = 2
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -30,7 +30,7 @@
two columns of data.
\table
\row \li \inlineimage treemodel-structure.png
\row \li \inlineimage treemodel-structure.svg
\li \b{Shortcut Editor Structure}
The data is stored internally in the model using ShortcutEditorModelItem

View File

@ -40,7 +40,7 @@
\target SimpleTreeModelStructure
\table
\row \li \inlineimage treemodel-structure.png
\row \li \inlineimage treemodel-structure.svg
\li \b{Simple Tree Model Structure}
The data is stored internally in the model using \c TreeItem objects that