KiCad PCB EDA Suite
dialog_migrate_settings_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 9 2019)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12DIALOG_MIGRATE_SETTINGS_BASE::DIALOG_MIGRATE_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13{
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15
16 m_sizer = new wxBoxSizer( wxVERTICAL );
17
18 wxBoxSizer* bSizer6;
19 bSizer6 = new wxBoxSizer( wxVERTICAL );
20
21 m_lblWelcome = new wxStaticText( this, wxID_ANY, _("Welcome to KiCad %s!"), wxDefaultPosition, wxDefaultSize, 0 );
22 m_lblWelcome->Wrap( -1 );
23 m_lblWelcome->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
24
25 bSizer6->Add( m_lblWelcome, 0, wxALL|wxEXPAND, 5 );
26
27
28 bSizer6->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
29
30 m_staticText2 = new wxStaticText( this, wxID_ANY, _("How would you like to configure KiCad?"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_staticText2->Wrap( -1 );
32 bSizer6->Add( m_staticText2, 0, wxALL|wxEXPAND, 5 );
33
34 m_btnPrevVer = new wxRadioButton( this, wxID_ANY, _("Import settings from a previous version at:"), wxDefaultPosition, wxDefaultSize, 0 );
35 bSizer6->Add( m_btnPrevVer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
36
37 wxBoxSizer* bSizer5;
38 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
39
40
41 bSizer5->Add( 20, 0, 0, wxEXPAND, 5 );
42
43 m_cbPath = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
44 m_cbPath->SetMinSize( wxSize( 480,-1 ) );
45
46 bSizer5->Add( m_cbPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
47
48 m_btnCustomPath = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
49 m_btnCustomPath->SetToolTip( _("Choose a different path") );
50
51 bSizer5->Add( m_btnCustomPath, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
52
53
54 bSizer6->Add( bSizer5, 1, wxEXPAND, 5 );
55
56 m_lblPathError = new wxStaticText( this, wxID_ANY, _("The selected path does not contain valid KiCad settings!"), wxDefaultPosition, wxDefaultSize, 0 );
57 m_lblPathError->Wrap( -1 );
58 m_lblPathError->SetForegroundColour( wxColour( 255, 43, 0 ) );
59 m_lblPathError->Hide();
60
61 bSizer6->Add( m_lblPathError, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
62
63 m_cbCopyLibraryTables = new wxCheckBox( this, wxID_ANY, _("Import library configuration from previous version"), wxDefaultPosition, wxDefaultSize, 0 );
64 m_cbCopyLibraryTables->SetValue(true);
65 m_cbCopyLibraryTables->SetToolTip( _("When checked, the symbol and footprint library tables from the previous version will be imported into this version") );
66
67 bSizer6->Add( m_cbCopyLibraryTables, 0, wxBOTTOM|wxRIGHT|wxLEFT, 23 );
68
69 m_btnUseDefaults = new wxRadioButton( this, wxID_ANY, _("Start with default settings"), wxDefaultPosition, wxDefaultSize, 0 );
70 bSizer6->Add( m_btnUseDefaults, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
71
72
73 m_sizer->Add( bSizer6, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
74
75 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
76 m_sizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
77
78 m_standardButtons = new wxStdDialogButtonSizer();
79 m_standardButtonsOK = new wxButton( this, wxID_OK );
81 m_standardButtonsCancel = new wxButton( this, wxID_CANCEL );
83 m_standardButtons->Realize();
84 m_standardButtons->SetMinSize( wxSize( -1,50 ) );
85
86 m_sizer->Add( m_standardButtons, 0, wxEXPAND|wxALL, 5 );
87
88
89 this->SetSizer( m_sizer );
90 this->Layout();
91 m_sizer->Fit( this );
92
93 this->Centre( wxBOTH );
94
95 // Connect Events
96 m_btnPrevVer->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPrevVerSelected ), NULL, this );
97 m_cbPath->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathChanged ), NULL, this );
98 m_cbPath->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathDefocused ), NULL, this );
99 m_cbPath->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathChanged ), NULL, this );
100 m_btnCustomPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnChoosePath ), NULL, this );
101 m_btnUseDefaults->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnDefaultSelected ), NULL, this );
102}
103
105{
106 // Disconnect Events
107 m_btnPrevVer->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPrevVerSelected ), NULL, this );
108 m_cbPath->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathChanged ), NULL, this );
109 m_cbPath->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathDefocused ), NULL, this );
110 m_cbPath->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnPathChanged ), NULL, this );
111 m_btnCustomPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnChoosePath ), NULL, this );
112 m_btnUseDefaults->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_MIGRATE_SETTINGS_BASE::OnDefaultSelected ), NULL, this );
113
114}
virtual void OnPathDefocused(wxFocusEvent &event)
DIALOG_MIGRATE_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Configure KiCad Settings Path"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxCAPTION)
virtual void OnPrevVerSelected(wxCommandEvent &event)
virtual void OnDefaultSelected(wxCommandEvent &event)
wxStdDialogButtonSizer * m_standardButtons
virtual void OnChoosePath(wxCommandEvent &event)
virtual void OnPathChanged(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
#define _(s)