kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #23204
[PATCH 17/19] 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 cbea37c..d7a83f7 100644
--- a/eeschema/lib_pin.cpp
+++ b/eeschema/lib_pin.cpp
@@ -2190,17 +2190,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 6cb03d9..95e241d 100644
--- a/eeschema/lib_pin.h
+++ b/eeschema/lib_pin.h
@@ -440,12 +440,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/19] Pin shape and type refactoring
From: Simon Richter, 2016-02-17
-
[PATCH 01/19] Replace DrawPinShape enum with PinShape
From: Simon Richter, 2016-02-17
-
[PATCH 02/19] PinShapeComboBox: Introduce widget
From: Simon Richter, 2016-02-17
-
[PATCH 03/19] PinShapeComboBox: Fully initialize in c'tor
From: Simon Richter, 2016-02-17
-
[PATCH 04/19] PinShapeComboBox: typesafe Get/Set
From: Simon Richter, 2016-02-17
-
[PATCH 05/19] PinShape: move enum to own header
From: Simon Richter, 2016-02-17
-
[PATCH 06/19] PinShape: move text lookup
From: Simon Richter, 2016-02-17
-
[PATCH 07/19] PinShape: drop list interfaces
From: Simon Richter, 2016-02-17
-
[PATCH 08/19] PinShape: move bitmap lookup
From: Simon Richter, 2016-02-17
-
[PATCH 09/19] ElectricPinType: move definition to pin_type.h
From: Simon Richter, 2016-02-17
-
[PATCH 10/19] ElectricPinType: Use enum rather than int where possible
From: Simon Richter, 2016-02-17
-
[PATCH 11/19] ElectricPinType: Rename PIN_NMAX to PINTYPE_COUNT
From: Simon Richter, 2016-02-17
-
[PATCH 12/19] ElectricPinType: Separate PINTYPE_COUNT from enum
From: Simon Richter, 2016-02-17
-
[PATCH 13/19] PinTypeComboBox: Introduce widget
From: Simon Richter, 2016-02-17
-
[PATCH 14/19] PinTypeComboBox: fully initialize in c'tor
From: Simon Richter, 2016-02-17
-
[PATCH 15/19] PinTypeComboBox: typesafe Get/Set
From: Simon Richter, 2016-02-17
-
[PATCH 16/19] ElectricPinType: move text lookup
From: Simon Richter, 2016-02-17