23#include <wx/aui/auibook.h>
26#include <wx/checkbox.h>
34#include <wx/filedlg.h>
56 SetTitle( wxString::Format(
_(
"%s Destination" ),
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 );
105 if( dlg.ShowModal() != wxID_OK )
108 wxString
path = dlg.GetPath();
112 wxFileName fn(
path );
114 if( fn.GetExt().IsEmpty() )
117 path = fn.GetFullPath();
129 if( outputPath.IsEmpty() )
135 wxArrayInt selectedItems;
143 for(
int i : selectedItems )
171 wxArrayString arrayStr;
172 std::vector<int> selectedList;
176 arrayStr.Add( wxString::Format( wxT(
"%d. %s" ),
177 (
int) arrayStr.size() + 1,
178 job.GetDescription() ) );
181 [&](
const wxString& only )
183 if( only == job.m_id )
190 selectedList.emplace_back( arrayStr.size() - 1 );
192 m_onlyMap.emplace( arrayStr.size() - 1, job.m_id );
195 if( arrayStr.size() != 0 )
199 if( selectedList.size() )
201 for(
int idx : selectedList )
206 for(
size_t idx = 0; idx <
m_includeJobs->GetCount(); ++idx )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
wxStaticText * m_textArchiveFormat
wxCheckListBox * m_includeJobs
wxChoice * m_choiceArchiveformat
STD_BITMAP_BUTTON * m_buttonOutputPath
wxTextCtrl * m_textCtrlOutputPath
wxTextCtrl * m_textCtrlDescription
DIALOG_DESTINATION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("%s Destination"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
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={})
void SetFormat(FORMAT format)
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
static const std::string ArchiveFileExtension
KICOMMON_API std::map< JOBSET_DESTINATION_T, JOBSET_DESTINATION_T_INFO > JobsetDestinationTypeInfos
Definition of file extensions used in Kicad.
#define FN_NORMALIZE_FLAGS
Default flags to pass to wxFileName::Normalize().