Browse Source
Fix some Doxygen warnings.
Fix some Doxygen warnings.
Eeschema: cleaning code. Start work to enhance annotation algorithm. Already added an option to annotate using sheet number (sheet 1 uses numbers 100 to 199, sheet 2 uses 200 to 299..). Works fine if deleting existing annotation, but needs work to be used when the existing annotation is kept .pull/1/head
47 changed files with 3213 additions and 2180 deletions
-
69bitmaps/annotate_down_right.xpm
-
71bitmaps/annotate_right_down.xpm
-
169bitmaps/sources/annotate_down_right.svg
-
169bitmaps/sources/annotate_right_down.svg
-
2common/edaappl.cpp
-
4copyright.h
-
2demos/ecc83/ecc83-pp_v2-cache.lib
-
10demos/ecc83/ecc83-pp_v2.sch
-
1eeschema/CMakeLists.txt
-
202eeschema/annotate.cpp
-
154eeschema/build_BOM.cpp
-
2eeschema/class_libentry.cpp
-
2eeschema/class_libentry.h
-
328eeschema/component_references_lister.cpp
-
45eeschema/dialogs/annotate_dialog.cpp
-
306eeschema/dialogs/dialog_annotate_base.cpp
-
2571eeschema/dialogs/dialog_annotate_base.fbp
-
171eeschema/dialogs/dialog_annotate_base.h
-
102eeschema/dialogs/dialog_build_BOM.cpp
-
6eeschema/dialogs/dialog_build_BOM.h
-
93eeschema/netlist.cpp
-
251eeschema/netlist.h
-
34eeschema/protos.h
-
5eeschema/sch_sheet.cpp
-
19eeschema/sch_sheet_path.cpp
-
10eeschema/sch_sheet_path.h
-
8include/dialog_load_error.h
-
33include/wxEeschemaStruct.h
-
2polygon/PolyLine.cpp
-
2polygon/PolyLine.h
-
368polygon/kbool/include/kbool/_dl_itr.cpp
-
12polygon/kbool/include/kbool/_dl_itr.h
-
10polygon/kbool/include/kbool/_lnk_itr.cpp
-
10polygon/kbool/include/kbool/_lnk_itr.h
-
34polygon/kbool/include/kbool/booleng.h
-
10polygon/kbool/include/kbool/graph.h
-
10polygon/kbool/include/kbool/graphlst.h
-
10polygon/kbool/include/kbool/line.h
-
18polygon/kbool/include/kbool/link.h
-
10polygon/kbool/include/kbool/lpoint.h
-
12polygon/kbool/include/kbool/node.h
-
10polygon/kbool/include/kbool/record.h
-
10polygon/kbool/include/kbool/scanbeam.h
-
10polygon/kbool/include/kbool/statusb.h
-
10polygon/kbool/include/kbool/valuesvc.h
-
4polygon/math_for_graphics.cpp
-
2polygon/math_for_graphics.h
@ -1,43 +1,38 @@ |
|||
/* XPM */ |
|||
#ifndef XPMMAIN |
|||
extern const char *annotate_down_right_xpm[]; |
|||
|
|||
#else |
|||
const char *annotate_down_right_xpm[] = { |
|||
/* columns rows colors chars-per-pixel */ |
|||
"16 16 16 1", |
|||
"@ c #89B09C", |
|||
"O c #DB8F8F", |
|||
". c #D4B7B7", |
|||
"# c #85A794", |
|||
"& c #72CAA2", |
|||
"% c #9EB5A9", |
|||
"- c #59CD99", |
|||
"o c #E48080", |
|||
"+ c #DC9897", |
|||
" c none", |
|||
"X c #D6A1A0", |
|||
": c #E46264", |
|||
"= c #64F6B4", |
|||
"$ c #B4BEBC", |
|||
"; c #69E5A9", |
|||
"* c #81B79F", |
|||
"= c #9A524C", |
|||
": c #405814", |
|||
"O c #932722", |
|||
". c #BAA7A6", |
|||
"X c #549454", |
|||
"+ c #7C210E", |
|||
" c None", |
|||
"$ c #8C0505", |
|||
"- c #AE7879", |
|||
"@ c #097409", |
|||
"* c #867258", |
|||
"& c #308430", |
|||
"# c #783820", |
|||
"; c #9E3838", |
|||
"% c #403F04", |
|||
"o c #7FA57F", |
|||
/* pixels */ |
|||
" ", |
|||
" ", |
|||
" .X o. ", |
|||
" .O +o. ", |
|||
" .X O.X. ", |
|||
" .O X. O. ", |
|||
" @# $%%+. #% ", |
|||
" && *=* $&&$", |
|||
"@&-# %;*@ #;-@", |
|||
" @@ .O% $ #@ ", |
|||
" .X O. X. ", |
|||
" .O O O. ", |
|||
" .+O. X. ", |
|||
" .: O. ", |
|||
" $ ", |
|||
" " |
|||
" .X. oX ", |
|||
"O+@#O .@@o ", |
|||
"O$%$$ &@@o ", |
|||
"*$$$= &@@@o ", |
|||
".$$$. -#%&&@o ", |
|||
" +$#.-;$$$+.X@o ", |
|||
" *+*O$$$$$= X@o ", |
|||
" o@X-=*:$$. X@o ", |
|||
" o@X .@%$= $#@O;", |
|||
" o@X &@$$. $$%$O", |
|||
" o@X&@&$; =$$$-", |
|||
" o@@@& -$$$ ", |
|||
" X@@@. $$= ", |
|||
" X@@o :+o ", |
|||
" o@o X@o ", |
|||
" o&. " |
|||
}; |
|||
#endif |
@ -1,43 +1,38 @@ |
|||
/* XPM */ |
|||
#ifndef XPMMAIN |
|||
extern const char *annotate_right_down_xpm[]; |
|||
|
|||
#else |
|||
const char *annotate_right_down_xpm[] = { |
|||
/* columns rows colors const chars-per-pixel */ |
|||
/* columns rows colors chars-per-pixel */ |
|||
"16 16 16 1", |
|||
"@ c #59CE99", |
|||
"% c #D79E9C", |
|||
"$ c #DC9393", |
|||
"o c #FFB4B4", |
|||
"* c #74CAA2", |
|||
"X c #FFBDBD", |
|||
". c #89AF9A", |
|||
" c none", |
|||
"- c #E46264", |
|||
"# c #FFAAAC", |
|||
"; c #64F6B4", |
|||
"& c #84A794", |
|||
"= c #69E5A9", |
|||
": c #E08280", |
|||
"O c #9BB5A5", |
|||
"+ c #81B79F", |
|||
"o c #A25451", |
|||
"+ c #88A887", |
|||
"* c #424004", |
|||
"% c #308530", |
|||
"@ c #8B0405", |
|||
"# c #7C563C", |
|||
" c None", |
|||
"- c #B18B8C", |
|||
"O c #BAA6A6", |
|||
"X c #8E1C17", |
|||
"$ c #549354", |
|||
"; c #74381C", |
|||
"& c #067205", |
|||
". c #993F3B", |
|||
"= c #748157", |
|||
": c #AC7474", |
|||
/* pixels */ |
|||
" . ", |
|||
" XoooO+@Ooooo ", |
|||
" #$%$&*=&%$%-X ", |
|||
" X& X$ ", |
|||
" X$o ", |
|||
" $ ", |
|||
" X O$o ", |
|||
" O+=+ ", |
|||
" O;@X ", |
|||
" %.OX ", |
|||
" %X ", |
|||
" $o ", |
|||
" $X X& ", |
|||
" ::%$&*=.%$%$ ", |
|||
" oooo.@@.oooo ", |
|||
" . " |
|||
" .XoO ", |
|||
"+X@@@X#$$$$$$$+ ", |
|||
"%&*@@@@&&&&&&&% ", |
|||
"O#@@@X=+++$&&&O ", |
|||
" X@.O O&&%O ", |
|||
" O o@O+&&% ", |
|||
" @@=&&$ ", |
|||
" -@X&&= ", |
|||
" o@**X@o ", |
|||
" O@@@@@X- ", |
|||
" +&@@@.- ", |
|||
" +&&;oO X@.: ", |
|||
"$&&&%%%%;@@@@;%+", |
|||
"%&&&&&&&&*@@@@&%", |
|||
" +++++++;@@@#++ ", |
|||
" .X: " |
|||
}; |
|||
#endif |
@ -0,0 +1,169 @@ |
|||
<?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" |
|||
sodipodi:docname="annotate_X.svg" |
|||
inkscape:version="0.47 r22583" |
|||
sodipodi:version="0.32" |
|||
id="svg2" |
|||
height="16.000000px" |
|||
width="16.000000px" |
|||
inkscape:export-filename="F:\kicad-launchpad\testing\bitmaps\sources\annotate_X.png" |
|||
inkscape:export-xdpi="90.000000" |
|||
inkscape:export-ydpi="90.000000" |
|||
version="1.1"> |
|||
<defs |
|||
id="defs3"> |
|||
<inkscape:path-effect |
|||
effect="skeletal" |
|||
id="path-effect2834" |
|||
is_visible="true" |
|||
pattern="M 0,5 10,10 10,0 z" |
|||
copytype="single_stretched" |
|||
prop_scale="1" |
|||
scale_y_rel="false" |
|||
spacing="0" |
|||
normal_offset="0" |
|||
tang_offset="0" |
|||
prop_units="false" |
|||
vertical_pattern="false" |
|||
fuse_tolerance="0" /> |
|||
<inkscape:perspective |
|||
sodipodi:type="inkscape:persp3d" |
|||
inkscape:vp_x="0 : 8 : 1" |
|||
inkscape:vp_y="0 : 1000 : 0" |
|||
inkscape:vp_z="16 : 8 : 1" |
|||
inkscape:persp3d-origin="8 : 5.3333333 : 1" |
|||
id="perspective29" /> |
|||
<linearGradient |
|||
id="linearGradient10731"> |
|||
<stop |
|||
id="stop10733" |
|||
offset="0.00000000" |
|||
style="stop-color:#8787ff;stop-opacity:1.0000000;" /> |
|||
<stop |
|||
id="stop10735" |
|||
offset="1.0000000" |
|||
style="stop-color:#ffffff;stop-opacity:1.0000000;" /> |
|||
</linearGradient> |
|||
<linearGradient |
|||
gradientUnits="userSpaceOnUse" |
|||
y2="12.266582" |
|||
x2="6.0408001" |
|||
y1="17.050747" |
|||
x1="11.430959" |
|||
gradientTransform="scale(1.224745,0.816497)" |
|||
id="linearGradient10737" |
|||
xlink:href="#linearGradient10731" |
|||
inkscape:collect="always" /> |
|||
<linearGradient |
|||
id="linearGradient2606"> |
|||
<stop |
|||
style="stop-color:#ff7800;stop-opacity:1.0000000;" |
|||
offset="0.00000000" |
|||
id="stop2608" /> |
|||
<stop |
|||
style="stop-color:#ffffff;stop-opacity:1.0000000;" |
|||
offset="1.0000000" |
|||
id="stop2610" /> |
|||
</linearGradient> |
|||
<inkscape:perspective |
|||
id="perspective4268" |
|||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
|||
inkscape:vp_z="1 : 0.5 : 1" |
|||
inkscape:vp_y="0 : 1000 : 0" |
|||
inkscape:vp_x="0 : 0.5 : 1" |
|||
sodipodi:type="inkscape:persp3d" /> |
|||
</defs> |
|||
<sodipodi:namedview |
|||
inkscape:window-y="-4" |
|||
inkscape:window-x="-4" |
|||
inkscape:window-height="968" |
|||
inkscape:window-width="1280" |
|||
inkscape:guide-bbox="true" |
|||
showguides="true" |
|||
inkscape:guide-points="true" |
|||
gridtolerance="0.50000000px" |
|||
inkscape:grid-points="true" |
|||
inkscape:grid-bbox="true" |
|||
showgrid="true" |
|||
inkscape:current-layer="layer1" |
|||
inkscape:document-units="px" |
|||
inkscape:cy="8" |
|||
inkscape:cx="2.8854733" |
|||
inkscape:zoom="28.9375" |
|||
inkscape:pageshadow="2" |
|||
inkscape:pageopacity="0.0" |
|||
borderopacity="1.0" |
|||
bordercolor="#666666" |
|||
pagecolor="#ffffff" |
|||
id="base" |
|||
inkscape:window-maximized="1"> |
|||
<inkscape:grid |
|||
id="GridFromPre046Settings" |
|||
type="xygrid" |
|||
originx="0px" |
|||
originy="0px" |
|||
spacingx="0.50000000px" |
|||
spacingy="0.50000000px" |
|||
color="#0000ff" |
|||
empcolor="#0000ff" |
|||
opacity="0.2" |
|||
empopacity="0.4" |
|||
empspacing="2" /> |
|||
</sodipodi:namedview> |
|||
<metadata |
|||
id="metadata4"> |
|||
<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></dc:title> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<g |
|||
id="layer1" |
|||
inkscape:groupmode="layer" |
|||
inkscape:label="Layer 1"> |
|||
<path |
|||
style="fill:none;stroke:#007100;stroke-width:1.97381759;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 2.6013377,1.2661359 2.5385809,14.170523 13.426862,1.3402729 l 0,13.8264601" |
|||
id="path2838" /> |
|||
<path |
|||
style="fill:none;stroke:#8c0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 5.0524871,6.8017199 9.9672796,5.3380844 7.9002122,10.258565" |
|||
id="path4254" /> |
|||
<path |
|||
style="fill:none;stroke:#8f0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 1.0314127,1.894766 2.4361783,6 4.2263917,1.970748" |
|||
id="path4256" /> |
|||
<path |
|||
style="fill:none;stroke:#8f0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 11.92745,8.924017 13.332216,13.029252 15.122429,9" |
|||
id="path4256-1" /> |
|||
</g> |
|||
<g |
|||
inkscape:groupmode="layer" |
|||
id="layer2" |
|||
inkscape:label="fondo" |
|||
sodipodi:insensitive="true"> |
|||
<rect |
|||
style="fill:#ffffff;fill-opacity:0.00000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:0.00000000;stroke-opacity:0.48858449" |
|||
id="rect2277" |
|||
width="16.000000" |
|||
height="16.000000" |
|||
x="0.00000000" |
|||
y="0.00000000" /> |
|||
</g> |
|||
</svg> |
@ -0,0 +1,169 @@ |
|||
<?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" |
|||
sodipodi:docname="annotate_X.svg" |
|||
inkscape:version="0.47 r22583" |
|||
sodipodi:version="0.32" |
|||
id="svg2" |
|||
height="16.000000px" |
|||
width="16.000000px" |
|||
inkscape:export-filename="C:\Documents and Settings\inigo\Escritorio\iconos\Export.png" |
|||
inkscape:export-xdpi="90.000000" |
|||
inkscape:export-ydpi="90.000000" |
|||
version="1.1"> |
|||
<defs |
|||
id="defs3"> |
|||
<inkscape:path-effect |
|||
effect="skeletal" |
|||
id="path-effect2834" |
|||
is_visible="true" |
|||
pattern="M 0,5 10,10 10,0 z" |
|||
copytype="single_stretched" |
|||
prop_scale="1" |
|||
scale_y_rel="false" |
|||
spacing="0" |
|||
normal_offset="0" |
|||
tang_offset="0" |
|||
prop_units="false" |
|||
vertical_pattern="false" |
|||
fuse_tolerance="0" /> |
|||
<inkscape:perspective |
|||
sodipodi:type="inkscape:persp3d" |
|||
inkscape:vp_x="0 : 8 : 1" |
|||
inkscape:vp_y="0 : 1000 : 0" |
|||
inkscape:vp_z="16 : 8 : 1" |
|||
inkscape:persp3d-origin="8 : 5.3333333 : 1" |
|||
id="perspective29" /> |
|||
<linearGradient |
|||
id="linearGradient10731"> |
|||
<stop |
|||
id="stop10733" |
|||
offset="0.00000000" |
|||
style="stop-color:#8787ff;stop-opacity:1.0000000;" /> |
|||
<stop |
|||
id="stop10735" |
|||
offset="1.0000000" |
|||
style="stop-color:#ffffff;stop-opacity:1.0000000;" /> |
|||
</linearGradient> |
|||
<linearGradient |
|||
gradientUnits="userSpaceOnUse" |
|||
y2="12.266582" |
|||
x2="6.0408001" |
|||
y1="17.050747" |
|||
x1="11.430959" |
|||
gradientTransform="scale(1.224745,0.816497)" |
|||
id="linearGradient10737" |
|||
xlink:href="#linearGradient10731" |
|||
inkscape:collect="always" /> |
|||
<linearGradient |
|||
id="linearGradient2606"> |
|||
<stop |
|||
style="stop-color:#ff7800;stop-opacity:1.0000000;" |
|||
offset="0.00000000" |
|||
id="stop2608" /> |
|||
<stop |
|||
style="stop-color:#ffffff;stop-opacity:1.0000000;" |
|||
offset="1.0000000" |
|||
id="stop2610" /> |
|||
</linearGradient> |
|||
<inkscape:perspective |
|||
id="perspective4268" |
|||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1" |
|||
inkscape:vp_z="1 : 0.5 : 1" |
|||
inkscape:vp_y="0 : 1000 : 0" |
|||
inkscape:vp_x="0 : 0.5 : 1" |
|||
sodipodi:type="inkscape:persp3d" /> |
|||
</defs> |
|||
<sodipodi:namedview |
|||
inkscape:window-y="-4" |
|||
inkscape:window-x="-4" |
|||
inkscape:window-height="968" |
|||
inkscape:window-width="1280" |
|||
inkscape:guide-bbox="true" |
|||
showguides="true" |
|||
inkscape:guide-points="true" |
|||
gridtolerance="0.50000000px" |
|||
inkscape:grid-points="true" |
|||
inkscape:grid-bbox="true" |
|||
showgrid="true" |
|||
inkscape:current-layer="layer1" |
|||
inkscape:document-units="px" |
|||
inkscape:cy="8" |
|||
inkscape:cx="2.8854733" |
|||
inkscape:zoom="28.9375" |
|||
inkscape:pageshadow="2" |
|||
inkscape:pageopacity="0.0" |
|||
borderopacity="1.0" |
|||
bordercolor="#666666" |
|||
pagecolor="#ffffff" |
|||
id="base" |
|||
inkscape:window-maximized="1"> |
|||
<inkscape:grid |
|||
id="GridFromPre046Settings" |
|||
type="xygrid" |
|||
originx="0px" |
|||
originy="0px" |
|||
spacingx="0.50000000px" |
|||
spacingy="0.50000000px" |
|||
color="#0000ff" |
|||
empcolor="#0000ff" |
|||
opacity="0.2" |
|||
empopacity="0.4" |
|||
empspacing="2" /> |
|||
</sodipodi:namedview> |
|||
<metadata |
|||
id="metadata4"> |
|||
<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></dc:title> |
|||
</cc:Work> |
|||
</rdf:RDF> |
|||
</metadata> |
|||
<g |
|||
id="layer1" |
|||
inkscape:groupmode="layer" |
|||
inkscape:label="Layer 1"> |
|||
<path |
|||
style="fill:none;stroke:#007100;stroke-width:1.97381759;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 1.0324229,2.4530527 13.93681,2.3902959 1.1065595,13.278577 l 13.8264605,0" |
|||
id="path2838" /> |
|||
<path |
|||
style="fill:none;stroke:#8c0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 6.271378,5.8642645 4.8077422,10.779057 9.7282233,8.7119896" |
|||
id="path4254" /> |
|||
<path |
|||
style="fill:none;stroke:#8f0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="M 1.9240173,1.0195985 6.0292515,2.4243641 2,4.2145775" |
|||
id="path4256" /> |
|||
<path |
|||
style="fill:none;stroke:#8f0000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" |
|||
d="m 8.9496441,11.836293 4.1052349,1.404766 -4.0292523,1.790213" |
|||
id="path4256-1" /> |
|||
</g> |
|||
<g |
|||
inkscape:groupmode="layer" |
|||
id="layer2" |
|||
inkscape:label="fondo" |
|||
sodipodi:insensitive="true"> |
|||
<rect |
|||
style="fill:#ffffff;fill-opacity:0.00000000;stroke:none;stroke-width:1.2500000;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:0.00000000;stroke-opacity:0.48858449" |
|||
id="rect2277" |
|||
width="16.000000" |
|||
height="16.000000" |
|||
x="0.00000000" |
|||
y="0.00000000" /> |
|||
</g> |
|||
</svg> |
@ -0,0 +1,328 @@ |
|||
/*
|
|||
* component_references_lister.cpp: creates a flat list of components. |
|||
* Needed for annotation and BOM. |
|||
*/ |
|||
|
|||
/*
|
|||
* This program source code file is part of KICAD, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 1992-2011 jean-pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> |
|||
* Copyright (C) 1992-2011 Wayne Stambaugh <stambaughw@verizon.net> |
|||
* Copyright (C) 1992-2011 Kicad Developers, see change_log.txt for contributors. |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|||
* or you may search the http://www.gnu.org website for the version 2 license,
|
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
|
|||
#include <algorithm> // to use sort vector
|
|||
#include <vector>
|
|||
|
|||
#include "fctsys.h"
|
|||
#include "common.h"
|
|||
#include "kicad_string.h"
|
|||
#include "wxEeschemaStruct.h"
|
|||
#include "wxstruct.h"
|
|||
#include "netlist.h"
|
|||
#include "class_sch_screen.h"
|
|||
#include "sch_component.h"
|
|||
|
|||
|
|||
|
|||
/* sort function to annotate items from their position.
|
|||
* Components are sorted |
|||
* by reference |
|||
* if same reference: by sheet |
|||
* if same sheet, by X pos |
|||
* if same X pos, by Y pos |
|||
* if same Y pos, by time stamp |
|||
*/ |
|||
bool SCH_REFERENCE_LIST::sortBy_X_Position( const SCH_REFERENCE& item1, |
|||
const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii = item1.CompareRef( item2 ); |
|||
|
|||
if( ii == 0 ) |
|||
ii = item1.m_SheetNum - item2.m_SheetNum; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.x - item2.m_CmpPos.x; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.y - item2.m_CmpPos.y; |
|||
if( ii == 0 ) |
|||
ii = item1.m_TimeStamp - item2.m_TimeStamp; |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
|
|||
/* sort function to annotate items by their position.
|
|||
* Components are sorted |
|||
* by reference |
|||
* if same reference: by sheet |
|||
* if same sheet, by Y pos |
|||
* if same Y pos, by X pos |
|||
* if same X pos, by time stamp |
|||
*/ |
|||
bool SCH_REFERENCE_LIST::sortBy_Y_Position( const SCH_REFERENCE& item1, |
|||
const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii = item1.CompareRef( item2 ); |
|||
|
|||
if( ii == 0 ) |
|||
ii = item1.m_SheetNum - item2.m_SheetNum; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.y - item2.m_CmpPos.y; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.x - item2.m_CmpPos.x; |
|||
if( ii == 0 ) |
|||
ii = item1.m_TimeStamp - item2.m_TimeStamp; |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
/*
|
|||
* sort function to annotate items by value |
|||
* Components are sorted |
|||
* by reference |
|||
* if same reference: by value |
|||
* if same value: by unit number |
|||
* if same unit number, by sheet |
|||
* if same sheet, by position X, and Y |
|||
*/ |
|||
bool SCH_REFERENCE_LIST::sortByRefAndValue( const SCH_REFERENCE& item1, const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii = item1.CompareRef( item2 ); |
|||
if( ii == 0 ) |
|||
ii = item1.CompareValue( item2 ); |
|||
if( ii == 0 ) |
|||
ii = item1.m_Unit - item2.m_Unit; |
|||
if( ii == 0 ) |
|||
ii = item1.m_SheetNum - item2.m_SheetNum; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.x - item2.m_CmpPos.x; |
|||
if( ii == 0 ) |
|||
ii = item1.m_CmpPos.y - item2.m_CmpPos.y; |
|||
if( ii == 0 ) |
|||
ii = item1.m_TimeStamp - item2.m_TimeStamp; |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
/* sort function for for list by values
|
|||
* components are sorted |
|||
* by value |
|||
* if same value: by reference |
|||
* if same reference: by unit number |
|||
*/ |
|||
bool SCH_REFERENCE_LIST::sortComponentsByValueOnly( const SCH_REFERENCE& item1, const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii; |
|||
const wxString* Text1, * Text2; |
|||
|
|||
Text1 = &( item1.m_RootCmp->GetField( VALUE )->m_Text ); |
|||
Text2 = &( item2.m_RootCmp->GetField( VALUE )->m_Text ); |
|||
ii = Text1->CmpNoCase( *Text2 ); |
|||
|
|||
if( ii == 0 ) |
|||
{ |
|||
ii = RefDesStringCompare( item1.GetRef(), item2.GetRef() ); |
|||
} |
|||
|
|||
if( ii == 0 ) |
|||
{ |
|||
ii = item1.m_Unit - item2.m_Unit; |
|||
} |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
/**
|
|||
* Function sortComponentsByReferenceOnly |
|||
* compare function for sorting in BOM creation. |
|||
* components are sorted |
|||
* by reference |
|||
* if same reference: by value |
|||
* if same value: by unit number |
|||
*/ |
|||
bool SCH_REFERENCE_LIST::sortComponentsByReferenceOnly( const SCH_REFERENCE& item1, |
|||
const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii; |
|||
const wxString* Text1, * Text2; |
|||
|
|||
ii = RefDesStringCompare( item1.GetRef(), item2.GetRef() ); |
|||
|
|||
if( ii == 0 ) |
|||
{ |
|||
Text1 = &( item1.m_RootCmp->GetField( VALUE )->m_Text ); |
|||
Text2 = &( item2.m_RootCmp->GetField( VALUE )->m_Text ); |
|||
ii = Text1->CmpNoCase( *Text2 ); |
|||
} |
|||
|
|||
if( ii == 0 ) |
|||
{ |
|||
ii = item1.m_Unit - item2.m_Unit; |
|||
} |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
|
|||
/*****************************************************************************
|
|||
* qsort function to annotate items by value |
|||
* Components are sorted by time stamp |
|||
*****************************************************************************/ |
|||
bool SCH_REFERENCE_LIST::sortByTimeStamp( const SCH_REFERENCE& item1, |
|||
const SCH_REFERENCE& item2 ) |
|||
{ |
|||
int ii = item1.m_SheetPath.Cmp( item2.m_SheetPath ); |
|||
|
|||
if( ii == 0 ) |
|||
ii = item1.m_TimeStamp - item2.m_TimeStamp; |
|||
|
|||
return ii < 0; |
|||
} |
|||
|
|||
|
|||
/* Remove sub components from the list, when multiples parts per package are
|
|||
* found in this list |
|||
*/ |
|||
void SCH_REFERENCE_LIST::RemoveSubComponentsFromList( ) |
|||
{ |
|||
SCH_COMPONENT* libItem; |
|||
wxString oldName; |
|||
wxString currName; |
|||
|
|||
// The component list **MUST** be sorted by reference and by unit number
|
|||
// in order to find all parts of a component
|
|||
SortComponentsByReferenceOnly(); |
|||
for( unsigned ii = 0; ii < componentFlatList.size(); ii++ ) |
|||
{ |
|||
libItem = componentFlatList[ii].m_RootCmp; |
|||
if( libItem == NULL ) |
|||
continue; |
|||
|
|||
currName = componentFlatList[ii].GetRef(); |
|||
|
|||
if( !oldName.IsEmpty() ) |
|||
{ |
|||
if( oldName == currName ) // currName is a subpart of oldName:
|
|||
// remove it
|
|||
{ |
|||
componentFlatList.erase( componentFlatList.begin() + ii ); |
|||
ii--; |
|||
} |
|||
} |
|||
oldName = currName; |
|||
} |
|||
} |
|||
|
|||
|
|||
|
|||
SCH_REFERENCE::SCH_REFERENCE( SCH_COMPONENT* aComponent, LIB_COMPONENT* aLibComponent, |
|||
SCH_SHEET_PATH& aSheetPath ) |
|||
{ |
|||
wxASSERT( aComponent != NULL && aLibComponent != NULL ); |
|||
|
|||
m_RootCmp = aComponent; |
|||
m_Entry = aLibComponent; |
|||
m_Unit = aComponent->GetUnitSelection( &aSheetPath ); |
|||
m_SheetPath = aSheetPath; |
|||
m_IsNew = false; |
|||
m_Flag = 0; |
|||
m_TimeStamp = aComponent->m_TimeStamp; |
|||
m_CmpPos = aComponent->m_Pos; |
|||
m_SheetNum = 0; |
|||
|
|||
if( aComponent->GetRef( &aSheetPath ).IsEmpty() ) |
|||
aComponent->SetRef( &aSheetPath, wxT( "DefRef?" ) ); |
|||
|
|||
SetRef( aComponent->GetRef( &aSheetPath ) ); |
|||
|
|||
m_NumRef = -1; |
|||
|
|||
if( aComponent->GetField( VALUE )->GetText().IsEmpty() ) |
|||
aComponent->GetField( VALUE )->SetText( wxT( "~" ) ); |
|||
|
|||
m_Value = &aComponent->GetField( VALUE )->m_Text; |
|||
} |
|||
|
|||
|
|||
void SCH_REFERENCE::Annotate() |
|||
{ |
|||
if( m_NumRef < 0 ) |
|||
m_Ref += wxChar( '?' ); |
|||
else |
|||
m_Ref = CONV_TO_UTF8( GetRef() << m_NumRef ); |
|||
|
|||
m_RootCmp->SetRef( &m_SheetPath, CONV_FROM_UTF8( m_Ref.c_str() ) ); |
|||
m_RootCmp->SetUnit( m_Unit ); |
|||
m_RootCmp->SetUnitSelection( &m_SheetPath, m_Unit ); |
|||
} |
|||
|
|||
|
|||
void SCH_REFERENCE::Split() |
|||
{ |
|||
std::string refText = GetRefStr(); |
|||
|
|||
m_NumRef = -1; |
|||
|
|||
int ll = refText.length() - 1; |
|||
|
|||
if( refText[ll] == '?' ) |
|||
{ |
|||
m_IsNew = true; |
|||
|
|||
if( !IsPartsLocked() ) |
|||
m_Unit = 0x7FFFFFFF; |
|||
|
|||
refText.erase( ll ); // delete last char
|
|||
|
|||
SetRefStr( refText ); |
|||
} |
|||
else if( isdigit( refText[ll] ) == 0 ) |
|||
{ |
|||
m_IsNew = true; |
|||
|
|||
if( !IsPartsLocked() ) |
|||
m_Unit = 0x7FFFFFFF; |
|||
} |
|||
else |
|||
{ |
|||
while( ll >= 0 ) |
|||
{ |
|||
if( (refText[ll] <= ' ' ) || isdigit( refText[ll] ) ) |
|||
ll--; |
|||
else |
|||
{ |
|||
if( isdigit( refText[ll + 1] ) ) |
|||
{ |
|||
// null terminated C string into cp
|
|||
const char* cp = refText.c_str() + ll + 1; |
|||
|
|||
m_NumRef = atoi( cp ); |
|||
} |
|||
|
|||
refText.erase( ll+1 ); // delete from ll+1 to end
|
|||
break; |
|||
} |
|||
} |
|||
|
|||
SetRefStr( refText ); |
|||
} |
|||
} |
|||
|
@ -1,139 +1,167 @@ |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Apr 21 2008)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_annotate_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bmainSizer; |
|||
bmainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bupperSizer; |
|||
bupperSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextScope->Wrap( -1 ); |
|||
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); |
|||
|
|||
bupperSizer->Add( m_staticTextScope, 0, wxALL, 6 ); |
|||
|
|||
wxBoxSizer* bscopeOptSizer; |
|||
bscopeOptSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 3 ); |
|||
|
|||
m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 3 ); |
|||
|
|||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 3 ); |
|||
|
|||
m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 3 ); |
|||
|
|||
bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 ); |
|||
|
|||
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bupperSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_staticTextOrder = new wxStaticText( this, wxID_ANY, _("Annotation Order"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextOrder->Wrap( -1 ); |
|||
m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); |
|||
|
|||
bupperSizer->Add( m_staticTextOrder, 0, wxALL, 6 ); |
|||
|
|||
wxBoxSizer* b_orderOptSizer; |
|||
b_orderOptSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bSizerXpos; |
|||
bSizerXpos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort Components by &X Position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerXpos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerYpos; |
|||
bSizerYpos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort Components by &Y Position"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerYpos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerValuepos; |
|||
bSizerValuepos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort Components by &Value"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerValuepos->Add( rbSortByValue, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerValuepos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 ); |
|||
|
|||
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
wxBoxSizer* bButtonsSizer; |
|||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
bupperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 6 ); |
|||
|
|||
bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 ); |
|||
|
|||
this->SetSizer( bmainSizer ); |
|||
this->Layout(); |
|||
bmainSizer->Fit( this ); |
|||
|
|||
// Connect Events
|
|||
m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this ); |
|||
m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this ); |
|||
m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_ANNOTATE_BASE::~DIALOG_ANNOTATE_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
m_btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this ); |
|||
m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this ); |
|||
m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this ); |
|||
} |
|||
///////////////////////////////////////////////////////////////////////////
|
|||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
|||
// http://www.wxformbuilder.org/
|
|||
//
|
|||
// PLEASE DO "NOT" EDIT THIS FILE!
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "dialog_annotate_base.h"
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////
|
|||
|
|||
DIALOG_ANNOTATE_BASE::DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) |
|||
{ |
|||
this->SetSizeHints( wxDefaultSize, wxDefaultSize ); |
|||
|
|||
wxBoxSizer* bmainSizer; |
|||
bmainSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bupperSizer; |
|||
bupperSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_staticTextScope = new wxStaticText( this, wxID_ANY, _("Scope"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextScope->Wrap( -1 ); |
|||
m_staticTextScope->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); |
|||
|
|||
bupperSizer->Add( m_staticTextScope, 0, wxALL, 6 ); |
|||
|
|||
wxBoxSizer* bscopeOptSizer; |
|||
bscopeOptSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
m_rbEntireSchematic = new wxRadioButton( this, ID_ENTIRE_SCHEMATIC, _("Use the &entire schematic"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bscopeOptSizer->Add( m_rbEntireSchematic, 0, wxALL, 3 ); |
|||
|
|||
m_rbCurrPage = new wxRadioButton( this, ID_CURRENT_PAGE, _("Use the current &page only"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bscopeOptSizer->Add( m_rbCurrPage, 0, wxALL, 3 ); |
|||
|
|||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bscopeOptSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_rbKeepAnnotation = new wxRadioButton( this, ID_KEEP_ANNOTATION, _("&Keep existing annotation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bscopeOptSizer->Add( m_rbKeepAnnotation, 0, wxALL, 3 ); |
|||
|
|||
m_rbResetAnnotation = new wxRadioButton( this, ID_RESET_ANNOTATION, _("&Reset existing annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bscopeOptSizer->Add( m_rbResetAnnotation, 0, wxALL, 3 ); |
|||
|
|||
bupperSizer->Add( bscopeOptSizer, 0, wxEXPAND|wxLEFT|wxALIGN_RIGHT, 25 ); |
|||
|
|||
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bupperSizer->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
m_staticTextOrder = new wxStaticText( this, wxID_ANY, _("Annotation Order"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
m_staticTextOrder->Wrap( -1 ); |
|||
m_staticTextOrder->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) ); |
|||
|
|||
bupperSizer->Add( m_staticTextOrder, 0, wxALL, 6 ); |
|||
|
|||
wxBoxSizer* b_orderOptSizer; |
|||
b_orderOptSizer = new wxBoxSizer( wxVERTICAL ); |
|||
|
|||
wxBoxSizer* bSizerXpos; |
|||
bSizerXpos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_X_Position = new wxRadioButton( this, ID_SORT_BY_X_POSITION, _("Sort components by &X position"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); |
|||
bSizerXpos->Add( m_rbSortBy_X_Position, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerXpos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerXpos->Add( annotate_down_right_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerXpos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerXpos_and_use_sheet; |
|||
bSizerXpos_and_use_sheet = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_X_Position_and_useSheet = new wxRadioButton( this, wxID_ANY, _("Sort components by X position and use sheet &number"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerXpos_and_use_sheet->Add( m_rbSortBy_X_Position_and_useSheet, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerXpos_and_use_sheet->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_down_right_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerXpos_and_use_sheet->Add( annotate_down_right_bitmap1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerXpos_and_use_sheet, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerYpos; |
|||
bSizerYpos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_Y_Position = new wxRadioButton( this, ID_SORT_BY_Y_POSITION, _("Sort components by &Y position"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos->Add( m_rbSortBy_Y_Position, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerYpos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos->Add( annotate_right_down_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerYpos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerYpos_and_useSheet; |
|||
bSizerYpos_and_useSheet = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_rbSortBy_Y_Position_and_useSheet = new wxRadioButton( this, wxID_ANY, _("Sort components by Y position and use &sheet number"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos_and_useSheet->Add( m_rbSortBy_Y_Position_and_useSheet, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerYpos_and_useSheet->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_right_down_bitmap1 = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerYpos_and_useSheet->Add( annotate_right_down_bitmap1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerYpos_and_useSheet, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
wxBoxSizer* bSizerValuepos; |
|||
bSizerValuepos = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
rbSortByValue = new wxRadioButton( this, ID_SORT_BY_VALUE, _("Sort components by &value"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerValuepos->Add( rbSortByValue, 0, wxALL, 3 ); |
|||
|
|||
|
|||
bSizerValuepos->Add( 0, 0, 1, wxEXPAND, 5 ); |
|||
|
|||
annotate_by_value_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bSizerValuepos->Add( annotate_by_value_bitmap, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 12 ); |
|||
|
|||
b_orderOptSizer->Add( bSizerValuepos, 0, wxEXPAND|wxRIGHT, 5 ); |
|||
|
|||
bupperSizer->Add( b_orderOptSizer, 1, wxEXPAND|wxLEFT, 25 ); |
|||
|
|||
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); |
|||
bupperSizer->Add( m_staticline5, 0, wxEXPAND | wxALL, 5 ); |
|||
|
|||
wxBoxSizer* bButtonsSizer; |
|||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL ); |
|||
|
|||
m_btnClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnClose, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_btnClear = new wxButton( this, ID_CLEAR_ANNOTATION_CMP, _("Clear Annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnClear, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
m_btnApply = new wxButton( this, wxID_APPLY, _("Annotation"), wxDefaultPosition, wxDefaultSize, 0 ); |
|||
bButtonsSizer->Add( m_btnApply, 0, wxALL|wxEXPAND, 5 ); |
|||
|
|||
bupperSizer->Add( bButtonsSizer, 0, wxALIGN_CENTER_HORIZONTAL, 6 ); |
|||
|
|||
bmainSizer->Add( bupperSizer, 1, wxALL|wxEXPAND, 6 ); |
|||
|
|||
this->SetSizer( bmainSizer ); |
|||
this->Layout(); |
|||
|
|||
// Connect Events
|
|||
m_btnClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this ); |
|||
m_btnClear->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this ); |
|||
m_btnApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this ); |
|||
} |
|||
|
|||
DIALOG_ANNOTATE_BASE::~DIALOG_ANNOTATE_BASE() |
|||
{ |
|||
// Disconnect Events
|
|||
m_btnClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnCancelClick ), NULL, this ); |
|||
m_btnClear->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnClearAnnotationCmpClick ), NULL, this ); |
|||
m_btnApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ANNOTATE_BASE::OnApplyClick ), NULL, this ); |
|||
|
|||
} |
2571
eeschema/dialogs/dialog_annotate_base.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,82 +1,89 @@ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Apr 21 2008) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_annotate_base__ |
|||
#define __dialog_annotate_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/radiobut.h> |
|||
#include <wx/statline.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/statbmp.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#define ID_ENTIRE_SCHEMATIC 1000 |
|||
#define ID_CURRENT_PAGE 1001 |
|||
#define ID_KEEP_ANNOTATION 1002 |
|||
#define ID_RESET_ANNOTATION 1003 |
|||
#define ID_SORT_BY_X_POSITION 1004 |
|||
#define ID_SORT_BY_Y_POSITION 1005 |
|||
#define ID_SORT_BY_VALUE 1006 |
|||
#define ID_CLEAR_ANNOTATION_CMP 1007 |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_ANNOTATE_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_ANNOTATE_BASE : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxStaticText* m_staticTextScope; |
|||
wxRadioButton* m_rbEntireSchematic; |
|||
wxRadioButton* m_rbCurrPage; |
|||
wxStaticLine* m_staticline1; |
|||
wxRadioButton* m_rbKeepAnnotation; |
|||
wxRadioButton* m_rbResetAnnotation; |
|||
wxStaticLine* m_staticline2; |
|||
wxStaticText* m_staticTextOrder; |
|||
wxRadioButton* m_rbSortBy_X_Position; |
|||
|
|||
wxStaticBitmap* annotate_down_right_bitmap; |
|||
wxRadioButton* m_rbSortBy_Y_Position; |
|||
|
|||
wxStaticBitmap* annotate_right_down_bitmap; |
|||
wxRadioButton* rbSortByValue; |
|||
|
|||
wxStaticBitmap* annotate_by_value_bitmap; |
|||
wxStaticLine* m_staticline5; |
|||
wxButton* m_btnClose; |
|||
wxButton* m_btnClear; |
|||
wxButton* m_btnApply; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnClearAnnotationCmpClick( wxCommandEvent& event ){ event.Skip(); } |
|||
virtual void OnApplyClick( wxCommandEvent& event ){ event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_ANNOTATE_BASE(); |
|||
|
|||
}; |
|||
|
|||
#endif //__dialog_annotate_base__ |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
// C++ code generated with wxFormBuilder (version Sep 8 2010) |
|||
// http://www.wxformbuilder.org/ |
|||
// |
|||
// PLEASE DO "NOT" EDIT THIS FILE! |
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#ifndef __dialog_annotate_base__ |
|||
#define __dialog_annotate_base__ |
|||
|
|||
#include <wx/intl.h> |
|||
|
|||
#include <wx/string.h> |
|||
#include <wx/stattext.h> |
|||
#include <wx/gdicmn.h> |
|||
#include <wx/font.h> |
|||
#include <wx/colour.h> |
|||
#include <wx/settings.h> |
|||
#include <wx/radiobut.h> |
|||
#include <wx/statline.h> |
|||
#include <wx/sizer.h> |
|||
#include <wx/bitmap.h> |
|||
#include <wx/image.h> |
|||
#include <wx/icon.h> |
|||
#include <wx/statbmp.h> |
|||
#include <wx/button.h> |
|||
#include <wx/dialog.h> |
|||
|
|||
/////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#define ID_ENTIRE_SCHEMATIC 1000 |
|||
#define ID_CURRENT_PAGE 1001 |
|||
#define ID_KEEP_ANNOTATION 1002 |
|||
#define ID_RESET_ANNOTATION 1003 |
|||
#define ID_SORT_BY_X_POSITION 1004 |
|||
#define ID_SORT_BY_Y_POSITION 1005 |
|||
#define ID_SORT_BY_VALUE 1006 |
|||
#define ID_CLEAR_ANNOTATION_CMP 1007 |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
/// Class DIALOG_ANNOTATE_BASE |
|||
/////////////////////////////////////////////////////////////////////////////// |
|||
class DIALOG_ANNOTATE_BASE : public wxDialog |
|||
{ |
|||
private: |
|||
|
|||
protected: |
|||
wxStaticText* m_staticTextScope; |
|||
wxRadioButton* m_rbEntireSchematic; |
|||
wxRadioButton* m_rbCurrPage; |
|||
wxStaticLine* m_staticline1; |
|||
wxRadioButton* m_rbKeepAnnotation; |
|||
wxRadioButton* m_rbResetAnnotation; |
|||
wxStaticLine* m_staticline2; |
|||
wxStaticText* m_staticTextOrder; |
|||
wxRadioButton* m_rbSortBy_X_Position; |
|||
|
|||
wxStaticBitmap* annotate_down_right_bitmap; |
|||
wxRadioButton* m_rbSortBy_X_Position_and_useSheet; |
|||
|
|||
wxStaticBitmap* annotate_down_right_bitmap1; |
|||
wxRadioButton* m_rbSortBy_Y_Position; |
|||
|
|||
wxStaticBitmap* annotate_right_down_bitmap; |
|||
wxRadioButton* m_rbSortBy_Y_Position_and_useSheet; |
|||
|
|||
wxStaticBitmap* annotate_right_down_bitmap1; |
|||
wxRadioButton* rbSortByValue; |
|||
|
|||
wxStaticBitmap* annotate_by_value_bitmap; |
|||
wxStaticLine* m_staticline5; |
|||
wxButton* m_btnClose; |
|||
wxButton* m_btnClear; |
|||
wxButton* m_btnApply; |
|||
|
|||
// Virtual event handlers, overide them in your derived class |
|||
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnClearAnnotationCmpClick( wxCommandEvent& event ) { event.Skip(); } |
|||
virtual void OnApplyClick( wxCommandEvent& event ) { event.Skip(); } |
|||
|
|||
|
|||
public: |
|||
|
|||
DIALOG_ANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 432,376 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); |
|||
~DIALOG_ANNOTATE_BASE(); |
|||
|
|||
}; |
|||
|
|||
#endif //__dialog_annotate_base__ |
@ -1,9 +1,9 @@ |
|||
/*! \file kbool/include/kbool/valuesvc.h |
|||
/*! \file valuesvc.h |
|||
\author Probably Klaas Holwerda |
|||
|
|||
|
|||
Copyright: 2001-2004 (C) Probably Klaas Holwerda |
|||
|
|||
Licence: see kboollicense.txt |
|||
|
|||
|
|||
Licence: see kboollicense.txt |
|||
|
|||
RCS-ID: $Id: valuesvc.h,v 1.2 2009/02/06 21:33:03 titato Exp $ |
|||
*/ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue