KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_database_lib_settings_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_DATABASE_LIB_SETTINGS_BASE::DIALOG_DATABASE_LIB_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 )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* bmainSizer;
19 bmainSizer = new wxBoxSizer( wxVERTICAL );
20
21 m_infoBar = new WX_INFOBAR( this );
22 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
23 m_infoBar->SetEffectDuration( 500 );
24 m_infoBar->Hide();
25
26 bmainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
27
28 wxBoxSizer* bupperSizer;
29 bupperSizer = new wxBoxSizer( wxVERTICAL );
30
31 wxStaticBoxSizer* sbSizer4;
32 sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Connection") ), wxVERTICAL );
33
34 wxGridBagSizer* gbSizer2;
35 gbSizer2 = new wxGridBagSizer( 0, 0 );
36 gbSizer2->SetFlexibleDirection( wxBOTH );
37 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
38
39 m_rbDSN = new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY, _("DSN:"), wxDefaultPosition, wxDefaultSize, 0 );
40 gbSizer2->Add( m_rbDSN, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
41
42 m_txtDSN = new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
43 gbSizer2->Add( m_txtDSN, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALL|wxEXPAND, 5 );
44
45 m_staticText2 = new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, _("Username:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_staticText2->Wrap( -1 );
47 gbSizer2->Add( m_staticText2, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
48
49 m_txtUser = new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
50 m_txtUser->SetMinSize( wxSize( 150,-1 ) );
51
52 gbSizer2->Add( m_txtUser, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
53
54 m_staticText3 = new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, _("Password:"), wxDefaultPosition, wxDefaultSize, 0 );
55 m_staticText3->Wrap( -1 );
56 gbSizer2->Add( m_staticText3, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
57
58 m_txtPassword = new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
59 m_txtPassword->SetMinSize( wxSize( 150,-1 ) );
60
61 gbSizer2->Add( m_txtPassword, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
62
63
64 gbSizer2->AddGrowableCol( 2 );
65
66 sbSizer4->Add( gbSizer2, 1, wxALL|wxEXPAND, 5 );
67
68 wxBoxSizer* bSizer4;
69 bSizer4 = new wxBoxSizer( wxVERTICAL );
70
71 m_rbConnectionString = new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY, _("Connection String:"), wxDefaultPosition, wxDefaultSize, 0 );
72 bSizer4->Add( m_rbConnectionString, 0, wxALL, 5 );
73
74 m_txtConnectionString = new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
75 m_txtConnectionString->Enable( false );
76
77 bSizer4->Add( m_txtConnectionString, 0, wxALL|wxEXPAND, 5 );
78
79
80 sbSizer4->Add( bSizer4, 0, wxALL|wxEXPAND, 5 );
81
82 wxBoxSizer* bSizer5;
83 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
84
85 m_btnTest = new wxButton( sbSizer4->GetStaticBox(), wxID_ANY, _("Test"), wxDefaultPosition, wxDefaultSize, 0 );
86 bSizer5->Add( m_btnTest, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
87
88 m_stConnectionTestStatus = new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_MIDDLE );
89 m_stConnectionTestStatus->Wrap( -1 );
90 bSizer5->Add( m_stConnectionTestStatus, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
91
92
93 sbSizer4->Add( bSizer5, 0, wxALL|wxEXPAND, 5 );
94
95
96 bupperSizer->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 );
97
98 wxStaticBoxSizer* sbSizer2;
99 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries") ), wxHORIZONTAL );
100
101 wxBoxSizer* bSizer6;
102 bSizer6 = new wxBoxSizer( wxHORIZONTAL );
103
104 m_btnReloadConfig = new wxButton( sbSizer2->GetStaticBox(), wxID_ANY, _("Reload Configuration"), wxDefaultPosition, wxDefaultSize, 0 );
105 m_btnReloadConfig->SetToolTip( _("Reload the database library configuration file") );
106
107 bSizer6->Add( m_btnReloadConfig, 0, wxALL, 5 );
108
109 m_stLibrariesStatus = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
110 m_stLibrariesStatus->Wrap( -1 );
111 bSizer6->Add( m_stLibrariesStatus, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
112
113
114 sbSizer2->Add( bSizer6, 1, wxALL|wxEXPAND, 5 );
115
116
117 bupperSizer->Add( sbSizer2, 0, wxALL|wxEXPAND, 5 );
118
119 wxStaticBoxSizer* sbSizer3;
120 sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Caching") ), wxVERTICAL );
121
122 wxFlexGridSizer* fgSizer1;
123 fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
124 fgSizer1->SetFlexibleDirection( wxBOTH );
125 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
126
127 m_staticText5 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Cache size:"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_staticText5->Wrap( -1 );
129 m_staticText5->SetToolTip( _("How many database queries to cache") );
130
131 fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
132
133 m_spinCacheSize = new wxSpinCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 1024, 256 );
134 m_spinCacheSize->SetToolTip( _("How many database queries to cache") );
135
136 fgSizer1->Add( m_spinCacheSize, 0, wxALL, 5 );
137
138 m_staticText6 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Cache timeout:"), wxDefaultPosition, wxDefaultSize, 0 );
139 m_staticText6->Wrap( -1 );
140 m_staticText6->SetToolTip( _("Time in seconds that database queries will be cached for") );
141
142 fgSizer1->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
143
144 m_spinCacheTimeout = new wxSpinCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 600, 10 );
145 m_spinCacheTimeout->SetToolTip( _("Time in seconds that database queries will be cached for") );
146
147 fgSizer1->Add( m_spinCacheTimeout, 0, wxALL, 5 );
148
149
150 sbSizer3->Add( fgSizer1, 1, wxEXPAND, 5 );
151
152
153 bupperSizer->Add( sbSizer3, 1, wxALL|wxEXPAND, 5 );
154
155
156 bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
157
158 wxBoxSizer* m_buttonsSizer;
159 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
160
161
162 m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
163
164 m_sdbSizer1 = new wxStdDialogButtonSizer();
165 m_sdbSizer1OK = new wxButton( this, wxID_OK );
166 m_sdbSizer1->AddButton( m_sdbSizer1OK );
167 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
168 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
169 m_sdbSizer1->Realize();
170
171 m_buttonsSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
172
173
174 bmainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 5 );
175
176
177 this->SetSizer( bmainSizer );
178 this->Layout();
179
180 // Connect Events
181 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnClose ) );
182 m_rbDSN->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnDSNSelected ), NULL, this );
183 m_rbConnectionString->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnConnectionStringSelected ), NULL, this );
184 m_btnTest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnBtnTest ), NULL, this );
185 m_btnReloadConfig->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnBtnReloadConfig ), NULL, this );
186 m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnCloseClick ), NULL, this );
187 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnApplyClick ), NULL, this );
188}
189
191{
192 // Disconnect Events
193 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnClose ) );
194 m_rbDSN->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnDSNSelected ), NULL, this );
195 m_rbConnectionString->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnConnectionStringSelected ), NULL, this );
196 m_btnTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnBtnTest ), NULL, this );
197 m_btnReloadConfig->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnBtnReloadConfig ), NULL, this );
198 m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnCloseClick ), NULL, this );
199 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DATABASE_LIB_SETTINGS_BASE::OnApplyClick ), NULL, this );
200
201}
virtual void OnConnectionStringSelected(wxCommandEvent &event)
virtual void OnBtnTest(wxCommandEvent &event)
virtual void OnBtnReloadConfig(wxCommandEvent &event)
virtual void OnDSNSelected(wxCommandEvent &event)
DIALOG_DATABASE_LIB_SETTINGS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Database Library Settings"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 600), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnApplyClick(wxCommandEvent &event)
virtual void OnCloseClick(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#define _(s)