Add a specific bitmap for show electrical type option (component editor and component viewer)

This commit is contained in:
jean-pierre charras 2016-11-04 13:59:45 +01:00
parent f15a59f0ad
commit c7fcb2695c
9 changed files with 255 additions and 1 deletions

View File

@ -437,6 +437,7 @@ set( BMAPS_MID
pin_name_to
pin_number_to
pin_size_to
pin_show_etype
pin_table
pin_to
pin

View File

@ -0,0 +1,54 @@
/* 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, 0x02, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x48, 0xc7, 0xed, 0x94, 0x4d, 0x68, 0x13,
0x41, 0x14, 0xc7, 0xdf, 0xc6, 0x8f, 0x74, 0x77, 0xd6, 0xee, 0x4c, 0x4c, 0xb1, 0x56, 0x2d, 0xf1,
0x50, 0x0f, 0x0a, 0x42, 0x15, 0x45, 0x14, 0x0f, 0x22, 0xc1, 0x83, 0x54, 0x4a, 0xcc, 0xa4, 0x9a,
0x43, 0x6b, 0x4b, 0xab, 0x45, 0x10, 0x0b, 0xea, 0x41, 0xb1, 0x90, 0x06, 0xbf, 0x5b, 0x50, 0xab,
0x87, 0x56, 0x3c, 0x79, 0x50, 0xbc, 0x59, 0x2f, 0x1e, 0x22, 0xa2, 0x27, 0x2b, 0x88, 0xf4, 0x22,
0xd8, 0x43, 0x50, 0xc1, 0x63, 0xa1, 0x07, 0x05, 0x15, 0xa1, 0xeb, 0x7f, 0x64, 0xb2, 0xec, 0x26,
0xad, 0xb1, 0x6d, 0x72, 0x10, 0xfa, 0xe0, 0xc7, 0x64, 0x67, 0x67, 0xdf, 0x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0x71, 0x84,
0x24, 0x5a, 0xe6, 0x6f, 0x27, 0xe6, 0x1f, 0x16, 0x76, 0x76, 0x4d, 0x08, 0x6f, 0x97, 0xd8, 0xc4,
0xe9, 0x05, 0x5d, 0x52, 0x52, 0x98, 0x8d, 0x52, 0xd8, 0xa3, 0x87, 0xb9, 0xd5, 0x5c, 0x24, 0x0a,
0x21, 0xe9, 0x29, 0x8c, 0xe3, 0x20, 0x0f, 0x9e, 0xe3, 0xf9, 0xe0, 0x5f, 0x52, 0xa9, 0x43, 0xd1,
0x3b, 0xc7, 0x29, 0xc4, 0xc5, 0xe4, 0x58, 0xdb, 0x54, 0xeb, 0x92, 0xdc, 0x4e, 0x2c, 0xe2, 0x52,
0x55, 0xb7, 0xcb, 0x09, 0x30, 0x0a, 0xb6, 0xce, 0xba, 0xa2, 0xa5, 0x81, 0x2c, 0xe9, 0x58, 0xdb,
0x5b, 0x39, 0xe7, 0x8b, 0x10, 0x5d, 0xd4, 0x97, 0xe9, 0xf9, 0x39, 0x45, 0x15, 0x8a, 0x5a, 0x3d,
0x9e, 0xad, 0xb6, 0x88, 0x96, 0x44, 0xff, 0x8d, 0xa8, 0x05, 0x34, 0xd2, 0x52, 0x54, 0x22, 0x7e,
0x03, 0x71, 0x06, 0xd1, 0x42, 0xe6, 0xbd, 0xce, 0x74, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82,
};
const BITMAP_OPAQUE pin_show_etype_xpm[1] = {{ png, sizeof( png ), "pin_show_etype_xpm" }};
//EOF

View File

@ -0,0 +1,167 @@
<?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"
height="26"
width="26"
version="1.1"
id="svg2"
inkscape:version="0.91 r13725"
sodipodi:docname="pin_show_etype.svg">
<metadata
id="metadata87">
<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>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1033"
id="namedview85"
showgrid="true"
inkscape:snap-grids="true"
inkscape:zoom="22.961538"
inkscape:cx="6.0753766"
inkscape:cy="17.063805"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:current-layer="g3019">
<inkscape:grid
type="xygrid"
id="grid3832"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<defs
id="defs4" />
<g
id="g3003">
<g
id="g17"
transform="matrix(2.4566,0,0,2.2316,-37.589,-61.022)">
<rect
style="fill-opacity:0"
id="rect19"
x="0"
y="0"
width="16"
height="16" />
</g>
<g
id="g47"
transform="matrix(2.6586,0,0,2.1996,5.9761,-10.078)">
<rect
style="fill-opacity:0"
id="rect49"
x="0"
y="0"
width="16"
height="16" />
</g>
<g
transform="matrix(2.4482476,0,0,2.4295429,2.830298,-7.57155)"
id="g69">
<rect
height="16"
width="16"
y="0"
x="0"
id="rect71"
style="fill-opacity:0" />
</g>
<g
transform="matrix(2.4482476,0,0,2.4295429,5.162342,-14.86007)"
id="g73">
<rect
height="16"
width="16"
y="0"
x="0"
id="rect75"
style="fill-opacity:0" />
</g>
<g
id="g3019"
transform="matrix(-1,0,0,1,26,0)">
<g
id="g4149"
transform="matrix(0.75842255,0,0,0.7133162,-0.56348628,1.9066437)">
<circle
id="path3003"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#800000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
cx="20"
cy="13"
r="4" />
<path
inkscape:connector-curvature="0"
id="path3771"
d="M 15,13 2,13"
style="fill:none;stroke:#800000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
<g
transform="matrix(0.73039612,0,0,0.77717921,16.353909,7.4762214)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12.87740231px;line-height:125%;font-family:OpenSymbol;-inkscape-font-specification:OpenSymbol;letter-spacing:0px;word-spacing:0px;fill:#55100b;fill-opacity:1;stroke:none"
id="text3773-7">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:21.86630249px;line-height:125%;font-family:'Comic Sans MS';-inkscape-font-specification:'Comic Sans MS';letter-spacing:0px;word-spacing:0px;fill:#55100b;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-14.801638"
y="10.679991"
id="text4171"
sodipodi:linespacing="125%"
transform="scale(-0.94795788,1.0548992)"><tspan
sodipodi:role="line"
id="tspan4173"
x="-14.801638"
y="10.679991"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Arial;-inkscape-font-specification:Arial;fill:#55100b;fill-opacity:1">?</tspan></text>
</g>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:125%;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.6;"
x="-9.1356783"
y="9.1390285"
id="text4261"
sodipodi:linespacing="125%"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan4263"
x="-9.1356783"
y="9.1390285">A</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:125%;font-family:Arial;-inkscape-font-specification:Arial;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.6;"
x="-8.1742039"
y="22.726969"
id="text4265"
sodipodi:linespacing="125%"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan4267"
x="-8.1742039"
y="22.726969">1</tspan></text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@ -230,6 +230,9 @@ enum id_eeschema_frm
ID_POPUP_LIBEDIT_FIELD_EDIT_ITEM,
ID_POPUP_LIBEDIT_DELETE_CURRENT_POLY_SEGMENT,
/* Library editor toolbar options IDs */
ID_LIBEDIT_SHOW_ELECTRICAL_TYPE,
/* Library editor menubar IDs */
ID_LIBEDIT_SAVE_CURRENT_LIB_AS,
ID_LIBEDIT_GEN_PNG_FILE,

View File

@ -120,6 +120,9 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT,
LIB_EDIT_FRAME::OnSelectTool )
// Left vertical toolbar (option toolbar).
EVT_TOOL( ID_LIBEDIT_SHOW_ELECTRICAL_TYPE, LIB_EDIT_FRAME::OnShowElectricalType )
// menubar commands
EVT_MENU( wxID_EXIT, LIB_EDIT_FRAME::CloseWindow )
EVT_MENU( ID_LIBEDIT_SAVE_CURRENT_LIB_AS, LIB_EDIT_FRAME::OnSaveActiveLibrary )
@ -174,6 +177,8 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_UPDATE_UI( ID_ZOOM_SELECTION, LIB_EDIT_FRAME::OnUpdateEditingPart )
EVT_UPDATE_UI_RANGE( ID_LIBEDIT_PIN_BUTT, ID_LIBEDIT_DELETE_ITEM_BUTT,
LIB_EDIT_FRAME::OnUpdateEditingPart )
EVT_UPDATE_UI( ID_LIBEDIT_SHOW_ELECTRICAL_TYPE, LIB_EDIT_FRAME::OnUpdateElectricalType )
END_EVENT_TABLE()
#define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" )
@ -461,6 +466,19 @@ void LIB_EDIT_FRAME::UpdatePartSelectList()
}
void LIB_EDIT_FRAME::OnShowElectricalType( wxCommandEvent& event )
{
SetShowElectricalType( not GetShowElectricalType() );
GetCanvas()->Refresh();
}
void LIB_EDIT_FRAME::OnUpdateElectricalType( wxUpdateUIEvent& aEvent )
{
aEvent.Check( GetShowElectricalType() );
}
void LIB_EDIT_FRAME::OnUpdateEditingPart( wxUpdateUIEvent& aEvent )
{
LIB_PART* part = GetCurPart();

View File

@ -231,6 +231,11 @@ public:
void OnSelectAlias( wxCommandEvent& event );
void OnSelectPart( wxCommandEvent& event );
/**
* From Option toolbar: option to show the electrical pin type name
*/
void OnShowElectricalType( wxCommandEvent& event );
/**
* Function DeleteOnePart
* is the command event handler to delete an entry from the current library.
@ -289,6 +294,7 @@ public:
void OnUpdateDeMorganNormal( wxUpdateUIEvent& event );
void OnUpdateDeMorganConvert( wxUpdateUIEvent& event );
void OnUpdateSelectAlias( wxUpdateUIEvent& event );
void OnUpdateElectricalType( wxUpdateUIEvent& aEvent );
void UpdateAliasSelectList();
void UpdatePartSelectList();

View File

@ -245,5 +245,9 @@ void LIB_EDIT_FRAME::CreateOptionToolbar()
_( "Change cursor shape" ), wxITEM_CHECK );
#endif // !__APPLE__
m_optionsToolBar->AddTool( ID_LIBEDIT_SHOW_ELECTRICAL_TYPE, wxEmptyString,
KiBitmap( pin_show_etype_xpm ),
_( "Show the pins electrical type" ), wxITEM_CHECK );
m_optionsToolBar->Realize();
}

View File

@ -207,7 +207,7 @@ void LIB_VIEW_FRAME::ReCreateMenuBar( void )
viewMenu->AppendSeparator();
AddMenuItem( viewMenu, ID_LIBVIEW_SHOW_ELECTRICAL_TYPE, _( "&Show Pin Electrical Type" ),
wxEmptyString, KiBitmap( pin_xpm ), wxITEM_CHECK );
wxEmptyString, KiBitmap( pin_show_etype_xpm ), wxITEM_CHECK );
// Menu Help:
wxMenu* helpMenu = new wxMenu;

View File

@ -422,6 +422,7 @@ EXTERN_BITMAP( pin2pin_xpm )
EXTERN_BITMAP( pin_name_to_xpm )
EXTERN_BITMAP( pin_number_to_xpm )
EXTERN_BITMAP( pin_size_to_xpm )
EXTERN_BITMAP( pin_show_etype_xpm )
EXTERN_BITMAP( pin_table_xpm )
EXTERN_BITMAP( pinorient_right_xpm )
EXTERN_BITMAP( pinorient_left_xpm )