23#include <wx/aui/auibook.h>
26#include <wx/checkbox.h>
34#include <wx/filedlg.h>
48 m_jobsFile( aJobsFile ),
54 SetTitle( wxString::Format(
_(
"%s Output Options" ),
73 bool isFolder =
false;
74 wxString fileWildcard =
"";
83 wxString currPath = fn.GetFullPath();
85 wxDirDialog dirDialog(
this,
_(
"Select output directory" ), currPath,
88 if( dirDialog.ShowModal() != wxID_OK )
91 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
99 wxFileDialog dlg(
this,
_(
"Select output path" ), fname.GetPath(), fname.GetFullName(),
101 wxFD_OVERWRITE_PROMPT | wxFD_SAVE );
103 if( dlg.ShowModal() != wxID_OK )
115 if( outputPath.IsEmpty() )
121 wxArrayInt selectedItems;
129 for(
int i : selectedItems )
154 wxArrayString arrayStr;
155 std::vector<int> selectedList;
159 arrayStr.Add( wxString::Format( wxT(
"%d. %s" ),
160 (
int) arrayStr.size() + 1,
161 job.GetDescription() ) );
164 [&](
const wxString& only )
166 if( only == job.m_id )
173 selectedList.emplace_back( arrayStr.size() - 1 );
175 m_onlyMap.emplace( arrayStr.size() - 1, job.m_id );
178 if( arrayStr.size() != 0 )
182 if( selectedList.size() )
184 for(
int idx : selectedList )
189 for(
size_t idx = 0; idx <
m_includeJobs->GetCount(); ++idx )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
Class DIALOG_JOBSET_OUTPUT_OPTIONS_BASE.
wxTextCtrl * m_textCtrlDescription
wxStaticText * m_textArchiveFormat
wxCheckListBox * m_includeJobs
STD_BITMAP_BUTTON * m_buttonOutputPath
wxChoice * m_choiceArchiveformat
wxTextCtrl * m_textCtrlOutputPath
std::map< int, wxString > m_onlyMap
virtual void onOutputPathBrowseClicked(wxCommandEvent &event) override
bool TransferDataFromWindow() override
DIALOG_JOBSET_OUTPUT_OPTIONS(wxWindow *aParent, JOBSET *aJobsFile, JOBSET_OUTPUT *aOutput)
bool TransferDataToWindow() override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
std::vector< JOBSET_JOB > & GetJobs()
void SetFormat(FORMAT format)
virtual wxString GetDefaultDescription() const
wxString GetOutputPath() const
void SetOutputPath(const wxString &aPath)
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
KICOMMON_API std::map< JOBSET_OUTPUT_TYPE, JOBSET_OUTPUT_TYPE_INFO > JobsetOutputTypeInfos
KICOMMON_API std::map< JOBSET_OUTPUT_TYPE, JOBSET_OUTPUT_TYPE_INFO > JobsetOutputTypeInfos
wxString GetDescription() const
std::vector< wxString > m_only
void SetDescription(const wxString &aDescription)
Transient property, not stored for now.
JOBS_OUTPUT_HANDLER * m_outputHandler
JOBSET_OUTPUT_TYPE m_type
Definition of file extensions used in Kicad.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().