libdrmconf
0.12.0
A library to program DMR radios.
|
Checks a string valued property. More...
#include <radiolimits.hh>
Public Types | |
enum | Encoding { DTMF , ASCII , Unicode } |
Possible encoding of strings. More... | |
Public Types inherited from RadioLimitElement | |
typedef std::initializer_list< std::pair< QString, RadioLimitElement * > > | PropList |
Initializer lists of ConfigItem properties. | |
Public Member Functions | |
RadioLimitString (int minLen, int maxLen, Encoding enc, QObject *parent=nullptr) | |
Constructor. More... | |
bool | verify (const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const |
Verifies the given property of the specified item. More... | |
Public Member Functions inherited from RadioLimitElement | |
virtual | ~RadioLimitElement () |
Destructor. | |
Protected Attributes | |
int | _minLen |
Holds the minimum length of the string. More... | |
int | _maxLen |
Holds the maximum length of the string. More... | |
Encoding | _encoding |
Holds the allowed character encoding. | |
Additional Inherited Members | |
Protected Member Functions inherited from RadioLimitValue | |
RadioLimitValue (QObject *parent=nullptr) | |
Hidden constructor. | |
Protected Member Functions inherited from RadioLimitElement | |
RadioLimitElement (QObject *parent=nullptr) | |
Hidden constructor. | |
Checks a string valued property.
Instances of this class can be used to verify string values. That is, checking the length of the string and its encoding.
RadioLimitString::RadioLimitString | ( | int | minLen, |
int | maxLen, | ||
Encoding | enc, | ||
QObject * | parent = nullptr |
||
) |
Constructor.
minLen | Specifies the minimum length of the string. If -1, check is disabled. |
maxLen | Specifies the maximum length of the string. If -1, check is disabled. |
enc | Specifies the allowed string encoding. |
parent | Specifies the QObject parent object. |
|
virtual |
Verifies the given property of the specified item.
This method gets implemented by the specialized classes to implement the actual verification.
Implements RadioLimitElement.
|
protected |
Holds the maximum length of the string.
If -1, the check is disabled.
|
protected |
Holds the minimum length of the string.
If -1, the check is disabled.