35 EVT_CHECKBOX(XRCID("reset_exposure"),
ResetDialog::OnSelectExposure)
36 EVT_CHECKBOX(XRCID("reset_color"),
ResetDialog::OnSelectColor)
43 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"reset_dialog"));
46 wxIconBundle myIcons(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.ico"),wxBITMAP_TYPE_ICO);
49 wxIcon myIcon(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.png"),wxBITMAP_TYPE_PNG);
54 wxConfigBase * cfg = wxConfigBase::Get();
56 cfg->Read(wxT(
"/ResetDialog/ResetPosition"),&check,
true);
57 XRCCTRL(*
this,
"reset_pos",wxCheckBox)->SetValue(check);
58 cfg->Read(wxT(
"/ResetDialog/ResetTranslation"), &check,
true);
59 wxCheckBox* reset_translation=XRCCTRL(*
this,
"reset_translation",wxCheckBox);
60 reset_translation->SetValue(check);
63 reset_translation->Hide();
65 cfg->Read(wxT(
"/ResetDialog/ResetFOV"),&check,
true);
66 XRCCTRL(*
this,
"reset_fov",wxCheckBox)->SetValue(check);
67 cfg->Read(wxT(
"/ResetDialog/ResetLens"),&check,
true);
68 XRCCTRL(*
this,
"reset_lens",wxCheckBox)->SetValue(check);
69 cfg->Read(wxT(
"/ResetDialog/ResetExposure"),&check,
true);
70 XRCCTRL(*
this,
"reset_exposure",wxCheckBox)->SetValue(check);
72 cfg->Read(wxT(
"/ResetDialog/ResetExposureParam"),&exp_param,0);
73 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Select(exp_param);
75 OnSelectExposure(dummy);
76 cfg->Read(wxT(
"/ResetDialog/ResetColor"),&check,
true);
77 XRCCTRL(*
this,
"reset_color",wxCheckBox)->SetValue(check);
78 cfg->Read(wxT(
"/ResetDialog/ResetColorParam"),&exp_param,0);
80 XRCCTRL(*
this,
"combo_color",wxComboBox)->Select(exp_param);
81 cfg->Read(wxT(
"/ResetDialog/ResetVignetting"),&check,
true);
82 XRCCTRL(*
this,
"reset_vignetting",wxCheckBox)->SetValue(check);
83 cfg->Read(wxT(
"/ResetDialog/ResetResponse"),&check,
true);
84 XRCCTRL(*
this,
"reset_response",wxCheckBox)->SetValue(check);
85 GetSizer()->Fit(
this);
87 int x = cfg->Read(wxT(
"/ResetDialog/positionX"),-1l);
88 int y = cfg->Read(wxT(
"/ResetDialog/positionY"),-1l);
89 if ( y >= 0 && x >= 0)
101 XRCCTRL(*
this,
"reset_exposure",wxCheckBox)->Show(
false);
102 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Show(
false);
103 XRCCTRL(*
this,
"reset_color",wxCheckBox)->Show(
false);
104 XRCCTRL(*
this,
"combo_color",wxComboBox)->Show(
false);
105 XRCCTRL(*
this,
"reset_vignetting",wxCheckBox)->Show(
false);
106 XRCCTRL(*
this,
"reset_response",wxCheckBox)->Show(
false);
107 GetSizer()->Fit(
this);
112 XRCCTRL(*
this,
"reset_pos",wxCheckBox)->Show(
false);
113 XRCCTRL(*
this,
"reset_translation",wxCheckBox)->Show(
false);
114 XRCCTRL(*
this,
"reset_fov",wxCheckBox)->Show(
false);
115 XRCCTRL(*
this,
"reset_lens",wxCheckBox)->Show(
false);
116 GetSizer()->Fit(
this);
121 wxConfigBase * cfg = wxConfigBase::Get();
122 wxPoint ps = this->GetPosition();
123 cfg->Write(wxT(
"/ResetDialog/positionX"), ps.x);
124 cfg->Write(wxT(
"/ResetDialog/positionY"), ps.y);
125 cfg->Write(wxT(
"/ResetDialog/ResetPosition"),
GetResetPos());
127 cfg->Write(wxT(
"/ResetDialog/ResetFOV"),
GetResetFOV());
128 cfg->Write(wxT(
"/ResetDialog/ResetLens"),
GetResetLens());
131 exp_param=XRCCTRL(*
this,
"combo_exposure",wxComboBox)->GetSelection();
132 cfg->Write(wxT(
"/ResetDialog/ResetExposureParam"),exp_param);
134 exp_param=XRCCTRL(*
this,
"combo_color",wxComboBox)->GetSelection();
135 cfg->Write(wxT(
"/ResetDialog/ResetColorParam"), exp_param);
144 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Enable(XRCCTRL(*
this,
"reset_exposure", wxCheckBox)->GetValue());
149 XRCCTRL(*
this,
"combo_color",wxComboBox)->Enable(XRCCTRL(*
this,
"reset_color", wxCheckBox)->GetValue());
154 return XRCCTRL(*
this,
"reset_pos", wxCheckBox)->GetValue();
159 return XRCCTRL(*
this,
"reset_translation", wxCheckBox)->GetValue();
164 return XRCCTRL(*
this,
"reset_fov", wxCheckBox)->GetValue();
169 return XRCCTRL(*
this,
"reset_lens", wxCheckBox)->GetValue();
174 return XRCCTRL(*
this,
"reset_exposure", wxCheckBox)->GetValue();
181 return XRCCTRL(*
this,
"combo_exposure", wxComboBox)->GetSelection()==0;
186 return XRCCTRL(*
this,
"reset_color", wxCheckBox)->GetValue();
193 return XRCCTRL(*
this,
"combo_color", wxComboBox)->GetSelection()==0;
198 return XRCCTRL(*
this,
"reset_vignetting", wxCheckBox)->GetValue();
203 return XRCCTRL(*
this,
"reset_response", wxCheckBox)->GetValue();
bool GetResetLens()
Return TRUE, when user selected "Reset lens".
void OnOk(wxCommandEvent &e)
Saves current state of all checkboxes when closing dialog with Ok.
Dialog for reset panorama settings.
bool GetResetExposure()
Return TRUE, when user selected "Reset exposure".
void LimitToPhotometric()
limits the displayed parameters to photometric parameters
include file for the hugin project
bool GetResetFOV()
Return TRUE, when user selected "Reset FOV".
Definition of ResetDialog class.
bool GetResetExposureToExif()
Return TRUE, when user selected "Reset exposure to EXIF", Return FALSE, when user selected "Reset exp...
static huginApp * Get()
hack.. kind of a pseudo singleton...
bool GetResetColor()
Return TRUE, when user selected "Reset color".
bool GetResetVignetting()
Return TRUE, when user selected "Reset vignetting".
void LimitToGeometric()
limits the displayed parameters to geometric parameters
bool GetResetColorToExif()
Return TRUE, when user selected "Reset color to EXIF", Return FALSE, when user selected "Reset color ...
void OnSelectColor(wxCommandEvent &e)
Method for enabling/disable combobox to select reset color to EXIF or ONE depending on state of "Rese...
bool GetResetTranslation()
Return TRUE, when user selected "Reset translation".
bool GetResetResponse()
Return TRUE, when user selected "Reset Camera Response".
void OnSelectExposure(wxCommandEvent &e)
Method for enabling/disable combobox to select reset exposure to EXIF or ZERO depending on state of "...
bool GetResetPos()
Return TRUE, when user selected "Reset position".