libdrmconf
0.12.0
A library to program DMR radios.
|
Represents the limits for a ConfigItem
instance.
More...
#include <radiolimits.hh>
Public Member Functions | |
RadioLimitItem (QObject *parent=nullptr) | |
Empty constructor. | |
RadioLimitItem (const PropList &list, QObject *parent=nullptr) | |
Constructor from initializer list. More... | |
bool | add (const QString &prop, RadioLimitElement *structure) |
Adds a property declaration. More... | |
virtual bool | verify (const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const |
Verifies the given property of the specified item. More... | |
virtual bool | verifyItem (const ConfigItem *item, RadioLimitContext &context) const |
Verifies the properties of the given item. | |
Public Member Functions inherited from RadioLimitElement | |
virtual | ~RadioLimitElement () |
Destructor. | |
Protected Attributes | |
QHash< QString, RadioLimitElement * > | _elements |
Holds the property <-> limits map. | |
Additional Inherited Members | |
Public Types inherited from RadioLimitElement | |
typedef std::initializer_list< std::pair< QString, RadioLimitElement * > > | PropList |
Initializer lists of ConfigItem properties. | |
Protected Member Functions inherited from RadioLimitElement | |
RadioLimitElement (QObject *parent=nullptr) | |
Hidden constructor. | |
Represents the limits for a ConfigItem
instance.
That is, it holds the limits for every property of the ConfigItem
instance. This class provides a initializer list constructor for easy programmatic construction of limits.
RadioLimitItem::RadioLimitItem | ( | const PropList & | list, |
QObject * | parent = nullptr |
||
) |
Constructor from initializer list.
The ownership of all passed elements are taken.
bool RadioLimitItem::add | ( | const QString & | prop, |
RadioLimitElement * | structure | ||
) |
Adds a property declaration.
The item takes the ownership of the structure declaration. If a property is already defined with the same name, false
is returned.
prop | Specifies the name of the property. |
structure | Specifies the structure declaration of the property value. |
false
If a property with the same name is already defined.
|
virtual |
Verifies the given property of the specified item.
This method gets implemented by the specialized classes to implement the actual verification.
Implements RadioLimitElement.
Reimplemented in RadioLimitIgnored.