Browse Source

Naming conventions.

master
Jeff Young 1 month ago
parent
commit
8c3026cf1a
  1. 6
      common/CMakeLists.txt
  2. 16
      common/dialogs/panel_base_display_options.cpp
  3. 12
      common/dialogs/panel_gal_options.cpp
  4. 128
      common/dialogs/panel_gal_options_base.cpp
  5. 8
      common/dialogs/panel_gal_options_base.fbp
  6. 66
      common/dialogs/panel_gal_options_base.h
  7. 7
      eeschema/dialogs/panel_eeschema_display_options.cpp
  8. 10
      eeschema/dialogs/panel_eeschema_display_options.h
  9. 7
      eeschema/dialogs/panel_sym_display_options.cpp
  10. 4
      eeschema/dialogs/panel_sym_display_options.h
  11. 2
      eeschema/eeschema.cpp
  12. 2
      eeschema/eeschema_config.cpp
  13. 6
      gerbview/dialogs/panel_gerbview_display_options.cpp
  14. 11
      gerbview/dialogs/panel_gerbview_display_options.h
  15. 13
      include/dialogs/panel_base_display_options.h
  16. 11
      include/dialogs/panel_gal_options.h
  17. 4
      pagelayout_editor/dialogs/panel_pl_editor_display_options.cpp
  18. 10
      pagelayout_editor/dialogs/panel_pl_editor_display_options.h
  19. 4
      pcbnew/dialogs/panel_display_options.cpp
  20. 4
      pcbnew/dialogs/panel_display_options.h

6
common/CMakeLists.txt

@ -430,10 +430,12 @@ set( COMMON_DLG_SRCS
dialogs/panel_design_block_lib_table.cpp
dialogs/panel_embedded_files.cpp
dialogs/panel_embedded_files_base.cpp
dialogs/panel_gal_display_options.cpp
dialogs/panel_base_display_options.cpp
dialogs/panel_hotkeys_editor.cpp
dialogs/panel_image_editor.cpp
dialogs/panel_image_editor_base.cpp
dialogs/panel_gal_options.cpp
dialogs/panel_gal_options_base.cpp
dialogs/panel_grid_settings.cpp
dialogs/panel_grid_settings_base.cpp
dialogs/panel_maintenance.cpp
@ -477,8 +479,6 @@ set( COMMON_WIDGET_SRCS
widgets/footprint_diff_widget.cpp
widgets/footprint_preview_widget.cpp
widgets/footprint_select_widget.cpp
widgets/gal_options_panel.cpp
widgets/gal_options_panel_base.cpp
widgets/grid_bitmap_toggle.cpp
widgets/grid_button.cpp
widgets/grid_checkbox.cpp

16
common/dialogs/panel_gal_display_options.cpp → common/dialogs/panel_base_display_options.cpp

@ -17,21 +17,19 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include <widgets/paged_dialog.h>
#include <dialogs/panel_base_display_options.h>
#include <dialogs/panel_gal_display_options.h>
PANEL_GAL_DISPLAY_OPTIONS::PANEL_GAL_DISPLAY_OPTIONS( wxWindow* aParent,
APP_SETTINGS_BASE* aAppSettings ) :
wxPanel( aParent, wxID_ANY )
PANEL_BASE_DISPLAY_OPTIONS::PANEL_BASE_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings ) :
wxPanel( aParent, wxID_ANY )
{
auto mainSizer = new wxBoxSizer( wxHORIZONTAL );
SetSizer( mainSizer );
// install GAL options pane
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, aAppSettings );
mainSizer->Add( m_galOptsPanel, 1, wxEXPAND | wxLEFT, 5 );
// a spacer to take up the other half of the width
@ -40,14 +38,14 @@ PANEL_GAL_DISPLAY_OPTIONS::PANEL_GAL_DISPLAY_OPTIONS( wxWindow* aParent,
}
bool PANEL_GAL_DISPLAY_OPTIONS::TransferDataToWindow()
bool PANEL_BASE_DISPLAY_OPTIONS::TransferDataToWindow()
{
m_galOptsPanel->TransferDataToWindow();
return true;
}
bool PANEL_GAL_DISPLAY_OPTIONS::TransferDataFromWindow()
bool PANEL_BASE_DISPLAY_OPTIONS::TransferDataFromWindow()
{
m_galOptsPanel->TransferDataFromWindow();
return true;

12
common/widgets/gal_options_panel.cpp → common/dialogs/panel_gal_options.cpp

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include <settings/app_settings.h>
#include <gal/gal_display_options.h>
#include <eda_draw_frame.h>
@ -57,8 +57,8 @@ static const UTIL::CFG_MAP<KIGFX::GRID_SNAPPING> gridSnapConfigVals =
};
GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings ) :
GAL_OPTIONS_PANEL_BASE( aParent ),
PANEL_GAL_OPTIONS::PANEL_GAL_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings ) :
PANEL_GAL_OPTIONS_BASE( aParent ),
m_cfg( aAppSettings )
{
// Grid settings subpanel
@ -80,7 +80,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, APP_SETTINGS_BASE* aApp
}
bool GAL_OPTIONS_PANEL::TransferDataToWindow()
bool PANEL_GAL_OPTIONS::TransferDataToWindow()
{
m_gridSnapOptions->SetSelection( m_cfg->m_Window.grid.snap );
@ -106,7 +106,7 @@ bool GAL_OPTIONS_PANEL::TransferDataToWindow()
}
bool GAL_OPTIONS_PANEL::TransferDataFromWindow()
bool PANEL_GAL_OPTIONS::TransferDataFromWindow()
{
m_cfg->m_Window.grid.snap = m_gridSnapOptions->GetSelection();
@ -134,7 +134,7 @@ bool GAL_OPTIONS_PANEL::TransferDataFromWindow()
}
bool GAL_OPTIONS_PANEL::ResetPanel( APP_SETTINGS_BASE* aAppSettings )
bool PANEL_GAL_OPTIONS::ResetPanel( APP_SETTINGS_BASE* aAppSettings )
{
APP_SETTINGS_BASE* saved = m_cfg;

128
common/dialogs/panel_gal_options_base.cpp

@ -0,0 +1,128 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "panel_gal_options_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_GAL_OPTIONS_BASE::PANEL_GAL_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
wxBoxSizer* mainSizer;
mainSizer = new wxBoxSizer( wxVERTICAL );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Grid Display"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
mainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxBoxSizer* bSizerGridStyle;
bSizerGridStyle = new wxBoxSizer( wxHORIZONTAL );
m_gridStyleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_gridStyleLabel->Wrap( -1 );
bSizerGridStyle->Add( m_gridStyleLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_rbDots = new wxRadioButton( this, wxID_ANY, _("Dots"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
bSizerGridStyle->Add( m_rbDots, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_rbLines = new wxRadioButton( this, wxID_ANY, _("Lines"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerGridStyle->Add( m_rbLines, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_rbCrosses = new wxRadioButton( this, wxID_ANY, _("Small crosses"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerGridStyle->Add( m_rbCrosses, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
mainSizer->Add( bSizerGridStyle, 0, wxEXPAND|wxALL, 5 );
wxGridBagSizer* gbGridSettings;
gbGridSettings = new wxGridBagSizer( 5, 5 );
gbGridSettings->SetFlexibleDirection( wxHORIZONTAL );
gbGridSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
l_gridLineWidth = new wxStaticText( this, wxID_ANY, _("Grid thickness:"), wxDefaultPosition, wxDefaultSize, 0 );
l_gridLineWidth->Wrap( -1 );
gbGridSettings->Add( l_gridLineWidth, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
wxArrayString m_gridLineWidthChoices;
m_gridLineWidth = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridLineWidthChoices, 0 );
m_gridLineWidth->SetSelection( 0 );
gbGridSettings->Add( m_gridLineWidth, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
l_gridLineWidthUnits = new wxStaticText( this, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 );
l_gridLineWidthUnits->Wrap( -1 );
gbGridSettings->Add( l_gridLineWidthUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
l_gridMinSpacing = new wxStaticText( this, wxID_ANY, _("Minimum grid spacing:"), wxDefaultPosition, wxDefaultSize, 0 );
l_gridMinSpacing->Wrap( -1 );
gbGridSettings->Add( l_gridMinSpacing, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_gridMinSpacing = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 5, 200, 10 );
gbGridSettings->Add( m_gridMinSpacing, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
l_gridMinSpacingUnits = new wxStaticText( this, wxID_ANY, _("pixels"), wxDefaultPosition, wxDefaultSize, 0 );
l_gridMinSpacingUnits->Wrap( -1 );
gbGridSettings->Add( l_gridMinSpacingUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
l_gridSnapOptions = new wxStaticText( this, wxID_ANY, _("Snap to grid:"), wxDefaultPosition, wxDefaultSize, 0 );
l_gridSnapOptions->Wrap( -1 );
gbGridSettings->Add( l_gridSnapOptions, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
wxString m_gridSnapOptionsChoices[] = { _("Always"), _("When grid shown"), _("Never") };
int m_gridSnapOptionsNChoices = sizeof( m_gridSnapOptionsChoices ) / sizeof( wxString );
m_gridSnapOptions = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_gridSnapOptionsNChoices, m_gridSnapOptionsChoices, 0 );
m_gridSnapOptions->SetSelection( 0 );
gbGridSettings->Add( m_gridSnapOptions, wxGBPosition( 2, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 );
gbGridSettings->AddGrowableCol( 1 );
mainSizer->Add( gbGridSettings, 0, wxEXPAND|wxALL, 5 );
mainSizer->Add( 0, 5, 0, 0, 5 );
m_stGridLabel = new wxStaticText( this, wxID_ANY, _("Cursor"), wxDefaultPosition, wxDefaultSize, 0 );
m_stGridLabel->Wrap( -1 );
mainSizer->Add( m_stGridLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
mainSizer->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxFlexGridSizer* fgSizer1;
fgSizer1 = new wxFlexGridSizer( 0, 1, 3, 0 );
fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_rbSmallCrosshairs = new wxRadioButton( this, wxID_ANY, _("Small crosshairs"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
fgSizer1->Add( m_rbSmallCrosshairs, 0, wxTOP|wxLEFT, 5 );
m_rbFullWindowCrosshairs = new wxRadioButton( this, wxID_ANY, _("Full window crosshairs"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_rbFullWindowCrosshairs, 0, wxLEFT, 5 );
m_rb45DegreeCrosshairs = new wxRadioButton( this, wxID_ANY, _("45 degree crosshairs"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_rb45DegreeCrosshairs, 0, wxLEFT, 5 );
fgSizer1->Add( 0, 8, 0, wxEXPAND, 5 );
m_forceCursorDisplay = new wxCheckBox( this, wxID_ANY, _("Always show crosshairs"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_forceCursorDisplay, 0, wxLEFT, 5 );
mainSizer->Add( fgSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
this->SetSizer( mainSizer );
this->Layout();
mainSizer->Fit( this );
}
PANEL_GAL_OPTIONS_BASE::~PANEL_GAL_OPTIONS_BASE()
{
}

8
common/widgets/gal_options_panel_base.fbp → common/dialogs/panel_gal_options_base.fbp

@ -13,12 +13,12 @@
<property name="cpp_use_enum">0</property>
<property name="embedded_files_path">res</property>
<property name="encoding">UTF-8</property>
<property name="file">gal_options_panel_base</property>
<property name="file">panel_gal_options_base</property>
<property name="first_id">1000</property>
<property name="internationalize">1</property>
<property name="lua_skip_events">1</property>
<property name="lua_ui_table">UI</property>
<property name="name">GAL_OPTIONS_PANEL_BASE_PRJ</property>
<property name="name">PANEL_GAL_OPTIONS_BASE</property>
<property name="path">.</property>
<property name="php_disconnect_events">0</property>
<property name="php_disconnect_mode">source_name</property>
@ -46,7 +46,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">GAL_OPTIONS_PANEL_BASE</property>
<property name="name">PANEL_GAL_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="subclass">; ; forward_declare</property>
@ -1267,7 +1267,7 @@
<property name="value">0</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">

66
common/dialogs/panel_gal_options_base.h

@ -0,0 +1,66 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#pragma once
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/statline.h>
#include <wx/radiobut.h>
#include <wx/sizer.h>
#include <wx/choice.h>
#include <wx/spinctrl.h>
#include <wx/gbsizer.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_GAL_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_GAL_OPTIONS_BASE : public wxPanel
{
private:
protected:
wxStaticText* m_staticText1;
wxStaticLine* m_staticline1;
wxStaticText* m_gridStyleLabel;
wxRadioButton* m_rbDots;
wxRadioButton* m_rbLines;
wxRadioButton* m_rbCrosses;
wxStaticText* l_gridLineWidth;
wxChoice* m_gridLineWidth;
wxStaticText* l_gridLineWidthUnits;
wxStaticText* l_gridMinSpacing;
wxSpinCtrl* m_gridMinSpacing;
wxStaticText* l_gridMinSpacingUnits;
wxStaticText* l_gridSnapOptions;
wxChoice* m_gridSnapOptions;
wxStaticText* m_stGridLabel;
wxStaticLine* m_staticline2;
wxRadioButton* m_rbSmallCrosshairs;
wxRadioButton* m_rbFullWindowCrosshairs;
wxRadioButton* m_rb45DegreeCrosshairs;
wxCheckBox* m_forceCursorDisplay;
public:
PANEL_GAL_OPTIONS_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_GAL_OPTIONS_BASE();
};

7
eeschema/dialogs/panel_eeschema_display_options.cpp

@ -26,7 +26,7 @@
#include <settings/settings_manager.h>
#include <eeschema_settings.h>
#include <panel_eeschema_display_options.h>
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include <widgets/ui_common.h>
#include <widgets/font_choice.h>
@ -34,11 +34,10 @@
#include <font/kicad_font_name.h>
PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS( wxWindow* aParent,
APP_SETTINGS_BASE* aAppSettings ) :
PANEL_EESCHEMA_DISPLAY_OPTIONS::PANEL_EESCHEMA_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings ) :
PANEL_EESCHEMA_DISPLAY_OPTIONS_BASE( aParent )
{
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, aAppSettings );
m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND|wxRIGHT, 0 );

10
eeschema/dialogs/panel_eeschema_display_options.h

@ -17,13 +17,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PANEL_EESCHEMA_DISPLAY_OPTIONS_H
#define PANEL_EESCHEMA_DISPLAY_OPTIONS_H
#pragma once
#include "panel_eeschema_display_options_base.h"
class APP_SETTINGS_BASE;
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class EESCHEMA_SETTINGS;
@ -41,8 +40,5 @@ private:
void loadEEschemaSettings( EESCHEMA_SETTINGS* aCfg );
private:
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};
#endif // PANEL_EESCHEMA_DISPLAY_OPTIONS_H

7
eeschema/dialogs/panel_sym_display_options.cpp

@ -26,14 +26,13 @@
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <symbol_editor/symbol_editor_settings.h>
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
PANEL_SYM_DISPLAY_OPTIONS::PANEL_SYM_DISPLAY_OPTIONS( wxWindow* aParent,
APP_SETTINGS_BASE* aAppSettings ) :
PANEL_SYM_DISPLAY_OPTIONS::PANEL_SYM_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings ) :
PANEL_SYM_DISPLAY_OPTIONS_BASE( aParent )
{
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, aAppSettings );
m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND | wxRIGHT, 5 );
}

4
eeschema/dialogs/panel_sym_display_options.h

@ -22,7 +22,7 @@
#include "panel_sym_display_options_base.h"
class APP_SETTINGS_BASE;
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class SYMBOL_EDITOR_SETTINGS;
@ -40,5 +40,5 @@ private:
void loadSymEditorSettings( SYMBOL_EDITOR_SETTINGS* aCfg );
private:
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};

2
eeschema/eeschema.cpp

@ -62,7 +62,7 @@
#include <panel_eeschema_editing_options.h>
#include <panel_eeschema_annotation_options.h>
#include <panel_sym_editing_options.h>
#include <dialogs/panel_gal_display_options.h>
#include <dialogs/panel_base_display_options.h>
#include <panel_eeschema_display_options.h>
#include <panel_sym_display_options.h>
#include <sim/simulator_frame.h>

2
eeschema/eeschema_config.cpp

@ -25,7 +25,7 @@
#include <dialogs/dialog_schematic_setup.h>
#include <kiway.h>
#include <symbol_edit_frame.h>
#include <dialogs/panel_gal_display_options.h>
#include <dialogs/panel_base_display_options.h>
#include <filename_resolver.h>
#include <pgm_base.h>
#include <project/project_file.h>

6
gerbview/dialogs/panel_gerbview_display_options.cpp

@ -22,16 +22,16 @@
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <gerbview_settings.h>
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include "panel_gerbview_display_options.h"
PANEL_GERBVIEW_DISPLAY_OPTIONS::PANEL_GERBVIEW_DISPLAY_OPTIONS( wxWindow* aParent ) :
PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE( aParent, wxID_ANY )
PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE( aParent, wxID_ANY )
{
GERBVIEW_SETTINGS* cfg = GetAppSettings<GERBVIEW_SETTINGS>( "gerbview" );
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, cfg );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, cfg );
m_galOptionsSizer->Add( m_galOptsPanel, 0, wxEXPAND|wxRIGHT, 15 );
}

11
gerbview/dialogs/panel_gerbview_display_options.h

@ -21,13 +21,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef PANEL_GERBVIEW_DISPLAY_OPTIONS_H
#define PANEL_GERBVIEW_DISPLAY_OPTIONS_H
#pragma once
#include "panel_gerbview_display_options_base.h"
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class PANEL_GERBVIEW_DISPLAY_OPTIONS : public PANEL_GERBVIEW_DISPLAY_OPTIONS_BASE
@ -45,9 +44,5 @@ private:
void loadSettings( GERBVIEW_SETTINGS* aCfg );
private:
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};
#endif // PANEL_GERBVIEW_DISPLAY_OPTIONS_H

13
include/dialogs/panel_gal_display_options.h → include/dialogs/panel_base_display_options.h

@ -18,24 +18,21 @@
*/
#ifndef PANEL_DISPLAY_OPTIONS_H
#define PANEL_DISPLAY_OPTIONS_H
#pragma once
#include <wx/panel.h>
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class PANEL_GAL_DISPLAY_OPTIONS : public wxPanel
class PANEL_BASE_DISPLAY_OPTIONS : public wxPanel
{
public:
PANEL_GAL_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings );
PANEL_BASE_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings );
private:
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};
#endif //PANEL_DISPLAY_OPTIONS_H

11
include/widgets/gal_options_panel.h → include/dialogs/panel_gal_options.h

@ -21,10 +21,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef WIDGETS_GAL_OPTIONS_PANEL__H_
#define WIDGETS_GAL_OPTIONS_PANEL__H_
#pragma once
#include <../../common/widgets/gal_options_panel_base.h>
#include <dialogs/panel_gal_options_base.h>
#include <gal/gal_display_options.h>
class wxBoxSizer;
@ -37,11 +36,11 @@ class EDA_DRAW_FRAME;
class APP_SETTINGS_BASE;
class GAL_OPTIONS_PANEL: public GAL_OPTIONS_PANEL_BASE
class PANEL_GAL_OPTIONS: public PANEL_GAL_OPTIONS_BASE
{
public:
GAL_OPTIONS_PANEL( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings );
PANEL_GAL_OPTIONS( wxWindow* aParent, APP_SETTINGS_BASE* aAppSettings );
/**
* Load the panel controls from the given opt
@ -60,5 +59,3 @@ private:
APP_SETTINGS_BASE* m_cfg;
};
#endif // WIDGETS_GAL_OPTIONS_PANEL__H_

4
pagelayout_editor/dialogs/panel_pl_editor_display_options.cpp

@ -24,7 +24,7 @@
#include <settings/settings_manager.h>
#include <pl_editor_settings.h>
#include <panel_pl_editor_display_options.h>
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include <widgets/ui_common.h>
#include <wx/sizer.h>
@ -36,7 +36,7 @@ PANEL_PL_EDITOR_DISPLAY_OPTIONS::PANEL_PL_EDITOR_DISPLAY_OPTIONS( wxWindow* aPar
wxBoxSizer* bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftCol = new wxBoxSizer( wxVERTICAL );
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, aAppSettings );
bLeftCol->Add( m_galOptsPanel, 1, wxEXPAND|wxRIGHT, 15 );
bPanelSizer->Add( bLeftCol, 0, wxEXPAND, 0 );

10
pagelayout_editor/dialogs/panel_pl_editor_display_options.h

@ -17,14 +17,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PANEL_PL_EDITOR_DISPLAY_OPTIONS_H
#define PANEL_PL_EDITOR_DISPLAY_OPTIONS_H
#pragma once
#include <widgets/resettable_panel.h>
class APP_SETTINGS_BASE;
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class PANEL_PL_EDITOR_DISPLAY_OPTIONS : public RESETTABLE_PANEL
@ -38,8 +37,5 @@ public:
void ResetPanel() override;
private:
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};
#endif // PANEL_PL_EDITOR_DISPLAY_OPTIONS_H

4
pcbnew/dialogs/panel_display_options.cpp

@ -24,7 +24,7 @@
#include <config_map.h>
#include <panel_display_options.h>
#include <widgets/paged_dialog.h>
#include <widgets/gal_options_panel.h>
#include <dialogs/panel_gal_options.h>
#include <widgets/std_bitmap_button.h>
#include <grid_tricks.h>
#include <board_design_settings.h>
@ -150,7 +150,7 @@ PANEL_DISPLAY_OPTIONS::PANEL_DISPLAY_OPTIONS( wxWindow* aParent, APP_SETTINGS_BA
PANEL_DISPLAY_OPTIONS_BASE( aParent ),
m_isPCBEdit( dynamic_cast<PCBNEW_SETTINGS*>( aAppSettings ) != nullptr )
{
m_galOptsPanel = new GAL_OPTIONS_PANEL( this, aAppSettings );
m_galOptsPanel = new PANEL_GAL_OPTIONS( this, aAppSettings );
m_galOptionsSizer->Add( m_galOptsPanel, 1, wxEXPAND|wxRIGHT, 5 );
m_optionsBook->SetSelection( m_isPCBEdit ? 1 : 0 );

4
pcbnew/dialogs/panel_display_options.h

@ -23,7 +23,7 @@
class PCBNEW_SETTINGS;
class FOOTPRINT_EDITOR_SETTINGS;
class APP_SETTINGS_BASE;
class GAL_OPTIONS_PANEL;
class PANEL_GAL_OPTIONS;
class PANEL_DISPLAY_OPTIONS : public PANEL_DISPLAY_OPTIONS_BASE
@ -51,6 +51,6 @@ private:
private:
bool m_isPCBEdit;
GAL_OPTIONS_PANEL* m_galOptsPanel;
PANEL_GAL_OPTIONS* m_galOptsPanel;
};
Loading…
Cancel
Save