29#include <wx/stdpaths.h>
30#include <wx/wfstream.h>
33#if defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
41 wxXmlResource::Get()->LoadDialog(
this,
parent,
"change_user_defined_dialog");
113 const long id = e.GetSelection();
138 if (filename.IsEmpty())
143 if (!wxFileName::FileExists(filename))
145 hugin_utils::HuginMessageBox(wxString::Format(
_(
"The file \"%s\" does not exists.\nPlease provide an existing file to the user defined sequence."), filename),
180 return huginRoot +
"share\\hugin\\data\\";
181#elif defined __WXMAC__ && defined MAC_SELF_CONTAINED_BUNDLE
192#elif defined UNIX_SELF_CONTAINED_BUNDLE
226 if (!files.IsEmpty())
228 for (
auto file : files)
244 help = wxString::Format(
_(
"User defined sequence: %s"), file);
255 wxCommandEvent
dummy;
wxString GetDataPath()
return path to data directory, it depends on operating system
basic classes and function for queuing commands in wxWidgets
void FillStitcherUserDefined()
void FillAssistantUserDefined()
~ChangeUserDefinedSequenceDialog()
destructor, saves size and position
wxRadioButton * m_radio_default
wxChoice * m_choice_user_define
wxRadioButton * m_radio_external
ChangeUserDefinedSequenceDialog(wxWindow *parent, wxString xrcPrefix, wxString userDefinedSequence, bool assistantUserDefined)
Constructor, read from xrc ressource; restore last uses size and position.
wxArrayString m_userFileNames
bool m_isAssistantUserDefined
wxString GetNewSequence()
returns the newly selected sequence
wxRadioButton * m_radio_user_sequence
void OnOk(wxCommandEvent &e)
void OnChangeUserDefinedChoice(wxCommandEvent &e)
wxArrayString m_userHelpTexts
wxButton * m_button_external_file
void OnChooseFilename(wxCommandEvent &e)
void UpdateStatus(wxCommandEvent &e)
wxTextCtrl * m_text_external_file
wxStaticText * m_label_user_define_filename
wxStaticText * m_label_user_define
void FillUserDefinedChoice(const wxArrayString &files)
const wxString GetSettingStringTranslated(wxConfigBase *setting, const wxString &name, const wxString defaultValue)
read a translated string from settings and remove all whitespaces
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
std::string GetUserAppDataDir()
returns the directory for user specific Hugin settings, e.g.
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.