37 wxXmlResource::Get()->LoadDialog(
this, parent, wxT(
"reset_dialog"));
40 wxIconBundle myIcons(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.ico"),wxBITMAP_TYPE_ICO);
43 wxIcon myIcon(
huginApp::Get()->GetXRCPath() + wxT(
"data/hugin.png"),wxBITMAP_TYPE_PNG);
48 wxConfigBase * cfg = wxConfigBase::Get();
50 cfg->Read(wxT(
"/ResetDialog/ResetPosition"),&check,
true);
51 XRCCTRL(*
this,
"reset_pos",wxCheckBox)->SetValue(check);
52 cfg->Read(wxT(
"/ResetDialog/ResetTranslation"), &check,
true);
53 wxCheckBox* reset_translation=XRCCTRL(*
this,
"reset_translation",wxCheckBox);
54 reset_translation->SetValue(check);
57 reset_translation->Hide();
59 cfg->Read(wxT(
"/ResetDialog/ResetFOV"),&check,
true);
60 XRCCTRL(*
this,
"reset_fov",wxCheckBox)->SetValue(check);
61 cfg->Read(wxT(
"/ResetDialog/ResetLens"),&check,
true);
62 XRCCTRL(*
this,
"reset_lens",wxCheckBox)->SetValue(check);
63 cfg->Read(wxT(
"/ResetDialog/ResetExposure"),&check,
true);
64 wxCheckBox* checkbox = XRCCTRL(*
this,
"reset_exposure", wxCheckBox);
65 checkbox->SetValue(check);
68 cfg->Read(wxT(
"/ResetDialog/ResetExposureParam"),&exp_param,0);
69 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Select(exp_param);
72 cfg->Read(wxT(
"/ResetDialog/ResetColor"),&check,
true);
73 checkbox = XRCCTRL(*
this,
"reset_color", wxCheckBox);
74 checkbox->SetValue(check);
76 cfg->Read(wxT(
"/ResetDialog/ResetColorParam"),&exp_param,0);
78 XRCCTRL(*
this,
"combo_color",wxComboBox)->Select(exp_param);
79 cfg->Read(wxT(
"/ResetDialog/ResetVignetting"),&check,
true);
80 XRCCTRL(*
this,
"reset_vignetting",wxCheckBox)->SetValue(check);
81 cfg->Read(wxT(
"/ResetDialog/ResetResponse"),&check,
true);
82 XRCCTRL(*
this,
"reset_response",wxCheckBox)->SetValue(check);
83 GetSizer()->Fit(
this);
85 int x = cfg->Read(wxT(
"/ResetDialog/positionX"),-1l);
86 int y = cfg->Read(wxT(
"/ResetDialog/positionY"),-1l);
87 if ( y >= 0 && x >= 0)
100 XRCCTRL(*
this,
"reset_exposure",wxCheckBox)->Show(
false);
101 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Show(
false);
102 XRCCTRL(*
this,
"reset_color",wxCheckBox)->Show(
false);
103 XRCCTRL(*
this,
"combo_color",wxComboBox)->Show(
false);
104 XRCCTRL(*
this,
"reset_vignetting",wxCheckBox)->Show(
false);
105 XRCCTRL(*
this,
"reset_response",wxCheckBox)->Show(
false);
106 GetSizer()->Fit(
this);
111 XRCCTRL(*
this,
"reset_pos",wxCheckBox)->Show(
false);
112 XRCCTRL(*
this,
"reset_translation",wxCheckBox)->Show(
false);
113 XRCCTRL(*
this,
"reset_fov",wxCheckBox)->Show(
false);
114 XRCCTRL(*
this,
"reset_lens",wxCheckBox)->Show(
false);
115 GetSizer()->Fit(
this);
120 wxConfigBase * cfg = wxConfigBase::Get();
121 wxPoint ps = this->GetPosition();
122 cfg->Write(wxT(
"/ResetDialog/positionX"), ps.x);
123 cfg->Write(wxT(
"/ResetDialog/positionY"), ps.y);
124 cfg->Write(wxT(
"/ResetDialog/ResetPosition"),
GetResetPos());
126 cfg->Write(wxT(
"/ResetDialog/ResetFOV"),
GetResetFOV());
127 cfg->Write(wxT(
"/ResetDialog/ResetLens"),
GetResetLens());
130 exp_param=XRCCTRL(*
this,
"combo_exposure",wxComboBox)->GetSelection();
131 cfg->Write(wxT(
"/ResetDialog/ResetExposureParam"),exp_param);
133 exp_param=XRCCTRL(*
this,
"combo_color",wxComboBox)->GetSelection();
134 cfg->Write(wxT(
"/ResetDialog/ResetColorParam"), exp_param);
143 XRCCTRL(*
this,
"combo_exposure",wxComboBox)->Enable(XRCCTRL(*
this,
"reset_exposure", wxCheckBox)->GetValue());
148 XRCCTRL(*
this,
"combo_color",wxComboBox)->Enable(XRCCTRL(*
this,
"reset_color", wxCheckBox)->GetValue());
153 return XRCCTRL(*
this,
"reset_pos", wxCheckBox)->GetValue();
158 return XRCCTRL(*
this,
"reset_translation", wxCheckBox)->GetValue();
163 return XRCCTRL(*
this,
"reset_fov", wxCheckBox)->GetValue();
168 return XRCCTRL(*
this,
"reset_lens", wxCheckBox)->GetValue();
173 return XRCCTRL(*
this,
"reset_exposure", wxCheckBox)->GetValue();
180 return XRCCTRL(*
this,
"combo_exposure", wxComboBox)->GetSelection()==0;
185 return XRCCTRL(*
this,
"reset_color", wxCheckBox)->GetValue();
192 return XRCCTRL(*
this,
"combo_color", wxComboBox)->GetSelection()==0;
197 return XRCCTRL(*
this,
"reset_vignetting", wxCheckBox)->GetValue();
202 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.
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".
ResetDialog(wxWindow *parent, GuiLevel guiLevel)
Constructor, read from xrc ressource; restore last uses settings, size and position.
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".