From 0b4bb9378ba51953552fecb2928095aa5c7f9a67 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 12 Jul 2021 11:58:14 +0100 Subject: [PATCH] Use consistent terminology. Fixes https://gitlab.com/kicad/code/kicad/issues/8777 --- eeschema/CMakeLists.txt | 4 +-- ...pp => dialog_line_wire_bus_properties.cpp} | 26 +++++++++---------- ...le.h => dialog_line_wire_bus_properties.h} | 14 +++++----- ... dialog_line_wire_bus_properties_base.cpp} | 10 +++---- ... dialog_line_wire_bus_properties_base.fbp} | 8 +++--- ...=> dialog_line_wire_bus_properties_base.h} | 8 +++--- eeschema/tools/sch_drawing_tools.cpp | 4 +-- eeschema/tools/sch_edit_tool.cpp | 4 +-- 8 files changed, 39 insertions(+), 39 deletions(-) rename eeschema/dialogs/{dialog_edit_line_style.cpp => dialog_line_wire_bus_properties.cpp} (85%) rename eeschema/dialogs/{dialog_edit_line_style.h => dialog_line_wire_bus_properties.h} (77%) rename eeschema/dialogs/{dialog_edit_line_style_base.cpp => dialog_line_wire_bus_properties_base.cpp} (88%) rename eeschema/dialogs/{dialog_edit_line_style_base.fbp => dialog_line_wire_bus_properties_base.fbp} (99%) rename eeschema/dialogs/{dialog_edit_line_style_base.h => dialog_line_wire_bus_properties_base.h} (80%) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 55a414408d..19b3e4ef29 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -60,8 +60,6 @@ set( EESCHEMA_DLGS dialogs/dialog_edit_symbols_libid_base.cpp dialogs/dialog_edit_label.cpp dialogs/dialog_edit_label_base.cpp - dialogs/dialog_edit_line_style.cpp - dialogs/dialog_edit_line_style_base.cpp dialogs/dialog_edit_one_field.cpp dialogs/dialog_eeschema_page_settings.cpp dialogs/dialog_erc.cpp @@ -79,6 +77,8 @@ set( EESCHEMA_DLGS dialogs/dialog_lib_edit_text_base.cpp dialogs/dialog_lib_new_symbol.cpp dialogs/dialog_lib_new_symbol_base.cpp + dialogs/dialog_line_wire_bus_properties.cpp + dialogs/dialog_line_wire_bus_properties_base.cpp dialogs/dialog_migrate_buses.cpp dialogs/dialog_migrate_buses_base.cpp dialogs/dialog_netlist.cpp diff --git a/eeschema/dialogs/dialog_edit_line_style.cpp b/eeschema/dialogs/dialog_line_wire_bus_properties.cpp similarity index 85% rename from eeschema/dialogs/dialog_edit_line_style.cpp rename to eeschema/dialogs/dialog_line_wire_bus_properties.cpp index d75058ff7f..45d6c1ed05 100644 --- a/eeschema/dialogs/dialog_edit_line_style.cpp +++ b/eeschema/dialogs/dialog_line_wire_bus_properties.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Seth Hillbrand - * Copyright (C) 2014-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.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 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -53,12 +53,12 @@ const std::map lineTypeNames = { #define INDETERMINATE_STYLE _( "Leave unchanged" ) -DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, - std::deque& strokeItems ) : - DIALOG_EDIT_LINE_STYLE_BASE( aParent ), - m_frame( aParent ), - m_strokeItems( strokeItems ), - m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true ) +DIALOG_LINE_WIRE_BUS_PROPERTIES::DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent, + std::deque& aItems ) : + DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE( aParent ), + m_frame( aParent ), + m_strokeItems( aItems ), + m_width( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits, true ) { m_sdbSizerApply->SetLabel( _( "Default" ) ); @@ -69,7 +69,7 @@ DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, SetInitialFocus( m_lineWidth ); - for( auto& typeEntry : lineTypeNames ) + for( const std::pair& typeEntry : lineTypeNames ) m_typeCombo->Append( typeEntry.second.name, KiBitmap( typeEntry.second.bitmap ) ); m_typeCombo->Append( DEFAULT_STYLE ); @@ -81,9 +81,9 @@ DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, } -bool DIALOG_EDIT_LINE_STYLE::TransferDataToWindow() +bool DIALOG_LINE_WIRE_BUS_PROPERTIES::TransferDataToWindow() { - auto first_stroke_item = m_strokeItems.front(); + SCH_ITEM* first_stroke_item = m_strokeItems.front(); if( std::all_of( m_strokeItems.begin() + 1, m_strokeItems.end(), [&]( const SCH_ITEM* r ) @@ -136,7 +136,7 @@ bool DIALOG_EDIT_LINE_STYLE::TransferDataToWindow() } -void DIALOG_EDIT_LINE_STYLE::resetDefaults( wxCommandEvent& event ) +void DIALOG_LINE_WIRE_BUS_PROPERTIES::resetDefaults( wxCommandEvent& event ) { m_width.SetValue( 0 ); m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false ); @@ -147,7 +147,7 @@ void DIALOG_EDIT_LINE_STYLE::resetDefaults( wxCommandEvent& event ) } -bool DIALOG_EDIT_LINE_STYLE::TransferDataFromWindow() +bool DIALOG_LINE_WIRE_BUS_PROPERTIES::TransferDataFromWindow() { PICKED_ITEMS_LIST pickedItems; STROKE_PARAMS stroke; diff --git a/eeschema/dialogs/dialog_edit_line_style.h b/eeschema/dialogs/dialog_line_wire_bus_properties.h similarity index 77% rename from eeschema/dialogs/dialog_edit_line_style.h rename to eeschema/dialogs/dialog_line_wire_bus_properties.h index 9a19e36ace..974750f904 100644 --- a/eeschema/dialogs/dialog_edit_line_style.h +++ b/eeschema/dialogs/dialog_line_wire_bus_properties.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Seth Hillbrand - * Copyright (C) 2014-2020 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2014-2021 KiCad Developers, see AUTHORS.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 @@ -22,10 +22,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __dialog_edit_line_style__ -#define __dialog_edit_line_style__ +#ifndef DIALOG_LINE_WIRE_BUS_PROPERTIES_H +#define DIALOG_LINE_WIRE_BUS_PROPERTIES_H -#include +#include #include @@ -33,10 +33,10 @@ class SCH_EDIT_FRAME; class SCH_LINE; -class DIALOG_EDIT_LINE_STYLE : public DIALOG_EDIT_LINE_STYLE_BASE +class DIALOG_LINE_WIRE_BUS_PROPERTIES : public DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE { public: - DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent, std::deque& strokeItems ); + DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent, std::deque& aItems ); bool TransferDataToWindow() override; bool TransferDataFromWindow() override; @@ -50,4 +50,4 @@ private: void resetDefaults( wxCommandEvent& event ) override; }; -#endif // __dialog_edit_line_style__ +#endif // DIALOG_LINE_WIRE_BUS_PROPERTIES_H diff --git a/eeschema/dialogs/dialog_edit_line_style_base.cpp b/eeschema/dialogs/dialog_line_wire_bus_properties_base.cpp similarity index 88% rename from eeschema/dialogs/dialog_edit_line_style_base.cpp rename to eeschema/dialogs/dialog_line_wire_bus_properties_base.cpp index b9f063970b..eace5be03b 100644 --- a/eeschema/dialogs/dialog_edit_line_style_base.cpp +++ b/eeschema/dialogs/dialog_line_wire_bus_properties_base.cpp @@ -7,15 +7,15 @@ #include "widgets/color_swatch.h" -#include "dialog_edit_line_style_base.h" +#include "dialog_line_wire_bus_properties_base.h" /////////////////////////////////////////////////////////////////////////// -BEGIN_EVENT_TABLE( DIALOG_EDIT_LINE_STYLE_BASE, DIALOG_SHIM ) - EVT_BUTTON( wxID_APPLY, DIALOG_EDIT_LINE_STYLE_BASE::_wxFB_resetDefaults ) +BEGIN_EVENT_TABLE( DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE, DIALOG_SHIM ) + EVT_BUTTON( wxID_APPLY, DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE::_wxFB_resetDefaults ) END_EVENT_TABLE() -DIALOG_EDIT_LINE_STYLE_BASE::DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE::DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -103,6 +103,6 @@ DIALOG_EDIT_LINE_STYLE_BASE::DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWi this->Centre( wxBOTH ); } -DIALOG_EDIT_LINE_STYLE_BASE::~DIALOG_EDIT_LINE_STYLE_BASE() +DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE::~DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE() { } diff --git a/eeschema/dialogs/dialog_edit_line_style_base.fbp b/eeschema/dialogs/dialog_line_wire_bus_properties_base.fbp similarity index 99% rename from eeschema/dialogs/dialog_edit_line_style_base.fbp rename to eeschema/dialogs/dialog_line_wire_bus_properties_base.fbp index f2196b6e41..d525e2f652 100644 --- a/eeschema/dialogs/dialog_edit_line_style_base.fbp +++ b/eeschema/dialogs/dialog_line_wire_bus_properties_base.fbp @@ -11,12 +11,12 @@ res UTF-8 table - dialog_edit_line_style_base + dialog_line_wire_bus_properties_base 1000 none 1 - dialog_edit_line_style + dialog_line_wire_bus_properties . @@ -43,12 +43,12 @@ wxID_ANY - DIALOG_EDIT_LINE_STYLE_BASE + DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Line Style + Line, Wire & Bus Properties diff --git a/eeschema/dialogs/dialog_edit_line_style_base.h b/eeschema/dialogs/dialog_line_wire_bus_properties_base.h similarity index 80% rename from eeschema/dialogs/dialog_edit_line_style_base.h rename to eeschema/dialogs/dialog_line_wire_bus_properties_base.h index 43b5a93fc2..c165401a92 100644 --- a/eeschema/dialogs/dialog_edit_line_style_base.h +++ b/eeschema/dialogs/dialog_line_wire_bus_properties_base.h @@ -30,9 +30,9 @@ class COLOR_SWATCH; /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_EDIT_LINE_STYLE_BASE +/// Class DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM +class DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE : public DIALOG_SHIM { DECLARE_EVENT_TABLE() private: @@ -64,8 +64,8 @@ class DIALOG_EDIT_LINE_STYLE_BASE : public DIALOG_SHIM public: - DIALOG_EDIT_LINE_STYLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Style"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_EDIT_LINE_STYLE_BASE(); + DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line, Wire & Bus Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE(); }; diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index ecf6300605..47ca2e5689 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include #include #include @@ -803,7 +803,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) std::deque strokeItems; strokeItems.push_back( previewItem ); - DIALOG_EDIT_LINE_STYLE dlg( m_frame, strokeItems ); + DIALOG_LINE_WIRE_BUS_PROPERTIES dlg( m_frame, strokeItems ); if( dlg.ShowModal() == wxID_OK ) { diff --git a/eeschema/tools/sch_edit_tool.cpp b/eeschema/tools/sch_edit_tool.cpp index 57f5392d19..691e9042da 100644 --- a/eeschema/tools/sch_edit_tool.cpp +++ b/eeschema/tools/sch_edit_tool.cpp @@ -54,7 +54,7 @@ #include #include #include -#include +#include #include #include #include @@ -1428,7 +1428,7 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) return 0; } - DIALOG_EDIT_LINE_STYLE dlg( m_frame, strokeItems ); + DIALOG_LINE_WIRE_BUS_PROPERTIES dlg( m_frame, strokeItems ); if( dlg.ShowModal() == wxID_OK ) {