Use QMDIWidget as base peripheral view instead of QMainWindow
MODIFY
resources/icons/icons.qrc
resources/icons/icons.qrc
<file>clear.svg</file>
<file>moon.svg</file>
<file>led.svg</file>
+ <file>tile.svg</file>
</qresource>
</RCC>

ADD
resources/icons/tile.svg
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ id="light"
+ enable-background="new 0 0 24 24"
+ height="512"
+ viewBox="0 0 24 24"
+ width="512"
+ version="1.1"
+ sodipodi:docname="tile.svg"
+ inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">
+ <metadata
+ id="metadata940">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs938" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1848"
+ inkscape:window-height="1016"
+ id="namedview936"
+ showgrid="false"
+ inkscape:zoom="1.6367188"
+ inkscape:cx="256"
+ inkscape:cy="256"
+ inkscape:window-x="72"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="light" />
+ <g
+ id="g921">
+ <path
+ d="m9.5 8h-8c-.827 0-1.5-.673-1.5-1.5v-5c0-.827.673-1.5 1.5-1.5h8c.827 0 1.5.673 1.5 1.5v5c0 .827-.673 1.5-1.5 1.5zm-8-7c-.275 0-.5.224-.5.5v5c0 .276.225.5.5.5h8c.275 0 .5-.224.5-.5v-5c0-.276-.225-.5-.5-.5z"
+ id="path919" />
+ </g>
+ <g
+ id="g925">
+ <path
+ d="m9.5 24h-8c-.827 0-1.5-.673-1.5-1.5v-11c0-.827.673-1.5 1.5-1.5h8c.827 0 1.5.673 1.5 1.5v11c0 .827-.673 1.5-1.5 1.5zm-8-13c-.275 0-.5.224-.5.5v11c0 .276.225.5.5.5h8c.275 0 .5-.224.5-.5v-11c0-.276-.225-.5-.5-.5z"
+ id="path923" />
+ </g>
+ <g
+ id="g929">
+ <path
+ d="m22.5 24h-8c-.827 0-1.5-.673-1.5-1.5v-5c0-.827.673-1.5 1.5-1.5h8c.827 0 1.5.673 1.5 1.5v5c0 .827-.673 1.5-1.5 1.5zm-8-7c-.275 0-.5.224-.5.5v5c0 .276.225.5.5.5h8c.275 0 .5-.224.5-.5v-5c0-.276-.225-.5-.5-.5z"
+ id="path927" />
+ </g>
+ <g
+ id="g933">
+ <path
+ d="m22.5 14h-8c-.827 0-1.5-.673-1.5-1.5v-11c0-.827.673-1.5 1.5-1.5h8c.827 0 1.5.673 1.5 1.5v11c0 .827-.673 1.5-1.5 1.5zm-8-13c-.275 0-.5.224-.5.5v11c0 .276.225.5.5.5h8c.275 0 .5-.224.5-.5v-11c0-.276-.225-.5-.5-.5z"
+ id="path931" />
+ </g>
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288147;stroke-miterlimit:4;stroke-dasharray:0.87288144, 2.61864432;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 28.349403,148.39353 c -2.257445,-0.84825 -4.509612,-2.99765 -5.556584,-5.30301 -1.082008,-2.38252 -1.137996,-5.19728 -1.150761,-57.854568 L 21.62864,29.88575 23.049178,27.192994 c 0.885583,-1.678701 2.323621,-3.206664 3.818616,-4.057406 l 2.398077,-1.364651 87.888569,-0.01005 c 97.85227,-0.01119 90.32937,-0.344369 93.75929,4.152476 l 1.6457,2.157628 v 57.281994 c 0,57.164185 -0.002,57.285545 -1.27814,59.006985 -0.70297,0.94875 -2.18707,2.34361 -3.29799,3.0997 l -2.01986,1.3747 -88.34878,-0.0482 c -48.591834,-0.0266 -88.761199,-0.20323 -89.265257,-0.39263 z"
+ id="path942"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288147;stroke-miterlimit:4;stroke-dasharray:0.87288144, 2.61864432;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 306.10288,276.50855 c -2.29248,-0.69011 -5.1837,-3.42786 -6.24877,-5.91709 -0.70487,-1.64737 -0.83959,-21.35541 -0.83117,-121.58472 l 0.01,-119.618673 1.3771,-2.431461 c 0.7704,-1.360247 2.44832,-3.039674 3.80857,-3.811994 l 2.43146,-1.380532 88.63952,0.146122 88.63953,0.146123 2.15754,1.645703 c 4.53348,3.457974 4.16245,-7.751126 4.16245,125.752462 0,119.78677 -10e-4,119.88353 -1.25451,122.11387 -0.68998,1.22765 -2.25071,2.91473 -3.46827,3.74906 l -2.21375,1.51695 -87.72028,0.10338 c -48.45861,0.0571 -88.51213,-0.13499 -89.48947,-0.4292 z"
+ id="path944"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288147;stroke-miterlimit:4;stroke-dasharray:0.87288144, 2.61864432;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 28.043914,489.50538 c -2.276941,-1.01633 -4.906803,-3.77477 -5.765426,-6.0473 -0.913579,-2.41799 -0.913579,-239.14447 0,-241.56246 0.884338,-2.34059 3.520933,-5.05475 5.898547,-6.07206 1.639308,-0.70141 16.464383,-0.83899 89.202865,-0.8278 83.75339,0.0129 87.33681,0.0588 89.74116,1.15076 1.3774,0.62554 3.16451,2.06294 3.97137,3.19422 l 1.467,2.05687 v 121.27924 121.27924 l -1.467,2.05687 c -0.80686,1.13129 -2.59397,2.56869 -3.97137,3.19422 -2.40522,1.09232 -5.96286,1.13693 -89.87428,1.12685 -71.658425,-0.009 -87.699542,-0.15763 -89.202866,-0.82865 z"
+ id="path946"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288147;stroke-miterlimit:4;stroke-dasharray:0.87288144, 2.61864432;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 304.48727,488.96444 c -1.82414,-0.96464 -3.10575,-2.24884 -4.07675,-4.08503 l -1.41621,-2.6781 0.16203,-56.29685 0.16204,-56.29684 1.71177,-2.24407 c 3.63719,-4.76822 -4.49898,-4.35943 90.85147,-4.56469 46.87733,-0.10092 86.66107,-0.0141 88.40831,0.19285 3.45782,0.40963 6.37571,2.07151 8.37561,4.77033 1.27267,1.71744 1.27876,1.96674 1.42607,58.34845 l 0.14793,56.62364 -1.36989,2.39808 c -0.85175,1.49105 -2.38837,2.93536 -4.06264,3.81861 l -2.69276,1.42054 H 394.63103 307.1478 Z"
+ id="path948"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffeeaa;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="M 28.043921,489.50538 C 25.76698,488.48904 23.137118,485.7306 22.278495,483.45807 21.82744,482.26426 21.628647,445.24014 21.628647,362.42768 V 243.11725 l 1.406924,-2.66053 c 0.961631,-1.81847 2.248984,-3.10582 4.067457,-4.06746 l 2.660533,-1.40692 87.426569,0.0134 c 83.93846,0.0129 87.5265,0.0588 89.93094,1.15076 1.37739,0.62554 3.1645,2.06294 3.97136,3.19422 l 1.467,2.05687 v 121.27924 121.27923 l -1.467,2.05688 c -0.80686,1.13128 -2.59397,2.56868 -3.97136,3.19422 -2.40523,1.09232 -5.96287,1.13692 -89.87429,1.12684 -71.658418,-0.009 -87.699535,-0.15762 -89.202859,-0.82864 z"
+ id="path866"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#aaeeff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 305.42816,276.27717 c -2.27874,-1.02122 -4.90756,-3.78007 -5.76543,-6.0506 -0.45119,-1.19419 -0.64677,-38.26765 -0.63979,-121.27923 l 0.01,-119.559266 1.3771,-2.431461 c 0.7704,-1.360247 2.44832,-3.039674 3.80857,-3.811994 l 2.43146,-1.380532 88.63952,0.146122 88.63952,0.146123 2.30836,1.760731 c 4.33071,3.303305 4.01164,-6.692648 4.01164,125.678217 0,119.74563 -10e-4,119.84275 -1.25452,122.07308 -0.68998,1.22765 -2.2507,2.91473 -3.46827,3.74906 l -2.21375,1.51695 -88.02576,0.13211 c -72.61794,0.10899 -88.3466,-0.0117 -89.8587,-0.68931 z"
+ id="path870"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffccaa;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 28.34941,148.39353 c -2.257445,-0.84825 -4.509612,-2.99764 -5.556584,-5.30301 -1.082376,-2.38332 -1.137505,-5.19139 -1.14071,-58.103403 l -0.0034,-55.599043 1.377104,-2.431461 c 0.770401,-1.360247 2.448317,-3.039674 3.808564,-3.811994 l 2.431461,-1.380532 88.699905,0.146122 c 88.52024,0.145827 88.70333,0.148674 90.38707,1.405831 0.92794,0.69284 2.25403,2.018968 2.94687,2.946951 1.25136,1.67606 1.25971,2.067301 1.25971,59.029616 0,57.225453 -0.002,57.345893 -1.27814,59.067363 -0.70297,0.94875 -2.18707,2.34361 -3.29799,3.0997 l -2.01985,1.3747 -88.34879,-0.0482 c -48.591832,-0.0265 -88.761195,-0.20323 -89.265253,-0.39263 z"
+ id="path872"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#e6e6e6;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 39.622703,489.81051 c -12.978551,-0.39657 -13.65965,-0.5959 -16.244751,-4.75402 L 21.934136,482.73412 21.724173,363.2229 c -0.207768,-118.2619 -0.19727,-119.5361 1.004199,-121.89021 1.38865,-2.72088 2.633732,-3.93985 5.516494,-5.40082 1.88535,-0.95549 8.422027,-1.01664 89.508354,-0.8374 95.32685,0.21072 88.48633,-0.0663 92.51504,3.74691 l 1.98568,1.87947 v 121.956 121.95599 l -1.98568,1.87948 c -4.02427,3.80902 1.8934,3.54903 -82.02386,3.60367 -42.340815,0.0276 -82.220576,-0.10989 -88.621697,-0.30548 z"
+ id="path878"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#999999;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 321.89588,276.57314 c -18.40949,-0.38964 -18.42636,-0.39342 -21.13369,-4.74814 l -1.44381,-2.32238 -0.21004,-119.94063 -0.21004,-119.940648 1.58996,-2.402587 c 0.87447,-1.321423 2.69604,-3.134563 4.04793,-4.0292 l 2.45798,-1.626613 88.67392,0.445629 88.67393,0.445628 1.98403,1.513291 c 1.09121,0.83231 2.17305,1.980021 2.40408,2.55047 1.17787,2.908324 1.57376,41.853643 1.40175,137.89636 -0.17677,98.70046 -0.25316,105.20709 -1.25678,107.0424 -0.58772,1.07476 -1.96242,2.62243 -3.0549,3.43927 l -1.98632,1.48517 -72.70644,0.27087 c -39.98854,0.14898 -80.14274,0.11348 -89.23156,-0.0789 z"
+ id="path880"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 50.851418,148.23755 -23.62687,-0.31965 -1.654736,-1.52744 c -3.726943,-3.44025 -3.550668,-0.613 -3.820595,-61.27789 L 21.502388,29.638979 23.09818,27.227573 c 0.877686,-1.326272 2.681589,-3.129951 4.008673,-4.008173 l 2.41288,-1.596769 88.913427,0.52234 88.91342,0.522339 2.30094,2.301353 2.30093,2.301352 v 58.101176 58.101179 l -2.96126,2.681 -2.96125,2.681 -65.77383,-0.13858 c -36.1756,-0.0762 -76.405914,-0.28242 -89.400692,-0.45824 z"
+ id="path882"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 304.64801,489.07694 c -1.71017,-0.84652 -3.13844,-2.18991 -4.13349,-3.88783 l -1.52041,-2.59439 0.16213,-56.55394 c 0.16066,-56.03929 0.1736,-56.56929 1.42184,-58.24099 1.81954,-2.43681 3.99485,-3.90352 6.7303,-4.53795 3.46874,-0.80449 172.22819,-0.75355 175.13183,0.0529 2.91252,0.80889 5.91303,3.33901 6.97555,5.882 0.68318,1.63505 0.8334,12.02457 0.8334,57.6376 0,54.42163 -0.0268,55.69554 -1.22093,58.03622 -0.75371,1.47739 -2.23554,2.98781 -3.87229,3.94702 l -2.65137,1.5538 -87.62174,-4.8e-4 -87.62173,-4.8e-4 z"
+ id="path884"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 310.78453,275.95935 c -5.4635,-0.36706 -6.45352,-0.60813 -7.84802,-1.91094 -3.48426,-3.25518 -3.3004,0.22247 -3.46085,-65.46055 l -0.14821,-60.66996 -0.31838,59.57041 c -0.21794,40.77844 -0.31574,22.1489 -0.31002,-59.05553 l 0.008,-118.625928 1.87016,-2.310584 c 2.51186,-3.103392 5.92848,-5.805395 7.35343,-5.815397 0.63967,-0.0045 40.61698,0.188578 88.83846,0.429039 l 87.67541,0.437202 2.19624,2.198524 2.19623,2.198524 0.39819,8.859188 c 0.54274,12.075392 0.41079,227.920222 -0.14205,232.349312 -0.37059,2.96901 -0.80598,3.90228 -2.70783,5.80429 l -2.26624,2.26644 -83.54132,0.078 c -45.94773,0.0429 -86.35483,-0.11102 -89.79355,-0.34204 z"
+ id="path886"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424000000007;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 30.793324,489.11029 c -1.84821,-0.27835 -3.80288,-0.60008 -4.343712,-0.71495 -1.189503,-0.25264 -2.60873,-1.69302 -2.883403,-2.92636 -0.110474,-0.49606 -0.550535,-1.31433 -0.977913,-1.81839 -1.168976,-1.37871 -1.019006,-239.59103 0.152514,-242.25298 0.443671,-1.00811 0.787347,-1.90167 0.763723,-1.98568 -0.0736,-0.26173 2.078641,-2.42272 2.400963,-2.41071 0.168019,0.006 1.130311,-0.36896 2.138425,-0.83382 4.094364,-1.88798 175.646229,-1.30189 179.322189,0.61263 0.8401,0.43754 2.28353,1.50073 3.20764,2.36263 l 1.68019,1.5671 v 121.96709 121.96708 l -1.68019,1.5671 c -3.70361,3.45433 2.2086,3.23732 -90.57756,3.32461 -47.213368,0.0444 -87.354656,-0.14699 -89.202866,-0.42535 z"
+ id="path888"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 46.678765,489.15821 c -10.92124,-0.19301 -20.342101,-0.5799 -20.935245,-0.85975 -0.593145,-0.27986 -1.717395,-1.84393 -2.498333,-3.4757 l -1.419889,-2.96686 0.125193,-117.47975 c 0.06886,-64.61385 0.339628,-119.07957 0.601717,-121.03492 0.681927,-5.08763 2.593204,-6.87123 8.086544,-7.54634 5.545905,-0.68157 152.854518,-0.46193 166.189278,0.24779 10.46794,0.55713 10.55647,0.57379 12.83055,2.41434 l 2.28987,1.85334 0.15425,122.04598 0.15425,122.04597 -1.70725,1.91531 c -0.93898,1.05342 -2.24563,2.0074 -2.90365,2.11996 -6.33387,1.08343 -113.332321,1.56245 -160.967285,0.72063 z"
+ id="path890"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424;stroke-dashoffset:0;stroke-opacity:0"
+ d="M 83.248688,148.25455 C 28.37854,147.92465 27.228314,147.89342 25.9069,146.69739 22.595528,143.70021 22.640019,144.12209 22.16959,111.25919 21.929072,94.457284 21.708966,69.072044 21.680466,54.847548 l -0.05182,-25.86272 3.678449,-3.678449 3.67845,-3.67845 58.794104,0.374559 c 32.336751,0.206007 72.541121,0.521085 89.343031,0.700173 l 30.54892,0.325615 1.99195,1.974391 1.99194,1.974392 0.003,58.331995 0.003,58.331996 -2.9115,2.57319 -2.9115,2.57318 -33.29833,-0.0981 c -18.31408,-0.054 -58.49533,-0.2496 -89.29165,-0.43475 z"
+ id="path892"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 307.2611,275.35501 c -2.77039,-0.4647 -5.49817,-2.06736 -6.12372,-3.59787 -1.088,-2.66196 -1.45026,-28.11629 -1.86458,-131.01233 l -0.44657,-110.904049 2.97624,-3.181843 c 1.63694,-1.750014 3.67225,-3.539677 4.52293,-3.977031 1.26127,-0.648452 17.82132,-0.709833 89.74239,-0.332634 l 88.19572,0.462553 2.2291,2.229052 2.2291,2.229052 0.17592,119.8944 c 0.0967,65.94192 0.0125,120.80436 -0.18727,121.91653 -0.19975,1.11218 -1.34194,3.1055 -2.53818,4.4296 l -2.17499,2.40746 -87.14609,-0.0765 c -47.93035,-0.0421 -88.24585,-0.26094 -89.59,-0.48641 z"
+ id="path894"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+ <path
+ style="fill:#f9f9f9;fill-opacity:1;stroke:#2a3990;stroke-width:0.87288141;stroke-miterlimit:4;stroke-dasharray:0.87288141, 2.61864424;stroke-dashoffset:0;stroke-opacity:0"
+ d="m 304.19341,488.88695 c -1.3512,-0.81006 -3.07379,-2.57078 -3.82799,-3.9127 l -1.37128,-2.43986 0.16212,-56.52377 c 0.16064,-56.00883 0.17359,-56.53915 1.42182,-58.21083 1.81954,-2.43681 3.99485,-3.90352 6.7303,-4.53795 3.46874,-0.80449 172.22819,-0.75355 175.13183,0.0529 2.91252,0.80889 5.91303,3.33901 6.97555,5.882 0.68348,1.63578 0.83159,12.02727 0.82335,57.766 l -0.01,55.77141 -1.37711,2.43146 c -0.77213,1.3633 -2.44526,3.03643 -3.80856,3.80857 l -2.43146,1.3771 -87.98091,0.004 -87.9809,0.004 -2.45671,-1.47285 z"
+ id="path896"
+ inkscape:connector-curvature="0"
+ transform="scale(0.046875)" />
+</svg>

MODIFY
src/io/ioledmatrix.cpp
src/io/ioledmatrix.cpp
@@ -55,7 +55,9 @@ void IOLedMatrix::updateLEDRegs() {
const int g = (0xFF * y) / width;
const int b = (0xFF * (x + y)) / (width + width);
- m_ledRegs.at(y * width + x) = r << 16 | g << 8 | b;
+ const unsigned idx = y * width + x;
+ m_ledRegs.at(idx) = r << 16 | g << 8 | b;
+ m_ledRegs.at(idx) = (0xFFFFFF / m_ledRegs.size()) * idx;
}
}
}

MODIFY
src/iotab.cpp
src/iotab.cpp
@@ -15,7 +15,31 @@ namespace Ripes {
IOTab::IOTab(QToolBar* toolbar, QWidget* parent) : RipesTab(toolbar, parent), m_ui(new Ui::IOTab) {
m_ui->setupUi(this);
- m_ui->mdiArea->addSubWindow(new IOLedMatrix(this, 0x10000, 25));
+ m_ui->mdiArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+ m_ui->mdiArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+
+ for (int i = 0; i < 10; i++) {
+ // It seems excessive to create a QMainWindow for each peripheral but it seems like the only way to mix MDI
+ // behaviour + dockable widgets that are able to pop out to a separate window
+ auto* mw = new QMainWindow(this);
+ m_ui->dockArea->addWidget(mw);
+ auto* dw = new QDockWidget("LED Matrix");
+ dw->setWidget(new IOLedMatrix(this, 0x10000, 25));
+ dw->setAllowedAreas(Qt::AllDockWidgetAreas);
+ mw->addDockWidget(Qt::TopDockWidgetArea, dw);
+ m_ui->mdiArea->addSubWindow(mw);
+ }
+
+ // Toolbar actions
+ m_tileAction = new QAction(this);
+ m_tileAction->setIcon(QIcon(":/icons/tile.svg"));
+ m_tileAction->setText("Tile I/O windows");
+ connect(m_tileAction, &QAction::triggered, this, &IOTab::tile);
+ m_toolbar->addAction(m_tileAction);
+}
+
+void IOTab::tile() {
+ Q_ASSERT(false);
}
IOTab::~IOTab() {

MODIFY
src/iotab.h
src/iotab.h
#include "defines.h"
+#include <QAction>
#include <QWidget>
#include <unordered_map>
@@ -24,6 +25,10 @@ public:
~IOTab() override;
private:
+ void tile();
+
Ui::IOTab* m_ui = nullptr;
+
+ QAction* m_tileAction = nullptr;
};
} // namespace Ripes

MODIFY
src/iotab.ui
src/iotab.ui
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QSplitter" name="splitter">
<property name="orientation">
</layout>
</widget>
</widget>
- <widget class="QMdiArea" name="mdiArea">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QWidget" name="gridLayoutWidget">
+ <layout class="QGridLayout" name="dockArea">
+ <item row="0" column="0">
+ <widget class="QMdiArea" name="mdiArea"/>
+ </item>
+ </layout>
</widget>
</widget>
</item>

MODIFY
src/mainwindow.cpp
src/mainwindow.cpp
@@ -70,7 +70,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), m_ui(new Ui::Main
m_IOToolbar = addToolBar("I/O");
m_IOToolbar->setVisible(false);
- m_IOTab = new IOTab(m_controlToolbar, this);
+ m_IOTab = new IOTab(m_IOToolbar, this);
m_stackedTabs->insertWidget(3, m_IOTab);
// Setup tab bar
@@ -143,7 +143,7 @@ void MainWindow::tabChanged(int index) {
m_editToolbar->setVisible(index == 0);
m_processorToolbar->setVisible(index == 1);
m_memoryToolbar->setVisible(index == 2);
- m_IOTab->setVisible(index == 3);
+ m_IOToolbar->setVisible(index == 3);
}
void MainWindow::fitToView() {

Use QMDIWidget as base peripheral view instead of QMainWindow