You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
4.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf-dirty)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "panel_plugin_settings_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. PANEL_PLUGIN_SETTINGS_BASE::PANEL_PLUGIN_SETTINGS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : RESETTABLE_PANEL( parent, id, pos, size, style, name )
  10. {
  11. wxBoxSizer* bPanelSizer;
  12. bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
  13. wxBoxSizer* bSizer8;
  14. bSizer8 = new wxBoxSizer( wxVERTICAL );
  15. wxStaticBoxSizer* sbSizerServer;
  16. sbSizerServer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("KiCad API") ), wxVERTICAL );
  17. m_staticText3 = new wxStaticText( sbSizerServer->GetStaticBox(), wxID_ANY, _("When the KiCad API is enabled, plugins and other software running on this computer can connect to KiCad."), wxDefaultPosition, wxDefaultSize, 0 );
  18. m_staticText3->Wrap( -1 );
  19. sbSizerServer->Add( m_staticText3, 0, wxALL, 5 );
  20. m_cbEnableApi = new wxCheckBox( sbSizerServer->GetStaticBox(), wxID_ANY, _("Enable KiCad API"), wxDefaultPosition, wxDefaultSize, 0 );
  21. m_cbEnableApi->SetToolTip( _("Enable the KiCad API. Doing so will allow third-party software running on your computer to access KiCad.") );
  22. sbSizerServer->Add( m_cbEnableApi, 0, wxALL, 5 );
  23. m_stApiStatus = new wxStaticText( sbSizerServer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  24. m_stApiStatus->Wrap( -1 );
  25. sbSizerServer->Add( m_stApiStatus, 0, wxALL, 5 );
  26. bSizer8->Add( sbSizerServer, 0, wxALL|wxEXPAND, 5 );
  27. wxStaticBoxSizer* sbSizerPython;
  28. sbSizerPython = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Python Interpreter") ), wxVERTICAL );
  29. wxBoxSizer* bSizer4;
  30. bSizer4 = new wxBoxSizer( wxHORIZONTAL );
  31. m_staticText2 = new wxStaticText( sbSizerPython->GetStaticBox(), wxID_ANY, _("Path to Python interpreter:"), wxDefaultPosition, wxDefaultSize, 0 );
  32. m_staticText2->Wrap( -1 );
  33. bSizer4->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  34. m_pickerPythonInterpreter = new wxFilePickerCtrl( sbSizerPython->GetStaticBox(), wxID_ANY, wxEmptyString, _("Select the path to a Python interpreter"), _("*.*"), wxDefaultPosition, wxDefaultSize, wxFLP_DEFAULT_STYLE|wxFLP_USE_TEXTCTRL );
  35. bSizer4->Add( m_pickerPythonInterpreter, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  36. m_btnDetectAutomatically = new wxButton( sbSizerPython->GetStaticBox(), wxID_ANY, _("Detect Automatically"), wxDefaultPosition, wxDefaultSize, 0 );
  37. bSizer4->Add( m_btnDetectAutomatically, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  38. sbSizerPython->Add( bSizer4, 0, wxEXPAND, 5 );
  39. m_stPythonStatus = new wxStaticText( sbSizerPython->GetStaticBox(), wxID_ANY, _("No Python interpreter chosen; external Python plugins will not be available"), wxDefaultPosition, wxDefaultSize, 0 );
  40. m_stPythonStatus->Wrap( -1 );
  41. m_stPythonStatus->SetToolTip( _("Python interpreter status") );
  42. sbSizerPython->Add( m_stPythonStatus, 0, wxALL, 5 );
  43. bSizer8->Add( sbSizerPython, 0, wxALL|wxEXPAND, 5 );
  44. bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
  45. bPanelSizer->Add( bSizer8, 1, wxEXPAND, 5 );
  46. this->SetSizer( bPanelSizer );
  47. this->Layout();
  48. bPanelSizer->Fit( this );
  49. // Connect Events
  50. m_cbEnableApi->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnEnableApiChecked ), NULL, this );
  51. m_pickerPythonInterpreter->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnPythonInterpreterChanged ), NULL, this );
  52. m_btnDetectAutomatically->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnBtnDetectAutomaticallyClicked ), NULL, this );
  53. }
  54. PANEL_PLUGIN_SETTINGS_BASE::~PANEL_PLUGIN_SETTINGS_BASE()
  55. {
  56. // Disconnect Events
  57. m_cbEnableApi->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnEnableApiChecked ), NULL, this );
  58. m_pickerPythonInterpreter->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnPythonInterpreterChanged ), NULL, this );
  59. m_btnDetectAutomatically->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PLUGIN_SETTINGS_BASE::OnBtnDetectAutomaticallyClicked ), NULL, this );
  60. }