Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list.

This commit is contained in:
jp-charras 2016-08-29 11:39:54 +02:00
parent 440f8c8b69
commit 26b1c732de
13 changed files with 694 additions and 71 deletions

View File

@ -513,6 +513,7 @@ set( BMAPS_MID
select_w_layer
shape_3d
sheetset
simulator
sim_run
sim_stop
sim_tune

View File

@ -0,0 +1,118 @@
/* Do not modify this file, it was automatically generated by the
* PNG2cpp CMake script, using a *.png file as input.
*/
#include <bitmaps.h>
static const unsigned char png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x1a, 0x08, 0x06, 0x00, 0x00, 0x00, 0xa9, 0x4a, 0x4c,
0xce, 0x00, 0x00, 0x06, 0x4e, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0x9d, 0x56, 0x69, 0x4c, 0x54,
0x57, 0x14, 0x7e, 0x8a, 0x52, 0x2a, 0xad, 0x5a, 0xa5, 0x45, 0x5c, 0x70, 0x5f, 0x19, 0x04, 0xcb,
0x2a, 0x55, 0x27, 0xca, 0xe6, 0x82, 0xa0, 0x51, 0x51, 0x9c, 0x52, 0x15, 0x3b, 0x38, 0x82, 0x2c,
0x23, 0x2a, 0x41, 0x19, 0x60, 0xf6, 0xb7, 0xb0, 0x33, 0x34, 0xd2, 0xa2, 0x18, 0x54, 0x5a, 0x91,
0xa1, 0xa6, 0xfe, 0x30, 0x35, 0xa9, 0x4a, 0x42, 0x8d, 0x31, 0xfe, 0xd0, 0x1f, 0x6a, 0xd2, 0xfe,
0x30, 0x6a, 0xa8, 0x52, 0x4d, 0x67, 0xdf, 0x9c, 0xf7, 0xde, 0xe9, 0xdc, 0x3b, 0xce, 0x53, 0x5a,
0x63, 0x22, 0x93, 0xdc, 0x4c, 0xde, 0xbd, 0xf7, 0xdd, 0xef, 0x9e,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14, 0x84, 0xfa, 0xdf, 0x03,
0xf6, 0xfb, 0x5a, 0xc4, 0xfe, 0x43, 0x35, 0x36, 0x4d, 0xf3, 0x85, 0xf7, 0x76, 0x4f, 0x44, 0xf8,
0x0a, 0x52, 0xec, 0x09, 0x34, 0xcb, 0xfd, 0x4d, 0x35, 0x81, 0x94, 0x0d, 0x50, 0x2d, 0x17, 0x53,
0x11, 0xc6, 0xbf, 0xb5, 0x5d, 0x34, 0x31, 0xa7, 0x0c, 0x08, 0x5f, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE simulator_xpm[1] = {{ png, sizeof( png ), "simulator_xpm" }};
//EOF

View File

@ -0,0 +1,415 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<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:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="26"
height="26"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="simulator.svg"
inkscape:export-filename="/home/baranovskiykonstantin/Рабочий стол/eeschema.png"
inkscape:export-xdpi="166"
inkscape:export-ydpi="166">
<defs
id="defs4">
<linearGradient
id="linearGradient3775">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3777" />
<stop
style="stop-color:#e1e1e1;stop-opacity:1;"
offset="1"
id="stop3779" />
</linearGradient>
<linearGradient
id="linearGradient3767">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3769" />
<stop
style="stop-color:#dcdcdc;stop-opacity:1;"
offset="1"
id="stop3771" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#be-2-3"
id="linearGradient4120"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.64407,-0.64045,0.66092,0.65072,61.423,86.661)"
x1="23.576"
y1="25.357"
x2="23.576"
y2="31.211" />
<linearGradient
id="be-2-3"
y2="31.211"
gradientUnits="userSpaceOnUse"
x2="23.576"
gradientTransform="matrix(0.64407,-0.64045,0.66092,0.65072,61.423,86.661)"
y1="25.357"
x1="23.576">
<stop
offset="0"
id="stop180-9" />
<stop
stop-color="#c3c3c3"
offset=".13483"
id="stop182-1" />
<stop
stop-color="#8c8c8c"
offset=".20224"
id="stop184-9" />
<stop
stop-color="#fff"
offset=".26966"
id="stop186-6" />
<stop
stop-color="#757575"
offset=".4465"
id="stop188-5-9" />
<stop
stop-color="#7d7d7d"
offset=".57114"
id="stop190-8-3" />
<stop
stop-color="#b6b6b6"
offset=".72038"
id="stop192-3" />
<stop
offset="1"
id="stop194-8" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#ar-2-5"
id="linearGradient4122"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.298,83.616)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="ar-2-5">
<stop
stop-color="#3e3e3e"
offset="0"
id="stop166-8-6" />
<stop
stop-color="#828282"
offset=".5"
id="stop168-4-6" />
<stop
stop-color="#3c3c3c"
offset="1"
id="stop170-4" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#aq-0"
id="linearGradient4124"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.119,83.794)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="aq-0">
<stop
stop-color="#999"
offset="0"
id="stop173-4" />
<stop
stop-color="#fff"
offset=".5"
id="stop175-6" />
<stop
stop-color="#777"
offset="1"
id="stop177-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#ar-2-5"
id="linearGradient4126"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.921,82.996)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="linearGradient3332">
<stop
stop-color="#3e3e3e"
offset="0"
id="stop3334" />
<stop
stop-color="#828282"
offset=".5"
id="stop3336" />
<stop
stop-color="#3c3c3c"
offset="1"
id="stop3338" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#aq-0"
id="linearGradient4128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.742,83.175)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="linearGradient3341">
<stop
stop-color="#999"
offset="0"
id="stop3343" />
<stop
stop-color="#fff"
offset=".5"
id="stop3345" />
<stop
stop-color="#777"
offset="1"
id="stop3347" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#ar-2-5"
id="linearGradient4130"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,60.547,82.374)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="linearGradient3350">
<stop
stop-color="#3e3e3e"
offset="0"
id="stop3352" />
<stop
stop-color="#828282"
offset=".5"
id="stop3354" />
<stop
stop-color="#3c3c3c"
offset="1"
id="stop3356" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#aq-0"
id="linearGradient4132"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,60.367,82.552)"
x1="30.038"
y1="24.99"
x2="30.038"
y2="30" />
<linearGradient
id="linearGradient3359">
<stop
stop-color="#999"
offset="0"
id="stop3361" />
<stop
stop-color="#fff"
offset=".5"
id="stop3363" />
<stop
stop-color="#777"
offset="1"
id="stop3365" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#bl-2-6"
id="linearGradient4134"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.06,83.852)"
x1="9"
y1="29.056999"
x2="9"
y2="26.030001" />
<linearGradient
id="bl-2-6"
y2="26.030001"
gradientUnits="userSpaceOnUse"
x2="9"
gradientTransform="matrix(0.62586,-0.62234,0.77349,0.76155,59.06,83.852)"
y1="29.056999"
x1="9">
<stop
stop-color="#e4db7b"
offset="0"
id="stop203-9-1" />
<stop
stop-color="#f4f0c8"
offset="1"
id="stop205-9-3" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#bm-0-2"
id="linearGradient4136"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.52586,0,0,0.51993,81.027,79.545)"
x1="5.5179"
y1="37.372002"
x2="9.5221004"
y2="41.391998" />
<linearGradient
id="bm-0-2"
y2="41.391998"
gradientUnits="userSpaceOnUse"
x2="9.5221004"
gradientTransform="matrix(0.52586,0,0,0.51993,81.027,79.545)"
y1="37.372002"
x1="5.5179">
<stop
stop-color="#cbbd27"
offset="0"
id="stop208-1" />
<stop
stop-color="#9b901d"
offset="1"
id="stop210-5" />
</linearGradient>
<linearGradient
id="f"
y2="39.685001"
gradientUnits="userSpaceOnUse"
x2="34.534"
gradientTransform="matrix(0.92673,0,0,0.84499,4.7271,52.187)"
y1="12.285"
x1="14.463">
<stop
stop-color="#c9c9c9"
offset="0"
id="stop4248" />
<stop
stop-color="#f8f8f8"
offset=".25"
id="stop4250" />
<stop
stop-color="#e2e2e2"
offset=".5"
id="stop4252" />
<stop
stop-color="#b0b0b0"
offset=".75"
id="stop4254" />
<stop
stop-color="#c9c9c9"
offset="1"
id="stop4256" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="27.446584"
inkscape:cx="11.834513"
inkscape:cy="12.018277"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:showpageshadow="false"
inkscape:window-width="1920"
inkscape:window-height="1033"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
spacingx="0.5px"
spacingy="0.5px" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1026.3622)">
<rect
style="opacity:0.935;fill:#8794ad;fill-opacity:1;stroke:#8794ad;stroke-width:7.30961895;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect4209"
width="18.675474"
height="18.784777"
x="3.6986969"
y="1029.9517" />
<g
style="stroke:#000000"
transform="matrix(0.43815516,0,0,0.46664043,-3.740557,1010.5736)"
id="g4280">
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:url(#f);stroke-width:1.30209994"
d="m 25.828,57.411 c -0.34731,0.02167 -0.68489,0.07071 -1.026,0.10631 l -0.02332,0 -0.81616,4.061 c -1.3303,0.27623 -2.5818,0.74502 -3.7077,1.382 l -3.661,-2.402 c -0.98968,0.70058 -1.8903,1.5177 -2.6817,2.4026 l 2.5417,3.3807 c -0.77174,1.0754 -1.3521,2.3033 -1.679,3.5933 -5.2e-5,0.0061 -4.5e-5,0.0202 0,0.02126 l -4.4306,0.63786 c -0.081,0.60325 -0.11659,1.2267 -0.11659,1.8498 0,0.50981 0.0154,1.0128 0.0699,1.5096 l 4.4306,0.72291 c 0.31511,1.4029 0.91369,2.713 1.7489,3.8697 l -2.635,3.2956 c 0.75466,0.85424 1.6259,1.632 2.5651,2.3176 l 3.731,-2.3388 c 1.3039,0.75844 2.7595,1.2903 4.3373,1.5521 l 0.69956,4.0185 c 0.49711,0.04126 1.0069,0.04252 1.5157,0.04252 0.71836,-10e-7 1.4045,-0.02482 2.0987,-0.10631 l 0.83948,-4.1036 c 1.499,-0.341 2.906,-0.931 4.128,-1.723 l 3.5911,2.3813 c 0.93128,-0.72243 1.7829,-1.5528 2.5184,-2.4451 l -2.6117,-3.4444 c 0.70729,-1.1138 1.1974,-2.3427 1.4458,-3.6571 l 4.4073,-0.63786 c 0.03865,-0.41935 0.04663,-0.82605 0.04663,-1.2545 0,-0.74449 -0.09491,-1.4745 -0.20987,-2.19 l -4.476,-0.745 c -0.351,-1.181 -0.927,-2.283 -1.656,-3.274 l 2.635,-3.2956 c -0.817,-0.911 -1.749,-1.752 -2.775,-2.466 l -3.801,2.381 c -1.092,-0.589 -2.268,-1.041 -3.544,-1.297 l -0.7,-4.04 c -0.63673,-0.06829 -1.2787,-0.10631 -1.9355,-0.10631 -0.1775,0 -0.36018,-0.0051 -0.53633,0 -0.08587,0.0024 -0.17086,-0.0046 -0.25651,0 -0.0232,0.0012 -0.0468,-0.0014 -0.06996,0 z m 0.60629,10.333 c 0.08519,-0.0039 0.17025,0 0.25651,0 2.7603,0 5.0135,2.0545 5.0135,4.5713 1e-6,2.5168 -2.2532,4.5501 -5.0135,4.5501 -2.7603,1e-6 -4.9902,-2.0332 -4.9902,-4.5501 0,-2.4382 2.0928,-4.4491 4.7337,-4.5713 z"
id="path4282" />
<path
inkscape:connector-curvature="0"
style="color:#000000;opacity:0.34658999;fill:none;stroke-width:1.40030003"
d="m 25.311,58.215 -0.6553,3.932 c -1.2469,0.25892 -3.5405,1.0508 -4.5959,1.6479 l -3.4863,-2.3726 c -0.92766,0.65668 -0.99127,0.70121 -1.7331,1.5307 l 2.5207,3.4087 c -0.72338,1.008 -1.5922,2.8042 -1.9042,4.0878 0,0 -4.4171,0.67892 -4.4171,0.67892 -0.07593,0.56544 -0.03948,1.7757 0.01164,2.2413 l 4.2192,0.69303 c 0.29536,1.315 1.4006,3.4316 2.1835,4.5157 l -2.6681,3.2142 c 0.70736,0.8007 0.84892,0.87397 1.7292,1.5166 l 3.5677,-2.3833 c 1.2222,0.7109 3.6482,1.5757 5.1271,1.8211 l 0.58553,3.8824 c 0.46595,0.03867 1.7532,0.14715 2.4038,0.07077 l 0.65531,-4.0416 c 1.4042,-0.31862 3.8304,-1.2267 4.9759,-1.9697 l 3.5639,2.3479 c 0.87292,-0.67715 0.88074,-0.77919 1.5702,-1.6156 l -2.641,-3.4228 c 0.66296,-1.044 1.5202,-3.0857 1.753,-4.3177 l 4.324,-0.65416 c 0.03623,-0.39307 0.03799,-1.4892 -0.06977,-2.1599 l -4.4054,-0.69303 c -0.32887,-1.1073 -1.4575,-3.1025 -2.1409,-4.0314 l 2.8,-3.2142 c -0.76558,-0.85369 -1.0502,-0.97082 -2.0124,-1.6403 l -3.688,2.408 c -1.024,-0.553 -3.066,-1.394 -4.262,-1.634 l -0.65149,-3.8471 c -0.59683,-0.06401 -2.3187,-0.03559 -2.6598,0 z"
id="path4284" />
<path
inkscape:connector-curvature="0"
style="color:#000000;opacity:0.64772997;fill:none;stroke-width:0.71253002"
d="m 32.454,72.306 a 5.7605,5.2524 0 0 1 -11.521,0 5.7605,5.2524 0 1 1 11.521,0 z"
id="path4286" />
</g>
<path
style="fill:none;fill-rule:evenodd;stroke:#8b1800;stroke-width:1.75744188;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 0.77188355,1038.5811 c 0,0 6.83773475,-22.0449 10.11485845,-4.5603 4.973889,26.5375 9.068029,7.3589 10.631815,1.6345"
id="path3426"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#008100;stroke-width:1.80332279;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 3.798249,1042.2739 c 0,0 7.079952,-22.4168 10.473165,-4.6371 5.150081,26.9853 9.389251,7.4829 11.008432,1.662"
id="path3426-9"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -5,7 +5,7 @@
// Maintainer: Davide Rondini
// Contributors: Jose Luis Blanco, Val Greene, Maciej Suminski, Tomasz Wlostowski
// Created: 21/07/2003
// Last edit: 12/08/2016
// Last edit: 25/08/2016
// Copyright: (c) David Schalig, Davide Rondini
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@ -15,9 +15,7 @@
#pragma implementation "mathplot.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include <wx/window.h>
// #include <wx/wxprec.h>
// Comment out for release operation:
// (Added by J.L.Blanco, Aug 2007)
@ -878,13 +876,13 @@ void mpScaleX::recalculateTicks( wxDC& dc, mpWindow& w )
for( int i = 10; i <= 20; i += 2 )
{
double step = fabs( maxVvis - minVvis ) / (double) i;
double base = pow( 10, floor( log10( step ) ) );
double curr_step = fabs( maxVvis - minVvis ) / (double) i;
double base = pow( 10, floor( log10( curr_step ) ) );
// printf("base %.3f\n", base);
double stepInt = floor( step / base ) * base;
double err = fabs( step - stepInt );
double stepInt = floor( curr_step / base ) * base;
double err = fabs( curr_step - stepInt );
if( err < minErr )
{
@ -892,7 +890,7 @@ void mpScaleX::recalculateTicks( wxDC& dc, mpWindow& w )
bestStep = stepInt;
}
// printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
// printf("curr_step %d %.3f %.3f best %.3f\n",i, curr_step, stepInt, bestStep);
}
@ -1138,13 +1136,13 @@ void mpScaleY::recalculateTicks( wxDC& dc, mpWindow& w )
for( int i = 10; i <= 20; i += 2 )
{
double step = fabs( maxVvis - minVvis ) / (double) i;
double base = pow( 10, floor( log10( step ) ) );
double curr_step = fabs( maxVvis - minVvis ) / (double) i;
double base = pow( 10, floor( log10( curr_step ) ) );
// printf("base %.3f\n", base);
double stepInt = floor( step / base ) * base;
double err = fabs( step - stepInt );
double stepInt = floor( curr_step / base ) * base;
double err = fabs( curr_step - stepInt );
if( err< minErr )
{
@ -1152,7 +1150,7 @@ void mpScaleY::recalculateTicks( wxDC& dc, mpWindow& w )
bestStep = stepInt;
}
// printf("step %d %.3f %.3f best %.3f\n",i, step, stepInt, bestStep);
// printf("curr_step %d %.3f %.3f best %.3f\n",i, curr_step, stepInt, bestStep);
}
@ -1757,9 +1755,9 @@ mpWindow::mpWindow( wxWindow* parent,
m_lockaspect = FALSE;
m_popmenu.Append( mpID_CENTER, _( "Center" ), _( "Center plot view to this position" ) );
m_popmenu.Append( mpID_FIT, _( "Fit" ), _( "Set plot view to show all items" ) );
m_popmenu.Append( mpID_ZOOM_IN, _( "Zoom in" ), _( "Zoom in plot view." ) );
m_popmenu.Append( mpID_ZOOM_OUT, _( "Zoom out" ), _( "Zoom out plot view." ) );
m_popmenu.Append( mpID_FIT, _( "Fit on Screen" ), _( "Set plot view to show all items" ) );
m_popmenu.Append( mpID_ZOOM_IN, _( "Zoom In" ), _( "Zoom in plot view." ) );
m_popmenu.Append( mpID_ZOOM_OUT, _( "Zoom Out" ), _( "Zoom out plot view." ) );
// m_popmenu.AppendCheckItem( mpID_LOCKASPECT, _("Lock aspect"), _("Lock horizontal and vertical zoom aspect."));
// m_popmenu.Append( mpID_HELP_MOUSE, _("Show mouse commands..."), _("Show help about the mouse commands."));
@ -2015,19 +2013,14 @@ void mpWindow::Fit( double xMin,
double xExtra = fabs( xMax - xMin ) * 0.00;
double yExtra = fabs( yMax - yMin ) * 0.03;
xMin -= xExtra;
xMax += xExtra;
yMin -= yExtra;
yMax += yExtra;
// printf(" ******************Fit: %.3f %.3f", xMin, xMax);
// Save desired borders:
m_desiredXmin = xMin; m_desiredXmax = xMax;
m_desiredYmin = yMin; m_desiredYmax = yMax;
// printf("minx %.1f miny %.1f maxx %.1f maxy %.1f\n", xMin, yMin, xMax, yMax);
if( printSizeX!=NULL && printSizeY!=NULL )
{
@ -2525,17 +2518,11 @@ void mpWindow::DelAllLayers( bool alsoDeleteObject, bool refreshDisplay )
}
// void mpWindow::DoPrepareDC(wxDC& dc)
// {
// dc.SetDeviceOrigin(x2p(m_minX), y2p(m_maxY));
// }
void mpWindow::OnPaint( wxPaintEvent& WXUNUSED( event ) )
{
wxPaintDC dc( this );
dc.GetSize( &m_scrX, &m_scrY ); // This is the size of the visible area only!
// DoPrepareDC(dc);
#ifdef MATHPLOT_DO_LOGGING
wxLogMessage( "[mpWindow::OnPaint] vis.area: x %i y%i", m_scrX, m_scrY );

View File

@ -499,7 +499,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
AddMenuItem( toolsMenu,
ID_SIM_SHOW,
_("Simula&tor"), _( "Simulate the circuit" ),
wxNullBitmap );
KiBitmap( simulator_xpm ) );
#endif /* KICAD_SPICE */
// Help Menu:

View File

@ -38,6 +38,8 @@
#include "spice_simulator.h"
#include "spice_reporter.h"
#include <menus_helpers.h>
SIM_PLOT_TYPE operator|( SIM_PLOT_TYPE aFirst, SIM_PLOT_TYPE aSecond )
{
int res = (int) aFirst | (int) aSecond;
@ -103,12 +105,18 @@ SIM_PLOT_FRAME::SIM_PLOT_FRAME( KIWAY* aKiway, wxWindow* aParent )
: SIM_PLOT_FRAME_BASE( aParent ), m_lastSimPlot( nullptr )
{
SetKiway( this, aKiway );
m_signalsIconColorList = NULL;
m_schematicFrame = (SCH_EDIT_FRAME*) Kiway().Player( FRAME_SCH, false );
if( m_schematicFrame == NULL )
throw std::runtime_error( "There is no schematic window" );
// Give an icon
wxIcon icon;
icon.CopyFromBitmap( KiBitmap( simulator_xpm ) );
SetIcon( icon );
m_simulator = SPICE_SIMULATOR::CreateInstance( "ngspice" );
if( !m_simulator )
@ -171,6 +179,7 @@ SIM_PLOT_FRAME::~SIM_PLOT_FRAME()
{
m_simulator->SetReporter( nullptr );
delete m_reporter;
delete m_signalsIconColorList;
if( m_settingsDlg )
m_settingsDlg->Destroy();
@ -461,11 +470,58 @@ void SIM_PLOT_FRAME::updateSignalList()
if( !plotPanel )
return;
// Fill the signals listbox
m_signals->Clear();
m_signals->ClearAll();
wxSize size = m_signals->GetClientSize();
m_signals->AppendColumn( _( "Signal" ), wxLIST_FORMAT_LEFT, size.x );
// Build an image list, to show the color of the corresponding trace
// in the plot panel
// This image list is used for trace and cursor lists
#define ICON_SIZEX 10
#define ICON_SIZEY 10
if( m_signalsIconColorList == NULL )
m_signalsIconColorList = new wxImageList( ICON_SIZEX, ICON_SIZEY, false );
else
m_signalsIconColorList->RemoveAll();
wxMemoryDC bmDC;
const int isize = bmDC.GetCharHeight();
wxBitmap bitmap( isize, isize );
for( const auto& trace : CurrentPlot()->GetTraces() )
{
bmDC.SelectObject( bitmap );
wxColor tcolor = trace.second->GetTraceColour();
bmDC.SetPen( wxPen( tcolor ) );
bmDC.SetBrush( wxBrush( m_signals->GetBackgroundColour() ) );
bmDC.Clear();
bmDC.SetBrush( wxBrush( tcolor ) );
bmDC.DrawRectangle( 0, isize/4, isize, isize - (isize/4) );
bmDC.SelectObject( wxNullBitmap ); // Needed to initialize bitmap
m_signalsIconColorList->Add( bitmap );
}
bmDC.SetBrush( wxNullBrush );
bmDC.SetPen( wxNullPen );
m_signals->SetImageList(m_signalsIconColorList, wxIMAGE_LIST_SMALL);
// Fill the signals listctrl. Keep the order of names and
// the order of icon color identical, because the icons
// are also used in cursor list, and the color index is
// calculated from the trace name index
int imgidx = 0;
for( const auto& trace : m_plots[plotPanel].m_traces )
m_signals->Append( trace.first );
{
m_signals->InsertItem( imgidx, trace.first, imgidx );
imgidx++;
}
}
@ -815,28 +871,28 @@ void SIM_PLOT_FRAME::onPlotChanged( wxAuiNotebookEvent& event )
}
void SIM_PLOT_FRAME::onSignalDblClick( wxCommandEvent& event )
void SIM_PLOT_FRAME::onSignalDblClick( wxMouseEvent& event )
{
// Remove signal from the plot panel when double clicked
int idx = m_signals->GetSelection();
long idx = m_signals->GetFocusedItem();
if( idx != wxNOT_FOUND )
removePlot( m_signals->GetString( idx ) );
removePlot( m_signals->GetItemText( idx, 0 ) );
}
void SIM_PLOT_FRAME::onSignalRClick( wxMouseEvent& event )
void SIM_PLOT_FRAME::onSignalRClick( wxListEvent& event )
{
int idx = m_signals->HitTest( event.GetPosition() );
int idx = event.GetIndex();
if( idx != wxNOT_FOUND )
m_signals->SetSelection( idx );
m_signals->Select( idx );
idx = m_signals->GetSelection();
idx = m_signals->GetFirstSelected();
if( idx != wxNOT_FOUND )
{
const wxString& netName = m_signals->GetString( idx );
const wxString& netName = m_signals->GetItemText( idx, 0 );
SIGNAL_CONTEXT_MENU ctxMenu( netName, this );
m_signals->PopupMenu( &ctxMenu );
}
@ -942,7 +998,11 @@ void SIM_PLOT_FRAME::onCursorUpdate( wxCommandEvent& event )
if( !plotPanel )
return;
const long SIGNAL_COL = m_cursors->AppendColumn( _( "Signal" ), wxLIST_FORMAT_LEFT, size.x / 2 );
if( m_signalsIconColorList )
m_cursors->SetImageList(m_signalsIconColorList, wxIMAGE_LIST_SMALL);
// Fill the signals listctrl
m_cursors->AppendColumn( _( "Signal" ), wxLIST_FORMAT_LEFT, size.x / 2 );
const long X_COL = m_cursors->AppendColumn( plotPanel->GetLabelX(), wxLIST_FORMAT_LEFT, size.x / 4 );
wxString labelY1 = plotPanel->GetLabelY1();
@ -957,12 +1017,17 @@ void SIM_PLOT_FRAME::onCursorUpdate( wxCommandEvent& event )
const long Y_COL = m_cursors->AppendColumn( labelY, wxLIST_FORMAT_LEFT, size.x / 4 );
// Update cursor values
int itemidx = 0;
for( const auto& trace : plotPanel->GetTraces() )
{
if( CURSOR* cursor = trace.second->GetCursor() )
{
// Find the right icon color in list.
// It is the icon used in m_signals list for the same trace
long iconColor = m_signals->FindItem( -1, trace.first );
const wxRealPoint coords = cursor->GetCoords();
long idx = m_cursors->InsertItem( SIGNAL_COL, trace.first );
long idx = m_cursors->InsertItem( itemidx++, trace.first, iconColor );
m_cursors->SetItem( idx, X_COL, SPICE_VALUE( coords.x ).ToSpiceString() );
m_cursors->SetItem( idx, Y_COL, SPICE_VALUE( coords.y ).ToSpiceString() );
}
@ -1066,14 +1131,18 @@ SIM_PLOT_FRAME::SIGNAL_CONTEXT_MENU::SIGNAL_CONTEXT_MENU( const wxString& aSigna
{
SIM_PLOT_PANEL* plot = m_plotFrame->CurrentPlot();
Append( HIDE_SIGNAL, _( "Hide signal" ) );
AddMenuItem( this, HIDE_SIGNAL, _( "Hide signal" ),
_( "Erase the signal from plot screen" ),
KiBitmap( delete_xpm ) );
TRACE* trace = plot->GetTrace( m_signal );
if( trace->HasCursor() )
Append( HIDE_CURSOR, _( "Hide cursor" ) );
AddMenuItem( this, HIDE_CURSOR, _( "Hide cursor" ),
wxEmptyString, KiBitmap( mirepcb_xpm ) );
else
Append( SHOW_CURSOR, _( "Show cursor" ) );
AddMenuItem( this, SHOW_CURSOR, _( "Show cursor" ),
wxEmptyString, KiBitmap( mirepcb_xpm ) );
Connect( wxEVT_COMMAND_MENU_SELECTED, wxMenuEventHandler( SIGNAL_CONTEXT_MENU::onMenuEvent ), NULL, this );
}

View File

@ -246,8 +246,8 @@ private:
void onPlotChanged( wxAuiNotebookEvent& event ) override;
void onPlotClose( wxAuiNotebookEvent& event ) override;
void onSignalDblClick( wxCommandEvent& event ) override;
void onSignalRClick( wxMouseEvent& event ) override;
void onSignalDblClick( wxMouseEvent& event ) override;
void onSignalRClick( wxListEvent& event ) override;
void onSimulate( wxCommandEvent& event );
void onSettings( wxCommandEvent& event );
@ -320,6 +320,10 @@ private:
///> Panel that was used as the most recent one for simulations
SIM_PLOT_PANEL* m_lastSimPlot;
///> imagelists uset to add a small coloured icon to signal names
///> and cursors name, the same color as the corresponding signal traces
wxImageList* m_signalsIconColorList;
};
// Commands

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 24 2016)
// C++ code generated with wxFormBuilder (version Jul 31 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -183,7 +183,7 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_sidePanel, wxID_ANY, _("Signals") ), wxVERTICAL );
m_signals = new wxListBox( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE|wxLB_SORT );
m_signals = new wxListView( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON );
sbSizer1->Add( m_signals, 1, wxALL|wxEXPAND, 5 );
@ -237,8 +237,8 @@ SIM_PLOT_FRAME_BASE::SIM_PLOT_FRAME_BASE( wxWindow* parent, wxWindowID id, const
this->Connect( m_showLegend->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
m_plotNotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
m_signals->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
m_signals->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
m_signals->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
m_signals->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
}
SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE()
@ -259,7 +259,7 @@ SIM_PLOT_FRAME_BASE::~SIM_PLOT_FRAME_BASE()
this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( SIM_PLOT_FRAME_BASE::menuShowLegendUpdate ) );
m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotChanged ), NULL, this );
m_plotNotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( SIM_PLOT_FRAME_BASE::onPlotClose ), NULL, this );
m_signals->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
m_signals->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
m_signals->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( SIM_PLOT_FRAME_BASE::onSignalDblClick ), NULL, this );
m_signals->Disconnect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( SIM_PLOT_FRAME_BASE::onSignalRClick ), NULL, this );
}

View File

@ -905,7 +905,6 @@
<event name="OnAuiNotebookPageChanged">onPlotChanged</event>
<event name="OnAuiNotebookPageChanging"></event>
<event name="OnAuiNotebookPageClose">onPlotClose</event>
<event name="OnAuiNotebookPageClosed"></event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
@ -1269,7 +1268,7 @@
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
@ -1426,11 +1425,11 @@
<property name="parent">1</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="0">
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxListBox" expanded="0">
<object class="wxListCtrl" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@ -1444,7 +1443,6 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices"></property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -1476,8 +1474,8 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLB_SINGLE|wxLB_SORT</property>
<property name="subclass"></property>
<property name="style">wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_SMALL_ICON</property>
<property name="subclass">wxListView; </property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
@ -1494,11 +1492,29 @@
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDClick">onSignalDblClick</event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnListBox"></event>
<event name="OnListBoxDClick">onSignalDblClick</event>
<event name="OnListBeginDrag"></event>
<event name="OnListBeginLabelEdit"></event>
<event name="OnListBeginRDrag"></event>
<event name="OnListCacheHint"></event>
<event name="OnListColBeginDrag"></event>
<event name="OnListColClick"></event>
<event name="OnListColDragging"></event>
<event name="OnListColEndDrag"></event>
<event name="OnListColRightClick"></event>
<event name="OnListDeleteAllItems"></event>
<event name="OnListDeleteItem"></event>
<event name="OnListEndLabelEdit"></event>
<event name="OnListInsertItem"></event>
<event name="OnListItemActivated"></event>
<event name="OnListItemDeselected"></event>
<event name="OnListItemFocused"></event>
<event name="OnListItemMiddleClick"></event>
<event name="OnListItemRightClick">onSignalRClick</event>
<event name="OnListItemSelected"></event>
<event name="OnListKeyDown"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
@ -1508,7 +1524,7 @@
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp">onSignalRClick</event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jun 24 2016)
// C++ code generated with wxFormBuilder (version Jul 31 2016)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@ -12,6 +12,7 @@
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class KIWAY_PLAYER;
class wxListView;
#include "kiway_player.h"
#include <wx/string.h>
@ -30,9 +31,8 @@ class KIWAY_PLAYER;
#include <wx/aui/auibook.h>
#include <wx/textctrl.h>
#include <wx/splitter.h>
#include <wx/listbox.h>
#include <wx/statbox.h>
#include <wx/listctrl.h>
#include <wx/statbox.h>
#include <wx/frame.h>
///////////////////////////////////////////////////////////////////////////
@ -72,7 +72,7 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
wxTextCtrl* m_simConsole;
wxPanel* m_sidePanel;
wxBoxSizer* m_sideSizer;
wxListBox* m_signals;
wxListView* m_signals;
wxListCtrl* m_cursors;
wxStaticBoxSizer* sbSizer4;
wxBoxSizer* m_tuneSizer;
@ -93,8 +93,8 @@ class SIM_PLOT_FRAME_BASE : public KIWAY_PLAYER
virtual void menuShowLegendUpdate( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void onPlotChanged( wxAuiNotebookEvent& event ) { event.Skip(); }
virtual void onPlotClose( wxAuiNotebookEvent& event ) { event.Skip(); }
virtual void onSignalDblClick( wxCommandEvent& event ) { event.Skip(); }
virtual void onSignalRClick( wxMouseEvent& event ) { event.Skip(); }
virtual void onSignalDblClick( wxMouseEvent& event ) { event.Skip(); }
virtual void onSignalRClick( wxListEvent& event ) { event.Skip(); }
public:

View File

@ -490,7 +490,8 @@ bool SIM_PLOT_PANEL::AddTrace( const wxString& aName, int aPoints,
// New entry
trace = new TRACE( aName );
trace->SetPen( wxPen( generateColor(), 2, wxPENSTYLE_SOLID ) );
trace->SetTraceColour( generateColor() );
trace->SetPen( wxPen( trace->GetTraceColour(), 2, wxPENSTYLE_SOLID ) );
m_traces[aName] = trace;
// It is a trick to keep legend & coords always on the top

View File

@ -142,9 +142,20 @@ public:
return m_flags;
}
void SetTraceColour( wxColour aColour )
{
m_traceColour = aColour;
}
wxColour GetTraceColour()
{
return m_traceColour;
}
protected:
CURSOR* m_cursor;
int m_flags;
wxColour m_traceColour;
};

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2007-2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2007-2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 1992-2016 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
@ -571,6 +571,7 @@ EXTERN_BITMAP( zoom_xpm )
EXTERN_BITMAP( tune_diff_pair_length_legend_xpm )
EXTERN_BITMAP( tune_diff_pair_skew_legend_xpm )
EXTERN_BITMAP( tune_single_track_length_legend_xpm )
EXTERN_BITMAP( simulator_xpm )
EXTERN_BITMAP( sim_run_xpm )
EXTERN_BITMAP( sim_stop_xpm )
EXTERN_BITMAP( sim_tune_xpm )