Validates record names, ensuring they're not empty and don't start or end with spaces.
More...
#include <recordnamevalidator.h>
|
| | RecordNameValidator (QObject *parent=Q_NULLPTR) |
| | Constructs a new validator for record names. More...
|
| |
| virtual void | fixup (QString &input) const Q_DECL_OVERRIDE |
| | Removes all leading or trailing spaces from the specified string. More...
|
| |
| virtual State | validate (QString &input, int &pos) const Q_DECL_OVERRIDE |
| | Validates the specified input string. More...
|
| |
Validates record names, ensuring they're not empty and don't start or end with spaces.
◆ RecordNameValidator()
| RecordNameValidator::RecordNameValidator |
( |
QObject * |
parent = Q_NULLPTR | ) |
|
Constructs a new validator for record names.
- Parameters
-
| parent | Optional owner object. |
◆ fixup()
| void RecordNameValidator::fixup |
( |
QString & |
input | ) |
const |
|
virtual |
Removes all leading or trailing spaces from the specified string.
- Parameters
-
◆ validate()
| QValidator::State RecordNameValidator::validate |
( |
QString & |
input, |
|
|
int & |
pos |
|
) |
| const |
|
virtual |
Validates the specified input string.
- Parameters
-
| input | String to validate. |
| pos | Unused. |
- Returns
- State::Invalid, if the input string is empty or starts or ends with a space, and State::Acceptable otherwise.
The documentation for this class was generated from the following files:
- Source/Tome/Features/Records/Controller/recordnamevalidator.h
- Source/Tome/Features/Records/Controller/recordnamevalidator.cpp