WIP: netlist browser - coloring
|
Before Width: | Height: | Size: 257 B After Width: | Height: | Size: 252 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 392 B |
|
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 524 B |
|
After Width: | Height: | Size: 250 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 383 B After Width: | Height: | Size: 382 B |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 576 B |
|
|
@ -26,8 +26,8 @@
|
|||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="2.8"
|
||||
inkscape:cx="396.23267"
|
||||
inkscape:cy="867.9533"
|
||||
inkscape:cx="560.64642"
|
||||
inkscape:cy="920.20375"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
|
@ -1031,18 +1031,18 @@
|
|||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="79.362206"
|
||||
x="356"
|
||||
x="357"
|
||||
height="0.99999923"
|
||||
width="29"
|
||||
width="27"
|
||||
id="rect5577"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<rect
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="75.362206"
|
||||
x="406"
|
||||
x="407"
|
||||
height="0.99999923"
|
||||
width="21"
|
||||
width="20"
|
||||
id="rect5583"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
inkscape:export-filename="icon_device_net_24.png" />
|
||||
|
|
@ -1050,9 +1050,9 @@
|
|||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="72.362206"
|
||||
x="446"
|
||||
x="447"
|
||||
height="0.99999923"
|
||||
width="13"
|
||||
width="12"
|
||||
id="rect5589"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<text
|
||||
|
|
@ -1095,9 +1095,9 @@
|
|||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="82.362206"
|
||||
x="296"
|
||||
x="298"
|
||||
height="1.9999992"
|
||||
width="46"
|
||||
width="42"
|
||||
id="rect5611"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<rect
|
||||
|
|
@ -1105,7 +1105,7 @@
|
|||
inkscape:export-xdpi="90"
|
||||
y="83.362206"
|
||||
x="318"
|
||||
height="30.000008"
|
||||
height="29"
|
||||
width="2"
|
||||
id="rect5613"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
|
|
@ -1114,7 +1114,7 @@
|
|||
inkscape:export-xdpi="90"
|
||||
y="80.362206"
|
||||
x="370"
|
||||
height="17.999992"
|
||||
height="17"
|
||||
width="1"
|
||||
id="rect5621"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
|
|
@ -1122,8 +1122,8 @@
|
|||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="76.362206"
|
||||
x="416"
|
||||
height="14"
|
||||
x="413"
|
||||
height="12.999999"
|
||||
width="1"
|
||||
id="rect5627"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
|
|
@ -1132,8 +1132,8 @@
|
|||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
y="73.362206"
|
||||
x="452"
|
||||
height="8.9999933"
|
||||
x="451"
|
||||
height="7.999999"
|
||||
width="1"
|
||||
id="rect5633"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
|
|
@ -1169,14 +1169,14 @@
|
|||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="path5635-8-1"
|
||||
sodipodi:type="arc"
|
||||
sodipodi:cx="416.5"
|
||||
sodipodi:cx="413.5"
|
||||
sodipodi:cy="75.862206"
|
||||
sodipodi:rx="3.5"
|
||||
sodipodi:ry="3.4999998"
|
||||
sodipodi:start="0"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:open="true"
|
||||
d="m 420,75.862206 a 3.5,3.4999998 0 0 1 -3.47705,3.499924 3.5,3.4999998 0 0 1 -3.52265,-3.454019 3.5,3.4999998 0 0 1 3.43084,-3.545228 3.5,3.4999998 0 0 1 3.56766,3.40752"
|
||||
d="m 417,75.862206 a 3.5,3.4999998 0 0 1 -3.47705,3.499924 3.5,3.4999998 0 0 1 -3.52265,-3.454019 3.5,3.4999998 0 0 1 3.43084,-3.545228 3.5,3.4999998 0 0 1 3.56766,3.40752"
|
||||
inkscape:export-filename="icon_device_net_24.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
|
|
@ -1184,14 +1184,14 @@
|
|||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#5a5a5a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="path5635-8-1-3"
|
||||
sodipodi:type="arc"
|
||||
sodipodi:cx="452.5"
|
||||
sodipodi:cx="451.5"
|
||||
sodipodi:cy="72.862206"
|
||||
sodipodi:rx="2.5"
|
||||
sodipodi:ry="2.5"
|
||||
sodipodi:start="0"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:open="true"
|
||||
d="m 455,72.862206 a 2.5,2.5 0 0 1 -2.4836,2.499946 2.5,2.5 0 0 1 -2.51618,-2.467157 2.5,2.5 0 0 1 2.4506,-2.532306 2.5,2.5 0 0 1 2.54832,2.433943"
|
||||
d="m 454,72.862206 a 2.5,2.5 0 0 1 -2.4836,2.499946 2.5,2.5 0 0 1 -2.51618,-2.467157 2.5,2.5 0 0 1 2.4506,-2.532306 2.5,2.5 0 0 1 2.54832,2.433943"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
|
|
@ -1257,14 +1257,14 @@
|
|||
id="rect5722"
|
||||
width="2"
|
||||
height="30.000008"
|
||||
x="170.36221"
|
||||
x="171.3622"
|
||||
y="-327"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
transform="matrix(0,1,-1,0,0,0)" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#5a5a5a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 314.00001,163.36221 0,16 14,0 7,-8 -7,-8 z"
|
||||
d="m 314.00002,164.3622 0,16 14,0 7,-8 -7,-8 z"
|
||||
id="path5738"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-xdpi="90"
|
||||
|
|
@ -1284,14 +1284,14 @@
|
|||
id="rect5724"
|
||||
width="1"
|
||||
height="17.999992"
|
||||
x="162.36221"
|
||||
x="163.36221"
|
||||
y="-374"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
transform="matrix(0,1,-1,0,0,0)" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#5a5a5a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 367.00001,157.36221 0,11 9.625,0 4.8125,-5.5 -4.8125,-5.5 z"
|
||||
d="m 367,158.3622 0,11 9.625,0 4.8125,-5.5 -4.8125,-5.5 z"
|
||||
id="path5738-1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-xdpi="90"
|
||||
|
|
@ -1313,14 +1313,14 @@
|
|||
id="rect5726"
|
||||
width="1"
|
||||
height="14"
|
||||
x="158.36221"
|
||||
x="159.3622"
|
||||
y="-420"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
transform="matrix(0,1,-1,0,0,0)" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#5a5a5a;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 415.49018,154.8559 0,8.02082 7.20783,0 3.60395,-4.01041 -3.60395,-4.01041 z"
|
||||
d="m 415.49018,155.85589 0,8.02082 7.20783,0 3.60395,-4.01041 -3.60395,-4.01041 z"
|
||||
id="path5738-1-1"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-xdpi="90"
|
||||
|
|
@ -1340,14 +1340,14 @@
|
|||
id="rect5728"
|
||||
width="1"
|
||||
height="8.9999933"
|
||||
x="154.36221"
|
||||
x="155.3622"
|
||||
y="-455"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90"
|
||||
transform="matrix(0,1,-1,0,0,0)" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#5a5a5a;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 451.48582,151.85379 0,6.02907 5.2135,0 2.60676,-3.01453 -2.60676,-3.01454 z"
|
||||
d="m 451.48581,152.85378 0,6.02907 5.2135,0 2.60676,-3.01453 -2.60676,-3.01454 z"
|
||||
id="path5738-1-1-0"
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-xdpi="90"
|
||||
|
|
@ -1793,5 +1793,221 @@
|
|||
y="74.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
y="67.362213"
|
||||
x="545"
|
||||
height="48"
|
||||
width="48"
|
||||
id="rect4343"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text4345"
|
||||
y="127.19971"
|
||||
x="544.84998"
|
||||
style="font-style:normal;font-variant:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'URW Gothic L';-inkscape-font-specification:'URW Gothic L Book';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-size:5px"
|
||||
y="127.19971"
|
||||
x="544.84998"
|
||||
id="tspan4347"
|
||||
sodipodi:role="line">icon_net_light_48.png</tspan></text>
|
||||
<rect
|
||||
y="67.362213"
|
||||
x="605"
|
||||
height="32"
|
||||
width="32"
|
||||
id="rect4349"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
inkscape:export-filename="icon_device_net_24.png"
|
||||
y="67.362213"
|
||||
x="655"
|
||||
height="24"
|
||||
width="24"
|
||||
id="rect4351"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
y="67.362213"
|
||||
x="695"
|
||||
height="16"
|
||||
width="16"
|
||||
id="rect4353"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4355"
|
||||
width="27"
|
||||
height="0.99999923"
|
||||
x="607"
|
||||
y="79.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
inkscape:export-filename="icon_device_net_24.png"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4357"
|
||||
width="20"
|
||||
height="0.99999923"
|
||||
x="657"
|
||||
y="75.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4359"
|
||||
width="12"
|
||||
height="0.99999923"
|
||||
x="697"
|
||||
y="72.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text4361"
|
||||
y="116.12219"
|
||||
x="609.685"
|
||||
style="font-style:normal;font-variant:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'URW Gothic L';-inkscape-font-specification:'URW Gothic L Book';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-size:5px"
|
||||
y="116.12219"
|
||||
x="609.685"
|
||||
id="tspan4363"
|
||||
sodipodi:role="line">icon_net_light_32.png</tspan></text>
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text4365"
|
||||
y="106.12219"
|
||||
x="651.88165"
|
||||
style="font-style:normal;font-variant:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'URW Gothic L';-inkscape-font-specification:'URW Gothic L Book';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-size:5px"
|
||||
y="106.12219"
|
||||
x="651.88165"
|
||||
id="tspan4367"
|
||||
sodipodi:role="line">icon_net_light_24.png</tspan></text>
|
||||
<text
|
||||
sodipodi:linespacing="125%"
|
||||
id="text4369"
|
||||
y="96.122192"
|
||||
x="696.88165"
|
||||
style="font-style:normal;font-variant:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:'URW Gothic L';-inkscape-font-specification:'URW Gothic L Book';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
xml:space="preserve"><tspan
|
||||
style="font-size:5px"
|
||||
y="96.122192"
|
||||
x="696.88165"
|
||||
id="tspan4371"
|
||||
sodipodi:role="line">icon_net_light_16.png</tspan></text>
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4373"
|
||||
width="42"
|
||||
height="1.9999992"
|
||||
x="548"
|
||||
y="82.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4375"
|
||||
width="2"
|
||||
height="29"
|
||||
x="568"
|
||||
y="83.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4377"
|
||||
width="1"
|
||||
height="17"
|
||||
x="620"
|
||||
y="80.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
inkscape:export-filename="icon_device_net_24.png"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4379"
|
||||
width="1"
|
||||
height="12.999999"
|
||||
x="663"
|
||||
y="76.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<rect
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
|
||||
id="rect4381"
|
||||
width="1"
|
||||
height="7.999999"
|
||||
x="701"
|
||||
y="73.362206"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90" />
|
||||
<path
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
d="m 577,83.362206 a 8,8 0 0 1 -7.94754,7.999827 8,8 0 0 1 -8.05177,-7.894901 8,8 0 0 1 7.84193,-8.103378 8,8 0 0 1 8.15463,7.788617"
|
||||
sodipodi:open="true"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:start="0"
|
||||
sodipodi:ry="8"
|
||||
sodipodi:rx="8"
|
||||
sodipodi:cy="83.362206"
|
||||
sodipodi:cx="569"
|
||||
sodipodi:type="arc"
|
||||
id="path4383"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
d="m 626,79.862206 a 5.5,5.5000005 0 0 1 -5.46393,5.499882 5.5,5.5000005 0 0 1 -5.5356,-5.427746 5.5,5.5000005 0 0 1 5.39133,-5.571073 5.5,5.5000005 0 0 1 5.60631,5.354675"
|
||||
sodipodi:open="true"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:start="0"
|
||||
sodipodi:ry="5.5000005"
|
||||
sodipodi:rx="5.5"
|
||||
sodipodi:cy="79.862206"
|
||||
sodipodi:cx="620.5"
|
||||
sodipodi:type="arc"
|
||||
id="path4385"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-filename="icon_device_net_24.png"
|
||||
d="m 667,75.862206 a 3.5,3.4999998 0 0 1 -3.47705,3.499924 3.5,3.4999998 0 0 1 -3.52265,-3.454019 3.5,3.4999998 0 0 1 3.43084,-3.545228 3.5,3.4999998 0 0 1 3.56766,3.40752"
|
||||
sodipodi:open="true"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:start="0"
|
||||
sodipodi:ry="3.4999998"
|
||||
sodipodi:rx="3.5"
|
||||
sodipodi:cy="75.862206"
|
||||
sodipodi:cx="663.5"
|
||||
sodipodi:type="arc"
|
||||
id="path4387"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:export-ydpi="90"
|
||||
inkscape:export-xdpi="90"
|
||||
d="m 704,72.862206 a 2.5,2.5 0 0 1 -2.4836,2.499946 2.5,2.5 0 0 1 -2.51618,-2.467157 2.5,2.5 0 0 1 2.4506,-2.532306 2.5,2.5 0 0 1 2.54832,2.433943"
|
||||
sodipodi:open="true"
|
||||
sodipodi:end="6.256953"
|
||||
sodipodi:start="0"
|
||||
sodipodi:ry="2.5"
|
||||
sodipodi:rx="2.5"
|
||||
sodipodi:cy="72.862206"
|
||||
sodipodi:cx="701.5"
|
||||
sodipodi:type="arc"
|
||||
id="path4389"
|
||||
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#f0f0f0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
|
||||
</g>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 143 KiB |
|
|
@ -23,6 +23,8 @@
|
|||
#ifndef HDR_layItemDelegates
|
||||
#define HDR_layItemDelegates
|
||||
|
||||
#include "laybasicCommon.h"
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
namespace lay
|
||||
|
|
@ -33,7 +35,7 @@ namespace lay
|
|||
/**
|
||||
* @brief A delegate displaying the display text as HTML formatted text
|
||||
*/
|
||||
class HTMLItemDelegate
|
||||
class LAYBASIC_PUBLIC HTMLItemDelegate
|
||||
: public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -713,7 +713,29 @@ Marker::set (const db::Polygon &poly, const db::ICplxTrans &t1, const std::vecto
|
|||
GenericMarkerBase::set (t1, trans);
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
Marker::set (const db::PolygonRef &poly, const db::ICplxTrans &trans)
|
||||
{
|
||||
remove_object ();
|
||||
|
||||
m_type = PolygonRef;
|
||||
m_object.polygon_ref = new db::PolygonRef (poly);
|
||||
|
||||
GenericMarkerBase::set (trans);
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set (const db::PolygonRef &poly, const db::ICplxTrans &t1, const std::vector<db::DCplxTrans> &trans)
|
||||
{
|
||||
remove_object ();
|
||||
|
||||
m_type = PolygonRef;
|
||||
m_object.polygon_ref = new db::PolygonRef (poly);
|
||||
|
||||
GenericMarkerBase::set (t1, trans);
|
||||
}
|
||||
|
||||
void
|
||||
Marker::set (const db::DPolygon &poly, const db::DCplxTrans &trans)
|
||||
{
|
||||
remove_object ();
|
||||
|
|
@ -960,6 +982,8 @@ Marker::item_bbox () const
|
|||
return *m_object.dbox;
|
||||
} else if (m_type == Polygon) {
|
||||
return db::DBox (m_object.polygon->box ());
|
||||
} else if (m_type == PolygonRef) {
|
||||
return db::DBox (m_object.polygon_ref->box ());
|
||||
} else if (m_type == DPolygon) {
|
||||
return m_object.dpolygon->box ();
|
||||
} else if (m_type == EdgePair) {
|
||||
|
|
@ -996,6 +1020,8 @@ Marker::remove_object ()
|
|||
delete m_object.dbox;
|
||||
} else if (m_type == Polygon) {
|
||||
delete m_object.polygon;
|
||||
} else if (m_type == PolygonRef) {
|
||||
delete m_object.polygon_ref;
|
||||
} else if (m_type == DPolygon) {
|
||||
delete m_object.dpolygon;
|
||||
} else if (m_type == EdgePair) {
|
||||
|
|
@ -1031,6 +1057,8 @@ Marker::draw (lay::Renderer &r, const db::CplxTrans &t, lay::CanvasPlane *fill,
|
|||
r.draw (*m_object.dbox, db::DCplxTrans (t), fill, contour, vertex, text);
|
||||
} else if (m_type == Polygon) {
|
||||
r.draw (*m_object.polygon, t, fill, contour, vertex, text);
|
||||
} else if (m_type == PolygonRef) {
|
||||
r.draw (m_object.polygon_ref->obj (), t * db::ICplxTrans (m_object.polygon_ref->trans ()), fill, contour, vertex, text);
|
||||
} else if (m_type == DPolygon) {
|
||||
r.draw (*m_object.dpolygon, db::DCplxTrans (t), fill, contour, vertex, text);
|
||||
} else if (m_type == Path) {
|
||||
|
|
|
|||
|
|
@ -562,6 +562,16 @@ public:
|
|||
*/
|
||||
void set (const db::DPolygon &poly, const db::DCplxTrans &t1, const std::vector<db::DCplxTrans> &trans);
|
||||
|
||||
/**
|
||||
* @brief Set the polygon reference the marker is to display
|
||||
*/
|
||||
void set (const db::PolygonRef &poly_ref, const db::ICplxTrans &t1);
|
||||
|
||||
/**
|
||||
* @brief Set the polygon reference the marker is to display
|
||||
*/
|
||||
void set (const db::PolygonRef &poly_ref, const db::ICplxTrans &t1, const std::vector<db::DCplxTrans> &trans);
|
||||
|
||||
/**
|
||||
* @brief Set the edge pair the marker is to display
|
||||
*/
|
||||
|
|
@ -697,7 +707,7 @@ private:
|
|||
size_t m_max_shapes;
|
||||
|
||||
enum {
|
||||
None, Box, DBox, Polygon, DPolygon, EdgePair, DEdgePair, Edge, DEdge, Path, DPath, Text, DText, Instance
|
||||
None, Box, DBox, Polygon, PolygonRef, DPolygon, EdgePair, DEdgePair, Edge, DEdge, Path, DPath, Text, DText, Instance
|
||||
} m_type;
|
||||
|
||||
union {
|
||||
|
|
@ -705,6 +715,7 @@ private:
|
|||
db::DBox *dbox;
|
||||
db::Polygon *polygon;
|
||||
db::DPolygon *dpolygon;
|
||||
db::PolygonRef *polygon_ref;
|
||||
db::EdgePair *edge_pair;
|
||||
db::DEdgePair *dedge_pair;
|
||||
db::Edge *edge;
|
||||
|
|
|
|||
|
|
@ -332,7 +332,7 @@ NetlistBrowserDialog::configure (const std::string &name, const std::string &val
|
|||
|
||||
need_update = lay::test_and_set (m_auto_colors, colors);
|
||||
|
||||
} else if (name == cfg_l2ndb_marker_cycle_colors) {
|
||||
} else if (name == cfg_l2ndb_marker_cycle_colors_enabled) {
|
||||
|
||||
bool f = false;
|
||||
tl::from_string (value, f);
|
||||
|
|
|
|||
|
|
@ -23,16 +23,127 @@
|
|||
|
||||
#include "layNetlistBrowserPage.h"
|
||||
#include "layItemDelegates.h"
|
||||
#include "layCellView.h"
|
||||
#include "layLayoutView.h"
|
||||
#include "layMarker.h"
|
||||
#include "dbLayoutToNetlist.h"
|
||||
#include "dbNetlistDeviceClasses.h"
|
||||
|
||||
#include <QUrl>
|
||||
#include <QPainter>
|
||||
|
||||
namespace lay
|
||||
{
|
||||
|
||||
extern std::string cfg_l2ndb_show_all;
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// Utilities
|
||||
|
||||
template <class Obj, class Attr, class Iter>
|
||||
static const Attr *attr_by_object_and_index (const Obj *obj, size_t index, const Iter &begin, const Iter &end, std::map<const Obj *, std::map<size_t, const Attr *> > &cache)
|
||||
{
|
||||
typename std::map<const Obj *, std::map<size_t, const Attr *> >::iterator cc = cache.find (obj);
|
||||
if (cc == cache.end ()) {
|
||||
cc = cache.insert (std::make_pair (obj, std::map<size_t, const Attr *> ())).first;
|
||||
}
|
||||
|
||||
typename std::map<size_t, const Attr *>::iterator c = cc->second.find (index);
|
||||
if (c == cc->second.end ()) {
|
||||
|
||||
c = cc->second.insert (std::make_pair (index, (const Attr *) 0)).first;
|
||||
for (Iter i = begin; i != end; ++i) {
|
||||
if (index-- == 0) {
|
||||
c->second = i.operator-> ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return c->second;
|
||||
}
|
||||
|
||||
template <class Attr, class Iter>
|
||||
static size_t index_from_attr (const Attr *attr, const Iter &begin, const Iter &end, std::map<const Attr *, size_t> &cache)
|
||||
{
|
||||
typename std::map<const Attr *, size_t>::iterator cc = cache.find (attr);
|
||||
if (cc != cache.end ()) {
|
||||
return cc->second;
|
||||
}
|
||||
|
||||
size_t index = 0;
|
||||
for (Iter i = begin; i != end; ++i, ++index) {
|
||||
if (i.operator-> () == attr) {
|
||||
cache.insert (std::make_pair (i.operator-> (), index));
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
tl_assert (false);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// NetColorizer implementation
|
||||
|
||||
NetColorizer::NetColorizer ()
|
||||
{
|
||||
m_auto_colors_enabled = false;
|
||||
}
|
||||
|
||||
void
|
||||
NetColorizer::configure (const QColor &marker_color, const lay::ColorPalette *auto_colors)
|
||||
{
|
||||
m_marker_color = marker_color;
|
||||
if (auto_colors) {
|
||||
m_auto_colors = *auto_colors;
|
||||
m_auto_colors_enabled = true;
|
||||
} else {
|
||||
m_auto_colors_enabled = false;
|
||||
}
|
||||
|
||||
emit colors_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
NetColorizer::set_color_of_net (const db::Net *net, const QColor &color)
|
||||
{
|
||||
m_custom_color[net] = color;
|
||||
emit colors_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
NetColorizer::reset_color_of_net (const db::Net *net)
|
||||
{
|
||||
m_custom_color.erase (net);
|
||||
emit colors_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
NetColorizer::clear ()
|
||||
{
|
||||
m_net_index_by_object.clear ();
|
||||
m_custom_color.clear ();
|
||||
emit colors_changed ();
|
||||
}
|
||||
|
||||
QColor
|
||||
NetColorizer::color_of_net (const db::Net *net) const
|
||||
{
|
||||
std::map<const db::Net *, QColor>::const_iterator c = m_custom_color.find (net);
|
||||
if (c != m_custom_color.end ()) {
|
||||
return c->second;
|
||||
}
|
||||
|
||||
if (m_auto_colors_enabled) {
|
||||
const db::Circuit *circuit = net->circuit ();
|
||||
size_t index = index_from_attr (net, circuit->begin_nets (), circuit->end_nets (), m_net_index_by_object);
|
||||
return m_auto_colors.color_by_index ((unsigned int) index);
|
||||
} else {
|
||||
return m_marker_color;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// NetlistBrowserModel implementation
|
||||
|
||||
|
|
@ -80,10 +191,10 @@ static inline bool always (bool)
|
|||
return true;
|
||||
}
|
||||
|
||||
NetlistBrowserModel::NetlistBrowserModel (QWidget *parent, db::LayoutToNetlist *l2ndb)
|
||||
: QAbstractItemModel (parent), mp_l2ndb (l2ndb)
|
||||
NetlistBrowserModel::NetlistBrowserModel (QWidget *parent, db::LayoutToNetlist *l2ndb, NetColorizer *colorizer)
|
||||
: QAbstractItemModel (parent), mp_l2ndb (l2ndb), mp_colorizer (colorizer)
|
||||
{
|
||||
// .. nothing yet ..
|
||||
connect (mp_colorizer, SIGNAL (colors_changed ()), this, SLOT (colors_changed ()));
|
||||
}
|
||||
|
||||
NetlistBrowserModel::~NetlistBrowserModel ()
|
||||
|
|
@ -658,7 +769,7 @@ NetlistBrowserModel::text (const QModelIndex &index) const
|
|||
if (circuit && circuit->pin_by_id (other_index)) {
|
||||
const db::Pin *pin = circuit->pin_by_id (other_index);
|
||||
if (index.column () == 0) {
|
||||
return tl::to_qstring (pin->expanded_name ());
|
||||
return make_link_to (pin, circuit);
|
||||
} else {
|
||||
return make_link_to (ref->subcircuit ()->net_for_pin (pin->id ()));
|
||||
}
|
||||
|
|
@ -707,6 +818,16 @@ static QIcon icon_for_net ()
|
|||
return icon;
|
||||
}
|
||||
|
||||
static QIcon light_icon_for_net ()
|
||||
{
|
||||
QIcon icon;
|
||||
icon.addPixmap (QPixmap (QString::fromUtf8 (":/images/icon_net_light_48.png")));
|
||||
icon.addPixmap (QPixmap (QString::fromUtf8 (":/images/icon_net_light_32.png")));
|
||||
icon.addPixmap (QPixmap (QString::fromUtf8 (":/images/icon_net_light_24.png")));
|
||||
icon.addPixmap (QPixmap (QString::fromUtf8 (":/images/icon_net_light_16.png")));
|
||||
return icon;
|
||||
}
|
||||
|
||||
static QIcon icon_for_pin ()
|
||||
{
|
||||
QIcon icon;
|
||||
|
|
@ -750,17 +871,73 @@ static QIcon icon_for_circuit ()
|
|||
return icon;
|
||||
}
|
||||
|
||||
static QIcon net_icon_with_color (const QColor &color)
|
||||
{
|
||||
if (! color.isValid ()) {
|
||||
return icon_for_net ();
|
||||
}
|
||||
|
||||
QIcon colored_icon;
|
||||
QIcon original_icon = light_icon_for_net ();
|
||||
|
||||
QList<QSize> sizes = original_icon.availableSizes ();
|
||||
for (QList<QSize>::const_iterator i = sizes.begin (); i != sizes.end (); ++i) {
|
||||
|
||||
QImage image (*i, QImage::Format_ARGB32);
|
||||
image.fill (Qt::transparent);
|
||||
QPainter painter (&image);
|
||||
original_icon.paint (&painter, 0, 0, i->width (), i->height ());
|
||||
|
||||
for (int x = 0; x < i->width (); ++x) {
|
||||
for (int y = 0; y < i->height (); ++y) {
|
||||
QRgb pixel = image.pixel (x, y);
|
||||
pixel = (pixel & ~RGB_MASK) | (color.rgb () & RGB_MASK);
|
||||
image.setPixel (x, y, pixel);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
colored_icon.addPixmap (QPixmap::fromImage (image));
|
||||
|
||||
}
|
||||
|
||||
return colored_icon;
|
||||
}
|
||||
|
||||
QIcon
|
||||
NetlistBrowserModel::icon_for_net (const db::Net *net) const
|
||||
{
|
||||
if (mp_colorizer) {
|
||||
|
||||
QColor color = mp_colorizer->color_of_net (net);
|
||||
|
||||
lay::color_t rgb = lay::color_t (color.rgb ());
|
||||
std::map<lay::color_t, QIcon>::const_iterator c = m_net_icon_per_color.find (rgb);
|
||||
if (c == m_net_icon_per_color.end ()) {
|
||||
c = m_net_icon_per_color.insert (std::make_pair (rgb, net_icon_with_color (color))).first;
|
||||
}
|
||||
|
||||
return c->second;
|
||||
|
||||
} else {
|
||||
return lay::icon_for_net ();
|
||||
}
|
||||
}
|
||||
|
||||
QIcon
|
||||
NetlistBrowserModel::icon (const QModelIndex &index) const
|
||||
{
|
||||
void *id = index.internalPointer ();
|
||||
|
||||
const db::Net *net = net_from_index (index);
|
||||
if (net) {
|
||||
return icon_for_net (net);
|
||||
}
|
||||
|
||||
if (is_id_circuit (id)) {
|
||||
return icon_for_circuit ();
|
||||
} else if (is_id_circuit_pin (id) || is_id_circuit_subcircuit_pin (id)) {
|
||||
} else if (is_id_circuit_pin (id)) {
|
||||
return icon_for_pin ();
|
||||
} else if (is_id_circuit_pin_net (id)) {
|
||||
return icon_for_net ();
|
||||
} else if (is_id_circuit_device (id)) {
|
||||
|
||||
const db::Device *device = device_from_id (id);
|
||||
|
|
@ -768,12 +945,8 @@ NetlistBrowserModel::icon (const QModelIndex &index) const
|
|||
return icon_for_device (device->device_class ());
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_device_terminal (id)) {
|
||||
return icon_for_net ();
|
||||
} else if (is_id_circuit_subcircuit (id)) {
|
||||
return icon_for_circuit ();
|
||||
} else if (is_id_circuit_net (id)) {
|
||||
return icon_for_net ();
|
||||
} else if (is_id_circuit_net_pin (id) || is_id_circuit_net_subcircuit_pin_others (id)) {
|
||||
return icon_for_pin ();
|
||||
} else if (is_id_circuit_net_subcircuit_pin (id)) {
|
||||
|
|
@ -785,8 +958,6 @@ NetlistBrowserModel::icon (const QModelIndex &index) const
|
|||
return icon_for_device (ref->device ()->device_class ());
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_net_device_terminal_others (id)) {
|
||||
return icon_for_net ();
|
||||
}
|
||||
|
||||
return QIcon ();
|
||||
|
|
@ -923,6 +1094,76 @@ NetlistBrowserModel::index (int row, int column, const QModelIndex &parent) cons
|
|||
return createIndex (row, column, new_id);
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserModel::colors_changed ()
|
||||
{
|
||||
// @@@ TODO: refresh colors of nets
|
||||
}
|
||||
|
||||
const db::Net *
|
||||
NetlistBrowserModel::net_from_index (const QModelIndex &index) const
|
||||
{
|
||||
void *id = index.internalPointer ();
|
||||
if (is_id_circuit_net (id)) {
|
||||
|
||||
return net_from_id (id);
|
||||
|
||||
} else if (is_id_circuit_device_terminal (id)) {
|
||||
|
||||
const db::Device *device = device_from_id (id);
|
||||
if (device && device->device_class ()) {
|
||||
size_t terminal = circuit_device_terminal_index_from_id (id);
|
||||
if (device->device_class ()->terminal_definitions ().size () > terminal) {
|
||||
return device->net_for_terminal (device->device_class ()->terminal_definitions () [terminal].id ());
|
||||
}
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_pin_net (id)) {
|
||||
|
||||
const db::Circuit *circuit = circuit_from_id (id);
|
||||
const db::Pin *pin = pin_from_id (id);
|
||||
if (pin) {
|
||||
return circuit->net_for_pin (pin->id ());
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_subcircuit_pin (id)) {
|
||||
|
||||
const db::SubCircuit *subcircuit = subcircuit_from_id (id);
|
||||
if (subcircuit && subcircuit->circuit () && subcircuit->circuit_ref ()) {
|
||||
const db::Pin *pin = pin_from_id (id);
|
||||
if (pin) {
|
||||
return subcircuit->net_for_pin (pin->id ());
|
||||
}
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_net_subcircuit_pin_others (id)) {
|
||||
|
||||
const db::NetSubcircuitPinRef *ref = net_subcircuit_pinref_from_id (id);
|
||||
size_t other_index = circuit_net_subcircuit_pin_other_index_from_id (id);
|
||||
|
||||
if (ref && ref->pin () && ref->subcircuit ()) {
|
||||
const db::Circuit *circuit = ref->subcircuit ()->circuit_ref ();
|
||||
if (circuit && circuit->pin_by_id (other_index)) {
|
||||
const db::Pin *pin = circuit->pin_by_id (other_index);
|
||||
return ref->subcircuit ()->net_for_pin (pin->id ());
|
||||
}
|
||||
}
|
||||
|
||||
} else if (is_id_circuit_net_device_terminal_others (id)) {
|
||||
|
||||
const db::NetTerminalRef *ref = net_terminalref_from_id (id);
|
||||
size_t other_index = circuit_net_device_terminal_other_index_from_id (id);
|
||||
|
||||
if (ref && ref->device_class () && ref->device_class ()->terminal_definitions ().size () > other_index) {
|
||||
const db::DeviceTerminalDefinition &def = ref->device_class ()->terminal_definitions ()[other_index];
|
||||
return ref->device ()->net_for_terminal (def.id ());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
QModelIndex
|
||||
NetlistBrowserModel::index_from_id (void *id, int column) const
|
||||
{
|
||||
|
|
@ -1107,30 +1348,6 @@ NetlistBrowserModel::circuit_from_id (void *id) const
|
|||
return c->second;
|
||||
}
|
||||
|
||||
template <class Obj, class Attr, class Iter>
|
||||
static const Attr *attr_by_object_and_index (const Obj *obj, size_t index, const Iter &begin, const Iter &end, std::map<const Obj *, std::map<size_t, const Attr *> > &cache)
|
||||
{
|
||||
typename std::map<const Obj *, std::map<size_t, const Attr *> >::iterator cc = cache.find (obj);
|
||||
if (cc == cache.end ()) {
|
||||
cc = cache.insert (std::make_pair (obj, std::map<size_t, const Attr *> ())).first;
|
||||
}
|
||||
|
||||
typename std::map<size_t, const Attr *>::iterator c = cc->second.find (index);
|
||||
if (c == cc->second.end ()) {
|
||||
|
||||
c = cc->second.insert (std::make_pair (index, (const Attr *) 0)).first;
|
||||
for (Iter i = begin; i != end; ++i) {
|
||||
if (index-- == 0) {
|
||||
c->second = i.operator-> ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return c->second;
|
||||
}
|
||||
|
||||
const db::Net *
|
||||
NetlistBrowserModel::net_from_id (void *id) const
|
||||
{
|
||||
|
|
@ -1215,25 +1432,6 @@ NetlistBrowserModel::subcircuit_from_id (void *id) const
|
|||
}
|
||||
}
|
||||
|
||||
template <class Attr, class Iter>
|
||||
static size_t index_from_attr (const Attr *attr, const Iter &begin, const Iter &end, std::map<const Attr *, size_t> &cache)
|
||||
{
|
||||
typename std::map<const Attr *, size_t>::iterator cc = cache.find (attr);
|
||||
if (cc != cache.end ()) {
|
||||
return cc->second;
|
||||
}
|
||||
|
||||
size_t index = 0;
|
||||
for (Iter i = begin; i != end; ++i, ++index) {
|
||||
if (i.operator-> () == attr) {
|
||||
cache.insert (std::make_pair (i.operator-> (), index));
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
tl_assert (false);
|
||||
}
|
||||
|
||||
size_t
|
||||
NetlistBrowserModel::circuit_index (const db::Circuit *circuit) const
|
||||
{
|
||||
|
|
@ -1273,12 +1471,13 @@ NetlistBrowserPage::NetlistBrowserPage (QWidget * /*parent*/)
|
|||
m_marker_halo (-1),
|
||||
m_marker_dither_pattern (-1),
|
||||
m_marker_intensity (0),
|
||||
m_auto_colors_enabled (false),
|
||||
mp_view (0),
|
||||
m_cv_index (0),
|
||||
mp_plugin_root (0),
|
||||
m_history_ptr (0),
|
||||
m_signals_enabled (true)
|
||||
m_signals_enabled (true),
|
||||
m_enable_updates (true),
|
||||
m_update_needed (true)
|
||||
{
|
||||
Ui::NetlistBrowserPage::setupUi (this);
|
||||
|
||||
|
|
@ -1314,7 +1513,7 @@ NetlistBrowserPage::NetlistBrowserPage (QWidget * /*parent*/)
|
|||
|
||||
NetlistBrowserPage::~NetlistBrowserPage ()
|
||||
{
|
||||
// .. nothing yet ..
|
||||
clear_markers ();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1326,16 +1525,12 @@ NetlistBrowserPage::set_plugin_root (lay::PluginRoot *pr)
|
|||
void
|
||||
NetlistBrowserPage::set_highlight_style (QColor color, int line_width, int vertex_size, int halo, int dither_pattern, int marker_intensity, const lay::ColorPalette *auto_colors)
|
||||
{
|
||||
m_marker_color = color;
|
||||
m_colorizer.configure (color, auto_colors);
|
||||
m_marker_line_width = line_width;
|
||||
m_marker_vertex_size = vertex_size;
|
||||
m_marker_halo = halo;
|
||||
m_marker_dither_pattern = dither_pattern;
|
||||
m_marker_intensity = marker_intensity;
|
||||
m_auto_colors_enabled = (auto_colors != 0);
|
||||
if (auto_colors) {
|
||||
m_auto_colors = *auto_colors;
|
||||
}
|
||||
update_highlights ();
|
||||
}
|
||||
|
||||
|
|
@ -1361,9 +1556,7 @@ NetlistBrowserPage::set_max_shape_count (size_t max_shape_count)
|
|||
{
|
||||
if (m_max_shape_count != max_shape_count) {
|
||||
m_max_shape_count = max_shape_count;
|
||||
#if 0 // @@@
|
||||
update_marker_list (1 /*select first*/);
|
||||
#endif
|
||||
update_highlights ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1380,6 +1573,21 @@ NetlistBrowserPage::anchor_clicked (const QString &a)
|
|||
navigate_to (id, true);
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::current_index_changed (const QModelIndex &index)
|
||||
{
|
||||
if (index.isValid () && m_signals_enabled) {
|
||||
|
||||
void *id = index.internalPointer ();
|
||||
add_to_history (id, true);
|
||||
|
||||
NetlistBrowserModel *model = dynamic_cast<NetlistBrowserModel *> (directory_tree->model ());
|
||||
tl_assert (model != 0);
|
||||
show_net (model->net_from_index (index));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::navigate_to (void *id, bool fwd)
|
||||
{
|
||||
|
|
@ -1401,14 +1609,8 @@ NetlistBrowserPage::navigate_to (void *id, bool fwd)
|
|||
m_signals_enabled = true;
|
||||
|
||||
add_to_history (id, fwd);
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::current_index_changed (const QModelIndex &index)
|
||||
{
|
||||
if (index.isValid () && m_signals_enabled) {
|
||||
add_to_history (index.internalPointer (), true);
|
||||
}
|
||||
show_net (model->net_from_index (index));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1488,50 +1690,25 @@ NetlistBrowserPage::show_all (bool f)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::update_highlights ()
|
||||
{
|
||||
#if 0
|
||||
if (! m_enable_updates) {
|
||||
m_update_needed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_recursion_sentinel) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_recursion_sentinel = true;
|
||||
try {
|
||||
do_update_markers ();
|
||||
} catch (...) {
|
||||
m_recursion_sentinel = false;
|
||||
throw;
|
||||
}
|
||||
m_recursion_sentinel = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::set_l2ndb (db::LayoutToNetlist *database)
|
||||
{
|
||||
if (database != mp_database.get ()) {
|
||||
|
||||
mp_database.reset (database);
|
||||
clear_markers ();
|
||||
show_net (0);
|
||||
|
||||
if (! database) {
|
||||
directory_tree->setModel (0);
|
||||
return;
|
||||
}
|
||||
|
||||
// @@@ release_markers ();
|
||||
|
||||
// NOTE: with the tree as the parent, the tree will take over ownership of the model
|
||||
NetlistBrowserModel *new_model = new NetlistBrowserModel (directory_tree, database);
|
||||
NetlistBrowserModel *new_model = new NetlistBrowserModel (directory_tree, database, &m_colorizer);
|
||||
|
||||
directory_tree->setModel (new_model);
|
||||
connect (directory_tree->selectionModel (), SIGNAL (currentChanged (const QModelIndex &, const QModelIndex &)), this, SLOT (current_index_changed (const QModelIndex &)));
|
||||
// @@@ connect (directory_tree->selectionModel (), SIGNAL (selectionChanged (const QItemSelection &, const QItemSelection &)), this, SLOT (directory_selection_changed (const QItemSelection &, const QItemSelection &)));
|
||||
|
||||
directory_tree->header ()->setSortIndicatorShown (true);
|
||||
|
||||
|
|
@ -1540,23 +1717,200 @@ NetlistBrowserPage::set_l2ndb (db::LayoutToNetlist *database)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::show_net (const db::Net *net)
|
||||
{
|
||||
if (net != mp_current_net) {
|
||||
|
||||
mp_current_net = net;
|
||||
clear_markers ();
|
||||
|
||||
if (net) {
|
||||
adjust_view ();
|
||||
update_highlights ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::enable_updates (bool f)
|
||||
{
|
||||
#if 0 // @@@
|
||||
if (f != m_enable_updates) {
|
||||
|
||||
m_enable_updates = f;
|
||||
|
||||
if (f && m_update_needed) {
|
||||
update_markers ();
|
||||
update_info_text ();
|
||||
update_highlights ();
|
||||
// @@@ update_info_text ();
|
||||
}
|
||||
|
||||
m_update_needed = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::adjust_view ()
|
||||
{
|
||||
if (! mp_database.get () || ! mp_view || ! mp_current_net || ! mp_current_net->circuit ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const lay::CellView &cv = mp_view->cellview (m_cv_index);
|
||||
if (! cv.is_valid ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_window != lay::NetlistBrowserConfig::FitNet && m_window != lay::NetlistBrowserConfig::Center && m_window != lay::NetlistBrowserConfig::CenterSize) {
|
||||
return;
|
||||
}
|
||||
|
||||
const db::Layout *layout = mp_database->internal_layout ();
|
||||
if (! layout) {
|
||||
return;
|
||||
}
|
||||
|
||||
db::cell_index_type cell_index = mp_current_net->circuit ()->cell_index ();
|
||||
size_t cluster_id = mp_current_net->cluster_id ();
|
||||
|
||||
db::DBox bbox;
|
||||
|
||||
// @@@std::map<unsigned int, std::vector<db::DCplxTrans> > tv_by_layer = mp_view->cv_transform_variants_by_layer (m_cv_index);
|
||||
std::vector<db::DCplxTrans> tv = mp_view->cv_transform_variants (m_cv_index);
|
||||
|
||||
const db::Connectivity &conn = mp_database->connectivity ();
|
||||
for (db::Connectivity::layer_iterator layer = conn.begin_layers (); layer != conn.end_layers (); ++layer) {
|
||||
|
||||
// @@@ TODO: how to get the original layer?
|
||||
|
||||
db::Box layer_bbox;
|
||||
db::recursive_cluster_shape_iterator<db::PolygonRef> shapes (mp_database->net_clusters (), *layer, cell_index, cluster_id);
|
||||
while (! shapes.at_end ()) {
|
||||
layer_bbox += shapes.trans () * shapes->box ();
|
||||
++shapes;
|
||||
}
|
||||
|
||||
for (std::vector<db::DCplxTrans>::const_iterator t = tv.begin (); t != tv.end (); ++t) {
|
||||
bbox += *t * db::CplxTrans (layout->dbu ()) * layer_bbox;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (! bbox.empty ()) {
|
||||
|
||||
if (m_window == lay::NetlistBrowserConfig::FitNet) {
|
||||
|
||||
mp_view->zoom_box (bbox.enlarged (db::DVector (m_window_dim, m_window_dim)));
|
||||
|
||||
} else if (m_window == lay::NetlistBrowserConfig::Center) {
|
||||
|
||||
mp_view->pan_center (bbox.p1 () + (bbox.p2 () - bbox.p1 ()) * 0.5);
|
||||
|
||||
} else if (m_window == lay::NetlistBrowserConfig::CenterSize) {
|
||||
|
||||
double w = std::max (bbox.width (), m_window_dim);
|
||||
double h = std::max (bbox.height (), m_window_dim);
|
||||
db::DPoint center (bbox.p1() + (bbox.p2 () - bbox.p1 ()) * 0.5);
|
||||
db::DVector d (w * 0.5, h * 0.5);
|
||||
mp_view->zoom_box (db::DBox (center - d, center + d));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::update_highlights ()
|
||||
{
|
||||
if (! m_enable_updates) {
|
||||
m_update_needed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
clear_markers ();
|
||||
|
||||
if (! mp_database.get () || ! mp_view || ! mp_current_net || ! mp_current_net->circuit ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const db::Layout *layout = mp_database->internal_layout ();
|
||||
if (! layout) {
|
||||
return;
|
||||
}
|
||||
|
||||
db::cell_index_type cell_index = mp_current_net->circuit ()->cell_index ();
|
||||
size_t cluster_id = mp_current_net->cluster_id ();
|
||||
|
||||
// @@@std::map<unsigned int, std::vector<db::DCplxTrans> > tv_by_layer = mp_view->cv_transform_variants_by_layer (m_cv_index);
|
||||
std::vector<db::DCplxTrans> tv = mp_view->cv_transform_variants (m_cv_index);
|
||||
|
||||
size_t n_markers = 0;
|
||||
QColor net_color = m_colorizer.color_of_net (mp_current_net);
|
||||
|
||||
const db::Connectivity &conn = mp_database->connectivity ();
|
||||
for (db::Connectivity::layer_iterator layer = conn.begin_layers (); layer != conn.end_layers (); ++layer) {
|
||||
|
||||
// @@@ TODO: how to get the original layer?
|
||||
|
||||
db::recursive_cluster_shape_iterator<db::PolygonRef> shapes (mp_database->net_clusters (), *layer, cell_index, cluster_id);
|
||||
while (! shapes.at_end () && n_markers < m_max_shape_count) {
|
||||
|
||||
mp_markers.push_back (new lay::Marker (mp_view, m_cv_index));
|
||||
mp_markers.back ()->set (*shapes, shapes.trans (), tv);
|
||||
|
||||
#if 0
|
||||
// @@@
|
||||
if (! original.at_end ()) {
|
||||
mp_markers.back ()->set_line_width (original->width (true));
|
||||
mp_markers.back ()->set_vertex_size (1);
|
||||
mp_markers.back ()->set_dither_pattern (original->dither_pattern (true));
|
||||
if (view ()->background_color ().green () < 128) {
|
||||
mp_markers.back ()->set_color (original->eff_fill_color_brighter (true, (m_marker_intensity * 255) / 100));
|
||||
mp_markers.back ()->set_frame_color (original->eff_frame_color_brighter (true, (m_marker_intensity * 255) / 100));
|
||||
} else {
|
||||
mp_markers.back ()->set_color (original->eff_fill_color_brighter (true, (-m_marker_intensity * 255) / 100));
|
||||
mp_markers.back ()->set_frame_color (original->eff_frame_color_brighter (true, (-m_marker_intensity * 255) / 100));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// @@@
|
||||
mp_markers.back ()->set_color (net_color);
|
||||
mp_markers.back ()->set_frame_color (net_color);
|
||||
// @@@
|
||||
|
||||
if (m_marker_line_width >= 0) {
|
||||
mp_markers.back ()->set_line_width (m_marker_line_width);
|
||||
}
|
||||
|
||||
if (m_marker_vertex_size >= 0) {
|
||||
mp_markers.back ()->set_vertex_size (m_marker_vertex_size);
|
||||
}
|
||||
|
||||
if (m_marker_halo >= 0) {
|
||||
mp_markers.back ()->set_halo (m_marker_halo);
|
||||
}
|
||||
|
||||
if (m_marker_dither_pattern >= 0) {
|
||||
mp_markers.back ()->set_dither_pattern (m_marker_dither_pattern);
|
||||
}
|
||||
|
||||
++shapes;
|
||||
++n_markers;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
NetlistBrowserPage::clear_markers ()
|
||||
{
|
||||
for (std::vector <lay::Marker *>::iterator m = mp_markers.begin (); m != mp_markers.end (); ++m) {
|
||||
delete *m;
|
||||
}
|
||||
|
||||
mp_markers.clear ();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,36 @@ namespace lay
|
|||
|
||||
class LayoutView;
|
||||
class PluginRoot;
|
||||
class Marker;
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// NetColorizer definition
|
||||
|
||||
class LAYBASIC_PUBLIC NetColorizer
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NetColorizer ();
|
||||
|
||||
void configure (const QColor &marker_color, const lay::ColorPalette *auto_colors);
|
||||
void set_color_of_net (const db::Net *net, const QColor &color);
|
||||
void reset_color_of_net (const db::Net *net);
|
||||
void clear ();
|
||||
|
||||
QColor color_of_net (const db::Net *net) const;
|
||||
|
||||
signals:
|
||||
void colors_changed ();
|
||||
|
||||
private:
|
||||
QColor m_marker_color;
|
||||
lay::ColorPalette m_auto_colors;
|
||||
bool m_auto_colors_enabled;
|
||||
std::map<const db::Net *, QColor> m_custom_color;
|
||||
mutable std::map<const db::Net *, size_t> m_net_index_by_object;
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
// NetlistBrowserModel definition
|
||||
|
|
@ -66,8 +96,10 @@ class PluginRoot;
|
|||
class LAYBASIC_PUBLIC NetlistBrowserModel
|
||||
: public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NetlistBrowserModel (QWidget *parent, db::LayoutToNetlist *l2ndb);
|
||||
NetlistBrowserModel (QWidget *parent, db::LayoutToNetlist *l2ndb, NetColorizer *colorizer);
|
||||
~NetlistBrowserModel ();
|
||||
|
||||
virtual int columnCount (const QModelIndex &parent) const;
|
||||
|
|
@ -81,6 +113,11 @@ public:
|
|||
|
||||
QModelIndex index_from_id (void *id, int column) const;
|
||||
|
||||
const db::Net *net_from_index (const QModelIndex &index) const;
|
||||
|
||||
private slots:
|
||||
void colors_changed ();
|
||||
|
||||
private:
|
||||
void *make_id_circuit (size_t circuit_index) const;
|
||||
void *make_id_circuit_pin (size_t circuit_index, size_t pin_index) const;
|
||||
|
|
@ -144,7 +181,10 @@ private:
|
|||
return const_cast<db::Netlist *> (mp_l2ndb->netlist ());
|
||||
}
|
||||
|
||||
QIcon icon_for_net (const db::Net *net) const;
|
||||
|
||||
db::LayoutToNetlist *mp_l2ndb;
|
||||
NetColorizer *mp_colorizer;
|
||||
mutable std::map<size_t, const db::Circuit *> m_circuit_by_index;
|
||||
mutable std::map<const db::Circuit *, std::map<size_t, const db::Net *> > m_net_by_circuit_and_index;
|
||||
mutable std::map<const db::Net *, std::map<size_t, const db::NetSubcircuitPinRef *> > m_subcircuit_pinref_by_net_and_index;
|
||||
|
|
@ -157,6 +197,7 @@ private:
|
|||
mutable std::map<const db::Net *, size_t> m_net_index_by_object;
|
||||
mutable std::map<const db::Pin *, size_t> m_pin_index_by_object;
|
||||
mutable std::map<const db::SubCircuit *, size_t> m_subcircuit_index_by_object;
|
||||
mutable std::map<lay::color_t, QIcon> m_net_icon_per_color;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -206,14 +247,6 @@ public:
|
|||
*/
|
||||
void set_window (lay::NetlistBrowserConfig::net_window_type window_type, double window_dim);
|
||||
|
||||
/**
|
||||
* @brief Update the net highlights
|
||||
*
|
||||
* This method should be called if the cellview has changed so the highlights can
|
||||
* be recomputed and shown in the new cell context.
|
||||
*/
|
||||
void update_highlights ();
|
||||
|
||||
/**
|
||||
* @brief Set the maximum number of shapes highlighted for a net
|
||||
*/
|
||||
|
|
@ -250,6 +283,11 @@ public:
|
|||
*/
|
||||
void enable_updates (bool f);
|
||||
|
||||
/**
|
||||
* @brief Updates net highlights
|
||||
*/
|
||||
void update_highlights ();
|
||||
|
||||
private slots:
|
||||
void show_all_clicked ();
|
||||
void filter_changed ();
|
||||
|
|
@ -261,17 +299,15 @@ private slots:
|
|||
private:
|
||||
bool m_show_all;
|
||||
QAction *m_show_all_action;
|
||||
NetColorizer m_colorizer;
|
||||
NetlistBrowserConfig::net_window_type m_window;
|
||||
double m_window_dim;
|
||||
size_t m_max_shape_count;
|
||||
QColor m_marker_color;
|
||||
int m_marker_line_width;
|
||||
int m_marker_vertex_size;
|
||||
int m_marker_halo;
|
||||
int m_marker_dither_pattern;
|
||||
int m_marker_intensity;
|
||||
lay::ColorPalette m_auto_colors;
|
||||
bool m_auto_colors_enabled;
|
||||
lay::LayoutView *mp_view;
|
||||
unsigned int m_cv_index;
|
||||
lay::PluginRoot *mp_plugin_root;
|
||||
|
|
@ -279,9 +315,16 @@ private:
|
|||
std::vector<void *> m_history;
|
||||
size_t m_history_ptr;
|
||||
bool m_signals_enabled;
|
||||
std::vector <lay::Marker *> mp_markers;
|
||||
bool m_enable_updates;
|
||||
bool m_update_needed;
|
||||
const db::Net *mp_current_net;
|
||||
|
||||
void add_to_history (void *id, bool fwd);
|
||||
void navigate_to (void *id, bool forward = true);
|
||||
void adjust_view ();
|
||||
void clear_markers ();
|
||||
void show_net (const db::Net *net);
|
||||
};
|
||||
|
||||
} // namespace lay
|
||||
|
|
|
|||
|
|
@ -24,5 +24,9 @@
|
|||
<file>images/icon_circuit_24.png</file>
|
||||
<file>images/icon_circuit_32.png</file>
|
||||
<file>images/icon_circuit_48.png</file>
|
||||
<file>images/icon_net_light_16.png</file>
|
||||
<file>images/icon_net_light_24.png</file>
|
||||
<file>images/icon_net_light_32.png</file>
|
||||
<file>images/icon_net_light_48.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ TEST (1)
|
|||
db::LayoutToNetlist l2n;
|
||||
l2n.load (tl::testsrc () + "/testdata/lay/l2n_browser.l2n");
|
||||
|
||||
std::auto_ptr<lay::NetlistBrowserModel> model (new lay::NetlistBrowserModel (0, &l2n));
|
||||
lay::NetColorizer colorizer;
|
||||
std::auto_ptr<lay::NetlistBrowserModel> model (new lay::NetlistBrowserModel (0, &l2n, &colorizer));
|
||||
|
||||
EXPECT_EQ (model->hasChildren (QModelIndex ()), true);
|
||||
// two circuits
|
||||
|
|
|
|||