From 89718dd3bad8a8ba914e3adf1349d68c734ee232 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 19 Jun 2021 18:28:45 +0100 Subject: [PATCH] Naming conventions. --- .../3d_cache/dialogs/3d_cache_dialogs.cpp | 4 +- ...3dmodel.cpp => dialog_select_3d_model.cpp} | 53 +++-- ...ect_3dmodel.h => dialog_select_3d_model.h} | 33 ++-- ...se.cpp => dialog_select_3d_model_base.cpp} | 26 +-- ...se.fbp => dialog_select_3d_model_base.fbp} | 9 +- ...l_base.h => dialog_select_3d_model_base.h} | 14 +- ...prev_3d.cpp => panel_preview_3d_model.cpp} | 47 ++--- ...nel_prev_3d.h => panel_preview_3d_model.h} | 16 +- ...se.cpp => panel_preview_3d_model_base.cpp} | 186 +++++++++--------- ...se.fbp => panel_preview_3d_model_base.fbp} | 6 +- ...d_base.h => panel_preview_3d_model_base.h} | 8 +- ...del_viewer.cpp => eda_3d_model_viewer.cpp} | 78 ++++---- ...d_model_viewer.h => eda_3d_model_viewer.h} | 8 +- 3d-viewer/3d_viewer/3d_menubar.cpp | 6 +- 3d-viewer/3d_viewer/3d_toolbar.cpp | 6 +- .../3d_viewer/dialogs/panel_3D_colors.cpp | 2 +- 3d-viewer/3d_viewer/dialogs/panel_3D_colors.h | 2 +- .../dialogs/panel_3D_display_options.cpp | 4 +- .../dialogs/panel_3D_display_options.h | 8 +- .../dialogs/panel_3D_opengl_options.cpp | 4 +- .../dialogs/panel_3D_opengl_options.h | 2 +- .../dialogs/panel_3D_raytracing_options.cpp | 4 +- .../dialogs/panel_3D_raytracing_options.h | 2 +- 3d-viewer/3d_viewer/eda_3d_viewer.cpp | 110 ++++++----- 3d-viewer/3d_viewer/eda_3d_viewer.h | 8 +- ...ettings.cpp => eda_3d_viewer_settings.cpp} | 2 +- ...er_settings.h => eda_3d_viewer_settings.h} | 0 .../{3d_actions.cpp => eda_3d_actions.cpp} | 2 +- .../tools/{3d_actions.h => eda_3d_actions.h} | 0 ...d_conditions.cpp => eda_3d_conditions.cpp} | 2 +- .../{3d_conditions.h => eda_3d_conditions.h} | 0 ...d_controller.cpp => eda_3d_controller.cpp} | 11 +- .../{3d_controller.h => eda_3d_controller.h} | 2 +- 3d-viewer/CMakeLists.txt | 18 +- include/pcb_base_frame.h | 6 +- .../dialogs/dialog_footprint_properties.cpp | 70 +++---- pcbnew/dialogs/dialog_footprint_properties.h | 9 +- .../dialog_footprint_properties_fp_editor.cpp | 20 +- .../dialog_footprint_properties_fp_editor.h | 7 +- pcbnew/files.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 2 +- pcbnew/pcb_base_frame.cpp | 15 +- pcbnew/pcbnew_settings.cpp | 2 +- pcbnew/tools/pcb_viewer_tools.cpp | 2 +- qa/libeval_compiler/CMakeLists.txt | 2 +- 45 files changed, 406 insertions(+), 414 deletions(-) rename 3d-viewer/3d_cache/dialogs/{dlg_select_3dmodel.cpp => dialog_select_3d_model.cpp} (82%) rename 3d-viewer/3d_cache/dialogs/{dlg_select_3dmodel.h => dialog_select_3d_model.h} (66%) rename 3d-viewer/3d_cache/dialogs/{dlg_select_3dmodel_base.cpp => dialog_select_3d_model_base.cpp} (76%) rename 3d-viewer/3d_cache/dialogs/{dialog_select_3dmodel_base.fbp => dialog_select_3d_model_base.fbp} (99%) rename 3d-viewer/3d_cache/dialogs/{dlg_select_3dmodel_base.h => dialog_select_3d_model_base.h} (75%) rename 3d-viewer/3d_cache/dialogs/{panel_prev_3d.cpp => panel_preview_3d_model.cpp} (89%) rename 3d-viewer/3d_cache/dialogs/{panel_prev_3d.h => panel_preview_3d_model.h} (93%) rename 3d-viewer/3d_cache/dialogs/{panel_prev_3d_base.cpp => panel_preview_3d_model_base.cpp} (72%) rename 3d-viewer/3d_cache/dialogs/{panel_prev_3d_base.fbp => panel_preview_3d_model_base.fbp} (99%) rename 3d-viewer/3d_cache/dialogs/{panel_prev_3d_base.h => panel_preview_3d_model_base.h} (91%) rename 3d-viewer/3d_model_viewer/{3d_model_viewer.cpp => eda_3d_model_viewer.cpp} (81%) rename 3d-viewer/3d_model_viewer/{3d_model_viewer.h => eda_3d_model_viewer.h} (94%) rename 3d-viewer/3d_viewer/{3d_viewer_settings.cpp => eda_3d_viewer_settings.cpp} (99%) rename 3d-viewer/3d_viewer/{3d_viewer_settings.h => eda_3d_viewer_settings.h} (100%) rename 3d-viewer/3d_viewer/tools/{3d_actions.cpp => eda_3d_actions.cpp} (99%) rename 3d-viewer/3d_viewer/tools/{3d_actions.h => eda_3d_actions.h} (100%) rename 3d-viewer/3d_viewer/tools/{3d_conditions.cpp => eda_3d_conditions.cpp} (98%) rename 3d-viewer/3d_viewer/tools/{3d_conditions.h => eda_3d_conditions.h} (100%) rename 3d-viewer/3d_viewer/tools/{3d_controller.cpp => eda_3d_controller.cpp} (97%) rename 3d-viewer/3d_viewer/tools/{3d_controller.h => eda_3d_controller.h} (99%) diff --git a/3d-viewer/3d_cache/dialogs/3d_cache_dialogs.cpp b/3d-viewer/3d_cache/dialogs/3d_cache_dialogs.cpp index 27a6837ddf..b0be2a30dd 100644 --- a/3d-viewer/3d_cache/dialogs/3d_cache_dialogs.cpp +++ b/3d-viewer/3d_cache/dialogs/3d_cache_dialogs.cpp @@ -27,7 +27,7 @@ #include "3d_info.h" #include "3d_cache.h" #include "3d_cache_dialogs.h" -#include "dlg_select_3dmodel.h" +#include "dialog_select_3d_model.h" bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevModelSelectDir, @@ -36,7 +36,7 @@ bool S3D::Select3DModel( wxWindow* aParent, S3D_CACHE* aCache, wxString& prevMod if( NULL == aModel ) return false; - DLG_SELECT_3DMODEL dm( aParent, aCache, aModel, prevModelSelectDir, prevModelWildcard ); + DIALOG_SELECT_3DMODEL dm( aParent, aCache, aModel, prevModelSelectDir, prevModelWildcard ); // Use QuasiModal so that Configure3DPaths (and its help window) will work return dm.ShowQuasiModal() == wxID_OK; diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model.cpp similarity index 82% rename from 3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp rename to 3d-viewer/3d_cache/dialogs/dialog_select_3d_model.cpp index 8fec3bf6e7..900181853a 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.cpp +++ b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model.cpp @@ -25,12 +25,12 @@ #include -#include "dlg_select_3dmodel.h" +#include "dialog_select_3d_model.h" #include "project.h" #include "3d_cache/3d_info.h" #include "3d_cache/3d_cache.h" #include "3d_cache_dialogs.h" -#include <3d_model_viewer/3d_model_viewer.h> +#include <3d_model_viewer/eda_3d_model_viewer.h> #include #include #include @@ -40,25 +40,19 @@ #include -DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, - FP_3DMODEL* aModelItem, wxString& prevModelSelectDir, - int& prevModelWildcard ) : - DLG_SELECT_3D_MODELE_BASE( aParent ), - m_model( aModelItem ), m_cache( aCacheManager ), m_previousDir( prevModelSelectDir ), - m_previousFilterIndex( prevModelWildcard ) +DIALOG_SELECT_3DMODEL::DIALOG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, + FP_3DMODEL* aModelItem, wxString& prevModelSelectDir, + int& prevModelWildcard ) : + DIALOG_SELECT_3D_MODEL_BASE( aParent ), + m_model( aModelItem ), + m_cache( aCacheManager ), + m_resolver( aCacheManager ? aCacheManager->GetResolver() : nullptr ), + m_previousDir( prevModelSelectDir ), + m_modelViewer( nullptr ) { - if( NULL != m_cache ) - m_resolver = m_cache->GetResolver(); - else - m_resolver = NULL; - - // set to NULL to avoid segfaults when m_FileTree is instantiated - // and wxGenericDirCtrl events are posted - m_modelViewer = NULL; - - m_modelViewer = new C3D_MODEL_VIEWER( m_pane3Dviewer, - OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ), - m_cache ); + m_modelViewer = new EDA_3D_MODEL_VIEWER( m_pane3Dviewer, + OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ), + m_cache ); m_modelViewer->SetMinSize( wxSize( 400, -1 ) ); m_Sizer3Dviewer->Add( m_modelViewer, 1, wxEXPAND|wxRIGHT, 5 ); @@ -102,13 +96,19 @@ DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheMana m_FileTree->SetFilter( full_filter ); } else + { m_FileTree->SetFilter( filter ); + } } else + { m_FileTree->SetFilter( wxFileSelectorDefaultWildcardStr ); + } if( prevModelWildcard >= 0 && prevModelWildcard < (int)fl->size() ) + { m_FileTree->SetFilterIndex( prevModelWildcard ); + } else { prevModelWildcard = 0; @@ -138,7 +138,7 @@ DLG_SELECT_3DMODEL::DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheMana } -bool DLG_SELECT_3DMODEL::TransferDataFromWindow() +bool DIALOG_SELECT_3DMODEL::TransferDataFromWindow() { if( !m_model || !m_FileTree ) return true; @@ -160,7 +160,6 @@ bool DLG_SELECT_3DMODEL::TransferDataFromWindow() return true; m_previousDir = m_FileTree->GetPath(); - m_previousFilterIndex = m_FileTree->GetFilterIndex(); // file selection mode: retrieve the filename and specify a // path relative to one of the config paths @@ -172,14 +171,14 @@ bool DLG_SELECT_3DMODEL::TransferDataFromWindow() } -void DLG_SELECT_3DMODEL::OnSelectionChanged( wxCommandEvent& event ) +void DIALOG_SELECT_3DMODEL::OnSelectionChanged( wxCommandEvent& event ) { if( m_modelViewer ) m_modelViewer->Set3DModel( m_FileTree->GetFilePath() ); } -void DLG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event ) +void DIALOG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event ) { if( m_modelViewer ) m_modelViewer->Set3DModel( m_FileTree->GetFilePath() ); @@ -188,21 +187,21 @@ void DLG_SELECT_3DMODEL::OnFileActivated( wxCommandEvent& event ) } -void DLG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event ) +void DIALOG_SELECT_3DMODEL::SetRootDir( wxCommandEvent& event ) { if( m_FileTree && m_dirChoices->GetSelection() > 0 ) m_FileTree->SetPath( m_dirChoices->GetString( m_dirChoices->GetSelection() ) ); } -void DLG_SELECT_3DMODEL::Cfg3DPaths( wxCommandEvent& event ) +void DIALOG_SELECT_3DMODEL::Cfg3DPaths( wxCommandEvent& event ) { if( S3D::Configure3DPaths( this, m_resolver ) ) updateDirChoiceList(); } -void DLG_SELECT_3DMODEL::updateDirChoiceList( void ) +void DIALOG_SELECT_3DMODEL::updateDirChoiceList( void ) { if( !m_FileTree || !m_resolver || !m_dirChoices ) return; diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model.h similarity index 66% rename from 3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h rename to 3d-viewer/3d_cache/dialogs/dialog_select_3d_model.h index ddcba4dfe2..29c8d7fd1a 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel.h +++ b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model.h @@ -22,27 +22,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file dlg_select_3dmodel.h - * creates a dialog to select 3D model files - */ +#ifndef DIALOG_SELECT_3DMODEL_H +#define DIALOG_SELECT_3DMODEL_H - -#ifndef DLG_SELECT_3DMODEL_H -#define DLG_SELECT_3DMODEL_H - -#include "dlg_select_3dmodel_base.h" +#include "dialog_select_3d_model_base.h" class FP_3DMODEL; class S3D_CACHE; class FILENAME_RESOLVER; -class C3D_MODEL_VIEWER; +class EDA_3D_MODEL_VIEWER; -class DLG_SELECT_3DMODEL : public DLG_SELECT_3D_MODELE_BASE +class DIALOG_SELECT_3DMODEL : public DIALOG_SELECT_3D_MODEL_BASE { public: - DLG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem, - wxString& prevModelSelectDir, int& prevModelWildcard ); + DIALOG_SELECT_3DMODEL( wxWindow* aParent, S3D_CACHE* aCacheManager, FP_3DMODEL* aModelItem, + wxString& prevModelSelectDir, int& prevModelWildcard ); bool TransferDataFromWindow() override; void OnSelectionChanged( wxCommandEvent& event )override; @@ -53,14 +47,13 @@ public: private: void updateDirChoiceList( void ); - FP_3DMODEL* m_model; // data for the selected model - S3D_CACHE* m_cache; // cache manager - FILENAME_RESOLVER* m_resolver; // 3D filename resolver + FP_3DMODEL* m_model; // data for the selected model + S3D_CACHE* m_cache; // cache manager + FILENAME_RESOLVER* m_resolver; // 3D filename resolver - wxString& m_previousDir; - int& m_previousFilterIndex; + wxString& m_previousDir; - C3D_MODEL_VIEWER* m_modelViewer; + EDA_3D_MODEL_VIEWER* m_modelViewer; }; -#endif // DLG_SELECT_3DMODEL_H +#endif // DIALOG_SELECT_3DMODEL_H diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.cpp b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.cpp similarity index 76% rename from 3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.cpp rename to 3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.cpp index ddb575d1f0..4ce557d1fe 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.cpp +++ b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.cpp @@ -1,15 +1,15 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "dlg_select_3dmodel_base.h" +#include "dialog_select_3d_model_base.h" /////////////////////////////////////////////////////////////////////////// -DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_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_SELECT_3D_MODEL_BASE::DIALOG_SELECT_3D_MODEL_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 ); @@ -22,7 +22,7 @@ DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindow bSizerUpper->SetMinSize( wxSize( -1,400 ) ); m_splitterWin = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D ); m_splitterWin->SetSashGravity( 0.35 ); - m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DLG_SELECT_3D_MODELE_BASE::m_splitterWinOnIdle ), NULL, this ); + m_splitterWin->Connect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SELECT_3D_MODEL_BASE::m_splitterWinOnIdle ), NULL, this ); m_panelLeft = new wxPanel( m_splitterWin, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizerLeft; @@ -87,18 +87,18 @@ DLG_SELECT_3D_MODELE_BASE::DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindow this->Centre( wxBOTH ); // Connect Events - m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this ); - m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this ); - m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this ); - m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this ); + m_FileTree->Connect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this ); + m_FileTree->Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this ); + m_dirChoices->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this ); + m_cfgPathsButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this ); } -DLG_SELECT_3D_MODELE_BASE::~DLG_SELECT_3D_MODELE_BASE() +DIALOG_SELECT_3D_MODEL_BASE::~DIALOG_SELECT_3D_MODEL_BASE() { // Disconnect Events - m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnFileActivated ), NULL, this ); - m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::OnSelectionChanged ), NULL, this ); - m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::SetRootDir ), NULL, this ); - m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DLG_SELECT_3D_MODELE_BASE::Cfg3DPaths ), NULL, this ); + m_FileTree->Disconnect( wxEVT_DIRCTRL_FILEACTIVATED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnFileActivated ), NULL, this ); + m_FileTree->Disconnect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::OnSelectionChanged ), NULL, this ); + m_dirChoices->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::SetRootDir ), NULL, this ); + m_cfgPathsButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_3D_MODEL_BASE::Cfg3DPaths ), NULL, this ); } diff --git a/3d-viewer/3d_cache/dialogs/dialog_select_3dmodel_base.fbp b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.fbp similarity index 99% rename from 3d-viewer/3d_cache/dialogs/dialog_select_3dmodel_base.fbp rename to 3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.fbp index 1b46acb83c..d9ad916caf 100644 --- a/3d-viewer/3d_cache/dialogs/dialog_select_3dmodel_base.fbp +++ b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.fbp @@ -11,13 +11,12 @@ res UTF-8 connect - dlg_select_3dmodel_base + dialog_select_3d_model_base 1000 none - 1 - dlg_select_3dmodel_base + dialog_select_3d_model_base . @@ -26,7 +25,6 @@ 1 1 UI - 0 0 0 @@ -45,7 +43,7 @@ wxID_ANY - DLG_SELECT_3D_MODELE_BASE + DIALOG_SELECT_3D_MODEL_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER @@ -466,7 +464,6 @@ - 0 diff --git a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.h b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.h similarity index 75% rename from 3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.h rename to 3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.h index c91094e1da..ecec634fbe 100644 --- a/3d-viewer/3d_cache/dialogs/dlg_select_3dmodel_base.h +++ b/3d-viewer/3d_cache/dialogs/dialog_select_3d_model_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Nov 1 2020) +// C++ code generated with wxFormBuilder (version Oct 26 2018) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,19 +22,19 @@ #include #include #include -#include #include #include #include +#include #include /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class DLG_SELECT_3D_MODELE_BASE +/// Class DIALOG_SELECT_3D_MODEL_BASE /////////////////////////////////////////////////////////////////////////////// -class DLG_SELECT_3D_MODELE_BASE : public DIALOG_SHIM +class DIALOG_SELECT_3D_MODEL_BASE : public DIALOG_SHIM { private: @@ -60,13 +60,13 @@ class DLG_SELECT_3D_MODELE_BASE : public DIALOG_SHIM public: - DLG_SELECT_3D_MODELE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select 3D Model"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DLG_SELECT_3D_MODELE_BASE(); + DIALOG_SELECT_3D_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select 3D Model"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_SELECT_3D_MODEL_BASE(); void m_splitterWinOnIdle( wxIdleEvent& ) { m_splitterWin->SetSashPosition( 300 ); - m_splitterWin->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DLG_SELECT_3D_MODELE_BASE::m_splitterWinOnIdle ), NULL, this ); + m_splitterWin->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DIALOG_SELECT_3D_MODEL_BASE::m_splitterWinOnIdle ), NULL, this ); } }; diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model.cpp similarity index 89% rename from 3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp rename to 3d-viewer/3d_cache/dialogs/panel_preview_3d_model.cpp index a5d36d92d5..f7ffdc87f9 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d.cpp +++ b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model.cpp @@ -24,12 +24,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "panel_prev_3d.h" +#include "panel_preview_3d_model.h" #include <3d_canvas/eda_3d_canvas.h> #include #include -#include -#include +#include +#include #include #include #include @@ -41,9 +41,10 @@ #include -PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint, - std::vector* aParentModelList ) : - PANEL_PREV_3D_BASE( aParent, wxID_ANY ), +PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAME* aFrame, + FOOTPRINT* aFootprint, + std::vector* aParentModelList ) : + PANEL_PREVIEW_3D_MODEL_BASE( aParent, wxID_ANY ), m_previewPane( nullptr ), m_infobar( nullptr ), m_boardAdapter(), @@ -122,7 +123,7 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 ); for( wxEventType eventType : { wxEVT_MENU_OPEN, wxEVT_MENU_CLOSE, wxEVT_MENU_HIGHLIGHT } ) - Connect( eventType, wxMenuEventHandler( PANEL_PREV_3D::OnMenuEvent ), NULL, this ); + Connect( eventType, wxMenuEventHandler( PANEL_PREVIEW_3D_MODEL::OnMenuEvent ), NULL, this ); #ifdef __WXOSX__ // Call layout once to get the proper button sizes after the bitmaps have been set @@ -145,14 +146,14 @@ PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRI } -PANEL_PREV_3D::~PANEL_PREV_3D() +PANEL_PREVIEW_3D_MODEL::~PANEL_PREVIEW_3D_MODEL() { delete m_dummyBoard; delete m_previewPane; } -void PANEL_PREV_3D::OnMenuEvent( wxMenuEvent& aEvent ) +void PANEL_PREVIEW_3D_MODEL::OnMenuEvent( wxMenuEvent& aEvent ) { if( !m_toolDispatcher ) aEvent.Skip(); @@ -161,7 +162,7 @@ void PANEL_PREV_3D::OnMenuEvent( wxMenuEvent& aEvent ) } -void PANEL_PREV_3D::loadCommonSettings() +void PANEL_PREVIEW_3D_MODEL::loadCommonSettings() { wxCHECK_RET( m_previewPane, "Cannot load settings to null canvas" ); @@ -199,19 +200,19 @@ static double rotationFromString( const wxString& aValue ) } -wxString PANEL_PREV_3D::formatScaleValue( double aValue ) +wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue ) { return wxString::Format( "%.4f", aValue ); } -wxString PANEL_PREV_3D::formatRotationValue( double aValue ) +wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue ) { return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) ); } -wxString PANEL_PREV_3D::formatOffsetValue( double aValue ) +wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue ) { // Convert from internal units (mm) to user units if( m_userUnits == EDA_UNITS::INCHES ) @@ -221,7 +222,7 @@ wxString PANEL_PREV_3D::formatOffsetValue( double aValue ) } -void PANEL_PREV_3D::SetSelectedModel( int idx ) +void PANEL_PREVIEW_3D_MODEL::SetSelectedModel( int idx ) { if( m_parentModelList && idx >= 0 && idx < (int) m_parentModelList->size() ) { @@ -265,7 +266,7 @@ void PANEL_PREV_3D::SetSelectedModel( int idx ) } -void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event ) +void PANEL_PREVIEW_3D_MODEL::updateOrientation( wxCommandEvent &event ) { if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() ) { @@ -290,7 +291,7 @@ void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event ) } -void PANEL_PREV_3D::onOpacitySlider( wxCommandEvent& event ) +void PANEL_PREVIEW_3D_MODEL::onOpacitySlider( wxCommandEvent& event ) { if( m_parentModelList && m_selected >= 0 && m_selected < (int) m_parentModelList->size() ) { @@ -305,7 +306,7 @@ void PANEL_PREV_3D::onOpacitySlider( wxCommandEvent& event ) } -void PANEL_PREV_3D::doIncrementScale( wxSpinEvent& event, double aSign ) +void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign ) { wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject(); @@ -326,7 +327,7 @@ void PANEL_PREV_3D::doIncrementScale( wxSpinEvent& event, double aSign ) } -void PANEL_PREV_3D::doIncrementRotation( wxSpinEvent& aEvent, double aSign ) +void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aSign ) { wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject(); wxTextCtrl* textCtrl = xrot; @@ -346,7 +347,7 @@ void PANEL_PREV_3D::doIncrementRotation( wxSpinEvent& aEvent, double aSign ) } -void PANEL_PREV_3D::doIncrementOffset( wxSpinEvent& event, double aSign ) +void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign ) { wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject(); @@ -372,7 +373,7 @@ void PANEL_PREV_3D::doIncrementOffset( wxSpinEvent& event, double aSign ) } -void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event ) +void PANEL_PREVIEW_3D_MODEL::onMouseWheelScale( wxMouseEvent& event ) { wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject(); @@ -394,7 +395,7 @@ void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event ) } -void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event ) +void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event ) { wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject(); @@ -416,7 +417,7 @@ void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event ) } -void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event ) +void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event ) { wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject(); @@ -446,7 +447,7 @@ void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event ) } -void PANEL_PREV_3D::UpdateDummyFootprint( bool aReloadRequired ) +void PANEL_PREVIEW_3D_MODEL::UpdateDummyFootprint( bool aReloadRequired ) { m_dummyFootprint->Models().clear(); diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d.h b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model.h similarity index 93% rename from 3d-viewer/3d_cache/dialogs/panel_prev_3d.h rename to 3d-viewer/3d_cache/dialogs/panel_preview_3d_model.h index 49d3397277..506367f5a4 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d.h +++ b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model.h @@ -33,10 +33,10 @@ * to tune the positioning of the models without invoking a file selector dialog. */ -#ifndef PANEL_PREV_MODEL_H -#define PANEL_PREV_MODEL_H +#ifndef PANEL_PREVIEW_3D_MODEL_H +#define PANEL_PREVIEW_3D_MODEL_H -#include "panel_prev_3d_base.h" +#include "panel_preview_3d_model_base.h" #include #include @@ -71,13 +71,13 @@ class BOARD; class BOARD_ADAPTER; class FOOTPRINT; -class PANEL_PREV_3D: public EDA_3D_BOARD_HOLDER, public TOOLS_HOLDER, public PANEL_PREV_3D_BASE +class PANEL_PREVIEW_3D_MODEL: public EDA_3D_BOARD_HOLDER, public TOOLS_HOLDER, public PANEL_PREVIEW_3D_MODEL_BASE { public: - PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint, - std::vector* aParentModelList ); + PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAME* aFrame, FOOTPRINT* aFootprint, + std::vector* aParentModelList ); - ~PANEL_PREV_3D(); + ~PANEL_PREVIEW_3D_MODEL(); /** * The TOOL_DISPATCHER needs these to work around some issues in wxWidgets where the menu @@ -210,4 +210,4 @@ private: EDA_UNITS m_userUnits; }; -#endif // PANEL_PREV_MODEL_H +#endif // PANEL_PREVIEW_3D_MODEL_H diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.cpp b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.cpp similarity index 72% rename from 3d-viewer/3d_cache/dialogs/panel_prev_3d_base.cpp rename to 3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.cpp index 7756ec2b52..ab70e79c5f 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.cpp +++ b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.cpp @@ -5,11 +5,11 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#include "panel_prev_3d_base.h" +#include "panel_preview_3d_model_base.h" /////////////////////////////////////////////////////////////////////////// -PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) +PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name ) { wxBoxSizer* bSizermain; bSizermain = new wxBoxSizer( wxHORIZONTAL ); @@ -231,100 +231,100 @@ PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const w bSizermain->Fit( this ); // Connect Events - xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREV_3D_BASE::onOpacitySlider ), NULL, this ); - m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this ); - m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this ); - m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this ); - m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this ); - m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this ); - m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this ); - m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this ); - m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this ); + xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + m_opacity->Connect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this ); + m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this ); + m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this ); + m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this ); + m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this ); + m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBack ), NULL, this ); + m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this ); + m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this ); + m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this ); } -PANEL_PREV_3D_BASE::~PANEL_PREV_3D_BASE() +PANEL_PREVIEW_3D_MODEL_BASE::~PANEL_PREVIEW_3D_MODEL_BASE() { // Disconnect Events - xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this ); - zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this ); - m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this ); - xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this ); - zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this ); - m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this ); - xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this ); - zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this ); - m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this ); - m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this ); - m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREV_3D_BASE::onOpacitySlider ), NULL, this ); - m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this ); - m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this ); - m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this ); - m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this ); - m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this ); - m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this ); - m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this ); - m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this ); + xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelScale ), NULL, this ); + zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementScale ), NULL, this ); + m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementScale ), NULL, this ); + xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelRot ), NULL, this ); + zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementRot ), NULL, this ); + m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementRot ), NULL, this ); + xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onMouseWheelOffset ), NULL, this ); + zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::updateOrientation ), NULL, this ); + m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onDecrementOffset ), NULL, this ); + m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onIncrementOffset ), NULL, this ); + m_opacity->Disconnect( wxEVT_SLIDER, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::onOpacitySlider ), NULL, this ); + m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DISO ), NULL, this ); + m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DLeft ), NULL, this ); + m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DRight ), NULL, this ); + m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DFront ), NULL, this ); + m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBack ), NULL, this ); + m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DTop ), NULL, this ); + m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DBottom ), NULL, this ); + m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL_BASE::View3DUpdate ), NULL, this ); } diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.fbp b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.fbp similarity index 99% rename from 3d-viewer/3d_cache/dialogs/panel_prev_3d_base.fbp rename to 3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.fbp index a67d816a78..a67b9c3b3d 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.fbp +++ b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.fbp @@ -11,12 +11,12 @@ res UTF-8 connect - panel_prev_3d_base + panel_preview_3d_model_base 1000 none 1 - panel_prev_3d_base + panel_preview_3d_model_base . @@ -41,7 +41,7 @@ wxID_ANY - PANEL_PREV_3D_BASE + PANEL_PREVIEW_3D_MODEL_BASE -1,-1 diff --git a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.h b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.h similarity index 91% rename from 3d-viewer/3d_cache/dialogs/panel_prev_3d_base.h rename to 3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.h index 338a147f75..cb270baa17 100644 --- a/3d-viewer/3d_cache/dialogs/panel_prev_3d_base.h +++ b/3d-viewer/3d_cache/dialogs/panel_preview_3d_model_base.h @@ -32,9 +32,9 @@ /////////////////////////////////////////////////////////////////////////////// -/// Class PANEL_PREV_3D_BASE +/// Class PANEL_PREVIEW_3D_MODEL_BASE /////////////////////////////////////////////////////////////////////////////// -class PANEL_PREV_3D_BASE : public wxPanel +class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel { private: @@ -101,8 +101,8 @@ class PANEL_PREV_3D_BASE : public wxPanel public: wxTextCtrl* yoff; - PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); - ~PANEL_PREV_3D_BASE(); + PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString ); + ~PANEL_PREVIEW_3D_MODEL_BASE(); }; diff --git a/3d-viewer/3d_model_viewer/3d_model_viewer.cpp b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp similarity index 81% rename from 3d-viewer/3d_model_viewer/3d_model_viewer.cpp rename to 3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp index 79ece4896d..077b264946 100644 --- a/3d-viewer/3d_model_viewer/3d_model_viewer.cpp +++ b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp @@ -31,7 +31,7 @@ #include #include "3d_rendering/legacy/3d_model.h" -#include "3d_model_viewer.h" +#include "eda_3d_model_viewer.h" #include "../3d_rendering/legacy/ogl_legacy_utils.h" #include "../3d_cache/3d_cache.h" #include "common_ogl/ogl_utils.h" @@ -52,27 +52,27 @@ * * @ingroup trace_env_vars */ -const wxChar* C3D_MODEL_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_MODEL_VIEWER" ); +const wxChar* EDA_3D_MODEL_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_MODEL_VIEWER" ); -BEGIN_EVENT_TABLE( C3D_MODEL_VIEWER, wxGLCanvas ) - EVT_PAINT( C3D_MODEL_VIEWER::OnPaint ) +BEGIN_EVENT_TABLE( EDA_3D_MODEL_VIEWER, wxGLCanvas ) + EVT_PAINT( EDA_3D_MODEL_VIEWER::OnPaint ) // mouse events - EVT_LEFT_DOWN( C3D_MODEL_VIEWER::OnLeftDown ) - EVT_LEFT_UP( C3D_MODEL_VIEWER::OnLeftUp ) - EVT_MIDDLE_UP( C3D_MODEL_VIEWER::OnMiddleUp ) - EVT_MIDDLE_DOWN(C3D_MODEL_VIEWER::OnMiddleDown) - EVT_RIGHT_DOWN( C3D_MODEL_VIEWER::OnRightClick ) - EVT_MOUSEWHEEL( C3D_MODEL_VIEWER::OnMouseWheel ) - EVT_MOTION( C3D_MODEL_VIEWER::OnMouseMove ) + EVT_LEFT_DOWN( EDA_3D_MODEL_VIEWER::OnLeftDown ) + EVT_LEFT_UP( EDA_3D_MODEL_VIEWER::OnLeftUp ) + EVT_MIDDLE_UP( EDA_3D_MODEL_VIEWER::OnMiddleUp ) + EVT_MIDDLE_DOWN( EDA_3D_MODEL_VIEWER::OnMiddleDown) + EVT_RIGHT_DOWN( EDA_3D_MODEL_VIEWER::OnRightClick ) + EVT_MOUSEWHEEL( EDA_3D_MODEL_VIEWER::OnMouseWheel ) + EVT_MOTION( EDA_3D_MODEL_VIEWER::OnMouseMove ) #ifdef USE_OSX_MAGNIFY_EVENT - EVT_MAGNIFY( C3D_MODEL_VIEWER::OnMagnify ) + EVT_MAGNIFY( EDA_3D_MODEL_VIEWER::OnMagnify ) #endif // other events - EVT_ERASE_BACKGROUND( C3D_MODEL_VIEWER::OnEraseBackground ) + EVT_ERASE_BACKGROUND( EDA_3D_MODEL_VIEWER::OnEraseBackground ) END_EVENT_TABLE() @@ -82,13 +82,13 @@ END_EVENT_TABLE() #define RANGE_SCALE_3D 8.0f -C3D_MODEL_VIEWER::C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList, - S3D_CACHE* aCacheManager ) : +EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList, + S3D_CACHE* aCacheManager ) : HIDPI_GL_CANVAS( aParent, wxID_ANY, aAttribList, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE ), m_trackBallCamera( RANGE_SCALE_3D * 2.0f ), m_cacheManager( aCacheManager ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::C3D_MODEL_VIEWER" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWER" ) ); m_ogl_initialized = false; m_reload_is_needed = false; @@ -100,9 +100,9 @@ C3D_MODEL_VIEWER::C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList, } -C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER() +EDA_3D_MODEL_VIEWER::~EDA_3D_MODEL_VIEWER() { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::EDA_3D_MODEL_VIEWERWER" ) ); if( m_glRC ) { @@ -117,9 +117,9 @@ C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER() } -void C3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel ) +void EDA_3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::Set3DModel with a S3DMODEL" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::Set3DModel with a S3DMODEL" ) ); // Validate a3DModel pointers wxASSERT( a3DModel.m_Materials != nullptr ); @@ -144,9 +144,9 @@ void C3D_MODEL_VIEWER::Set3DModel( const S3DMODEL& a3DModel ) } -void C3D_MODEL_VIEWER::Set3DModel(const wxString& aModelPathName) +void EDA_3D_MODEL_VIEWER::Set3DModel( const wxString& aModelPathName) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::Set3DModel with a wxString" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::Set3DModel with a wxString" ) ); if( m_cacheManager ) { @@ -160,7 +160,7 @@ void C3D_MODEL_VIEWER::Set3DModel(const wxString& aModelPathName) } -void C3D_MODEL_VIEWER::Clear3DModel() +void EDA_3D_MODEL_VIEWER::Clear3DModel() { // Delete the old model m_reload_is_needed = false; @@ -174,7 +174,7 @@ void C3D_MODEL_VIEWER::Clear3DModel() } -void C3D_MODEL_VIEWER::ogl_initialize() +void EDA_3D_MODEL_VIEWER::ogl_initialize() { glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); glHint( GL_LINE_SMOOTH_HINT, GL_NICEST ); @@ -206,7 +206,7 @@ void C3D_MODEL_VIEWER::ogl_initialize() } -void C3D_MODEL_VIEWER::ogl_set_arrow_material() +void EDA_3D_MODEL_VIEWER::ogl_set_arrow_material() { glEnable( GL_COLOR_MATERIAL ); glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); @@ -218,14 +218,14 @@ void C3D_MODEL_VIEWER::ogl_set_arrow_material() } -void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event ) +void EDA_3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event ) { event.Skip( false ); // SwapBuffer requires the window to be shown before calling if( !IsShownOnScreen() ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnPaint !IsShown" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint !IsShown" ) ); return; } @@ -253,7 +253,7 @@ void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event ) if( m_reload_is_needed ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnPaint m_reload_is_needed" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnPaint m_reload_is_needed" ) ); m_reload_is_needed = false; m_ogl_3dmodel = new MODEL_3D( *m_3d_model, MATERIAL_MODE::NORMAL ); @@ -349,16 +349,16 @@ void C3D_MODEL_VIEWER::OnPaint( wxPaintEvent& event ) } -void C3D_MODEL_VIEWER::OnEraseBackground( wxEraseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnEraseBackground( wxEraseEvent& event ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnEraseBackground" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnEraseBackground" ) ); // Do nothing, to avoid flashing. } -void C3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event ) { - wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::OnMouseWheel" ) ); + wxLogTrace( m_logTrace, wxT( "EDA_3D_MODEL_VIEWER::OnMouseWheel" ) ); if( event.ShiftDown() ) { @@ -387,13 +387,13 @@ void C3D_MODEL_VIEWER::OnMouseWheel( wxMouseEvent& event ) #ifdef USE_OSX_MAGNIFY_EVENT -void C3D_MODEL_VIEWER::OnMagnify( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnMagnify( wxMouseEvent& event ) { } #endif -void C3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event ) { m_trackBallCamera.SetCurWindowSize( GetClientSize() ); @@ -410,31 +410,31 @@ void C3D_MODEL_VIEWER::OnMouseMove( wxMouseEvent& event ) } -void C3D_MODEL_VIEWER::OnLeftDown( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnLeftDown( wxMouseEvent& event ) { event.Skip(); } -void C3D_MODEL_VIEWER::OnLeftUp( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnLeftUp( wxMouseEvent& event ) { event.Skip(); } -void C3D_MODEL_VIEWER::OnMiddleDown( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnMiddleDown( wxMouseEvent& event ) { event.Skip(); } -void C3D_MODEL_VIEWER::OnMiddleUp( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnMiddleUp( wxMouseEvent& event ) { event.Skip(); } -void C3D_MODEL_VIEWER::OnRightClick( wxMouseEvent& event ) +void EDA_3D_MODEL_VIEWER::OnRightClick( wxMouseEvent& event ) { event.Skip(); } diff --git a/3d-viewer/3d_model_viewer/3d_model_viewer.h b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.h similarity index 94% rename from 3d-viewer/3d_model_viewer/3d_model_viewer.h rename to 3d-viewer/3d_model_viewer/eda_3d_model_viewer.h index 749165df9b..a33fd1c551 100644 --- a/3d-viewer/3d_model_viewer/3d_model_viewer.h +++ b/3d-viewer/3d_model_viewer/eda_3d_model_viewer.h @@ -42,7 +42,7 @@ class MODEL_3D; /** * Implement a canvas based on a wxGLCanvas. */ -class C3D_MODEL_VIEWER : public HIDPI_GL_CANVAS +class EDA_3D_MODEL_VIEWER : public HIDPI_GL_CANVAS { public: /** @@ -51,10 +51,10 @@ public: * @param aParent the parent creator of this canvas. * @param aAttribList a list of openGL options created by #OGL_ATT_LIST::GetAttributesList. */ - C3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList = nullptr, - S3D_CACHE* aCacheManager = nullptr ); + EDA_3D_MODEL_VIEWER( wxWindow* aParent, const int* aAttribList = nullptr, + S3D_CACHE* aCacheManager = nullptr ); - ~C3D_MODEL_VIEWER(); + ~EDA_3D_MODEL_VIEWER(); /** * Set this model to be displayed. diff --git a/3d-viewer/3d_viewer/3d_menubar.cpp b/3d-viewer/3d_viewer/3d_menubar.cpp index 24ad9ee577..4827337a5f 100644 --- a/3d-viewer/3d_viewer/3d_menubar.cpp +++ b/3d-viewer/3d_viewer/3d_menubar.cpp @@ -29,15 +29,15 @@ #include #include #include <3d_viewer_id.h> -#include <3d_viewer/tools/3d_actions.h> +#include <3d_viewer/tools/eda_3d_actions.h> #include #include #include -void EDA_3D_VIEWER::CreateMenuBar() +void EDA_3D_VIEWER_FRAME::CreateMenuBar() { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CreateMenuBar" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CreateMenuBar" ); COMMON_CONTROL* tool = m_toolManager->GetTool(); WX_MENUBAR* menuBar = new WX_MENUBAR(); diff --git a/3d-viewer/3d_viewer/3d_toolbar.cpp b/3d-viewer/3d_viewer/3d_toolbar.cpp index 7ba30e702d..7ccd398193 100644 --- a/3d-viewer/3d_viewer/3d_toolbar.cpp +++ b/3d-viewer/3d_viewer/3d_toolbar.cpp @@ -30,12 +30,12 @@ #include #include #include -#include +#include #include <3d_viewer_id.h> -void EDA_3D_VIEWER::ReCreateMainToolbar() +void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar() { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::ReCreateMainToolbar" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ); wxWindowUpdateLocker dummy( this ); diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_colors.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_colors.cpp index f0aab5e607..852c07f4cd 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_colors.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_colors.cpp @@ -29,7 +29,7 @@ #include #include -PANEL_3D_COLORS::PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) : +PANEL_3D_COLORS::PANEL_3D_COLORS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) : PANEL_3D_COLORS_BASE( aParent ), m_settings( aFrame->GetAdapter() ) { diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_colors.h b/3d-viewer/3d_viewer/dialogs/panel_3D_colors.h index 4786954e31..9d804dd21a 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_colors.h +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_colors.h @@ -30,7 +30,7 @@ class PANEL_3D_COLORS : public PANEL_3D_COLORS_BASE { public: - explicit PANEL_3D_COLORS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ); + explicit PANEL_3D_COLORS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ); /// Automatically called when clicking on the OK button bool TransferDataFromWindow() override; diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp index e9c882a633..ae8380d6ac 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.cpp @@ -25,11 +25,11 @@ #include "panel_3D_display_options.h" #include <3d_canvas/board_adapter.h> #include <3d_viewer/eda_3d_viewer.h> -#include <3d_viewer/tools/3d_controller.h> +#include <3d_viewer/tools/eda_3d_controller.h> #include -PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) : +PANEL_3D_DISPLAY_OPTIONS::PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) : PANEL_3D_DISPLAY_OPTIONS_BASE( aParent ), m_frame( aFrame ), m_settings( aFrame->GetAdapter() ), diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.h b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.h index a619002902..b5ef9dc179 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.h +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_display_options.h @@ -32,7 +32,7 @@ class PANEL_3D_DISPLAY_OPTIONS : public PANEL_3D_DISPLAY_OPTIONS_BASE { public: - explicit PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ); + explicit PANEL_3D_DISPLAY_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ); void OnCheckEnableAnimation( wxCommandEvent& WXUNUSED( event ) ) override; @@ -45,9 +45,9 @@ public: void TransferColorDataToWindow(); private: - EDA_3D_VIEWER* m_frame; - BOARD_ADAPTER& m_settings; - EDA_3D_CANVAS* m_canvas; + EDA_3D_VIEWER_FRAME* m_frame; + BOARD_ADAPTER& m_settings; + EDA_3D_CANVAS* m_canvas; }; diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.cpp index 8da165e502..74b55355d8 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.cpp @@ -26,9 +26,9 @@ #include #include <3d_canvas/board_adapter.h> #include <3d_viewer/eda_3d_viewer.h> -#include <3d_viewer/tools/3d_controller.h> +#include <3d_viewer/tools/eda_3d_controller.h> -PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ) : +PANEL_3D_OPENGL_OPTIONS::PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) : PANEL_3D_OPENGL_OPTIONS_BASE( aParent ), m_settings( aFrame->GetAdapter() ), m_canvas( aFrame->GetCanvas() ) diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.h b/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.h index bcc0c5b1bc..84436827f8 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.h +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_opengl_options.h @@ -31,7 +31,7 @@ class PANEL_3D_OPENGL_OPTIONS : public PANEL_3D_OPENGL_OPTIONS_BASE { public: - explicit PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ); + explicit PANEL_3D_OPENGL_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ); /// Automatically called when clicking on the OK button bool TransferDataFromWindow() override; diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.cpp b/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.cpp index dc87efe3ab..661684a2fc 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.cpp +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.cpp @@ -25,11 +25,11 @@ #include "panel_3D_raytracing_options.h" #include <3d_canvas/board_adapter.h> #include <3d_viewer/eda_3d_viewer.h> -#include <3d_viewer/tools/3d_controller.h> +#include <3d_viewer/tools/eda_3d_controller.h> #include #include -PANEL_3D_RAYTRACING_OPTIONS::PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame, +PANEL_3D_RAYTRACING_OPTIONS::PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ) : PANEL_3D_RAYTRACING_OPTIONS_BASE( aParent ), m_settings( aFrame->GetAdapter() ), diff --git a/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.h b/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.h index b550143998..900d58fa13 100644 --- a/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.h +++ b/3d-viewer/3d_viewer/dialogs/panel_3D_raytracing_options.h @@ -31,7 +31,7 @@ class PANEL_3D_RAYTRACING_OPTIONS : public PANEL_3D_RAYTRACING_OPTIONS_BASE { public: - explicit PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER* aFrame, wxWindow* aParent ); + explicit PANEL_3D_RAYTRACING_OPTIONS( EDA_3D_VIEWER_FRAME* aFrame, wxWindow* aParent ); void ResetPanel() override; diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.cpp b/3d-viewer/3d_viewer/eda_3d_viewer.cpp index 5c9d0e0cac..3f6dcfbf5d 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer.cpp @@ -30,11 +30,11 @@ #include #include #include "eda_3d_viewer.h" -#include <3d_viewer_settings.h> +#include #include <3d_viewer_id.h> -#include <3d_viewer/tools/3d_actions.h> -#include <3d_viewer/tools/3d_controller.h> -#include <3d_viewer/tools/3d_conditions.h> +#include <3d_viewer/tools/eda_3d_actions.h> +#include <3d_viewer/tools/eda_3d_controller.h> +#include <3d_viewer/tools/eda_3d_conditions.h> #include #include #include @@ -66,27 +66,27 @@ * * @ingroup trace_env_vars */ -const wxChar* EDA_3D_VIEWER::m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" ); +const wxChar* EDA_3D_VIEWER_FRAME::m_logTrace = wxT( "KI_TRACE_EDA_3D_VIEWER" ); -BEGIN_EVENT_TABLE( EDA_3D_VIEWER, EDA_BASE_FRAME ) +BEGIN_EVENT_TABLE( EDA_3D_VIEWER_FRAME, EDA_BASE_FRAME ) - EVT_ACTIVATE( EDA_3D_VIEWER::OnActivate ) - EVT_SET_FOCUS( EDA_3D_VIEWER::OnSetFocus ) + EVT_ACTIVATE( EDA_3D_VIEWER_FRAME::OnActivate ) + EVT_SET_FOCUS( EDA_3D_VIEWER_FRAME::OnSetFocus ) EVT_TOOL_RANGE( ID_START_COMMAND_3D, ID_MENU_COMMAND_END, - EDA_3D_VIEWER::Process_Special_Functions ) + EDA_3D_VIEWER_FRAME::Process_Special_Functions ) - EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER::Exit3DFrame ) - EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER::OnRenderEngineSelection ) - EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER::OnDisableRayTracing ) + EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER_FRAME::Exit3DFrame ) + EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER_FRAME::OnRenderEngineSelection ) + EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER_FRAME::OnDisableRayTracing ) - EVT_CLOSE( EDA_3D_VIEWER::OnCloseWindow ) + EVT_CLOSE( EDA_3D_VIEWER_FRAME::OnCloseWindow ) END_EVENT_TABLE() -EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxString &aTitle, - long style ) : +EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY *aKiway, PCB_BASE_FRAME *aParent, + const wxString &aTitle, long style ) : KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition, wxDefaultSize, style, QUALIFIED_VIEWER3D_FRAMENAME( aParent ) ), m_mainToolBar( nullptr ), @@ -94,7 +94,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt m_currentCamera( m_trackBallCamera ), m_trackBallCamera( RANGE_SCALE_3D ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::EDA_3D_VIEWER %s", aTitle ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME %s", aTitle ); m_disable_ray_tracing = false; m_aboutTitle = _( "KiCad 3D Viewer" ); @@ -171,7 +171,7 @@ EDA_3D_VIEWER::EDA_3D_VIEWER( KIWAY *aKiway, PCB_BASE_FRAME *aParent, const wxSt } -EDA_3D_VIEWER::~EDA_3D_VIEWER() +EDA_3D_VIEWER_FRAME::~EDA_3D_VIEWER_FRAME() { m_canvas->SetEventDispatcher( nullptr ); @@ -183,7 +183,7 @@ EDA_3D_VIEWER::~EDA_3D_VIEWER() } -void EDA_3D_VIEWER::setupUIConditions() +void EDA_3D_VIEWER_FRAME::setupUIConditions() { EDA_BASE_FRAME::setupUIConditions(); @@ -227,7 +227,8 @@ void EDA_3D_VIEWER::setupUIConditions() } -void EDA_3D_VIEWER::InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) +void EDA_3D_VIEWER_FRAME::InstallPreferences( PAGED_DIALOG* aParent, + PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) { wxTreebook* book = aParent->GetTreebook(); @@ -241,7 +242,7 @@ void EDA_3D_VIEWER::InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDI } -void EDA_3D_VIEWER::ReloadRequest() +void EDA_3D_VIEWER_FRAME::ReloadRequest() { // This will schedule a request to load later if( m_canvas ) @@ -249,7 +250,7 @@ void EDA_3D_VIEWER::ReloadRequest() } -void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw ) +void EDA_3D_VIEWER_FRAME::NewDisplay( bool aForceImmediateRedraw ) { ReloadRequest(); @@ -260,7 +261,7 @@ void EDA_3D_VIEWER::NewDisplay( bool aForceImmediateRedraw ) } -void EDA_3D_VIEWER::Redraw() +void EDA_3D_VIEWER_FRAME::Redraw() { // Only update in OpenGL for an interactive interaction if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY ) @@ -268,7 +269,7 @@ void EDA_3D_VIEWER::Redraw() } -void EDA_3D_VIEWER::refreshRender() +void EDA_3D_VIEWER_FRAME::refreshRender() { if( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::OPENGL_LEGACY ) m_canvas->Request_refresh(); @@ -277,17 +278,17 @@ void EDA_3D_VIEWER::refreshRender() } -void EDA_3D_VIEWER::Exit3DFrame( wxCommandEvent &event ) +void EDA_3D_VIEWER_FRAME::Exit3DFrame( wxCommandEvent &event ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::Exit3DFrame" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Exit3DFrame" ); Close( true ); } -void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event ) +void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnCloseWindow" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnCloseWindow" ); if( m_canvas ) m_canvas->Close(); @@ -301,13 +302,14 @@ void EDA_3D_VIEWER::OnCloseWindow( wxCloseEvent &event ) } -void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event ) +void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event ) { int id = event.GetId(); bool isChecked = event.IsChecked(); - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::Process_Special_Functions id %d isChecked %d", - id, isChecked ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d isChecked %d", + id, + isChecked ); if( m_canvas == nullptr ) return; @@ -338,13 +340,13 @@ void EDA_3D_VIEWER::Process_Special_Functions( wxCommandEvent &event ) return; default: - wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER::Process_Special_Functions()" ); + wxFAIL_MSG( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ); return; } } -void EDA_3D_VIEWER::OnRenderEngineSelection( wxCommandEvent &event ) +void EDA_3D_VIEWER_FRAME::OnRenderEngineSelection( wxCommandEvent &event ) { const RENDER_ENGINE old_engine = m_boardAdapter.GetRenderEngine(); @@ -353,27 +355,27 @@ void EDA_3D_VIEWER::OnRenderEngineSelection( wxCommandEvent &event ) else m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY ); - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnRenderEngineSelection type %s ", - ( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "Ray Trace" : - "OpenGL Legacy" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s ", + ( m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ) ? "Raytrace" : + "OpenGL" ); if( old_engine != m_boardAdapter.GetRenderEngine() ) RenderEngineChanged(); } -void EDA_3D_VIEWER::OnDisableRayTracing( wxCommandEvent& aEvent ) +void EDA_3D_VIEWER_FRAME::OnDisableRayTracing( wxCommandEvent& aEvent ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::%s disabling ray tracing.", __WXFUNCTION__ ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::%s disabling ray tracing.", __WXFUNCTION__ ); m_disable_ray_tracing = true; m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY ); } -void EDA_3D_VIEWER::OnActivate( wxActivateEvent &aEvent ) +void EDA_3D_VIEWER_FRAME::OnActivate( wxActivateEvent &aEvent ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::OnActivate" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::OnActivate" ); if( aEvent.GetActive() && m_canvas ) { @@ -390,7 +392,7 @@ void EDA_3D_VIEWER::OnActivate( wxActivateEvent &aEvent ) } -void EDA_3D_VIEWER::OnSetFocus( wxFocusEvent& aEvent ) +void EDA_3D_VIEWER_FRAME::OnSetFocus( wxFocusEvent& aEvent ) { // Activates again the focus of the canvas so it will catch mouse and key events if( m_canvas ) @@ -400,14 +402,14 @@ void EDA_3D_VIEWER::OnSetFocus( wxFocusEvent& aEvent ) } -void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg ) +void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg ) { EDA_BASE_FRAME::LoadSettings( aCfg ); EDA_3D_VIEWER_SETTINGS* cfg = dynamic_cast( aCfg ); wxASSERT( cfg ); - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::LoadSettings" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::LoadSettings" ); COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings(); @@ -523,8 +525,8 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg ) #if 0 RENDER_ENGINE engine = static_cast( cfg->m_Render.engine ); wxLogTrace( m_logTrace, engine == RENDER_ENGINE::RAYTRACING ? - "EDA_3D_VIEWER::LoadSettings render setting Ray Trace" : - "EDA_3D_VIEWER::LoadSettings render setting OpenGL" ); + "EDA_3D_VIEWER_FRAME::LoadSettings render setting Ray Trace" : + "EDA_3D_VIEWER_FRAME::LoadSettings render setting OpenGL" ); #else m_boardAdapter.SetRenderEngine( RENDER_ENGINE::OPENGL_LEGACY ); #endif @@ -540,13 +542,13 @@ void EDA_3D_VIEWER::LoadSettings( APP_SETTINGS_BASE *aCfg ) } -void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg ) +void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg ) { auto cfg = Pgm().GetSettingsManager().GetAppSettings(); EDA_BASE_FRAME::SaveSettings( cfg ); - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::SaveSettings" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::SaveSettings" ); COLOR_SETTINGS* colors = Pgm().GetSettingsManager().GetColorSettings(); @@ -583,8 +585,8 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg ) Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" ); wxLogTrace( m_logTrace, m_boardAdapter.GetRenderEngine() == RENDER_ENGINE::RAYTRACING ? - "EDA_3D_VIEWER::SaveSettings render setting Ray Trace" : - "EDA_3D_VIEWER::SaveSettings render setting OpenGL" ); + "EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" : + "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ); if( cfg ) { @@ -676,9 +678,9 @@ void EDA_3D_VIEWER::SaveSettings( APP_SETTINGS_BASE *aCfg ) } -void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) +void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsChanged ) { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::CommonSettingsChanged" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::CommonSettingsChanged" ); // Regen menu bars, etc EDA_BASE_FRAME::CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged ); @@ -692,7 +694,7 @@ void EDA_3D_VIEWER::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVarsC } -void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event ) +void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event ) { wxString fullFileName; bool fmt_is_jpeg = false; @@ -786,16 +788,16 @@ void EDA_3D_VIEWER::takeScreenshot( wxCommandEvent& event ) } -void EDA_3D_VIEWER::RenderEngineChanged() +void EDA_3D_VIEWER_FRAME::RenderEngineChanged() { - wxLogTrace( m_logTrace, "EDA_3D_VIEWER::RenderEngineChanged()" ); + wxLogTrace( m_logTrace, "EDA_3D_VIEWER_FRAME::RenderEngineChanged()" ); if( m_canvas ) m_canvas->RenderEngineChanged(); } -void EDA_3D_VIEWER::loadCommonSettings() +void EDA_3D_VIEWER_FRAME::loadCommonSettings() { wxCHECK_RET( m_canvas, "Cannot load settings to null canvas" ); diff --git a/3d-viewer/3d_viewer/eda_3d_viewer.h b/3d-viewer/3d_viewer/eda_3d_viewer.h index 34655df846..980c62eb5f 100644 --- a/3d-viewer/3d_viewer/eda_3d_viewer.h +++ b/3d-viewer/3d_viewer/eda_3d_viewer.h @@ -59,13 +59,13 @@ enum EDA_3D_VIEWER_STATUSBAR /** * Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard */ -class EDA_3D_VIEWER : public EDA_3D_BOARD_HOLDER, public KIWAY_PLAYER +class EDA_3D_VIEWER_FRAME : public EDA_3D_BOARD_HOLDER, public KIWAY_PLAYER { public: - EDA_3D_VIEWER( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle, - long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); + EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent, const wxString& aTitle, + long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); - ~EDA_3D_VIEWER(); + ~EDA_3D_VIEWER_FRAME(); PCB_BASE_FRAME* Parent() const { return (PCB_BASE_FRAME*)GetParent(); } diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.cpp b/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp similarity index 99% rename from 3d-viewer/3d_viewer/3d_viewer_settings.cpp rename to 3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp index a499a833fd..65a194fe73 100644 --- a/3d-viewer/3d_viewer/3d_viewer_settings.cpp +++ b/3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp @@ -23,7 +23,7 @@ #include #include -#include "3d_viewer_settings.h" +#include "eda_3d_viewer_settings.h" using KIGFX::COLOR4D; diff --git a/3d-viewer/3d_viewer/3d_viewer_settings.h b/3d-viewer/3d_viewer/eda_3d_viewer_settings.h similarity index 100% rename from 3d-viewer/3d_viewer/3d_viewer_settings.h rename to 3d-viewer/3d_viewer/eda_3d_viewer_settings.h diff --git a/3d-viewer/3d_viewer/tools/3d_actions.cpp b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp similarity index 99% rename from 3d-viewer/3d_viewer/tools/3d_actions.cpp rename to 3d-viewer/3d_viewer/tools/eda_3d_actions.cpp index e8d9434b64..4041fc07d7 100644 --- a/3d-viewer/3d_viewer/tools/3d_actions.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_actions.cpp @@ -22,7 +22,7 @@ #include #include <3d_viewer_id.h> #include <3d_enums.h> -#include "3d_actions.h" +#include "eda_3d_actions.h" // Actions, being statically-defined, require specialized I18N handling. We continue to diff --git a/3d-viewer/3d_viewer/tools/3d_actions.h b/3d-viewer/3d_viewer/tools/eda_3d_actions.h similarity index 100% rename from 3d-viewer/3d_viewer/tools/3d_actions.h rename to 3d-viewer/3d_viewer/tools/eda_3d_actions.h diff --git a/3d-viewer/3d_viewer/tools/3d_conditions.cpp b/3d-viewer/3d_viewer/tools/eda_3d_conditions.cpp similarity index 98% rename from 3d-viewer/3d_viewer/tools/3d_conditions.cpp rename to 3d-viewer/3d_viewer/tools/eda_3d_conditions.cpp index 4819ce427e..91b0ebe06f 100644 --- a/3d-viewer/3d_viewer/tools/3d_conditions.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_conditions.cpp @@ -23,7 +23,7 @@ */ #include <3d_canvas/board_adapter.h> -#include <3d_viewer/tools/3d_conditions.h> +#include <3d_viewer/tools/eda_3d_conditions.h> #include diff --git a/3d-viewer/3d_viewer/tools/3d_conditions.h b/3d-viewer/3d_viewer/tools/eda_3d_conditions.h similarity index 100% rename from 3d-viewer/3d_viewer/tools/3d_conditions.h rename to 3d-viewer/3d_viewer/tools/eda_3d_conditions.h diff --git a/3d-viewer/3d_viewer/tools/3d_controller.cpp b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp similarity index 97% rename from 3d-viewer/3d_viewer/tools/3d_controller.cpp rename to 3d-viewer/3d_viewer/tools/eda_3d_controller.cpp index fe4c895d31..68353f3c78 100644 --- a/3d-viewer/3d_viewer/tools/3d_controller.cpp +++ b/3d-viewer/3d_viewer/tools/eda_3d_controller.cpp @@ -27,9 +27,8 @@ #include #include #include -#include <3d_viewer_id.h> -#include -#include "3d_actions.h" +#include +#include "eda_3d_actions.h" bool EDA_3D_CONTROLLER::Init() @@ -177,7 +176,7 @@ int EDA_3D_CONTROLLER::SetMaterial( const TOOL_EVENT& aEvent ) m_boardAdapter->SetMaterialMode( mode ); - if( EDA_3D_VIEWER* viewer = dynamic_cast( m_toolMgr->GetToolHolder() ) ) + if( auto* viewer = dynamic_cast( m_toolMgr->GetToolHolder() ) ) viewer->NewDisplay( true ); else m_canvas->Request_refresh(); @@ -218,9 +217,7 @@ int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent ) default: { - EDA_3D_VIEWER* viewer = dynamic_cast( m_toolMgr->GetToolHolder() ); - - if( viewer ) + if( auto* viewer = dynamic_cast( m_toolMgr->GetToolHolder() ) ) viewer->NewDisplay( true ); else m_canvas->Request_refresh(); diff --git a/3d-viewer/3d_viewer/tools/3d_controller.h b/3d-viewer/3d_viewer/tools/eda_3d_controller.h similarity index 99% rename from 3d-viewer/3d_viewer/tools/3d_controller.h rename to 3d-viewer/3d_viewer/tools/eda_3d_controller.h index c0f4ead004..b6b24dae1a 100644 --- a/3d-viewer/3d_viewer/tools/3d_controller.h +++ b/3d-viewer/3d_viewer/tools/eda_3d_controller.h @@ -26,7 +26,7 @@ #include -class EDA_3D_VIEWER; +class EDA_3D_VIEWER_FRAME; class BOARD_ADAPTER; diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index bc701c6103..e456d49f64 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -28,17 +28,17 @@ set(3D-VIEWER_SRCS 3d_cache/3d_cache.cpp 3d_cache/3d_plugin_manager.cpp ${DIR_DLG}/3d_cache_dialogs.cpp - ${DIR_DLG}/dlg_select_3dmodel_base.cpp - ${DIR_DLG}/dlg_select_3dmodel.cpp - ${DIR_DLG}/panel_prev_3d_base.cpp - ${DIR_DLG}/panel_prev_3d.cpp + ${DIR_DLG}/dialog_select_3d_model_base.cpp + ${DIR_DLG}/dialog_select_3d_model.cpp + ${DIR_DLG}/panel_preview_3d_model_base.cpp + ${DIR_DLG}/panel_preview_3d_model.cpp 3d_canvas/board_adapter.cpp 3d_canvas/create_layer_items.cpp 3d_canvas/create_3Dgraphic_brd_items.cpp 3d_canvas/create_layer_poly.cpp 3d_canvas/eda_3d_canvas.cpp 3d_canvas/eda_3d_canvas_pivot.cpp - 3d_model_viewer/3d_model_viewer.cpp + 3d_model_viewer/eda_3d_model_viewer.cpp 3d_rendering/legacy/3d_model.cpp 3d_rendering/legacy/ogl_legacy_utils.cpp 3d_rendering/legacy/create_scene.cpp @@ -95,11 +95,11 @@ set(3D-VIEWER_SRCS 3d_viewer/dialogs/panel_3D_opengl_options_base.cpp 3d_viewer/dialogs/panel_3D_raytracing_options.cpp 3d_viewer/dialogs/panel_3D_raytracing_options_base.cpp - 3d_viewer/tools/3d_actions.cpp - 3d_viewer/tools/3d_conditions.cpp - 3d_viewer/tools/3d_controller.cpp + 3d_viewer/tools/eda_3d_actions.cpp + 3d_viewer/tools/eda_3d_conditions.cpp + 3d_viewer/tools/eda_3d_controller.cpp 3d_viewer/eda_3d_viewer.cpp - 3d_viewer/3d_viewer_settings.cpp + 3d_viewer/eda_3d_viewer_settings.cpp common_ogl/ogl_attr_list.cpp common_ogl/ogl_utils.cpp 3d_fastmath.cpp diff --git a/include/pcb_base_frame.h b/include/pcb_base_frame.h index f7254b1c59..40e400ca8a 100644 --- a/include/pcb_base_frame.h +++ b/include/pcb_base_frame.h @@ -52,7 +52,7 @@ class BOARD_CONNECTED_ITEM; class COLOR_SETTINGS; class FOOTPRINT; class PAD; -class EDA_3D_VIEWER; +class EDA_3D_VIEWER_FRAME; class GENERAL_COLLECTOR; class GENERAL_COLLECTORS_GUIDE; class BOARD_DESIGN_SETTINGS; @@ -81,7 +81,7 @@ public: /** * @return a reference to the child 3D viewer frame, when exists, or NULL */ - EDA_3D_VIEWER* Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* Get3DViewerFrame(); /** * Update the 3D view, if the viewer is opened by this frame. @@ -231,7 +231,7 @@ public: * * If it does not exist, it is created. If it exists, it is brought to the foreground. */ - EDA_3D_VIEWER* CreateAndShow3D_Frame(); + EDA_3D_VIEWER_FRAME* CreateAndShow3D_Frame(); /** * @return global configuration options. diff --git a/pcbnew/dialogs/dialog_footprint_properties.cpp b/pcbnew/dialogs/dialog_footprint_properties.cpp index bb1e9499e5..2cdc1fa255 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties.cpp @@ -42,7 +42,7 @@ #include #include "3d_cache/dialogs/3d_cache_dialogs.h" -#include "3d_cache/dialogs/panel_prev_3d.h" +#include "3d_cache/dialogs/panel_preview_3d_model.h" #include @@ -52,15 +52,15 @@ int DIALOG_FOOTPRINT_PROPERTIES::m_page = 0; // remember the last open page DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParent, FOOTPRINT* aFootprint ) : - DIALOG_FOOTPRINT_PROPERTIES_BASE( aParent ), - m_posX( aParent, m_XPosLabel, m_ModPositionX, m_XPosUnit ), - m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ), - m_OrientValidator( 3, &m_OrientValue ), - m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ), - m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), - m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), - m_initialFocus( true ), - m_inSelect( false ) + DIALOG_FOOTPRINT_PROPERTIES_BASE( aParent ), + m_posX( aParent, m_XPosLabel, m_ModPositionX, m_XPosUnit ), + m_posY( aParent, m_YPosLabel, m_ModPositionY, m_YPosUnit ), + m_orientValidator( 3, &m_orientValue ), + m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ), + m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), + m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), + m_initialFocus( true ), + m_inSelect( false ) { m_frame = aParent; m_footprint = aFootprint; @@ -119,15 +119,15 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen m_modelsGrid->SetWindowStyleFlag( m_modelsGrid->GetWindowStyle() & ~wxHSCROLL ); m_modelsGrid->SetSelectionMode( wxGrid::wxGridSelectRows ); - m_OrientValidator.SetRange( -360.0, 360.0 ); - m_OrientValueCtrl->SetValidator( m_OrientValidator ); - m_OrientValidator.SetWindow( m_OrientValueCtrl ); + m_orientValidator.SetRange( -360.0, 360.0 ); + m_OrientValueCtrl->SetValidator( m_orientValidator ); + m_orientValidator.SetWindow( m_OrientValueCtrl ); aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() ); - m_PreviewPane = new PANEL_PREV_3D( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list ); + m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list ); - bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 ); + bLowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 ); // Set font size for items showing long strings: wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT ); @@ -165,7 +165,7 @@ DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES( PCB_EDIT_FRAME* aParen m_sdbSizerStdButtonsOK->SetDefault(); - m_OrientValue = 0; + m_orientValue = 0; // Configure button logos m_bpAdd->SetBitmap( KiBitmap( BITMAPS::small_plus ) ); @@ -198,7 +198,7 @@ DIALOG_FOOTPRINT_PROPERTIES::~DIALOG_FOOTPRINT_PROPERTIES() m_page = m_NoteBook->GetSelection(); m_NoteBook->SetSelection( 1 ); - delete m_PreviewPane; + delete m_previewPane; } @@ -245,13 +245,13 @@ void DIALOG_FOOTPRINT_PROPERTIES::ChangeFootprint( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::FootprintOrientEvent( wxCommandEvent& ) { if( m_Orient0->GetValue() ) - m_OrientValue = 0.0; + m_orientValue = 0.0; else if( m_Orient90->GetValue() ) - m_OrientValue = 90.0; + m_orientValue = 90.0; else if( m_Orient270->GetValue() ) - m_OrientValue = 270.0; + m_orientValue = 270.0; else if( m_Orient180->GetValue() ) - m_OrientValue = 180.0; + m_orientValue = 180.0; updateOrientationControl(); } @@ -312,15 +312,15 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow() m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 ); - m_OrientValue = m_footprint->GetOrientation() / 10.0; + m_orientValue = m_footprint->GetOrientation() / 10.0; - if( m_OrientValue == 0.0 ) + if( m_orientValue == 0.0 ) m_Orient0->SetValue( true ); - else if( m_OrientValue == 90.0 || m_OrientValue == -270.0 ) + else if( m_orientValue == 90.0 || m_orientValue == -270.0 ) m_Orient90->SetValue( true ); - else if( m_OrientValue == 270.0 || m_OrientValue == -90.0 ) + else if( m_orientValue == 270.0 || m_orientValue == -90.0 ) m_Orient270->SetValue( true ); - else if( m_OrientValue == 180.0 || m_OrientValue == -180.0 ) + else if( m_orientValue == 180.0 || m_orientValue == -180.0 ) m_Orient180->SetValue( true ); else m_OrientOther->SetValue( true ); @@ -402,7 +402,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataToWindow() } select3DModel( 0 ); // will clamp idx within bounds - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); // Show the footprint's FPID. m_tcLibraryID->SetValue( m_footprint->GetFPID().Format() ); @@ -452,7 +452,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::select3DModel( int aModelIdx ) m_modelsGrid->SetGridCursor( aModelIdx, 0 ); } - m_PreviewPane->SetSelectedModel( aModelIdx ); + m_previewPane->SetSelectedModel( aModelIdx ); m_inSelect = false; } @@ -505,7 +505,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::On3DModelCellChanged( wxGridEvent& aEvent ) m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) ); } - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } @@ -521,7 +521,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnRemove3DModel( wxCommandEvent& ) m_modelsGrid->DeleteRows( idx, 1 ); select3DModel( idx ); // will clamp idx within bounds - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } } @@ -589,7 +589,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnAdd3DModel( wxCommandEvent& ) m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) ); select3DModel( idx ); - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } @@ -753,9 +753,9 @@ bool DIALOG_FOOTPRINT_PROPERTIES::TransferDataFromWindow() // Now, set orientation. Must be done after other changes because rotation changes field // positions on board (so that relative positions are held constant) - m_OrientValidator.TransferFromWindow(); + m_orientValidator.TransferFromWindow(); - double orient = m_OrientValue * 10; + double orient = m_orientValue * 10; if( m_footprint->GetOrientation() != orient ) m_footprint->Rotate( m_footprint->GetPosition(), orient - m_footprint->GetOrientation() ); @@ -852,7 +852,7 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnDeleteField( wxCommandEvent& ) void DIALOG_FOOTPRINT_PROPERTIES::Cfg3DPath( wxCommandEvent& ) { if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) ) - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } @@ -967,5 +967,5 @@ void DIALOG_FOOTPRINT_PROPERTIES::OnPageChange( wxNotebookEvent& aEvent ) void DIALOG_FOOTPRINT_PROPERTIES::updateOrientationControl() { - KIUI::ValidatorTransferToWindowWithoutEvents( m_OrientValidator ); + KIUI::ValidatorTransferToWindowWithoutEvents( m_orientValidator ); } diff --git a/pcbnew/dialogs/dialog_footprint_properties.h b/pcbnew/dialogs/dialog_footprint_properties.h index 69de75d420..0d16fb46ec 100644 --- a/pcbnew/dialogs/dialog_footprint_properties.h +++ b/pcbnew/dialogs/dialog_footprint_properties.h @@ -35,7 +35,7 @@ class PCB_EDIT_FRAME; -class PANEL_PREV_3D; +class PANEL_PREVIEW_3D_MODEL; class DIALOG_FOOTPRINT_PROPERTIES: public DIALOG_FOOTPRINT_PROPERTIES_BASE @@ -93,6 +93,7 @@ private: */ void updateOrientationControl(); +private: PCB_EDIT_FRAME* m_frame; FOOTPRINT* m_footprint; @@ -101,15 +102,15 @@ private: FP_TEXT_GRID_TABLE* m_texts; UNIT_BINDER m_posX; UNIT_BINDER m_posY; - wxFloatingPointValidator m_OrientValidator; - double m_OrientValue; + wxFloatingPointValidator m_orientValidator; + double m_orientValue; UNIT_BINDER m_netClearance; UNIT_BINDER m_solderMask; UNIT_BINDER m_solderPaste; std::vector m_shapes3D_list; - PANEL_PREV_3D* m_PreviewPane; + PANEL_PREVIEW_3D_MODEL* m_previewPane; wxString m_delayedErrorMessage; wxGrid* m_delayedFocusGrid; diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index 90a3c426e6..680056cab2 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -40,7 +40,7 @@ #include #include "filename_resolver.h" #include -#include "3d_cache/dialogs/panel_prev_3d.h" +#include "3d_cache/dialogs/panel_preview_3d_model.h" #include "3d_cache/dialogs/3d_cache_dialogs.h" #include #include @@ -109,9 +109,9 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FO aParent->Prj().Get3DCacheManager()->GetResolver()->SetProgramBase( &Pgm() ); - m_PreviewPane = new PANEL_PREV_3D( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list ); + m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_Panel3D, m_frame, m_footprint, &m_shapes3D_list ); - bLowerSizer3D->Add( m_PreviewPane, 1, wxEXPAND, 5 ); + bLowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 ); m_FootprintNameCtrl->SetValidator( FOOTPRINT_NAME_VALIDATOR() ); @@ -187,7 +187,7 @@ DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR() m_page = m_NoteBook->GetSelection(); m_NoteBook->SetSelection( 1 ); - delete m_PreviewPane; + delete m_previewPane; } @@ -309,7 +309,7 @@ bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow() } select3DModel( 0 ); // will clamp idx within bounds - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ ) { @@ -357,7 +357,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::select3DModel( int aModelIdx ) m_modelsGrid->SetGridCursor( aModelIdx, 0 ); } - m_PreviewPane->SetSelectedModel( aModelIdx ); + m_previewPane->SetSelectedModel( aModelIdx ); m_inSelect = false; } @@ -411,7 +411,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::On3DModelCellChanged( wxGridEvent& a m_shapes3D_list[ aEvent.GetRow() ].m_Show = ( showValue == wxT( "1" ) ); } - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } @@ -428,7 +428,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnRemove3DModel( wxCommandEvent& ) m_modelsGrid->DeleteRows( idx ); select3DModel( idx ); // will clamp idx within bounds - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } } @@ -496,7 +496,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAdd3DModel( wxCommandEvent& ) m_modelsGrid->SetCellValue( idx, 1, wxT( "1" ) ); select3DModel( idx ); - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } @@ -803,7 +803,7 @@ void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnDeleteField( wxCommandEvent& event void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Cfg3DPath( wxCommandEvent& event ) { if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) ) - m_PreviewPane->UpdateDummyFootprint(); + m_previewPane->UpdateDummyFootprint(); } diff --git a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h index 0b07b4c668..da36064a0b 100644 --- a/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h @@ -32,7 +32,7 @@ #include -class PANEL_PREV_3D; +class PANEL_PREVIEW_3D_MODEL; class FOOTPRINT_EDIT_FRAME; @@ -68,19 +68,20 @@ private: void adjustGridColumns( int aWidth ); +private: FOOTPRINT_EDIT_FRAME* m_frame; FOOTPRINT* m_footprint; static int m_page; // remember the last open page during session - FP_TEXT_GRID_TABLE* m_texts; + FP_TEXT_GRID_TABLE* m_texts; UNIT_BINDER m_netClearance; UNIT_BINDER m_solderMask; UNIT_BINDER m_solderPaste; std::vector m_shapes3D_list; - PANEL_PREV_3D* m_PreviewPane; + PANEL_PREVIEW_3D_MODEL* m_previewPane; wxControl* m_delayedFocusCtrl; int m_delayedFocusPage; diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index b5a30369ad..ecf603f7e3 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -906,7 +906,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector& aFileSet, in onBoardLoaded(); // Refresh the 3D view, if any - EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame(); if( draw3DFrame ) draw3DFrame->NewDisplay(); diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index b1d8150d0f..9a2fd050ee 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -234,7 +234,7 @@ FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME() if( m_toolManager ) m_toolManager->DeactivateTool(); - EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame(); if( draw3DFrame ) draw3DFrame->Destroy(); diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 1d04ed3ac0..fa646ff0bc 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -96,15 +96,16 @@ bool PCB_BASE_FRAME::canCloseWindow( wxCloseEvent& aEvent ) } -EDA_3D_VIEWER* PCB_BASE_FRAME::Get3DViewerFrame() +EDA_3D_VIEWER_FRAME* PCB_BASE_FRAME::Get3DViewerFrame() { - return dynamic_cast( FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) ) ); + wxWindow* frame = FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) ); + return dynamic_cast( frame ); } void PCB_BASE_FRAME::Update3DView( bool aMarkDirty, bool aRefresh, const wxString* aTitle ) { - EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame(); if( draw3DFrame ) { @@ -428,12 +429,12 @@ void PCB_BASE_FRAME::ShowChangedLanguage() } -EDA_3D_VIEWER* PCB_BASE_FRAME::CreateAndShow3D_Frame() +EDA_3D_VIEWER_FRAME* PCB_BASE_FRAME::CreateAndShow3D_Frame() { - EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* draw3DFrame = Get3DViewerFrame(); if( !draw3DFrame ) - draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) ); + draw3DFrame = new EDA_3D_VIEWER_FRAME( &Kiway(), this, _( "3D Viewer" ) ); // Raising the window does not show the window on Windows if iconized. This should work // on any platform. @@ -694,7 +695,7 @@ void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged, bool aTextVars RecreateToolbars(); // The 3D viewer isn't in the Kiway, so send its update manually - EDA_3D_VIEWER* viewer = Get3DViewerFrame(); + EDA_3D_VIEWER_FRAME* viewer = Get3DViewerFrame(); if( viewer ) viewer->CommonSettingsChanged( aEnvVarsChanged, aTextVarsChanged ); diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index 719e3e4b2c..53b27ab43b 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -39,7 +39,7 @@ #include #include -#include "../3d-viewer/3d_viewer/3d_viewer_settings.h" +#include "../3d-viewer/3d_viewer/eda_3d_viewer_settings.h" ///! Update the schema version whenever a migration is required diff --git a/pcbnew/tools/pcb_viewer_tools.cpp b/pcbnew/tools/pcb_viewer_tools.cpp index 90cd90c849..eb5f9e42a4 100644 --- a/pcbnew/tools/pcb_viewer_tools.cpp +++ b/pcbnew/tools/pcb_viewer_tools.cpp @@ -62,7 +62,7 @@ void PCB_VIEWER_TOOLS::Reset( RESET_REASON aReason ) int PCB_VIEWER_TOOLS::Show3DViewer( const TOOL_EVENT& aEvent ) { - EDA_3D_VIEWER* draw3DFrame = frame()->CreateAndShow3D_Frame(); + EDA_3D_VIEWER_FRAME* draw3DFrame = frame()->CreateAndShow3D_Frame(); if( frame()->IsType( FRAME_FOOTPRINT_VIEWER ) || frame()->IsType( FRAME_FOOTPRINT_VIEWER_MODAL ) diff --git a/qa/libeval_compiler/CMakeLists.txt b/qa/libeval_compiler/CMakeLists.txt index a2e3363465..8d6f963cf5 100644 --- a/qa/libeval_compiler/CMakeLists.txt +++ b/qa/libeval_compiler/CMakeLists.txt @@ -32,7 +32,7 @@ add_executable( libeval_compiler_test libeval_compiler_test.cpp ../qa_utils/mocks.cpp ../../common/base_units.cpp - ../../3d-viewer/3d_viewer/3d_viewer_settings.cpp + ../../3d-viewer/3d_viewer/eda_3d_viewer_settings.cpp ) include_directories( BEFORE ${INC_BEFORE} )