MCPcopy Create free account
hub / github.com/GollyGang/ready / TransferDataFromWindow

Method TransferDataFromWindow

src/gui/ImportImageDialog.cpp:144–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142// -----------------------------------------------------------------------------------------------
143
144bool ImportImageDialog::TransferDataFromWindow()
145{
146 const wxString errorCaption = _("Error in dialog");
147 const int errorStyle = wxOK | wxCENTRE | wxICON_ERROR;
148 this->image_filename = this->filename_edit->GetValue();
149 if (this->image_filename.IsEmpty()) {
150 wxMessageBox(_("No filename entered."), errorCaption, errorStyle);
151 return false;
152 }
153 this->iTargetChemical = this->chemical_combo->GetSelection();
154 if (!this->in_low_edit->GetValue().ToDouble(&this->in_low)) {
155 wxMessageBox(_("Cannot convert value to number."), errorCaption, errorStyle);
156 return false;
157 }
158 if (!this->in_high_edit->GetValue().ToDouble(&this->in_high)) {
159 wxMessageBox(_("Cannot convert value to number."), errorCaption, errorStyle);
160 return false;
161 }
162 if (!this->out_low_edit->GetValue().ToDouble(&this->out_low)) {
163 wxMessageBox(_("Cannot convert value to number."), errorCaption, errorStyle);
164 return false;
165 }
166 if (!this->out_high_edit->GetValue().ToDouble(&this->out_high)) {
167 wxMessageBox(_("Cannot convert value to number."), errorCaption, errorStyle);
168 return false;
169 }
170 return true;
171}
172
173// -----------------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

GetValueMethod · 0.45

Tested by

no test coverage detected