Use consistent naming.

This commit is contained in:
Jeff Young 2022-12-12 11:46:20 +00:00
parent f75d18c7c8
commit c7603372b5
7 changed files with 44 additions and 44 deletions

View File

@ -156,6 +156,7 @@ set( EESCHEMA_DLGS
) )
set( EESCHEMA_WIDGETS set( EESCHEMA_WIDGETS
widgets/hierarchy_pane.cpp
widgets/pin_shape_combobox.cpp widgets/pin_shape_combobox.cpp
widgets/pin_type_combobox.cpp widgets/pin_type_combobox.cpp
widgets/symbol_preview_widget.cpp widgets/symbol_preview_widget.cpp
@ -202,7 +203,6 @@ set( EESCHEMA_SRCS
files-io.cpp files-io.cpp
generate_alias_info.cpp generate_alias_info.cpp
picksymbol.cpp picksymbol.cpp
hierarch.cpp
lib_field.cpp lib_field.cpp
lib_item.cpp lib_item.cpp
lib_pin.cpp lib_pin.cpp

View File

@ -31,7 +31,7 @@
#include <sch_edit_frame.h> #include <sch_edit_frame.h>
#include <sch_painter.h> #include <sch_painter.h>
#include <schematic.h> #include <schematic.h>
#include <hierarch.h> #include <widgets/hierarchy_pane.h>
#include <settings/app_settings.h> #include <settings/app_settings.h>
#include <settings/settings_manager.h> #include <settings/settings_manager.h>
#include <symbol_lib_table.h> #include <symbol_lib_table.h>

View File

@ -31,7 +31,6 @@
#include <eeschema_id.h> #include <eeschema_id.h>
#include <executable_names.h> #include <executable_names.h>
#include <gestfich.h> #include <gestfich.h>
#include <hierarch.h>
#include <dialogs/html_message_box.h> #include <dialogs/html_message_box.h>
#include <ignore.h> #include <ignore.h>
#include <invoke_sch_dialog.h> #include <invoke_sch_dialog.h>
@ -79,6 +78,7 @@
#include <tools/sch_navigate_tool.h> #include <tools/sch_navigate_tool.h>
#include <view/view_controls.h> #include <view/view_controls.h>
#include <widgets/infobar.h> #include <widgets/infobar.h>
#include <widgets/hierarchy_pane.h>
#include <wildcards_and_files_ext.h> #include <wildcards_and_files_ext.h>
#include <wx/cmdline.h> #include <wx/cmdline.h>
#include <wx/app.h> #include <wx/app.h>
@ -154,7 +154,7 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
ReCreateVToolbar(); ReCreateVToolbar();
ReCreateOptToolbar(); ReCreateOptToolbar();
m_hierarchy = new HIERARCHY_NAVIG_PANEL( this ); m_hierarchy = new HIERARCHY_PANE( this );
// Initialize common print setup dialog settings. // Initialize common print setup dialog settings.
m_pageSetupData.GetPrintData().SetPrintMode( wxPRINT_MODE_PRINTER ); m_pageSetupData.GetPrintData().SetPrintMode( wxPRINT_MODE_PRINTER );

View File

@ -57,7 +57,7 @@ class SCHEMATIC;
class DIALOG_SCH_FIND; class DIALOG_SCH_FIND;
class wxFindReplaceData; class wxFindReplaceData;
class RESCUER; class RESCUER;
class HIERARCHY_NAVIG_PANEL; class HIERARCHY_PANE;
// @todo Move this to transform alone with all of the transform manipulation code. // @todo Move this to transform alone with all of the transform manipulation code.
/// enum used in RotationMiroir() /// enum used in RotationMiroir()
@ -933,7 +933,7 @@ private:
DIALOG_SCH_FIND* m_findReplaceDialog; DIALOG_SCH_FIND* m_findReplaceDialog;
HIERARCHY_NAVIG_PANEL* m_hierarchy; HIERARCHY_PANE* m_hierarchy;
bool m_syncingPcbToSchSelection; // Recursion guard when synchronizing selection from PCB bool m_syncingPcbToSchSelection; // Recursion guard when synchronizing selection from PCB
}; };

View File

@ -30,12 +30,12 @@
#include <kiface_base.h> #include <kiface_base.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <eeschema_id.h> #include <eeschema_id.h>
#include <hierarch.h>
#include <python_scripting.h> #include <python_scripting.h>
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
#include <tool/action_toolbar.h> #include <tool/action_toolbar.h>
#include <tools/ee_actions.h> #include <tools/ee_actions.h>
#include <tools/ee_selection_tool.h> #include <tools/ee_selection_tool.h>
#include <widgets/hierarchy_pane.h>
#include <widgets/wx_aui_utils.h> #include <widgets/wx_aui_utils.h>
/* Create the main Horizontal Toolbar for the schematic editor /* Create the main Horizontal Toolbar for the schematic editor

View File

@ -31,7 +31,7 @@
#include <tool/tool_manager.h> #include <tool/tool_manager.h>
#include <tools/ee_actions.h> #include <tools/ee_actions.h>
#include <hierarch.h> #include <hierarchy_pane.h>
#include <kiface_base.h> #include <kiface_base.h>
#include <eeschema_settings.h> #include <eeschema_settings.h>
@ -69,7 +69,7 @@ int HIERARCHY_TREE::OnCompareItems( const wxTreeItemId& item1, const wxTreeItemI
} }
HIERARCHY_NAVIG_PANEL::HIERARCHY_NAVIG_PANEL( SCH_EDIT_FRAME* aParent ) : HIERARCHY_PANE::HIERARCHY_PANE( SCH_EDIT_FRAME* aParent ) :
WX_PANEL( aParent ) WX_PANEL( aParent )
{ {
wxASSERT( dynamic_cast<SCH_EDIT_FRAME*>( aParent ) ); wxASSERT( dynamic_cast<SCH_EDIT_FRAME*>( aParent ) );
@ -98,23 +98,23 @@ HIERARCHY_NAVIG_PANEL::HIERARCHY_NAVIG_PANEL( SCH_EDIT_FRAME* aParent ) :
UpdateHierarchyTree(); UpdateHierarchyTree();
// Enable selection events // Enable selection events
Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
m_events_bound = true; m_events_bound = true;
} }
HIERARCHY_NAVIG_PANEL::~HIERARCHY_NAVIG_PANEL() HIERARCHY_PANE::~HIERARCHY_PANE()
{ {
Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
} }
void HIERARCHY_NAVIG_PANEL::buildHierarchyTree( SCH_SHEET_PATH* aList, const wxTreeItemId& aParent ) void HIERARCHY_PANE::buildHierarchyTree( SCH_SHEET_PATH* aList, const wxTreeItemId& aParent )
{ {
std::vector<SCH_ITEM*> sheetChildren; std::vector<SCH_ITEM*> sheetChildren;
aList->LastScreen()->GetSheets( &sheetChildren ); aList->LastScreen()->GetSheets( &sheetChildren );
@ -137,16 +137,16 @@ void HIERARCHY_NAVIG_PANEL::buildHierarchyTree( SCH_SHEET_PATH* aList, const wxT
} }
void HIERARCHY_NAVIG_PANEL::UpdateHierarchySelection() void HIERARCHY_PANE::UpdateHierarchySelection()
{ {
bool eventsWereBound = m_events_bound; bool eventsWereBound = m_events_bound;
if( eventsWereBound ) if( eventsWereBound )
{ {
// Disable selection events // Disable selection events
Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
m_events_bound = false; m_events_bound = false;
} }
@ -195,16 +195,16 @@ void HIERARCHY_NAVIG_PANEL::UpdateHierarchySelection()
if( eventsWereBound ) if( eventsWereBound )
{ {
// Enable selection events // Enable selection events
Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
m_events_bound = true; m_events_bound = true;
} }
} }
void HIERARCHY_NAVIG_PANEL::UpdateHierarchyTree() void HIERARCHY_PANE::UpdateHierarchyTree()
{ {
Freeze(); Freeze();
@ -213,9 +213,9 @@ void HIERARCHY_NAVIG_PANEL::UpdateHierarchyTree()
if( eventsWereBound ) if( eventsWereBound )
{ {
// Disable selection events // Disable selection events
Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Unbind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Unbind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
m_events_bound = false; m_events_bound = false;
} }
@ -236,9 +236,9 @@ void HIERARCHY_NAVIG_PANEL::UpdateHierarchyTree()
if( eventsWereBound ) if( eventsWereBound )
{ {
// Enable selection events // Enable selection events
Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_ITEM_ACTIVATED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_NAVIG_PANEL::onSelectSheetPath, this ); Bind( wxEVT_TREE_SEL_CHANGED, &HIERARCHY_PANE::onSelectSheetPath, this );
Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_NAVIG_PANEL::onRightClick, this ); Bind( wxEVT_TREE_ITEM_RIGHT_CLICK, &HIERARCHY_PANE::onRightClick, this );
m_events_bound = true; m_events_bound = true;
} }
@ -247,7 +247,7 @@ void HIERARCHY_NAVIG_PANEL::UpdateHierarchyTree()
} }
void HIERARCHY_NAVIG_PANEL::onSelectSheetPath( wxTreeEvent& aEvent ) void HIERARCHY_PANE::onSelectSheetPath( wxTreeEvent& aEvent )
{ {
wxTreeItemId itemSel = m_tree->GetSelection(); wxTreeItemId itemSel = m_tree->GetSelection();
TREE_ITEM_DATA* itemData = static_cast<TREE_ITEM_DATA*>( m_tree->GetItemData( itemSel ) ); TREE_ITEM_DATA* itemData = static_cast<TREE_ITEM_DATA*>( m_tree->GetItemData( itemSel ) );
@ -258,7 +258,7 @@ void HIERARCHY_NAVIG_PANEL::onSelectSheetPath( wxTreeEvent& aEvent )
} }
void HIERARCHY_NAVIG_PANEL::onRightClick( wxTreeEvent& aEvent ) void HIERARCHY_PANE::onRightClick( wxTreeEvent& aEvent )
{ {
wxTreeItemId itemSel = m_tree->GetFocusedItem(); wxTreeItemId itemSel = m_tree->GetFocusedItem();
@ -307,7 +307,7 @@ void HIERARCHY_NAVIG_PANEL::onRightClick( wxTreeEvent& aEvent )
} }
wxString HIERARCHY_NAVIG_PANEL::getRootString() wxString HIERARCHY_PANE::getRootString()
{ {
SCH_SHEET* rootSheet = &m_frame->Schematic().Root(); SCH_SHEET* rootSheet = &m_frame->Schematic().Root();
SCH_SHEET_PATH rootPath; SCH_SHEET_PATH rootPath;
@ -317,7 +317,7 @@ wxString HIERARCHY_NAVIG_PANEL::getRootString()
} }
wxString HIERARCHY_NAVIG_PANEL::formatPageString( const wxString& aName, const wxString& aPage ) wxString HIERARCHY_PANE::formatPageString( const wxString& aName, const wxString& aPage )
{ {
return aName + wxT( " " ) + wxString::Format( _( "(page %s)" ), aPage ); return aName + wxT( " " ) + wxString::Format( _( "(page %s)" ), aPage );
} }

View File

@ -25,19 +25,19 @@
*/ */
#ifndef HIERARCH_H #ifndef HIERARCHY_PANE_H
#define HIERARCH_H #define HIERARCHY_PANE_H
#include <wx/imaglist.h> #include <wx/imaglist.h>
#include <wx/object.h> // wxRTTI macros #include <wx/object.h> // wxRTTI macros
#include <wx/treectrl.h> #include <wx/treectrl.h>
#include <widgets/wx_panel.h> #include "widgets/wx_panel.h"
class SCH_EDIT_FRAME; class SCH_EDIT_FRAME;
class SCH_SHEET_PATH; class SCH_SHEET_PATH;
class HIERARCHY_NAVIG_PANEL; class HIERARCHY_PANE;
/** /**
@ -49,7 +49,7 @@ class HIERARCHY_NAVIG_PANEL;
class HIERARCHY_TREE : public wxTreeCtrl class HIERARCHY_TREE : public wxTreeCtrl
{ {
public: public:
HIERARCHY_TREE( HIERARCHY_NAVIG_PANEL* parent ) : HIERARCHY_TREE( HIERARCHY_PANE* parent ) :
wxTreeCtrl( (wxWindow*) parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTreeCtrl( (wxWindow*) parent, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxTR_HAS_BUTTONS, wxDefaultValidator, wxT( "HierachyTreeCtrl" ) ) wxTR_HAS_BUTTONS, wxDefaultValidator, wxT( "HierachyTreeCtrl" ) )
{ {
@ -64,12 +64,12 @@ private:
}; };
class HIERARCHY_NAVIG_PANEL : public WX_PANEL class HIERARCHY_PANE : public WX_PANEL
{ {
public: public:
HIERARCHY_NAVIG_PANEL( SCH_EDIT_FRAME* aParent ); HIERARCHY_PANE( SCH_EDIT_FRAME* aParent );
~HIERARCHY_NAVIG_PANEL(); ~HIERARCHY_PANE();
/** /**
* Update the hierarchical tree of the schematic. * Update the hierarchical tree of the schematic.
@ -121,4 +121,4 @@ private:
bool m_events_bound; bool m_events_bound;
}; };
#endif // HIERARCH_H #endif // HIERARCHY_PANE_H