libdrmconf 0.12.1
A library to program DMR radios.
Loading...
Searching...
No Matches
radiolimits.hh
1
29#ifndef RADIOLIMITS_HH
30#define RADIOLIMITS_HH
31
32#include <QObject>
33#include <QTextStream>
34#include <QMetaType>
35#include <QSet>
36
37#include "frequency.hh"
38#include "ranges.hh"
39
40// Forward declaration
41class Config;
42class ConfigItem;
43class ConfigObject;
44class RadioLimits;
45
46
49class RadioLimitIssue: public QTextStream
50{
51public:
59
60public:
63 RadioLimitIssue(Severity severity, const QStringList &stack);
65 RadioLimitIssue(const RadioLimitIssue &other);
66
70 RadioLimitIssue &operator =(const QString &message);
71
73 Severity severity() const;
75 const QString &message() const;
77 QString format() const;
78
79protected:
83 QStringList _stack;
85 QString _message;
86};
87
88
94{
95public:
97 explicit RadioLimitContext(bool ignoreFrequencyLimits=false);
98
101
103 int count() const;
105 const RadioLimitIssue &message(int n) const;
106
109 void push(const QString &element);
111 void pop();
112
114 bool ignoreFrequencyLimits() const;
116 void enableIgnoreFrequencyLimits(bool enable=true);
117
120
121protected:
123 QStringList _stack;
125 QList<RadioLimitIssue> _messages;
130};
131
132
136class RadioLimitElement: public QObject
137{
138 Q_OBJECT
139
140public:
142 typedef std::initializer_list< std::pair<QString, RadioLimitElement *> > PropList;
143
144protected:
146 explicit RadioLimitElement(QObject *parent=nullptr);
147
148public:
151 virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const = 0;
152
153public:
155 virtual ~RadioLimitElement();
156};
157
158
164{
165 Q_OBJECT
166
167protected:
169 explicit RadioLimitValue(QObject *parent=nullptr);
170};
171
172
180{
181 Q_OBJECT
182
183public:
190
191public:
197 RadioLimitString(int minLen, int maxLen, Encoding enc, QObject *parent=nullptr);
198
199 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
200
201protected:
208};
209
210
214{
215 Q_OBJECT
216
217public:
221 RadioLimitStringRegEx(const QString &pattern, QObject *parent=nullptr);
222
223 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
224
225protected:
227 QRegExp _pattern;
228};
229
230
235 Q_OBJECT
236
237public:
240
241 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
242
243protected:
246};
247
248
252{
253 Q_OBJECT
254
255public:
257 explicit RadioLimitBool(QObject *parent=nullptr);
258
259 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
260};
261
262
267{
268 Q_OBJECT
269
270public:
275 QObject *parent=nullptr);
276
277 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
278
279protected:
282};
283
284
288{
289 Q_OBJECT
290
291public:
297 RadioLimitUInt(qint64 minValue=-1, qint64 maxValue=-1, qint64 defValue=-1, QObject *parent=nullptr);
298
299 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
300
301protected:
303 qint64 _minValue;
305 qint64 _maxValue;
307 qint64 _defValue;
308};
309
310
315{
316 Q_OBJECT
317
318public:
321 explicit RadioLimitDMRId(QObject *parent=nullptr);
322};
323
324
328{
329 Q_OBJECT
330
331public:
333 RadioLimitEnum(const std::initializer_list<unsigned> &values, QObject *parent=nullptr);
334
335 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
336
337protected:
339 QSet<unsigned> _values;
340};
341
342
346{
347 Q_OBJECT
348
349public:
351 typedef std::initializer_list<std::pair<Frequency, Frequency>> RangeList;
352
353public:
355 explicit RadioLimitFrequencies(QObject *parent=nullptr);
357 RadioLimitFrequencies(const RangeList &ranges, bool warnOnly=false, QObject *parent=nullptr);
358
359 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
360
361protected:
363 QList<FrequencyRange> _frequencyRanges;
366};
367
368
373{
374 Q_OBJECT
375
376public:
378 explicit RadioLimitTransmitFrequencies(QObject *parent=nullptr);
380 RadioLimitTransmitFrequencies(const RangeList &ranges, QObject *parent=nullptr);
381
382 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
383};
384
385
393{
394 Q_OBJECT
395
396public:
398 explicit RadioLimitItem(QObject *parent=nullptr);
401 RadioLimitItem(const PropList &list, QObject *parent=nullptr);
402
411 bool add(const QString &prop, RadioLimitElement *structure);
412
413 virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
415 virtual bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
416
417protected:
419 QHash<QString, RadioLimitElement *> _elements;
420};
421
422
426{
427 Q_OBJECT
428
429public:
431 explicit RadioLimitObject(QObject *parent=nullptr);
434 RadioLimitObject(const PropList &list, QObject *parent=nullptr);
435
437 virtual bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const;
438};
439
440
448{
449 Q_OBJECT
450
451public:
454
455 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
456 bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const;
457
458protected:
461};
462
463
472{
473 Q_OBJECT
474
475public:
477 typedef std::initializer_list<std::pair<const QMetaObject&, RadioLimitObject *> > TypeList;
478
479public:
498 RadioLimitObjects(const TypeList &list, QObject *parent=nullptr);
499
500 bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
501
502protected:
504 QHash<QString, RadioLimitObject *> _types;
505};
506
507
511{
512 Q_OBJECT
513
514public:
519 RadioLimitObjRef(const QMetaObject &type, bool allowNull=true, QObject *parent=nullptr);
520
521 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
522
523protected:
525 bool validType(const QMetaObject *type) const;
526
527protected:
531 QSet<QString> _types;
532};
533
534
538{
539 Q_OBJECT
540
541public:
548 QObject *parent=nullptr);
549
550 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
551
552protected:
557};
558
559
563{
564 Q_OBJECT
565
566public:
569 const QMetaObject &type;
573 };
574
575public:
583 RadioLimitList(const QMetaObject &type, int minSize, int maxSize, RadioLimitObject *element, QObject *parent=nullptr);
585 RadioLimitList(const std::initializer_list<ElementLimits> &elements, QObject *parent=nullptr);
586
587 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
588
589protected:
591 QString findClassName(const QMetaObject &type) const;
592
593protected:
595 QHash<QString, RadioLimitObject *> _elements;
597 QHash<QString, qint64> _minCount;
599 QHash<QString, qint64> _maxCount;
600};
601
602
606{
607 Q_OBJECT
608
609public:
615 RadioLimitRefList(int minSize, int maxSize, const QMetaObject &type, QObject *parent=nullptr);
616
617 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
618
619protected:
621 bool validType(const QMetaObject *type) const;
622
623protected:
625 qint64 _minSize;
627 qint64 _maxSize;
629 QSet<QString> _types;
630};
631
632
637{
638 Q_OBJECT
639
640public:
645 RadioLimitGroupCallRefList(int minSize, int maxSize, QObject *parent=nullptr);
646
647 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
648
649protected:
651 qint64 _minSize;
653 qint64 _maxSize;
654};
655
656
665{
666 Q_OBJECT
667
668public:
673 RadioLimitSingleZone(qint64 maxSize, const PropList &list, QObject *parent=nullptr);
674
675 bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
676};
677
678
684{
685 Q_OBJECT
686
687public:
689 explicit RadioLimits(bool betaWarning, QObject *parent = nullptr);
691 RadioLimits(const std::initializer_list<std::pair<QString,RadioLimitElement *> > &list, QObject *parent=nullptr);
692
694 virtual bool verifyConfig(const Config *config, RadioLimitContext &context) const;
695
697 bool hasCallSignDB() const;
699 bool callSignDBImplemented() const;
701 unsigned numCallSignDBEntries() const;
702
703protected:
713};
714
715#endif // RADIOLIMITS_HH
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:40
Base class of all labeled and named objects.
Definition configobject.hh:199
The config class, representing the codeplug configuration.
Definition config.hh:70
Checks if a property is a boolean value.
Definition radiolimits.hh:252
RadioLimitBool(QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:286
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:293
Collects the issues found during verification.
Definition radiolimits.hh:94
RadioLimitIssue::Severity _maxSeverity
Holds the highest severity of all messages.
Definition radiolimits.hh:129
bool ignoreFrequencyLimits() const
If true, frequency limit voilations are warnings.
Definition radiolimits.cc:118
void pop()
Pops the top-most property name/element index from the stack.
Definition radiolimits.cc:113
const RadioLimitIssue & message(int n) const
Returns the n-th issue.
Definition radiolimits.cc:103
RadioLimitContext(bool ignoreFrequencyLimits=false)
Empty constructor.
Definition radiolimits.cc:83
bool _ignoreFrequencyLimits
If true, any frequency range voilation is a warning.
Definition radiolimits.hh:127
void push(const QString &element)
Push a property name/element index onto the stack.
Definition radiolimits.cc:108
QStringList _stack
The current item stack.
Definition radiolimits.hh:123
QList< RadioLimitIssue > _messages
The list of issues found.
Definition radiolimits.hh:125
RadioLimitIssue::Severity maxSeverity() const
Returns the highest severity of the messages.
Definition radiolimits.cc:127
RadioLimitIssue & newMessage(RadioLimitIssue::Severity severity=RadioLimitIssue::Hint)
Constructs a new message and puts it into the list of issues.
Definition radiolimits.cc:90
int count() const
Returns the number of issues.
Definition radiolimits.cc:98
void enableIgnoreFrequencyLimits(bool enable=true)
Enables/disables that frequency range voilations are handled as warnings.
Definition radiolimits.cc:122
Represents a DMR ID.
Definition radiolimits.hh:315
RadioLimitDMRId(QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:369
Abstract base class for all radio limits.
Definition radiolimits.hh:137
virtual ~RadioLimitElement()
Destructor.
Definition radiolimits.cc:141
RadioLimitElement(QObject *parent=nullptr)
Hidden constructor.
Definition radiolimits.cc:135
virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const =0
Verifies the given property of the specified item.
std::initializer_list< std::pair< QString, RadioLimitElement * > > PropList
Initializer lists of ConfigItem properties.
Definition radiolimits.hh:142
Represents a limit for a set of enum values.
Definition radiolimits.hh:328
QSet< unsigned > _values
Holds the set of valid values.
Definition radiolimits.hh:339
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:386
RadioLimitEnum(const std::initializer_list< unsigned > &values, QObject *parent=nullptr)
Constructor from initializer list of possible enum values.
Definition radiolimits.cc:379
Represents a limit on frequencies in MHz.
Definition radiolimits.hh:346
std::initializer_list< std::pair< Frequency, Frequency > > RangeList
Typedef for the initializer list.
Definition radiolimits.hh:351
RadioLimitFrequencies(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:413
QList< FrequencyRange > _frequencyRanges
Holds the frequency ranges for the device.
Definition radiolimits.hh:363
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:428
bool _warnOnly
If true, throw only a warning.
Definition radiolimits.hh:365
Implements the limits for a list of references to group call contacts.
Definition radiolimits.hh:637
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:847
qint64 _minSize
Holds the minimum size of the list.
Definition radiolimits.hh:651
RadioLimitGroupCallRefList(int minSize, int maxSize, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:840
qint64 _maxSize
Holds the maximum size of the list.
Definition radiolimits.hh:653
Specifies an boolean value as ignored.
Definition radiolimits.hh:267
RadioLimitIssue::Severity _severity
The severity of the issue generated.
Definition radiolimits.hh:281
RadioLimitIgnoredBool(RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:309
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:316
Represents an ignored element in the codeplug.
Definition radiolimits.hh:448
RadioLimitIssue::Severity _notification
Holds the level of the notification.
Definition radiolimits.hh:460
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:156
RadioLimitIgnored(RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor for a ignored setting verification element.
Definition radiolimits.cc:149
bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const
Verifies the properties of the given object.
Definition radiolimits.cc:165
Represents a single issue found during verification.
Definition radiolimits.hh:50
Severity
Defines the possible severity levels.
Definition radiolimits.hh:53
@ Critical
Assembly of the codeplug will fail or a non-functional codeplug might be created.
Definition radiolimits.hh:57
@ Hint
Just a hint, a working codplug will be assembled.
Definition radiolimits.hh:55
@ Silent
The user will not be notified.
Definition radiolimits.hh:54
@ Warning
The codeplug gets changed but a working codeplug might be assembled.
Definition radiolimits.hh:56
Severity severity() const
Returns the severity of the issue.
Definition radiolimits.cc:56
QStringList _stack
Holds the item-stack (where the issue occurred).
Definition radiolimits.hh:83
RadioLimitIssue(Severity severity, const QStringList &stack)
Constructs an empty message for the specified severity at the specified point of the verification.
Definition radiolimits.cc:28
QString format() const
Formats the message.
Definition radiolimits.cc:66
const QString & message() const
Returns the text message.
Definition radiolimits.cc:61
RadioLimitIssue & operator=(const RadioLimitIssue &other)
Copy assignment.
Definition radiolimits.cc:41
QString _message
Holds the text message.
Definition radiolimits.hh:85
Severity _severity
Holds the severity of the issue.
Definition radiolimits.hh:81
Represents the limits for a ConfigItem instance.
Definition radiolimits.hh:393
virtual bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:537
bool add(const QString &prop, RadioLimitElement *structure)
Adds a property declaration.
Definition radiolimits.cc:505
QHash< QString, RadioLimitElement * > _elements
Holds the property <-> limits map.
Definition radiolimits.hh:419
RadioLimitItem(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:490
virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:514
Specifies the limits for a list of ConfigObject instances.
Definition radiolimits.hh:563
QString findClassName(const QMetaObject &type) const
Searches for the specified type or one of its super-clsases in the set of allowed types.
Definition radiolimits.cc:768
RadioLimitList(const QMetaObject &type, int minSize, int maxSize, RadioLimitObject *element, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:682
QHash< QString, qint64 > _minCount
Maps typename to minimum count.
Definition radiolimits.hh:597
QHash< QString, RadioLimitObject * > _elements
Maps typename to element definition.
Definition radiolimits.hh:595
QHash< QString, qint64 > _maxCount
Maps typename to maximum count.
Definition radiolimits.hh:599
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:703
Issues a notification if a reference is set.
Definition radiolimits.hh:538
RadioLimitObjRefIgnored(ConfigObject *defObj=nullptr, RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:657
ConfigObject * _default
A weak reference to a default value, that gets silently ignored.
Definition radiolimits.hh:556
RadioLimitIssue::Severity _severity
The severity of the issue.
Definition radiolimits.hh:554
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:666
Limits the possible classes a ConfigObjectReference may refer to.
Definition radiolimits.hh:511
RadioLimitObjRef(const QMetaObject &type, bool allowNull=true, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:607
bool _allowNull
If true, a null reference is allowed.
Definition radiolimits.hh:529
bool validType(const QMetaObject *type) const
Checks if the given type is one of the valid ones in _types.
Definition radiolimits.cc:645
QSet< QString > _types
Possible classes of instances, the reference may point to.
Definition radiolimits.hh:531
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:614
Represents the limits for all properties of a ConfigObject instance.
Definition radiolimits.hh:426
virtual bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const
Verifies the properties of the given object.
Definition radiolimits.cc:572
RadioLimitObject(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:559
Dispatch by class.
Definition radiolimits.hh:472
RadioLimitObjects(const TypeList &list, QObject *parent=nullptr)
Constructor from initializer list.
Definition radiolimits.cc:583
bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:593
std::initializer_list< std::pair< const QMetaObject &, RadioLimitObject * > > TypeList
Initializer lists of type properties.
Definition radiolimits.hh:477
QHash< QString, RadioLimitObject * > _types
Maps class-names to object limits.
Definition radiolimits.hh:504
Implements the limits for reference lists.
Definition radiolimits.hh:606
qint64 _maxSize
Holds the maximum size of the list.
Definition radiolimits.hh:627
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:787
QSet< QString > _types
Possible classes of instances, the references may point to.
Definition radiolimits.hh:629
RadioLimitRefList(int minSize, int maxSize, const QMetaObject &type, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:780
qint64 _minSize
Holds the minimum size of the list.
Definition radiolimits.hh:625
bool validType(const QMetaObject *type) const
Checks if the given type is one of the valid ones in _types.
Definition radiolimits.cc:828
Specialized RadioLimitObject handling a zone for radio supporting only a single channel list per zone...
Definition radiolimits.hh:665
RadioLimitSingleZone(qint64 maxSize, const PropList &list, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:896
bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:905
Notifies the user that a string gets ignored.
Definition radiolimits.hh:234
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:266
RadioLimitIssue::Severity _severity
Holds the severity of the message.
Definition radiolimits.hh:245
RadioLimitStringIgnored(RadioLimitIssue::Severity severity=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:259
Verifies that a string matches a regular expression.
Definition radiolimits.hh:214
RadioLimitStringRegEx(const QString &pattern, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:231
QRegExp _pattern
Holds the regular expression pattern.
Definition radiolimits.hh:227
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:238
Checks a string valued property.
Definition radiolimits.hh:180
RadioLimitString(int minLen, int maxLen, Encoding enc, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:188
int _minLen
Holds the minimum length of the string.
Definition radiolimits.hh:203
int _maxLen
Holds the maximum length of the string.
Definition radiolimits.hh:205
Encoding
Possible encoding of strings.
Definition radiolimits.hh:185
@ ASCII
Just ASCII is allowed.
Definition radiolimits.hh:187
@ Unicode
Any Unicode character is allowed.
Definition radiolimits.hh:188
@ DTMF
Just DTMF symbols are allowed (0-9, A-D, *, #).
Definition radiolimits.hh:186
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:195
Encoding _encoding
Holds the allowed character encoding.
Definition radiolimits.hh:207
Specialization for transmit frequency limits.
Definition radiolimits.hh:373
RadioLimitTransmitFrequencies(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:459
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:472
Represents a limit for an unsigned integer value.
Definition radiolimits.hh:288
qint64 _maxValue
Holds the maximum value.
Definition radiolimits.hh:305
qint64 _defValue
Holds the default value.
Definition radiolimits.hh:307
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:343
qint64 _minValue
Holds the minimum value.
Definition radiolimits.hh:303
RadioLimitUInt(qint64 minValue=-1, qint64 maxValue=-1, qint64 defValue=-1, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:336
Base class to verify values.
Definition radiolimits.hh:164
RadioLimitValue(QObject *parent=nullptr)
Hidden constructor.
Definition radiolimits.cc:178
Represents the limits or the entire codeplug.
Definition radiolimits.hh:684
unsigned numCallSignDBEntries() const
Returns the maximum number of entries in the call-sign DB.
Definition radiolimits.cc:946
virtual bool verifyConfig(const Config *config, RadioLimitContext &context) const
Verifies the given configuration.
Definition radiolimits.cc:951
bool _callSignDBImplemented
If true, the call-sign is implemented.
Definition radiolimits.hh:710
bool _hasCallSignDB
If true, the radio supports a call-sign DB.
Definition radiolimits.hh:708
bool hasCallSignDB() const
Returns true if the radio supports a call-sign DB.
Definition radiolimits.cc:936
unsigned _numCallSignDBEntries
Holds the number of possible call-sign DB entries.
Definition radiolimits.hh:712
RadioLimits(bool betaWarning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:923
bool callSignDBImplemented() const
Returns true if the call-sign DB is implemented.
Definition radiolimits.cc:941
bool _betaWarning
If true, a warning is issued that the radio is still under development and not well tested yet.
Definition radiolimits.hh:706
Helper struct to pass list entry definitions.
Definition radiolimits.hh:568
int minCount
Minimum count of elements.
Definition radiolimits.hh:570
const QMetaObject & type
The type of the object.
Definition radiolimits.hh:569
int maxCount
Maximum count of elements.
Definition radiolimits.hh:571
RadioLimitObject * structure
The structure of the elements.
Definition radiolimits.hh:572