kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #17922
[PATCH 23/27] ElectricPinType: remove list interfaces
---
eeschema/lib_pin.cpp | 11 -----------
eeschema/lib_pin.h | 6 ------
eeschema/widgets/pin_type_combobox.cpp | 5 +++--
3 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/eeschema/lib_pin.cpp b/eeschema/lib_pin.cpp
index b0852ef..0783110 100644
--- a/eeschema/lib_pin.cpp
+++ b/eeschema/lib_pin.cpp
@@ -2181,17 +2181,6 @@ void LIB_PIN::Rotate()
}
-wxArrayString LIB_PIN::GetElectricalTypeNames( void )
-{
- wxArrayString tmp;
-
- for( unsigned ii = 0; ii < PIN_ELECTRICAL_TYPE_CNT; ii++ )
- tmp.Add( GetText( static_cast<ElectricPinType>( ii ) ) );
-
- return tmp;
-}
-
-
const BITMAP_DEF* LIB_PIN::GetElectricalTypeSymbols()
{
return iconsPinsElectricalType;
diff --git a/eeschema/lib_pin.h b/eeschema/lib_pin.h
index d77a2d9..8363ba5 100644
--- a/eeschema/lib_pin.h
+++ b/eeschema/lib_pin.h
@@ -417,12 +417,6 @@ public:
*/
static int GetOrientationCodeIndex( int aCode );
- /**
- * Get a list of pin electrical type names.
- *
- * @return List of valid pin electrical type names.
- */
- static wxArrayString GetElectricalTypeNames();
/**
* Get a list of pin electrical bitmaps for menus and dialogs.
diff --git a/eeschema/widgets/pin_type_combobox.cpp b/eeschema/widgets/pin_type_combobox.cpp
index ae9676d..52dc5fb 100644
--- a/eeschema/widgets/pin_type_combobox.cpp
+++ b/eeschema/widgets/pin_type_combobox.cpp
@@ -42,12 +42,13 @@ PinTypeComboBox::PinTypeComboBox( wxWindow* parent,
const wxString& name ) :
wxBitmapComboBox( parent, id, value, pos, size, n, choices, style, validator, name )
{
- wxArrayString texts = LIB_PIN::GetElectricalTypeNames();
const BITMAP_DEF* bitmaps = LIB_PIN::GetElectricalTypeSymbols();
for( unsigned ii = 0; ii < PINTYPE_COUNT; ++ii )
{
- wxString text = texts[ ii ];
+ ElectricPinType type = static_cast<ElectricPinType>( ii );
+
+ wxString text = GetText( type );
BITMAP_DEF bitmap = bitmaps[ ii ];
if( bitmap == NULL )
Follow ups
References
-
[PATCH 00/27] My current patch stack
From: Simon Richter, 2015-04-13
-
[PATCH 01/27] Move feature check before dependent tests
From: Simon Richter, 2015-04-13
-
[PATCH 02/27] Use Link Time Optimization with GCC in Release builds
From: Simon Richter, 2015-04-13
-
[PATCH 03/27] Make NETLIST_OBJECT::GetConnectionType() const
From: Simon Richter, 2015-04-13
-
[PATCH 04/27] Remove superfluous cast
From: Simon Richter, 2015-04-13
-
[PATCH 05/27] Separate ElectricPinType and TypeSheetLabel
From: Simon Richter, 2015-04-13
-
[PATCH 06/27] Regenerate "Edit Pin" dialog with newer wxFormBuilder
From: Simon Richter, 2015-04-13
-
[PATCH 07/27] Replace DrawPinShape enum with PinShape
From: Simon Richter, 2015-04-13
-
[PATCH 08/27] PinShapeComboBox: Introduce widget
From: Simon Richter, 2015-04-13
-
[PATCH 09/27] PinShapeComboBox: Fully initialize in c'tor
From: Simon Richter, 2015-04-13
-
[PATCH 10/27] PinShapeComboBox: typesafe Get/Set
From: Simon Richter, 2015-04-13
-
[PATCH 11/27] PinShape: move enum to own header
From: Simon Richter, 2015-04-13
-
[PATCH 12/27] PinShape: move text lookup
From: Simon Richter, 2015-04-13
-
[PATCH 13/27] PinShape: drop list interfaces
From: Simon Richter, 2015-04-13
-
[PATCH 14/27] PinShape: move bitmap lookup
From: Simon Richter, 2015-04-13
-
[PATCH 15/27] ElectricPinType: move definition to pin_type.h
From: Simon Richter, 2015-04-13
-
[PATCH 16/27] ElectricPinType: Use enum rather than int where possible
From: Simon Richter, 2015-04-13
-
[PATCH 17/27] ElectricPinType: Rename PIN_NMAX to PINTYPE_COUNT
From: Simon Richter, 2015-04-13
-
[PATCH 18/27] ElectricPinType: Separate PINTYPE_COUNT from enum
From: Simon Richter, 2015-04-13
-
[PATCH 19/27] PinTypeComboBox: Introduce widget
From: Simon Richter, 2015-04-13
-
[PATCH 20/27] PinTypeComboBox: fully initialize in c'tor
From: Simon Richter, 2015-04-13
-
[PATCH 21/27] PinTypeComboBox: typesafe Get/Set
From: Simon Richter, 2015-04-13
-
[PATCH 22/27] ElectricPinType: move text lookup
From: Simon Richter, 2015-04-13