29 #include "wx/msw/wrapwin.h"
34 #include "hugin_config.h"
39 #if defined MAC_SELF_CONTAINED_BUNDLE
42 #include <CoreFoundation/CFBundle.h>
48 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"cpdetector_dialog"));
53 m_edit_desc = XRCCTRL(*
this,
"prefs_cpdetector_desc", wxTextCtrl);
54 m_edit_prog = XRCCTRL(*
this,
"prefs_cpdetector_program", wxTextCtrl);
55 m_edit_args = XRCCTRL(*
this,
"prefs_cpdetector_args", wxTextCtrl);
64 m_check_option = XRCCTRL(*
this,
"prefs_cpdetector_option", wxCheckBox);
66 m_choice_step = XRCCTRL(*
this,
"choicebook_steps", wxChoicebook);
94 wxMessageBox(_(
"Autopano from http://autopano.kolor.com is not available for OS X"),
95 _(
"Using Autopano-Sift instead"),wxOK|wxICON_EXCLAMATION,
this);
100 valid=valid && (
m_edit_desc->GetValue().Trim().Len()>0);
104 valid=valid && (
m_edit_prog->GetValue().Trim().Len()>0);
105 valid=valid && (
m_edit_args->GetValue().Trim().Len()>0);
119 this->EndModal(wxOK);
121 wxMessageBox(_(
"At least one input field is empty.\nPlease check your inputs."),
122 _(
"Warning"),wxOK | wxICON_ERROR,
this);
129 if(cpdet_config->
settings[index].IsTwoStepDetector())
142 if(cpdet_config->
settings[index].IsCleanupPossible())
147 if(cpdet_config->
settings[index].ContainsStacks())
165 if(cpdet_config->
settings[index].IsCleanupPossible())
171 cpdet_config->
settings[index].SetArgsCleanup(wxEmptyString);
181 if(cpdet_config->
settings[index].ContainsStacks())
188 cpdet_config->
settings[index].SetProgStack(wxEmptyString);
189 cpdet_config->
settings[index].SetArgsStack(wxEmptyString);
216 m_check_option->SetLabel(_(
"Try to connect all overlapping images."));
219 XRCCTRL(*
this,
"prefs_cpdetector_no_option",wxStaticText)->Show(
false);
222 m_check_option->SetLabel(_(
"Only work on image pairs without control points."));
225 XRCCTRL(*
this,
"prefs_cpdetector_no_option",wxStaticText)->Show(
false);
228 XRCCTRL(*
this,
"prefs_cpdetector_no_option",wxStaticText)->Show(
true);
246 wxFileName executable(prog);
247 #ifdef MAC_SELF_CONTAINED_BUNDLE
248 wxString autopanoPath = MacGetPathToUserAppSupportAutoPanoFolder();
250 wxFileDialog dlg(
this,_(
"Select control point detector program"),
251 #ifdef MAC_SELF_CONTAINED_BUNDLE
254 executable.GetPath(),
256 executable.GetFullName(),
258 _(
"Executables (*.exe,*.vbs,*.cmd, *.bat)|*.exe;*.vbs;*.cmd;*.bat"),
262 wxFD_OPEN, wxDefaultPosition);
263 if (dlg.ShowModal() == wxID_OK)
void OnSelectPath(wxCommandEvent &e)
select program with file open dialog
void UpdateFields(CPDetectorConfig *cpdet_config, int index)
updates edit fields with values from settings
const bool IsCleanupPossible()
wxTextCtrl * m_edit_args_matcher
CPDetectorDialog(wxWindow *parent)
constructor
wxTextCtrl * m_edit_prog_stack
void OnSelectPathStack(wxCommandEvent &e)
select program for stack with file open dialog
wxChoicebook * m_choice_step
void OnSelectPathMatcher(wxCommandEvent &e)
select program for feature matcher with file open dialog
void OnTypeChange(wxCommandEvent &e)
update dialog, when other cp detector type is changed
wxStaticText * m_label_args_cleanup
void OnStepChanging(wxChoicebookEvent &e)
block selection of two step detector for autopano setting
wxTextCtrl * m_edit_args_stack
ArraySettings settings
array which stores the different autopano settings
virtual ~CPDetectorDialog()
destructor, saves position and size
wxTextCtrl * m_edit_args_cleanup
wxChoice * m_cpdetector_type
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename)
Store window size and position in configfile/registry.
wxTextCtrl * m_edit_args_descriptor
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename)
Restore window size and position from configfile/registry.
bool ShowFileDialog(wxString &prog)
shows file dialog
wxTextCtrl * m_edit_prog_matcher
wxCheckBox * m_check_option
functions for interaction with the hugin configuration file
wxTextCtrl * m_edit_prog_descriptor
void OnSelectPathDescriptor(wxCommandEvent &e)
select program for feature descriptor with file open dialog
class for storing settings of different control point generators
void UpdateSettings(CPDetectorConfig *cpdet_config, int index)
return inputed settings
void OnOk(wxCommandEvent &e)
check inputs
declaration of CPDetectorDialog class, which are for storing and changing settings of different autop...
const bool ContainsStacks()