libdrmconf 0.15.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 <QRegularExpression>
34#include <QTextStream>
35#include <QMetaType>
36#include <QSet>
37
38#include "frequency.hh"
39#include "ranges.hh"
40
41// Forward declaration
42class Config;
43class ConfigItem;
44class ConfigObject;
45class RadioLimits;
46
47
50class RadioLimitIssue: public QTextStream
51{
52public:
60
61public:
64 RadioLimitIssue(Severity severity, const QStringList &stack);
66 RadioLimitIssue(const RadioLimitIssue &other);
67
71 RadioLimitIssue &operator =(const QString &message);
72
74 Severity severity() const;
76 const QString &message() const;
78 const QStringList &stack() const;
80 QString format() const;
81
82protected:
86 QStringList _stack;
88 QString _message;
89};
90
91
97{
98public:
100 explicit RadioLimitContext(bool ignoreFrequencyLimits=false);
101
104
106 int count() const;
108 const RadioLimitIssue &message(int n) const;
109
112 void push(const QString &element);
114 void pop();
115
117 bool ignoreFrequencyLimits() const;
119 void enableIgnoreFrequencyLimits(bool enable=true);
120
123
124protected:
126 QStringList _stack;
128 QList<RadioLimitIssue> _messages;
133};
134
135
139class RadioLimitElement: public QObject
140{
141 Q_OBJECT
142
143public:
145 typedef std::initializer_list< std::pair<QString, RadioLimitElement *> > PropList;
146
147protected:
149 explicit RadioLimitElement(QObject *parent=nullptr);
150
151public:
154 virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const = 0;
155
156public:
158 virtual ~RadioLimitElement();
159};
160
161
167{
168 Q_OBJECT
169
170protected:
173 QObject *parent=nullptr);
174
175protected:
178};
179
180
188{
189 Q_OBJECT
190
191public:
198
199public:
205 RadioLimitString(int minLen, int maxLen, Encoding enc,
207 QObject *parent=nullptr);
208
209 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
210
211protected:
218};
219
220
224{
225 Q_OBJECT
226
227public:
232 RadioLimitStringRegEx(const QString &pattern,
234 QObject *parent=nullptr);
235
236 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
237
238protected:
240 QRegularExpression _pattern;
241};
242
243
247{
248 Q_OBJECT
249
250public:
254 RadioLimitPin(int length = -1,
256 QObject *parent=nullptr);
257};
258
259
264 Q_OBJECT
265
266public:
269
270 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
271};
272
273
277{
278 Q_OBJECT
279
280public:
282 explicit RadioLimitBool(QObject *parent=nullptr);
283
284 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
285};
286
287
292{
293 Q_OBJECT
294
295public:
300 QObject *parent=nullptr);
301
302 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
303
304protected:
307};
308
309
313{
314 Q_OBJECT
315
316public:
322 RadioLimitUInt(qint64 minValue=-1, qint64 maxValue=-1, qint64 defValue=-1,
324 QObject *parent=nullptr);
325
326 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
327
328protected:
330 qint64 _minValue;
332 qint64 _maxValue;
334 qint64 _defValue;
335};
336
337
342{
343 Q_OBJECT
344
345public:
349 QObject *parent=nullptr);
350};
351
352
356{
357 Q_OBJECT
358
359public:
361 RadioLimitEnum(const std::initializer_list<unsigned> &values,
363 QObject *parent=nullptr);
364
365 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
366
367protected:
369 QSet<unsigned> _values;
370};
371
372
376{
377 Q_OBJECT
378
379public:
381 typedef std::initializer_list<std::pair<Frequency, Frequency>> RangeList;
382
383public:
386 QObject *parent=nullptr);
388 RadioLimitFrequencies(const RangeList &ranges,
390 QObject *parent=nullptr);
391
392 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
393
394protected:
396 QList<FrequencyRange> _frequencyRanges;
397};
398
399
403{
404 Q_OBJECT
405
406public:
409 QObject *parent=nullptr);
412 const Frequency &raster,
414 QObject *parent=nullptr);
415
416 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const override;
417
418protected:
421};
422
423
428{
429 Q_OBJECT
430
431public:
434 QObject *parent=nullptr);
438 QObject *parent=nullptr);
439
440 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
441};
442
443
447{
448 Q_OBJECT
449
450public:
453 QObject *parent=nullptr);
457 QObject *parent=nullptr);
458
459 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
460
461protected:
464};
465
466
470{
471 Q_OBJECT
472
473public:
475 explicit RadioLimitLevel(const Range<unsigned int> &range = {0, 10}, bool allowInvalid=true,
477 QObject *parent=nullptr);
478
479 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
480
481protected:
482 Range<unsigned int> _range;
483 bool _allowInvalid;
484};
485
486
494{
495 Q_OBJECT
496
497public:
499 explicit RadioLimitItem(QObject *parent=nullptr);
502 RadioLimitItem(const PropList &list, QObject *parent=nullptr);
503
512 bool add(const QString &prop, RadioLimitElement *structure);
513
514 virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
516 virtual bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
517
518protected:
520 QHash<QString, RadioLimitElement *> _elements;
521};
522
523
527{
528 Q_OBJECT
529
530public:
532 explicit RadioLimitObject(QObject *parent=nullptr);
535 RadioLimitObject(const PropList &list, QObject *parent=nullptr);
536
538 virtual bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const;
539};
540
541
549{
550 Q_OBJECT
551
552public:
555
556 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
557 bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const;
558
559protected:
562};
563
564
573{
574 Q_OBJECT
575
576public:
578 typedef std::initializer_list<std::pair<const QMetaObject&, RadioLimitObject *> > TypeList;
579
580public:
599 RadioLimitObjects(const TypeList &list, QObject *parent=nullptr);
600
601 bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
602
603protected:
605 QHash<QString, RadioLimitObject *> _types;
606};
607
608
612{
613 Q_OBJECT
614
615public:
617 typedef std::initializer_list<QMetaObject> MetaObjectList;
618
619public:
624 RadioLimitObjRef(const QMetaObject &type, bool allowNull=true, QObject *parent=nullptr);
625
630 RadioLimitObjRef(const MetaObjectList &types, bool allowNull=true, QObject *parent=nullptr);
631
632 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
633
634protected:
636 bool validType(const QMetaObject *type) const;
637
638protected:
642 QSet<QString> _types;
643};
644
645
649{
650 Q_OBJECT
651
652public:
659 QObject *parent=nullptr);
660
661 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
662
663protected:
668};
669
670
674{
675 Q_OBJECT
676
677public:
680 const QMetaObject &type;
684 };
685
686public:
694 RadioLimitList(const QMetaObject &type, int minSize, int maxSize, RadioLimitObject *element, QObject *parent=nullptr);
696 RadioLimitList(const std::initializer_list<ElementLimits> &elements, QObject *parent=nullptr);
697
698 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
699
700protected:
702 QString findClassName(const QMetaObject &type) const;
703
704protected:
706 QHash<QString, RadioLimitObject *> _elements;
708 QHash<QString, qint64> _minCount;
710 QHash<QString, qint64> _maxCount;
711};
712
713
717{
718 Q_OBJECT
719
720public:
726 RadioLimitRefList(int minSize, int maxSize, const QMetaObject &type, QObject *parent=nullptr);
727
728 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
729
730protected:
732 bool validType(const QMetaObject *type) const;
733
734protected:
736 qint64 _minSize;
738 qint64 _maxSize;
740 QSet<QString> _types;
741};
742
743
748{
749 Q_OBJECT
750
751public:
756 RadioLimitGroupCallRefList(int minSize, int maxSize, QObject *parent=nullptr);
757
758 bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const;
759
760protected:
762 qint64 _minSize;
764 qint64 _maxSize;
765};
766
767
776{
777 Q_OBJECT
778
779public:
784 RadioLimitSingleZone(qint64 maxSize, const PropList &list, QObject *parent=nullptr);
785
786 bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const;
787};
788
789
795{
796 Q_OBJECT
797
798public:
800 explicit RadioLimits(bool betaWarning, QObject *parent = nullptr);
802 RadioLimits(const std::initializer_list<std::pair<QString,RadioLimitElement *> > &list, QObject *parent=nullptr);
803
805 virtual bool verifyConfig(const Config *config, RadioLimitContext &context) const;
806
808 bool hasCallSignDB() const;
810 bool callSignDBImplemented() const;
812 unsigned numCallSignDBEntries() const;
813
815 bool hasSatelliteConfig() const;
817 bool satelliteConfigImplemented() const;
819 unsigned numSatellites() const;
820
821protected:
837};
838
839#endif // RADIOLIMITS_HH
Base class for all configuration objects (channels, zones, contacts, etc).
Definition configobject.hh:35
Base class of all labeled and named objects.
Definition configobject.hh:192
The config class, representing the codeplug configuration.
Definition config.hh:70
RadioLimitBool(QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:314
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:321
Collects the issues found during verification.
Definition radiolimits.hh:97
RadioLimitIssue::Severity _maxSeverity
Holds the highest severity of all messages.
Definition radiolimits.hh:132
bool ignoreFrequencyLimits() const
If true, frequency limit voilations are warnings.
Definition radiolimits.cc:121
void pop()
Pops the top-most property name/element index from the stack.
Definition radiolimits.cc:116
const RadioLimitIssue & message(int n) const
Returns the n-th issue.
Definition radiolimits.cc:106
RadioLimitContext(bool ignoreFrequencyLimits=false)
Empty constructor.
Definition radiolimits.cc:86
bool _ignoreFrequencyLimits
If true, any frequency range voilation is a warning.
Definition radiolimits.hh:130
void push(const QString &element)
Push a property name/element index onto the stack.
Definition radiolimits.cc:111
QStringList _stack
The current item stack.
Definition radiolimits.hh:126
QList< RadioLimitIssue > _messages
The list of issues found.
Definition radiolimits.hh:128
RadioLimitIssue::Severity maxSeverity() const
Returns the highest severity of the messages.
Definition radiolimits.cc:130
RadioLimitIssue & newMessage(RadioLimitIssue::Severity severity=RadioLimitIssue::Hint)
Constructs a new message and puts it into the list of issues.
Definition radiolimits.cc:93
int count() const
Returns the number of issues.
Definition radiolimits.cc:101
void enableIgnoreFrequencyLimits(bool enable=true)
Enables/disables that frequency range voilations are handled as warnings.
Definition radiolimits.cc:125
RadioLimitDMRId(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:403
virtual ~RadioLimitElement()
Destructor.
Definition radiolimits.cc:144
std::initializer_list< std::pair< QString, RadioLimitElement * > > PropList
Initializer lists of ConfigItem properties.
Definition radiolimits.hh:145
RadioLimitElement(QObject *parent=nullptr)
Hidden constructor.
Definition radiolimits.cc:138
virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const =0
Verifies the given property of the specified item.
QSet< unsigned > _values
Holds the set of valid values.
Definition radiolimits.hh:369
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:420
RadioLimitEnum(const std::initializer_list< unsigned > &values, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Constructor from initializer list of possible enum values.
Definition radiolimits.cc:413
RadioLimitFrequencies(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:450
std::initializer_list< std::pair< Frequency, Frequency > > RangeList
Typedef for the initializer list.
Definition radiolimits.hh:381
QList< FrequencyRange > _frequencyRanges
Holds the frequency ranges for the device.
Definition radiolimits.hh:396
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:465
RadioLimitFrequencyRaster(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:495
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const override
Verifies the given property of the specified item.
Definition radiolimits.cc:511
Frequency _raster
Offset between channels.
Definition radiolimits.hh:420
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:1005
qint64 _minSize
Holds the minimum size of the list.
Definition radiolimits.hh:762
RadioLimitGroupCallRefList(int minSize, int maxSize, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:998
qint64 _maxSize
Holds the maximum size of the list.
Definition radiolimits.hh:764
RadioLimitIssue::Severity _severity
The severity of the issue generated.
Definition radiolimits.hh:306
RadioLimitIgnoredBool(RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:337
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:344
RadioLimitIssue::Severity _notification
Holds the level of the notification.
Definition radiolimits.hh:561
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:159
RadioLimitIgnored(RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor for a ignored setting verification element.
Definition radiolimits.cc:152
bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const
Verifies the properties of the given object.
Definition radiolimits.cc:168
RadioLimitInterval(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:569
Range< Interval > _durations
Holds the duration ranges for the interval.
Definition radiolimits.hh:463
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:583
Represents a single issue found during verification.
Definition radiolimits.hh:51
Severity
Defines the possible severity levels.
Definition radiolimits.hh:54
@ Critical
Assembly of the codeplug will fail or a non-functional codeplug might be created.
Definition radiolimits.hh:58
@ Hint
Just a hint, a working codeplug will be assembled.
Definition radiolimits.hh:56
@ Silent
The user will not be notified.
Definition radiolimits.hh:55
@ Warning
The codeplug gets changed but a working codeplug might be assembled.
Definition radiolimits.hh:57
Severity severity() const
Returns the severity of the issue.
Definition radiolimits.cc:54
QStringList _stack
Holds the item-stack (where the issue occurred).
Definition radiolimits.hh:86
RadioLimitIssue(Severity severity, const QStringList &stack)
Constructs an empty message for the specified severity at the specified point of the verification.
Definition radiolimits.cc:26
QString format() const
Formats the message.
Definition radiolimits.cc:69
const QString & message() const
Returns the text message.
Definition radiolimits.cc:59
const QStringList & stack() const
Returns the traceback of the issue.
Definition radiolimits.cc:64
RadioLimitIssue & operator=(const RadioLimitIssue &other)
Copy assignment.
Definition radiolimits.cc:39
QString _message
Holds the text message.
Definition radiolimits.hh:88
Severity _severity
Holds the severity of the issue.
Definition radiolimits.hh:84
virtual bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:688
bool add(const QString &prop, RadioLimitElement *structure)
Adds a property declaration.
Definition radiolimits.cc:656
QHash< QString, RadioLimitElement * > _elements
Holds the property <-> limits map.
Definition radiolimits.hh:520
RadioLimitItem(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:641
virtual bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:665
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:612
RadioLimitLevel(const Range< unsigned int > &range={0, 10}, bool allowInvalid=true, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:604
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:926
RadioLimitList(const QMetaObject &type, int minSize, int maxSize, RadioLimitObject *element, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:840
QHash< QString, qint64 > _minCount
Maps typename to minimum count.
Definition radiolimits.hh:708
QHash< QString, RadioLimitObject * > _elements
Maps typename to element definition.
Definition radiolimits.hh:706
QHash< QString, qint64 > _maxCount
Maps typename to maximum count.
Definition radiolimits.hh:710
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:861
RadioLimitObjRefIgnored(ConfigObject *defObj=nullptr, RadioLimitIssue::Severity notify=RadioLimitIssue::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:815
ConfigObject * _default
A weak reference to a default value, that gets silently ignored.
Definition radiolimits.hh:667
RadioLimitIssue::Severity _severity
The severity of the issue.
Definition radiolimits.hh:665
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:824
std::initializer_list< QMetaObject > MetaObjectList
Initializer lists of allowed classes.
Definition radiolimits.hh:617
RadioLimitObjRef(const QMetaObject &type, bool allowNull=true, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:758
bool _allowNull
If true, a null reference is allowed.
Definition radiolimits.hh:640
bool validType(const QMetaObject *type) const
Checks if the given type is one of the valid ones in _types.
Definition radiolimits.cc:803
QSet< QString > _types
Possible classes of instances, the reference may point to.
Definition radiolimits.hh:642
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:772
Represents the limits for all properties of a ConfigObject instance.
Definition radiolimits.hh:527
virtual bool verifyObject(const ConfigObject *item, RadioLimitContext &context) const
Verifies the properties of the given object.
Definition radiolimits.cc:723
RadioLimitObject(QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:710
RadioLimitObjects(const TypeList &list, QObject *parent=nullptr)
Constructor from initializer list.
Definition radiolimits.cc:734
bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:744
std::initializer_list< std::pair< const QMetaObject &, RadioLimitObject * > > TypeList
Initializer lists of type properties.
Definition radiolimits.hh:578
QHash< QString, RadioLimitObject * > _types
Maps class-names to object limits.
Definition radiolimits.hh:605
RadioLimitPin(int length=-1, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:271
qint64 _maxSize
Holds the maximum size of the list.
Definition radiolimits.hh:738
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:945
QSet< QString > _types
Possible classes of instances, the references may point to.
Definition radiolimits.hh:740
RadioLimitRefList(int minSize, int maxSize, const QMetaObject &type, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:938
qint64 _minSize
Holds the minimum size of the list.
Definition radiolimits.hh:736
bool validType(const QMetaObject *type) const
Checks if the given type is one of the valid ones in _types.
Definition radiolimits.cc:986
RadioLimitSingleZone(qint64 maxSize, const PropList &list, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:1054
bool verifyItem(const ConfigItem *item, RadioLimitContext &context) const
Verifies the properties of the given item.
Definition radiolimits.cc:1063
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:291
RadioLimitStringIgnored(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:284
QRegularExpression _pattern
Holds the regular expression pattern.
Definition radiolimits.hh:240
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:246
RadioLimitStringRegEx(const QString &pattern, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:239
int _minLen
Holds the minimum length of the string.
Definition radiolimits.hh:213
RadioLimitString(int minLen, int maxLen, Encoding enc, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:191
int _maxLen
Holds the maximum length of the string.
Definition radiolimits.hh:215
Encoding
Possible encoding of strings.
Definition radiolimits.hh:193
@ ASCII
Just ASCII is allowed.
Definition radiolimits.hh:195
@ Unicode
Any Unicode character is allowed.
Definition radiolimits.hh:196
@ DTMF
Just DTMF symbols are allowed (0-9, A-D, *, #).
Definition radiolimits.hh:194
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:198
Encoding _encoding
Holds the allowed character encoding.
Definition radiolimits.hh:217
RadioLimitTransmitFrequencies(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Warning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:538
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:551
qint64 _maxValue
Holds the maximum value.
Definition radiolimits.hh:332
qint64 _defValue
Holds the default value.
Definition radiolimits.hh:334
bool verify(const ConfigItem *item, const QMetaProperty &prop, RadioLimitContext &context) const
Verifies the given property of the specified item.
Definition radiolimits.cc:374
RadioLimitUInt(qint64 minValue=-1, qint64 maxValue=-1, qint64 defValue=-1, RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Constructor.
Definition radiolimits.cc:366
qint64 _minValue
Holds the minimum value.
Definition radiolimits.hh:330
RadioLimitIssue::Severity _severity
The severity of the issue, if the test fails.
Definition radiolimits.hh:177
RadioLimitValue(RadioLimitIssue::Severity severity=RadioLimitIssue::Severity::Hint, QObject *parent=nullptr)
Hidden constructor.
Definition radiolimits.cc:181
Represents the limits or the entire codeplug.
Definition radiolimits.hh:795
bool _satelliteConfigImplemented
If true, satellite config is implemented.
Definition radiolimits.hh:834
unsigned numCallSignDBEntries() const
Returns the maximum number of entries in the call-sign DB.
Definition radiolimits.cc:1109
virtual bool verifyConfig(const Config *config, RadioLimitContext &context) const
Verifies the given configuration.
Definition radiolimits.cc:1131
bool hasSatelliteConfig() const
Returns true if the radio supports satellite config.
Definition radiolimits.cc:1115
bool _callSignDBImplemented
If true, the call-sign is implemented.
Definition radiolimits.hh:828
bool _hasSatelliteConfig
If true, the radio supports satellite config.
Definition radiolimits.hh:832
bool _hasCallSignDB
If true, the radio supports a call-sign DB.
Definition radiolimits.hh:826
bool satelliteConfigImplemented() const
Returns true if satellite config is implemented.
Definition radiolimits.cc:1120
bool hasCallSignDB() const
Returns true if the radio supports a call-sign DB.
Definition radiolimits.cc:1099
unsigned _numSatellites
Holds the number of possible satellites.
Definition radiolimits.hh:836
unsigned _numCallSignDBEntries
Holds the number of possible call-sign DB entries.
Definition radiolimits.hh:830
RadioLimits(bool betaWarning, QObject *parent=nullptr)
Empty constructor.
Definition radiolimits.cc:1081
bool callSignDBImplemented() const
Returns true if the call-sign DB is implemented.
Definition radiolimits.cc:1104
bool _betaWarning
If true, a warning is issued that the radio is still under development and not well tested yet.
Definition radiolimits.hh:824
unsigned numSatellites() const
Returns the maximum number of satellites.
Definition radiolimits.cc:1125
Simple range class representing some range in some data type.
Definition ranges.hh:14
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:107
Helper struct to pass list entry definitions.
Definition radiolimits.hh:679
int minCount
Minimum count of elements.
Definition radiolimits.hh:681
const QMetaObject & type
The type of the object.
Definition radiolimits.hh:680
int maxCount
Maximum count of elements.
Definition radiolimits.hh:682
RadioLimitObject * structure
The structure of the elements.
Definition radiolimits.hh:683