← Back to team overview

kicad-developers team mailing list archive

[PATCH 0/5] Enum refactoring and shiny icons

 

Hi,

this refactors two enum types, ELECTRICAL_PINTYPE and DrawPinShape (which
becomes GRAPHIC_PINSHAPE):

1. Move enum to separate header file, out of lib_pin.h.
2. Move UI text and bitmap lookup out of LIB_PIN (end goal: no UI code in
   data structures)
3. Create separate widget class for use in dialogs, that is completely
   self-initializing to maximize reusability

Then, the TypeSheetLabel enum type is used explicitly where possible, for
better typesafety (this is what is left of the ERC changes posted earlier).

Finally, the "pin type" column in the pin table gets icons to hopefully
enhandle readability. This requires the text/bitmap lookup changes from
earlier, that's why it's in this patch set.

   Simon

Simon Richter (5):
  Fix typo
  Refactor DrawPinShape
  Refactor ELECTRICAL_PINTYPE
  Use TypeSheetLabel enum where appropriate
  Add icon to pin type column

 eeschema/CMakeLists.txt                        |   5 +
 eeschema/dialogs/dialog_edit_label.cpp         |   3 +-
 eeschema/dialogs/dialog_erc.cpp                |  18 +-
 eeschema/dialogs/dialog_erc.h                  |   4 +-
 eeschema/dialogs/dialog_lib_edit_pin.cpp       |  27 +-
 eeschema/dialogs/dialog_lib_edit_pin.h         |  14 +-
 eeschema/dialogs/dialog_lib_edit_pin_base.cpp  |   6 +-
 eeschema/dialogs/dialog_lib_edit_pin_base.fbp  |   4 +-
 eeschema/dialogs/dialog_lib_edit_pin_base.h    |   6 +-
 eeschema/dialogs/dialog_lib_edit_pin_table.cpp |  51 +++-
 eeschema/dialogs/dialog_sch_edit_sheet_pin.h   |   8 +-
 eeschema/edit_label.cpp                        |   8 +-
 eeschema/erc.cpp                               |  22 +-
 eeschema/lib_pin.cpp                           | 343 ++++++++++---------------
 eeschema/lib_pin.h                             | 102 +-------
 eeschema/pin_shape.cpp                         | 104 ++++++++
 eeschema/pin_shape.h                           |  57 ++++
 eeschema/pin_type.cpp                          | 116 +++++++++
 eeschema/pin_type.h                            |  59 +++++
 eeschema/pinedit.cpp                           |   9 +-
 eeschema/sch_sheet_pin.cpp                     |   2 +-
 eeschema/sch_text.cpp                          |   4 +-
 eeschema/sch_text.h                            |   6 +-
 eeschema/schframe.h                            |   4 +-
 eeschema/sheetlab.cpp                          |   2 +-
 eeschema/widgets/pin_shape_combobox.cpp        |  69 +++++
 eeschema/widgets/pin_shape_combobox.h          |  51 ++++
 eeschema/widgets/pin_type_combobox.cpp         |  69 +++++
 eeschema/widgets/pin_type_combobox.h           |  51 ++++
 29 files changed, 836 insertions(+), 388 deletions(-)
 create mode 100644 eeschema/pin_shape.cpp
 create mode 100644 eeschema/pin_shape.h
 create mode 100644 eeschema/pin_type.cpp
 create mode 100644 eeschema/pin_type.h
 create mode 100644 eeschema/widgets/pin_shape_combobox.cpp
 create mode 100644 eeschema/widgets/pin_shape_combobox.h
 create mode 100644 eeschema/widgets/pin_type_combobox.cpp
 create mode 100644 eeschema/widgets/pin_type_combobox.h

-- 
2.1.4


Follow ups