23#include <wx/aui/auibook.h>
26#include <wx/checkbox.h>
34#include <wx/filedlg.h>
49 m_jobsFile( aJobsFile ),
50 m_destination( aDestination )
55 SetTitle( wxString::Format(
_(
"%s Destination" ),
74 bool isFolder =
false;
75 wxString fileWildcard =
"";
84 wxString currPath = fn.GetFullPath();
86 wxDirDialog dirDialog(
this,
_(
"Select output directory" ), currPath,
89 if( dirDialog.ShowModal() != wxID_OK )
92 wxFileName dirName = wxFileName::DirName( dirDialog.GetPath() );
100 wxFileDialog dlg(
this,
_(
"Select output path" ), fname.GetPath(), fname.GetFullName(),
102 wxFD_OVERWRITE_PROMPT | wxFD_SAVE );
104 if( dlg.ShowModal() != wxID_OK )
116 if( outputPath.IsEmpty() )
122 wxArrayInt selectedItems;
130 for(
int i : selectedItems )
155 wxArrayString arrayStr;
156 std::vector<int> selectedList;
160 arrayStr.Add( wxString::Format( wxT(
"%d. %s" ),
161 (
int) arrayStr.size() + 1,
162 job.GetDescription() ) );
165 [&](
const wxString& only )
167 if( only == job.m_id )
174 selectedList.emplace_back( arrayStr.size() - 1 );
176 m_onlyMap.emplace( arrayStr.size() - 1, job.m_id );
179 if( arrayStr.size() != 0 )
183 if( selectedList.size() )
185 for(
int idx : selectedList )
190 for(
size_t idx = 0; idx <
m_includeJobs->GetCount(); ++idx )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Class DIALOG_DESTINATION_BASE.
wxStaticText * m_textArchiveFormat
wxCheckListBox * m_includeJobs
wxChoice * m_choiceArchiveformat
STD_BITMAP_BUTTON * m_buttonOutputPath
wxTextCtrl * m_textCtrlOutputPath
wxTextCtrl * m_textCtrlDescription
DIALOG_DESTINATION(wxWindow *aParent, JOBSET *aJobsFile, JOBSET_DESTINATION *aDestination)
std::map< int, wxString > m_onlyMap
bool TransferDataToWindow() override
bool TransferDataFromWindow() override
virtual void onOutputPathBrowseClicked(wxCommandEvent &event) override
JOBSET_DESTINATION * m_destination
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_DESTINATION_T, JOBSET_DESTINATION_T_INFO > JobsetDestinationTypeInfos
KICOMMON_API std::map< JOBSET_DESTINATION_T, JOBSET_DESTINATION_T_INFO > JobsetDestinationTypeInfos
void SetDescription(const wxString &aDescription)
Transient property, not stored for now.
JOBSET_DESTINATION_T m_type
JOBS_OUTPUT_HANDLER * m_outputHandler
std::vector< wxString > m_only
wxString GetDescription() const
Definition of file extensions used in Kicad.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().