7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 00:21:25 +00:00

Naming consistency.

This commit is contained in:
Jeff Young 2025-01-12 20:24:20 +00:00
parent 9322397933
commit 62041fdb69
12 changed files with 132 additions and 132 deletions

View File

@ -17,8 +17,8 @@ include_directories(
)
set( KICAD_SRCS
dialogs/dialog_job_output_options.cpp
dialogs/dialog_job_output_options_base.cpp
dialogs/dialog_jobset_output_options.cpp
dialogs/dialog_jobset_output_options_base.cpp
dialogs/dialog_copyfiles_job_settings.cpp
dialogs/dialog_copyfiles_job_settings_base.cpp
dialogs/dialog_executecommand_job_settings.cpp
@ -31,8 +31,8 @@ set( KICAD_SRCS
dialogs/dialog_template_selector.cpp
dialogs/panel_kicad_launcher_base.cpp
dialogs/panel_kicad_launcher.cpp
dialogs/panel_jobs_base.cpp
dialogs/panel_jobs.cpp
dialogs/panel_jobset_base.cpp
dialogs/panel_jobset.cpp
files-io.cpp
jobs_runner.cpp
import_proj.cpp

View File

@ -18,7 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "dialog_job_output_options.h"
#include "dialog_jobset_output_options.h"
#include "dialog_copyfiles_job_settings.h"
#include <wx/aui/auibook.h>
#include <jobs/jobset.h>
@ -42,9 +42,9 @@
extern KICOMMON_API std::map<JOBSET_OUTPUT_TYPE, JOBSET_OUTPUT_TYPE_INFO> JobsetOutputTypeInfos;
DIALOG_JOB_OUTPUT_OPTIONS::DIALOG_JOB_OUTPUT_OPTIONS( wxWindow* aParent, JOBSET* aJobsFile,
JOBSET_OUTPUT* aOutput ) :
DIALOG_JOB_OUTPUT_OPTIONS_BASE( aParent ),
DIALOG_JOBSET_OUTPUT_OPTIONS::DIALOG_JOBSET_OUTPUT_OPTIONS( wxWindow* aParent, JOBSET* aJobsFile,
JOBSET_OUTPUT* aOutput ) :
DIALOG_JOBSET_OUTPUT_OPTIONS_BASE( aParent ),
m_jobsFile( aJobsFile ),
m_output( aOutput )
{
@ -68,7 +68,7 @@ DIALOG_JOB_OUTPUT_OPTIONS::DIALOG_JOB_OUTPUT_OPTIONS( wxWindow* aParent, JOBSET*
}
void DIALOG_JOB_OUTPUT_OPTIONS::onOutputPathBrowseClicked(wxCommandEvent& event)
void DIALOG_JOBSET_OUTPUT_OPTIONS::onOutputPathBrowseClicked(wxCommandEvent& event)
{
bool isFolder = false;
wxString fileWildcard = "";
@ -108,7 +108,7 @@ void DIALOG_JOB_OUTPUT_OPTIONS::onOutputPathBrowseClicked(wxCommandEvent& event)
}
bool DIALOG_JOB_OUTPUT_OPTIONS::TransferDataFromWindow()
bool DIALOG_JOBSET_OUTPUT_OPTIONS::TransferDataFromWindow()
{
wxString outputPath = m_textCtrlOutputPath->GetValue().Trim().Trim( false );
@ -149,7 +149,7 @@ bool DIALOG_JOB_OUTPUT_OPTIONS::TransferDataFromWindow()
}
bool DIALOG_JOB_OUTPUT_OPTIONS::TransferDataToWindow()
bool DIALOG_JOBSET_OUTPUT_OPTIONS::TransferDataToWindow()
{
wxArrayString arrayStr;
std::vector<int> selectedList;

View File

@ -20,15 +20,15 @@
#pragma once
#include "dialog_job_output_options_base.h"
#include "dialog_jobset_output_options_base.h"
class JOBSET;
struct JOBSET_OUTPUT;
class DIALOG_JOB_OUTPUT_OPTIONS : public DIALOG_JOB_OUTPUT_OPTIONS_BASE
class DIALOG_JOBSET_OUTPUT_OPTIONS : public DIALOG_JOBSET_OUTPUT_OPTIONS_BASE
{
public:
DIALOG_JOB_OUTPUT_OPTIONS( wxWindow* aParent, JOBSET* aJobsFile, JOBSET_OUTPUT* aOutput );
DIALOG_JOBSET_OUTPUT_OPTIONS( wxWindow* aParent, JOBSET* aJobsFile, JOBSET_OUTPUT* aOutput );
private:
virtual void onOutputPathBrowseClicked(wxCommandEvent& event) override;

View File

@ -7,11 +7,11 @@
#include "widgets/std_bitmap_button.h"
#include "dialog_job_output_options_base.h"
#include "dialog_jobset_output_options_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_JOB_OUTPUT_OPTIONS_BASE::DIALOG_JOB_OUTPUT_OPTIONS_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_JOBSET_OUTPUT_OPTIONS_BASE::DIALOG_JOBSET_OUTPUT_OPTIONS_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 );
@ -91,12 +91,12 @@ DIALOG_JOB_OUTPUT_OPTIONS_BASE::DIALOG_JOB_OUTPUT_OPTIONS_BASE( wxWindow* parent
this->Centre( wxBOTH );
// Connect Events
m_buttonOutputPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_JOB_OUTPUT_OPTIONS_BASE::onOutputPathBrowseClicked ), NULL, this );
m_buttonOutputPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_JOBSET_OUTPUT_OPTIONS_BASE::onOutputPathBrowseClicked ), NULL, this );
}
DIALOG_JOB_OUTPUT_OPTIONS_BASE::~DIALOG_JOB_OUTPUT_OPTIONS_BASE()
DIALOG_JOBSET_OUTPUT_OPTIONS_BASE::~DIALOG_JOBSET_OUTPUT_OPTIONS_BASE()
{
// Disconnect Events
m_buttonOutputPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_JOB_OUTPUT_OPTIONS_BASE::onOutputPathBrowseClicked ), NULL, this );
m_buttonOutputPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_JOBSET_OUTPUT_OPTIONS_BASE::onOutputPathBrowseClicked ), NULL, this );
}

View File

@ -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">dialog_job_output_options_base</property>
<property name="file">dialog_jobset_output_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">DIALOG_JOB_OUTPUT_OPTIONS</property>
<property name="name">DIALOG_JOBSET_OUTPUT_OPTIONS</property>
<property name="path">.</property>
<property name="php_disconnect_events">0</property>
<property name="php_disconnect_mode">source_name</property>
@ -48,7 +48,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">DIALOG_JOB_OUTPUT_OPTIONS_BASE</property>
<property name="name">DIALOG_JOBSET_OUTPUT_OPTIONS_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>

View File

@ -33,9 +33,9 @@ class STD_BITMAP_BUTTON;
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_JOB_OUTPUT_OPTIONS_BASE
/// Class DIALOG_JOBSET_OUTPUT_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_JOB_OUTPUT_OPTIONS_BASE : public DIALOG_SHIM
class DIALOG_JOBSET_OUTPUT_OPTIONS_BASE : public DIALOG_SHIM
{
private:
@ -59,9 +59,9 @@ class DIALOG_JOB_OUTPUT_OPTIONS_BASE : public DIALOG_SHIM
public:
DIALOG_JOB_OUTPUT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s Output Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DIALOG_JOBSET_OUTPUT_OPTIONS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s Output Options"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_JOB_OUTPUT_OPTIONS_BASE();
~DIALOG_JOBSET_OUTPUT_OPTIONS_BASE();
};

View File

@ -18,8 +18,8 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "panel_jobs.h"
#include "dialog_job_output_options.h"
#include "panel_jobset.h"
#include "dialog_jobset_output_options.h"
#include "dialog_copyfiles_job_settings.h"
#include <wx/aui/auibook.h>
#include <jobs/jobset.h>
@ -129,12 +129,12 @@ private:
};
class PANEL_JOB_OUTPUT : public PANEL_JOB_OUTPUT_BASE
class PANEL_JOBSET_OUTPUT : public PANEL_JOBSET_OUTPUT_BASE
{
public:
PANEL_JOB_OUTPUT( wxWindow* aParent, PANEL_JOBS* aPanelParent, KICAD_MANAGER_FRAME* aFrame,
JOBSET* aFile, JOBSET_OUTPUT* aOutput ) :
PANEL_JOB_OUTPUT_BASE( aParent ),
PANEL_JOBSET_OUTPUT( wxWindow* aParent, PANEL_JOBSET* aPanelParent, KICAD_MANAGER_FRAME* aFrame,
JOBSET* aFile, JOBSET_OUTPUT* aOutput ) :
PANEL_JOBSET_OUTPUT_BASE( aParent ),
m_jobsFile( aFile ),
m_outputId( aOutput->m_id ),
m_frame( aFrame ),
@ -151,7 +151,7 @@ public:
SetWindowStyleFlag( style );
#endif // _WIN32
Connect( wxEVT_MENU, wxCommandEventHandler( PANEL_JOB_OUTPUT::onMenu ), nullptr, this );
Connect( wxEVT_MENU, wxCommandEventHandler( PANEL_JOBSET_OUTPUT::onMenu ), nullptr, this );
if( JobsetOutputTypeInfos.contains( aOutput->m_type ) )
{
@ -164,9 +164,9 @@ public:
}
~PANEL_JOB_OUTPUT()
~PANEL_JOBSET_OUTPUT()
{
Disconnect( wxEVT_MENU, wxCommandEventHandler( PANEL_JOB_OUTPUT::onMenu ), nullptr, this );
Disconnect( wxEVT_MENU, wxCommandEventHandler( PANEL_JOBSET_OUTPUT::onMenu ), nullptr, this );
}
void UpdateStatus()
@ -256,7 +256,7 @@ public:
JOBSET_OUTPUT* output = GetOutput();
wxCHECK( output, /*void*/ );
DIALOG_JOB_OUTPUT_OPTIONS dialog( m_frame, m_jobsFile, output );
DIALOG_JOBSET_OUTPUT_OPTIONS dialog( m_frame, m_jobsFile, output );
if( dialog.ShowModal() == wxID_OK )
{
@ -317,11 +317,11 @@ private:
JOBSET* m_jobsFile;
wxString m_outputId;
KICAD_MANAGER_FRAME* m_frame;
PANEL_JOBS* m_panelParent;
PANEL_JOBSET* m_panelParent;
};
JOBS_GRID_TRICKS::JOBS_GRID_TRICKS( PANEL_JOBS* aParent, WX_GRID* aGrid ) :
JOBS_GRID_TRICKS::JOBS_GRID_TRICKS( PANEL_JOBSET* aParent, WX_GRID* aGrid ) :
GRID_TRICKS( aGrid ),
m_parent( aParent )
{
@ -414,12 +414,12 @@ bool JOBS_GRID_TRICKS::handleDoubleClick( wxGridEvent& aEvent )
}
PANEL_JOBS::PANEL_JOBS( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
std::unique_ptr<JOBSET> aJobsFile ) :
PANEL_JOBS_BASE( aParent ),
m_parentBook( aParent ),
m_frame( aFrame ),
m_jobsFile( std::move( aJobsFile ) )
PANEL_JOBSET::PANEL_JOBSET( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
std::unique_ptr<JOBSET> aJobsFile ) :
PANEL_JOBSET_BASE( aParent ),
m_parentBook( aParent ),
m_frame( aFrame ),
m_jobsFile( std::move( aJobsFile ) )
{
m_jobsGrid->PushEventHandler( new JOBS_GRID_TRICKS( this, m_jobsGrid ) );
@ -444,14 +444,14 @@ PANEL_JOBS::PANEL_JOBS( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
}
PANEL_JOBS::~PANEL_JOBS()
PANEL_JOBSET::~PANEL_JOBSET()
{
// Delete the GRID_TRICKS.
m_jobsGrid->PopEventHandler( true );
}
void PANEL_JOBS::RemoveOutput( PANEL_JOB_OUTPUT* aPanel )
void PANEL_JOBSET::RemoveOutput( PANEL_JOBSET_OUTPUT* aPanel )
{
JOBSET_OUTPUT* output = aPanel->GetOutput();
@ -468,7 +468,7 @@ void PANEL_JOBS::RemoveOutput( PANEL_JOB_OUTPUT* aPanel )
}
void PANEL_JOBS::rebuildJobList()
void PANEL_JOBSET::rebuildJobList()
{
if( m_jobsGrid->GetNumberRows() )
m_jobsGrid->DeleteRows( 0, m_jobsGrid->GetNumberRows() );
@ -490,12 +490,12 @@ void PANEL_JOBS::rebuildJobList()
UpdateTitle();
// Ensure the outputs get their Run-ability status updated
for( PANEL_JOB_OUTPUT* panel : GetOutputPanels() )
for( PANEL_JOBSET_OUTPUT* panel : GetOutputPanels() )
panel->UpdateStatus();
}
void PANEL_JOBS::UpdateTitle()
void PANEL_JOBSET::UpdateTitle()
{
wxString tabName = m_jobsFile->GetFullName();
@ -507,10 +507,10 @@ void PANEL_JOBS::UpdateTitle()
}
void PANEL_JOBS::addJobOutputPanel( JOBSET_OUTPUT* aOutput )
void PANEL_JOBSET::addJobOutputPanel( JOBSET_OUTPUT* aOutput )
{
PANEL_JOB_OUTPUT* outputPanel = new PANEL_JOB_OUTPUT( m_outputList, this, m_frame,
m_jobsFile.get(), aOutput );
PANEL_JOBSET_OUTPUT* outputPanel = new PANEL_JOBSET_OUTPUT( m_outputList, this, m_frame,
m_jobsFile.get(), aOutput );
#if __OSX__
m_outputListSizer->Add( outputPanel, 0, wxEXPAND, 5 );
@ -522,13 +522,13 @@ void PANEL_JOBS::addJobOutputPanel( JOBSET_OUTPUT* aOutput )
}
std::vector<PANEL_JOB_OUTPUT*> PANEL_JOBS::GetOutputPanels()
std::vector<PANEL_JOBSET_OUTPUT*> PANEL_JOBSET::GetOutputPanels()
{
std::vector<PANEL_JOB_OUTPUT*> panels;
std::vector<PANEL_JOBSET_OUTPUT*> panels;
for( const wxSizerItem* item : m_outputListSizer->GetChildren() )
{
if( PANEL_JOB_OUTPUT* panel = dynamic_cast<PANEL_JOB_OUTPUT*>( item->GetWindow() ) )
if( PANEL_JOBSET_OUTPUT* panel = dynamic_cast<PANEL_JOBSET_OUTPUT*>( item->GetWindow() ) )
panels.push_back( panel );
}
@ -536,7 +536,7 @@ std::vector<PANEL_JOB_OUTPUT*> PANEL_JOBS::GetOutputPanels()
}
void PANEL_JOBS::buildOutputList()
void PANEL_JOBSET::buildOutputList()
{
Freeze();
@ -549,7 +549,7 @@ void PANEL_JOBS::buildOutputList()
}
bool PANEL_JOBS::OpenJobOptionsForListItem( size_t aItemIndex )
bool PANEL_JOBSET::OpenJobOptionsForListItem( size_t aItemIndex )
{
JOBSET_JOB& job = m_jobsFile->GetJobs()[aItemIndex];
@ -601,7 +601,7 @@ bool PANEL_JOBS::OpenJobOptionsForListItem( size_t aItemIndex )
}
void PANEL_JOBS::OnGridCellChange( wxGridEvent& aEvent )
void PANEL_JOBSET::OnGridCellChange( wxGridEvent& aEvent )
{
int row = aEvent.GetRow();
int col = aEvent.GetCol();
@ -611,7 +611,7 @@ void PANEL_JOBS::OnGridCellChange( wxGridEvent& aEvent )
}
void PANEL_JOBS::OnSaveButtonClick( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnSaveButtonClick( wxCommandEvent& aEvent )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -621,7 +621,7 @@ void PANEL_JOBS::OnSaveButtonClick( wxCommandEvent& aEvent )
}
void PANEL_JOBS::OnAddJobClick( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnAddJobClick( wxCommandEvent& aEvent )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -685,7 +685,7 @@ void PANEL_JOBS::OnAddJobClick( wxCommandEvent& aEvent )
}
void PANEL_JOBS::OnJobButtonDelete( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnJobButtonDelete( wxCommandEvent& aEvent )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -716,7 +716,7 @@ void PANEL_JOBS::OnJobButtonDelete( wxCommandEvent& aEvent )
}
void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnAddOutputClick( wxCommandEvent& aEvent )
{
wxArrayString headers;
std::vector<wxArrayString> items;
@ -744,7 +744,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
{
JOBSET_OUTPUT* output = m_jobsFile->AddNewJobOutput( jobType.first );
DIALOG_JOB_OUTPUT_OPTIONS dialog( m_frame, m_jobsFile.get(), output );
DIALOG_JOBSET_OUTPUT_OPTIONS dialog( m_frame, m_jobsFile.get(), output );
if (dialog.ShowModal() == wxID_OK)
{
Freeze();
@ -763,7 +763,7 @@ void PANEL_JOBS::OnAddOutputClick( wxCommandEvent& aEvent )
}
bool PANEL_JOBS::GetCanClose()
bool PANEL_JOBSET::GetCanClose()
{
if( m_jobsFile->GetDirty() )
{
@ -784,7 +784,7 @@ bool PANEL_JOBS::GetCanClose()
}
void PANEL_JOBS::EnsurePcbSchFramesOpen()
void PANEL_JOBSET::EnsurePcbSchFramesOpen()
{
PROJECT& project = m_frame->Kiway().Prj();
KIWAY_PLAYER* frame = m_frame->Kiway().Player( FRAME_PCB_EDITOR, false );
@ -836,13 +836,13 @@ void PANEL_JOBS::EnsurePcbSchFramesOpen()
}
wxString PANEL_JOBS::GetFilePath() const
wxString PANEL_JOBSET::GetFilePath() const
{
return m_jobsFile->GetFullFilename();
}
void PANEL_JOBS::OnJobButtonUp( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnJobButtonUp( wxCommandEvent& aEvent )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -865,7 +865,7 @@ void PANEL_JOBS::OnJobButtonUp( wxCommandEvent& aEvent )
}
void PANEL_JOBS::OnJobButtonDown( wxCommandEvent& aEvent )
void PANEL_JOBSET::OnJobButtonDown( wxCommandEvent& aEvent )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -888,7 +888,7 @@ void PANEL_JOBS::OnJobButtonDown( wxCommandEvent& aEvent )
}
void PANEL_JOBS::OnRunAllJobsClick( wxCommandEvent& event )
void PANEL_JOBSET::OnRunAllJobsClick( wxCommandEvent& event )
{
if( !m_jobsGrid->CommitPendingChanges() )
return;
@ -916,7 +916,7 @@ void PANEL_JOBS::OnRunAllJobsClick( wxCommandEvent& event )
jobRunner.RunJobsAllOutputs();
for( PANEL_JOB_OUTPUT* panel : GetOutputPanels() )
for( PANEL_JOBSET_OUTPUT* panel : GetOutputPanels() )
panel->UpdateStatus();
delete progressReporter;
@ -927,7 +927,7 @@ void PANEL_JOBS::OnRunAllJobsClick( wxCommandEvent& event )
}
void PANEL_JOBS::OnSizeGrid( wxSizeEvent& aEvent )
void PANEL_JOBSET::OnSizeGrid( wxSizeEvent& aEvent )
{
m_jobsGrid->SetColSize( 1, m_jobsGrid->GetSize().x - m_jobsGrid->GetColSize( 0 ) );

View File

@ -20,15 +20,15 @@
#pragma once
#include "panel_jobs_base.h"
#include "panel_jobset_base.h"
#include <memory>
#include <grid_tricks.h>
class wxAuiNotebook;
class JOBSET;
class KICAD_MANAGER_FRAME;
class PANEL_JOBS;
class PANEL_JOB_OUTPUT;
class PANEL_JOBSET;
class PANEL_JOBSET_OUTPUT;
struct JOBSET_OUTPUT;
class JOBS_GRID_TRICKS : public GRID_TRICKS
@ -40,7 +40,7 @@ class JOBS_GRID_TRICKS : public GRID_TRICKS
};
public:
explicit JOBS_GRID_TRICKS( PANEL_JOBS* aParent, WX_GRID* aGrid );
explicit JOBS_GRID_TRICKS( PANEL_JOBSET* aParent, WX_GRID* aGrid );
~JOBS_GRID_TRICKS() override = default;
@ -51,20 +51,20 @@ protected:
bool handleDoubleClick( wxGridEvent& aEvent ) override;
protected:
PANEL_JOBS* m_parent;
int m_doubleClickRow;
PANEL_JOBSET* m_parent;
int m_doubleClickRow;
};
class PANEL_JOBS : public PANEL_JOBS_BASE
class PANEL_JOBSET : public PANEL_JOBSET_BASE
{
public:
PANEL_JOBS( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
std::unique_ptr<JOBSET> aJobsFile );
PANEL_JOBSET( wxAuiNotebook* aParent, KICAD_MANAGER_FRAME* aFrame,
std::unique_ptr<JOBSET> aJobsFile );
~PANEL_JOBS();
~PANEL_JOBSET();
void RemoveOutput( PANEL_JOB_OUTPUT* aPanel );
void RemoveOutput( PANEL_JOBSET_OUTPUT* aPanel );
void EnsurePcbSchFramesOpen();
@ -76,7 +76,7 @@ public:
bool OpenJobOptionsForListItem( size_t aItemIndex );
void OnJobButtonDelete( wxCommandEvent& aEvent ) override;
std::vector<PANEL_JOB_OUTPUT*> GetOutputPanels();
std::vector<PANEL_JOBSET_OUTPUT*> GetOutputPanels();
protected:
virtual void OnSizeGrid( wxSizeEvent& aEvent ) override;

View File

@ -8,11 +8,11 @@
#include "widgets/std_bitmap_button.h"
#include "widgets/wx_grid.h"
#include "panel_jobs_base.h"
#include "panel_jobset_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_JOBS_BASE::PANEL_JOBS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : PANEL_NOTEBOOK_BASE( parent, id, pos, size, style, name )
PANEL_JOBSET_BASE::PANEL_JOBSET_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : PANEL_NOTEBOOK_BASE( parent, id, pos, size, style, name )
{
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
@ -129,33 +129,33 @@ PANEL_JOBS_BASE::PANEL_JOBS_BASE( wxWindow* parent, wxWindowID id, const wxPoint
this->Layout();
// Connect Events
m_jobsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBS_BASE::OnGridCellChange ), NULL, this );
m_jobsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBS_BASE::OnSizeGrid ), NULL, this );
m_buttonAddJob->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnAddJobClick ), NULL, this );
m_buttonUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonUp ), NULL, this );
m_buttonDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonDown ), NULL, this );
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonDelete ), NULL, this );
m_buttonOutputAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnAddOutputClick ), NULL, this );
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnSaveButtonClick ), NULL, this );
m_buttonRunAllOutputs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnRunAllJobsClick ), NULL, this );
m_jobsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBSET_BASE::OnGridCellChange ), NULL, this );
m_jobsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBSET_BASE::OnSizeGrid ), NULL, this );
m_buttonAddJob->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddJobClick ), NULL, this );
m_buttonUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonUp ), NULL, this );
m_buttonDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDown ), NULL, this );
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDelete ), NULL, this );
m_buttonOutputAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddOutputClick ), NULL, this );
m_buttonSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnSaveButtonClick ), NULL, this );
m_buttonRunAllOutputs->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnRunAllJobsClick ), NULL, this );
}
PANEL_JOBS_BASE::~PANEL_JOBS_BASE()
PANEL_JOBSET_BASE::~PANEL_JOBSET_BASE()
{
// Disconnect Events
m_jobsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBS_BASE::OnGridCellChange ), NULL, this );
m_jobsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBS_BASE::OnSizeGrid ), NULL, this );
m_buttonAddJob->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnAddJobClick ), NULL, this );
m_buttonUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonUp ), NULL, this );
m_buttonDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonDown ), NULL, this );
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnJobButtonDelete ), NULL, this );
m_buttonOutputAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnAddOutputClick ), NULL, this );
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnSaveButtonClick ), NULL, this );
m_buttonRunAllOutputs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBS_BASE::OnRunAllJobsClick ), NULL, this );
m_jobsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_JOBSET_BASE::OnGridCellChange ), NULL, this );
m_jobsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_JOBSET_BASE::OnSizeGrid ), NULL, this );
m_buttonAddJob->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddJobClick ), NULL, this );
m_buttonUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonUp ), NULL, this );
m_buttonDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDown ), NULL, this );
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnJobButtonDelete ), NULL, this );
m_buttonOutputAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnAddOutputClick ), NULL, this );
m_buttonSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnSaveButtonClick ), NULL, this );
m_buttonRunAllOutputs->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_BASE::OnRunAllJobsClick ), NULL, this );
}
PANEL_JOB_OUTPUT_BASE::PANEL_JOB_OUTPUT_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
PANEL_JOBSET_OUTPUT_BASE::PANEL_JOBSET_OUTPUT_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
{
this->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_3DLIGHT ) );
@ -207,21 +207,21 @@ PANEL_JOB_OUTPUT_BASE::PANEL_JOB_OUTPUT_BASE( wxWindow* parent, wxWindowID id, c
bSizerMain->Fit( this );
// Connect Events
this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOB_OUTPUT_BASE::OnRightDown ) );
m_statusBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOB_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
m_buttonProperties->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnProperties ), NULL, this );
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnDelete ), NULL, this );
m_buttonGenerate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnGenerate ), NULL, this );
this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnRightDown ) );
m_statusBitmap->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
m_buttonProperties->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnProperties ), NULL, this );
m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnDelete ), NULL, this );
m_buttonGenerate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnGenerate ), NULL, this );
}
PANEL_JOB_OUTPUT_BASE::~PANEL_JOB_OUTPUT_BASE()
PANEL_JOBSET_OUTPUT_BASE::~PANEL_JOBSET_OUTPUT_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOB_OUTPUT_BASE::OnRightDown ) );
m_statusBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOB_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
m_buttonProperties->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnProperties ), NULL, this );
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnDelete ), NULL, this );
m_buttonGenerate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOB_OUTPUT_BASE::OnGenerate ), NULL, this );
this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnRightDown ) );
m_statusBitmap->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnLastStatusClick ), NULL, this );
m_buttonProperties->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnProperties ), NULL, this );
m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnDelete ), NULL, this );
m_buttonGenerate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_JOBSET_OUTPUT_BASE::OnGenerate ), NULL, this );
}

View File

@ -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">panel_jobs_base</property>
<property name="file">panel_jobset_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">PANEL_JOBS_BASE</property>
<property name="name">PANEL_JOBSET_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">PANEL_JOBS_BASE</property>
<property name="name">PANEL_JOBSET_BASE</property>
<property name="pos"></property>
<property name="size">600,400</property>
<property name="subclass">PANEL_NOTEBOOK_BASE; dialogs/panel_notebook_base.h; forward_declare</property>
@ -871,7 +871,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">PANEL_JOB_OUTPUT_BASE</property>
<property name="name">PANEL_JOBSET_OUTPUT_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
<property name="subclass">; ; forward_declare</property>

View File

@ -39,9 +39,9 @@ class WX_GRID;
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_JOBS_BASE
/// Class PANEL_JOBSET_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_JOBS_BASE : public PANEL_NOTEBOOK_BASE
class PANEL_JOBSET_BASE : public PANEL_NOTEBOOK_BASE
{
private:
@ -71,16 +71,16 @@ class PANEL_JOBS_BASE : public PANEL_NOTEBOOK_BASE
public:
PANEL_JOBS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_JOBSET_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_JOBS_BASE();
~PANEL_JOBSET_BASE();
};
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_JOB_OUTPUT_BASE
/// Class PANEL_JOBSET_OUTPUT_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_JOB_OUTPUT_BASE : public wxPanel
class PANEL_JOBSET_OUTPUT_BASE : public wxPanel
{
private:
@ -102,9 +102,9 @@ class PANEL_JOB_OUTPUT_BASE : public wxPanel
public:
PANEL_JOB_OUTPUT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxBORDER_SUNKEN|wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
PANEL_JOBSET_OUTPUT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxBORDER_SUNKEN|wxTAB_TRAVERSAL, const wxString& name = wxEmptyString );
~PANEL_JOB_OUTPUT_BASE();
~PANEL_JOBSET_OUTPUT_BASE();
};

View File

@ -36,7 +36,7 @@
#include <confirm.h>
#include <dialogs/panel_kicad_launcher.h>
#include <dialogs/dialog_update_check_prompt.h>
#include <dialogs/panel_jobs.h>
#include <dialogs/panel_jobset.h>
#include <eda_base_frame.h>
#include <executable_names.h>
#include <file_history.h>
@ -698,7 +698,7 @@ void KICAD_MANAGER_FRAME::SaveOpenJobSetsToLocalSettings( bool aIsExplicitUserSa
for( size_t i = 0; i < m_notebook->GetPageCount(); i++ )
{
if( PANEL_JOBS* jobset = dynamic_cast<PANEL_JOBS*>( m_notebook->GetPage( i ) ) )
if( PANEL_JOBSET* jobset = dynamic_cast<PANEL_JOBSET*>( m_notebook->GetPage( i ) ) )
{
wxFileName jobsetFn( jobset->GetFilePath() );
jobsetFn.MakeRelativeTo( Prj().GetProjectPath() );
@ -767,7 +767,7 @@ void KICAD_MANAGER_FRAME::OpenJobsFile( const wxFileName& aFileName, bool aCreat
{
for( size_t i = 0; i < m_notebook->GetPageCount(); i++ )
{
if( PANEL_JOBS* panel = dynamic_cast<PANEL_JOBS*>( m_notebook->GetPage( i ) ) )
if( PANEL_JOBSET* panel = dynamic_cast<PANEL_JOBSET*>( m_notebook->GetPage( i ) ) )
{
if( aFileName.GetFullPath() == panel->GetFilePath() )
{
@ -784,7 +784,7 @@ void KICAD_MANAGER_FRAME::OpenJobsFile( const wxFileName& aFileName, bool aCreat
jobsFile->LoadFromFile();
PANEL_JOBS* jobPanel = new PANEL_JOBS( m_notebook, this, std::move( jobsFile ) );
PANEL_JOBSET* jobPanel = new PANEL_JOBSET( m_notebook, this, std::move( jobsFile ) );
jobPanel->SetProjectTied( true );
jobPanel->SetClosable( true );
m_notebook->AddPage( jobPanel, aFileName.GetFullName(), true );