4 #include "configobject.hh"
21 explicit RadioID(QObject *parent=
nullptr);
35 Q_CLASSINFO(
"IdPrefix",
"id")
42 Q_INVOKABLE
explicit DMRRadioID(QObject *parent=
nullptr);
94 Q_CLASSINFO(
"IdPrefix",
"dtmf")
101 Q_INVOKABLE
explicit DTMFRadioID(QObject *parent=
nullptr);
112 const QString &
number()
const;
143 virtual int addId(
const QString &name, uint32_t
id);
145 virtual bool delId(uint32_t
id);
Parse context for config objects.
Definition: configobject.hh:48
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
List class for config objects.
Definition: configobject.hh:349
Base class of all labeled and named objects.
Definition: configobject.hh:199
QString name
The name of the object.
Definition: configobject.hh:203
Implements a reference to a radio ID.
Definition: configreference.hh:251
Represents a DMR radio ID within the abstract config.
Definition: radioid.hh:33
unsigned number
The number of the radio ID.
Definition: radioid.hh:38
bool link(const YAML::Node &node, const ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Links the given object to the rest of the codeplug using the given context.
Definition: radioid.cc:90
ConfigItem * clone() const
Clones this item.
Definition: radioid.cc:40
void setNumber(uint32_t number)
Sets the DMR ID.
Definition: radioid.cc:55
YAML::Node serialize(const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition: radioid.cc:63
Q_INVOKABLE DMRRadioID(QObject *parent=nullptr)
Default constructor.
Definition: radioid.cc:27
bool parse(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Parses the given YAML node, updates the given object and updates the given context (IDs).
Definition: radioid.cc:76
uint32_t _number
Holds the DMR ID.
Definition: radioid.hh:63
Represents a DTMF radio ID as used for PTT-ID on analog channels.
Definition: radioid.hh:92
ConfigItem * clone() const
Clones this item.
Definition: radioid.cc:139
QString _number
Holds the DTMF number of the radio ID.
Definition: radioid.hh:118
Q_INVOKABLE DTMFRadioID(QObject *parent=nullptr)
Default constructor.
Definition: radioid.cc:126
QString number
The DTMF number of the radio ID.
Definition: radioid.hh:97
void setNumber(const QString &number)
Sets the DTMF number of the radio ID.
Definition: radioid.cc:153
A singleton radio ID representing the default DMR radio ID within the abstract config.
Definition: radioid.hh:70
DefaultRadioID(QObject *parent=nullptr)
Constructor.
Definition: radioid.cc:109
static DefaultRadioID * get()
Factory method returning the singleton instance.
Definition: radioid.cc:116
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Represents the list of configured DMR IDs (radio IDs) within the abstract config.
Definition: radioid.hh:125
void clear()
Clears the list.
Definition: radioid.cc:172
virtual int addId(const QString &name, uint32_t id)
Adds the given DMR ID.
Definition: radioid.cc:205
RadioIDList(QObject *parent=nullptr)
Constructor.
Definition: radioid.cc:165
int add(ConfigObject *obj, int row=-1, bool unique=true)
Adds an element to the list.
Definition: radioid.cc:193
ConfigItem * allocateChild(const YAML::Node &node, ConfigItem::Context &ctx, const ErrorStack &err=ErrorStack())
Allocates a member objects for the given YAML node.
Definition: radioid.cc:216
virtual bool delId(uint32_t id)
Deletes and removes the given DMR ID.
Definition: radioid.cc:210
DMRRadioID * find(uint32_t id) const
Searches the DMR ID object associated with the given DMR ID.
Definition: radioid.cc:184
DMRRadioID * getId(int idx) const
Returns the radio ID at the given index.
Definition: radioid.cc:177
Abstract base class for all radio IDs.
Definition: radioid.hh:15
RadioID(QObject *parent=nullptr)
Hidden default constructor.
Definition: radioid.cc:11