1 #ifndef CONFIGREFERENCE_HH
2 #define CONFIGREFERENCE_HH
4 #include "configobject.hh"
22 ConfigObjectReference(
const QMetaObject &elementType=ConfigObject::staticMetaObject, QObject *parent =
nullptr);
38 virtual bool allow(
const QMetaObject *elementType);
128 ChannelReference(
const QMetaObject &elementType, QObject *parent =
nullptr);
const QList< QMetaObject > & elementTypes() const
Returns the element type for this list.
Definition: configobject.cc:1242
Represents a list of weak references to channels (analog and digital).
Definition: configreference.hh:163
ChannelRefList(const QMetaObject &elementTypes, QObject *parent=nullptr)
Hidden constructor.
Definition: configreference.cc:186
Represents a reference to a channel.
Definition: configreference.hh:123
ChannelReference(const QMetaObject &elementType, QObject *parent=nullptr)
Hidden constructor.
Definition: configreference.cc:150
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
bool is() const
Returns true if this object is of class Object.
Definition: configobject.hh:147
const Object * as() const
Casts this object to the given type.
Definition: configobject.hh:153
List class for config objects.
Definition: configobject.hh:382
Implements a reference to a config object.
Definition: configreference.hh:17
const QStringList & elementTypeNames() const
Returns the type names of allowed objects.
Definition: configreference.cc:96
void onReferenceDeleted(QObject *obj)
Internal call back whenever the referenced object gets deleted.
Definition: configreference.cc:101
int compare(const ConfigObjectReference &other) const
Compares the references.
Definition: configreference.cc:78
virtual bool copy(const ConfigObjectReference *ref)
Copies the reference from another reference.
Definition: configreference.cc:70
QStringList _elementTypes
Holds the static QMetaObject of the possible element types.
Definition: configreference.hh:73
ConfigObject * _object
The reference to the object.
Definition: configreference.hh:75
virtual bool set(ConfigObject *object)
Sets the reference.
Definition: configreference.cc:38
virtual void clear()
Resets the reference.
Definition: configreference.cc:29
ConfigObjectReference(const QMetaObject &elementType=ConfigObject::staticMetaObject, QObject *parent=nullptr)
Hidden constructor.
Definition: configreference.cc:17
void modified()
Gets emitted if the reference is changed.
Type * as() const
Returns the reference as the specified type.
Definition: configreference.hh:45
virtual bool allow(const QMetaObject *elementType)
Adds a possible type to this reference.
Definition: configreference.cc:89
bool is() const
Returns true if the reference is of the specified type.
Definition: configreference.hh:53
bool isNull() const
Returns true if the reference is null.
Definition: configreference.cc:24
Base class of all labeled and named objects.
Definition: configobject.hh:199
Represents a list of references to some DMR channels.
Definition: configreference.hh:179
DMRChannelRefList(QObject *parent=nullptr)
Empty constructor.
Definition: configreference.cc:202
Implements a reference to a DMR channel.
Definition: configreference.hh:139
DMRChannelReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:166
Extension to the DigitalChannel class to implement an DMR channel.
Definition: channel.hh:350
Implements a reference to a radio ID.
Definition: configreference.hh:251
DMRRadioIDReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:268
Implements a reference to an encryption key.
Definition: configreference.hh:284
EncryptionKeyReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:298
Base class of all encryption keys.
Definition: encryptionextension.hh:10
Implements a reference to a FM channel.
Definition: configreference.hh:151
FMChannelReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:176
Extension to the AnalogChannel class to implement an analog FM channel.
Definition: channel.hh:210
Implements a reference to a GPS system.
Definition: configreference.hh:240
GPSSystemReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:258
Implements a reference to a group list.
Definition: configreference.hh:262
GroupListReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:278
Implements a reference to a positioning system.
Definition: configreference.hh:214
PositioningSystemReference(const QMetaObject &elementType, QObject *parent=nullptr)
Hidden constructor.
Definition: configreference.cc:232
Represents a list of references to some roaming channels.
Definition: configreference.hh:191
RoamingChannelRefList(QObject *parent=nullptr)
Empty constructor.
Definition: configreference.cc:212
Implements a reference to a roaming zone.
Definition: configreference.hh:273
RoamingZoneReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:288
Implements a reference to a scan list.
Definition: configreference.hh:203
ScanListReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:222
Generic representation of a scan list.
Definition: scanlist.hh:15
Implements a reference to a zone.
Definition: configreference.hh:295
ZoneReference(QObject *parent=nullptr)
Constructor.
Definition: configreference.cc:308