Form to edit the constant control data.
More...
#include <ConstantForm.h>
Form to edit the constant control data.
- Author
- Thales Lima Oliveira thale.nosp@m.s@uf.nosp@m.u.br
- Date
- 05/10/2017
Definition at line 31 of file ConstantForm.h.
◆ ConstantForm()
| ConstantForm::ConstantForm |
( |
wxWindow * | parent, |
|
|
Constant * | constant ) |
Definition at line 21 of file ConstantForm.cpp.
21 : ConstantFormBase(parent)
22{
23 SetSize(GetBestSize());
24
25 m_parent = parent;
26 m_constant = constant;
27
28 m_textCtrlValue->SetValue(m_constant->StringFromDouble(m_constant->GetValue()));
29}
◆ ~ConstantForm()
| ConstantForm::~ConstantForm |
( |
| ) |
|
|
virtual |
◆ OnCancelButtonClick()
| virtual void ConstantForm::OnCancelButtonClick |
( |
wxCommandEvent & | event | ) |
|
|
inlineprotectedvirtual |
◆ OnOKButtonClick()
| void ConstantForm::OnOKButtonClick |
( |
wxCommandEvent & | event | ) |
|
|
protectedvirtual |
Definition at line 32 of file ConstantForm.cpp.
33{
34 if(ValidateData()) EndModal(wxID_OK);
35}
◆ ValidateData()
| bool ConstantForm::ValidateData |
( |
| ) |
|
|
virtual |
Definition at line 37 of file ConstantForm.cpp.
38{
39 double value;
40 if(!m_constant->DoubleFromString(this, m_textCtrlValue->GetValue(), value,
41 _("Value entered incorrectly in the field \"Constant value\".")))
42 return false;
43
44 m_constant->SetValue(value);
45 return true;
46}
◆ m_constant
| Constant* ConstantForm::m_constant = nullptr |
|
protected |
◆ m_parent
| wxWindow* ConstantForm::m_parent = nullptr |
|
protected |
The documentation for this class was generated from the following files: