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 (int 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 | |
int | m_fieldId |
A text control validator used for validating the text allowed in fields.
Definition at line 220 of file validators.h.
FIELD_VALIDATOR::FIELD_VALIDATOR | ( | int | aFieldId, |
wxString * | aValue = nullptr |
||
) |
Definition at line 313 of file validators.cpp.
References m_fieldId, REFERENCE_FIELD, SHEETFILENAME_V, and SHEETNAME_V.
FIELD_VALIDATOR::FIELD_VALIDATOR | ( | const FIELD_VALIDATOR & | aValidator | ) |
Definition at line 342 of file validators.cpp.
|
inlineoverridevirtual |
Definition at line 227 of file validators.h.
bool FIELD_VALIDATOR::DoValidate | ( | const wxString & | aValue, |
wxWindow * | aParent | ||
) |
Definition at line 364 of file validators.cpp.
References _, DATASHEET_FIELD, FOOTPRINT_FIELD, UTIL::GetRefDesPrefix(), m_fieldId, REFERENCE_FIELD, SHEETFILENAME_V, SHEETNAME_V, and VALUE_FIELD.
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 348 of file validators.cpp.
References DoValidate(), and text.
|
private |
Definition at line 241 of file validators.h.
Referenced by DoValidate(), and FIELD_VALIDATOR().