KiCad PCB EDA Suite
|
A text control validator used for validating the text allowed in fields. More...
#include <validators.h>
Public Member Functions | |
FIELD_VALIDATOR (FIELD_T aFieldId, wxString *aValue=nullptr) | |
FIELD_VALIDATOR (const FIELD_VALIDATOR &aValidator) | |
virtual wxObject * | Clone () const override |
virtual bool | Validate (wxWindow *aParent) override |
Override the default Validate() function provided by wxTextValidator to provide better error messages. | |
bool | DoValidate (const wxString &aValue, wxWindow *aParent) |
Private Attributes | |
FIELD_T | m_fieldId |
A text control validator used for validating the text allowed in fields.
Definition at line 141 of file validators.h.
FIELD_VALIDATOR::FIELD_VALIDATOR | ( | FIELD_T | aFieldId, |
wxString * | aValue = nullptr ) |
Definition at line 236 of file validators.cpp.
References m_fieldId, REFERENCE, SHEET_FILENAME, and SHEET_NAME.
Referenced by Clone(), and FIELD_VALIDATOR().
FIELD_VALIDATOR::FIELD_VALIDATOR | ( | const FIELD_VALIDATOR & | aValidator | ) |
Definition at line 268 of file validators.cpp.
References FIELD_VALIDATOR(), and m_fieldId.
|
inlineoverridevirtual |
Definition at line 148 of file validators.h.
References FIELD_VALIDATOR().
bool FIELD_VALIDATOR::DoValidate | ( | const wxString & | aValue, |
wxWindow * | aParent ) |
Definition at line 401 of file validators.cpp.
References _, GetFieldValidationErrorMessage(), and m_fieldId.
Referenced by SCH_SYMBOL::SetRefProp(), and Validate().
|
overridevirtual |
Override the default Validate() function provided by wxTextValidator to provide better error messages.
aParent | is the parent window of the error message dialog. |
Definition at line 275 of file validators.cpp.
References DoValidate(), and text.
|
private |
Definition at line 162 of file validators.h.
Referenced by DoValidate(), FIELD_VALIDATOR(), and FIELD_VALIDATOR().