|
libdrmconf 0.13.3
A library to program DMR radios.
|
The config class, representing the codeplug configuration. More...
#include <config.hh>


Public Member Functions | |
| Q_INVOKABLE | Config (QObject *parent=nullptr) |
| Constructs an empty configuration. | |
| bool | copy (const ConfigItem &other) |
| Copies the given item into this one. | |
| ConfigItem * | clone () const |
| Clones this item. | |
| bool | isModified () const |
Returns true if the config was modified,. | |
| void | setModified (bool modified) |
| Sets the modified flag. | |
| RadioSettings * | settings () const |
| Returns the radio wide settings. | |
| RadioIDList * | radioIDs () const |
| Returns the list of radio IDs. | |
| ContactList * | contacts () const |
| Returns the list of contacts. | |
| RXGroupLists * | rxGroupLists () const |
| Returns the list of RX group lists. | |
| ChannelList * | channelList () const |
| Returns the list of channels. | |
| ZoneList * | zones () const |
| Returns the list of zones. | |
| ScanLists * | scanlists () const |
| Returns the list of scanlists. | |
| PositioningSystems * | posSystems () const |
| Returns the list of positioning systems. | |
| RoamingChannelList * | roamingChannels () const |
| Returns the list of roaming channels. | |
| RoamingZoneList * | roamingZones () const |
| Returns the list of roaming zones. | |
| bool | requiresRoaming () const |
Returns true if one of the digital channels has a roaming zone assigned. | |
| bool | requiresGPS () const |
Returns true if one of the channels has a GPS or APRS system assigned. | |
| void | clear () |
| Clears the complete configuration. | |
| const Config * | config () const |
Returns the config, the item belongs to or nullptr if not part of a config. | |
| CommercialExtension * | commercialExtension () const |
| Returns the commercial extension. | |
| SMSExtension * | smsExtension () const |
| Returns the SMS settings extension. | |
| TyTConfigExtension * | tytExtension () const |
| Returns the TyT settings extension. | |
| void | setTyTExtension (TyTConfigExtension *ext) |
| Sets the TyT settings extension. | |
| bool | readCSV (const QString &filename, QString &errorMessage) |
| Imports a configuration from the given file. | |
| bool | readCSV (QTextStream &stream, QString &errorMessage) |
| Imports a configuration from the given text stream in text format. | |
| bool | readYAML (const QString &filename, const ErrorStack &err=ErrorStack()) |
| Imports a configuration from the given YAML file. | |
| bool | parse (const YAML::Node &node, Context &ctx, const ErrorStack &err=ErrorStack()) |
| Parses the given YAML node, updates the given object and updates the given context (IDs). | |
| bool | link (const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack()) |
| Links the given object to the rest of the codeplug using the given context. | |
| bool | toYAML (QTextStream &stream, const ErrorStack &err=ErrorStack()) |
| Serializes the configuration into the given stream as text. | |
Public Member Functions inherited from ConfigItem | |
| virtual int | compare (const ConfigItem &other) const |
| Compares the items. | |
| virtual bool | label (Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively labels the config object. | |
| virtual YAML::Node | serialize (const Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively serializes the configuration to YAML nodes. | |
| virtual ConfigItem * | allocateChild (QMetaProperty &prop, const YAML::Node &node, const Context &ctx, const ErrorStack &err=ErrorStack()) |
| Allocates an instance for the given property on the given YAML node. | |
| virtual void | findItemsOfTypes (const QStringList &typeNames, QSet< ConfigItem * > &items) const |
| Searches the config tree to find all instances of the given type names. | |
| template<class Object > | |
| bool | is () const |
Returns true if this object is of class Object. | |
| template<class Object > | |
| const Object * | as () const |
| Casts this object to the given type. | |
| template<class Object > | |
| Object * | as () |
| Casts this object to the given type. | |
| bool | hasDescription () const |
Returns true if there is a class info "description" for this instance. | |
| bool | hasLongDescription () const |
Returns true if there is a class info "longDescription" for this instance. | |
| bool | hasDescription (const QMetaProperty &prop) const |
Returns true if there is a class info "[PropertyName]Description" for the given property. | |
| bool | hasLongDescription (const QMetaProperty &prop) const |
Returns true if there is a class info "[PropertyName]LongDescription" for the given property. | |
| QString | description () const |
| Returns the description of this instance if set by a class info. | |
| QString | longDescription () const |
| Returns the long description of this instance if set by a class info. | |
| QString | description (const QMetaProperty &prop) const |
| Returns the description of property if set by a class info. | |
| QString | longDescription (const QMetaProperty &prop) const |
| Returns the long description of property if set by a class info. | |
Protected Slots | |
| void | onConfigModified () |
| Iternal callback. | |
Protected Member Functions | |
| bool | populate (YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack()) |
| Recursively serializes the configuration to YAML nodes. | |
Protected Member Functions inherited from ConfigItem | |
| ConfigItem (QObject *parent=nullptr) | |
| Hidden constructor. | |
Protected Attributes | |
| bool | _modified |
If true, the configuration was modified. | |
| RadioSettings * | _settings |
| Radio wide settings. | |
| RadioIDList * | _radioIDs |
| The list of radio IDs. | |
| ContactList * | _contacts |
| The list of contacts. | |
| RXGroupLists * | _rxGroupLists |
| The list of RX group lists. | |
| ChannelList * | _channels |
| The list of channels. | |
| ZoneList * | _zones |
| The list of zones. | |
| ScanLists * | _scanlists |
| The list of scan lists. | |
| PositioningSystems * | _gpsSystems |
| The list of GPS Systems. | |
| RoamingChannelList * | _roamingChannels |
| The list of roaming channels. | |
| RoamingZoneList * | _roamingZones |
| The list of roaming zones. | |
| TyTConfigExtension * | _tytExtension |
| Owns the TyT settings extension. | |
| CommercialExtension * | _commercialExtension |
| Owns the commercial extension. | |
| SMSExtension * | _smsExtension |
| Owns the SMS settings extension. | |
Properties | |
| RadioSettings * | settings |
| The global radio settings. | |
| RadioIDList * | radioIDs |
| The list of radio IDs. | |
| ContactList * | contacts |
| The list of contacts. | |
| RXGroupLists * | groupLists |
| The list of group lists. | |
| ChannelList * | channels |
| The list of channels. | |
| ZoneList * | zones |
| The list of zones. | |
| ScanLists * | scanLists |
| The list of scan lists. | |
| PositioningSystems * | positioning |
| The list of positioning systems. | |
| RoamingChannelList * | roamingChannels |
| The list of roaming channels. | |
| RoamingZoneList * | roamingZones |
| The list of roaming zones. | |
| CommercialExtension * | commercial |
| Represents the config extension for encryption keys. | |
| SMSExtension * | sms |
| Represents the extended SMS settings. | |
| TyTConfigExtension * | tytExtension |
| Represents the config extension for TyT devices. | |
Additional Inherited Members | |
Signals inherited from ConfigItem | |
| void | modified (ConfigItem *obj) |
| Gets emitted once the config object is modified. | |
| void | beginClear () |
| Gets emitted before clearing the item. | |
| void | endClear () |
| Gets emitted after clearing the item. | |
The config class, representing the codeplug configuration.
It contains the description of the contacts, channels, zones, etc. of the codeplug configuration.
|
virtual |
Clears the complete configuration.
Reimplemented from ConfigItem.
|
virtual |
Clones this item.
Implements ConfigItem.
Returns the config, the item belongs to or nullptr if not part of a config.
Reimplemented from ConfigItem.
|
virtual |
Copies the given item into this one.
true if copying was successful and false otherwise. The two items must be of the same type (obviously). Reimplemented from ConfigItem.
|
virtual |
Links the given object to the rest of the codeplug using the given context.
Reimplemented from ConfigItem.
|
virtual |
Parses the given YAML node, updates the given object and updates the given context (IDs).
Reimplemented from ConfigItem.
|
protectedvirtual |
Recursively serializes the configuration to YAML nodes.
The complete configuration must be labeled first.
Reimplemented from ConfigItem.
| TyTConfigExtension * Config::tytExtension | ( | ) | const |
Returns the TyT settings extension.
If this extension is not set, returns nullptr.