Use consistent terminology.

Fixes https://gitlab.com/kicad/code/kicad/issues/8777
This commit is contained in:
Jeff Young 2021-07-12 11:58:14 +01:00
parent ad7e563e24
commit 0b4bb9378b
8 changed files with 39 additions and 39 deletions

View File

@ -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

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Seth Hillbrand <hillbrand@ucdavis.edu>
* 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 <bitmaps.h>
#include <sch_line.h>
#include <dialog_edit_line_style.h>
#include <dialog_line_wire_bus_properties.h>
#include <dialogs/dialog_color_picker.h>
#include <settings/settings_manager.h>
#include <sch_edit_frame.h>
@ -53,12 +53,12 @@ const std::map<PLOT_DASH_TYPE, struct lineTypeStruct> lineTypeNames = {
#define INDETERMINATE_STYLE _( "Leave unchanged" )
DIALOG_EDIT_LINE_STYLE::DIALOG_EDIT_LINE_STYLE( SCH_EDIT_FRAME* aParent,
std::deque<SCH_ITEM*>& 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<SCH_ITEM*>& 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<const PLOT_DASH_TYPE, lineTypeStruct>& 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;

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 Seth Hillbrand <hillbrand@ucdavis.edu>
* 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 <dialog_edit_line_style_base.h>
#include <dialog_line_wire_bus_properties_base.h>
#include <widgets/unit_binder.h>
@ -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<SCH_ITEM*>& strokeItems );
DIALOG_LINE_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent, std::deque<SCH_ITEM*>& 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

View File

@ -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()
{
}

View File

@ -11,12 +11,12 @@
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">table</property>
<property name="file">dialog_edit_line_style_base</property>
<property name="file">dialog_line_wire_bus_properties_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_edit_line_style</property>
<property name="name">dialog_line_wire_bus_properties</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
@ -43,12 +43,12 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">DIALOG_EDIT_LINE_STYLE_BASE</property>
<property name="name">DIALOG_LINE_WIRE_BUS_PROPERTIES_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Line Style</property>
<property name="title">Line, Wire &amp; Bus Properties</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>

View File

@ -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();
};

View File

@ -47,7 +47,7 @@
#include <symbol_library.h>
#include <eeschema_settings.h>
#include <dialogs/dialog_edit_label.h>
#include <dialogs/dialog_edit_line_style.h>
#include <dialogs/dialog_line_wire_bus_properties.h>
#include <dialogs/dialog_junction_props.h>
#include <dialogs/dialog_sheet_pin_properties.h>
#include <kicad_string.h>
@ -803,7 +803,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent )
std::deque<SCH_ITEM*> 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 )
{

View File

@ -54,7 +54,7 @@
#include <wx/gdicmn.h>
#include <dialogs/dialog_change_symbols.h>
#include <dialogs/dialog_image_editor.h>
#include <dialogs/dialog_edit_line_style.h>
#include <dialogs/dialog_line_wire_bus_properties.h>
#include <dialogs/dialog_symbol_properties.h>
#include <dialogs/dialog_sheet_pin_properties.h>
#include <dialogs/dialog_edit_one_field.h>
@ -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 )
{