41 #include <QTextStream>
43 #include "configobject.hh"
45 #include "rxgrouplist.hh"
48 #include "scanlist.hh"
49 #include "gpssystem.hh"
50 #include "roamingchannel.hh"
51 #include "roamingzone.hh"
53 #include "radiosettings.hh"
55 #include "commercial_extension.hh"
56 #include "smsextension.hh"
57 #include "tyt_extensions.hh"
103 Q_INVOKABLE
explicit Config(QObject *parent =
nullptr);
158 bool readCSV(
const QString &filename, QString &errorMessage);
160 bool readCSV(QTextStream &stream, QString &errorMessage);
Container class holding all channels (analog and digital) for a specific configuration (Config).
Definition: channel.hh:548
Implements the generic extension for the codeplug to represent some commercial features of DMR.
Definition: commercial_extension.hh:11
Parse context for config objects.
Definition: configobject.hh:48
Base class for all configuration objects (channels, zones, contacts, etc).
Definition: configobject.hh:40
void modified(ConfigItem *obj)
Gets emitted once the config object is modified.
The config class, representing the codeplug configuration.
Definition: config.hh:70
RoamingZoneList * _roamingZones
The list of roaming zones.
Definition: config.hh:201
ContactList * _contacts
The list of contacts.
Definition: config.hh:187
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.
Definition: config.cc:413
ScanLists * scanLists
The list of scan lists.
Definition: config.hh:86
TyTConfigExtension * tytExtension
Represents the config extension for TyT devices.
Definition: config.hh:99
bool copy(const ConfigItem &other)
Copies the given item into this one.
Definition: config.cc:64
ScanLists * _scanlists
The list of scan lists.
Definition: config.hh:195
RoamingChannelList * roamingChannels
The list of roaming channels.
Definition: config.hh:90
RoamingChannelList * _roamingChannels
The list of roaming channels.
Definition: config.hh:199
ContactList * contacts
The list of contacts.
Definition: config.hh:78
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).
Definition: config.cc:364
void onConfigModified()
Iternal callback.
Definition: config.cc:304
bool readYAML(const QString &filename, const ErrorStack &err=ErrorStack())
Imports a configuration from the given YAML file.
Definition: config.cc:329
RXGroupLists * rxGroupLists() const
Returns the list of RX group lists.
Definition: config.cc:184
RadioSettings * _settings
Radio wide settings.
Definition: config.hh:183
RadioIDList * _radioIDs
The list of radio IDs.
Definition: config.hh:185
bool requiresGPS() const
Returns true if one of the channels has a GPS or APRS system assigned.
Definition: config.cc:235
SMSExtension * _smsExtension
Owns the SMS settings extension.
Definition: config.hh:207
ChannelList * channels
The list of channels.
Definition: config.hh:82
bool populate(YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition: config.cc:120
RXGroupLists * groupLists
The list of group lists.
Definition: config.hh:80
Q_INVOKABLE Config(QObject *parent=nullptr)
Constructs an empty configuration.
Definition: config.cc:20
void clear()
Clears the complete configuration.
Definition: config.cc:252
RoamingZoneList * roamingZones
The list of roaming zones.
Definition: config.hh:92
ChannelList * channelList() const
Returns the list of channels.
Definition: config.cc:189
CommercialExtension * commercial
Represents the config extension for encryption keys.
Definition: config.hh:95
TyTConfigExtension * _tytExtension
Owns the TyT settings extension.
Definition: config.hh:203
RadioIDList * radioIDs
The list of radio IDs.
Definition: config.hh:76
bool toYAML(QTextStream &stream, const ErrorStack &err=ErrorStack())
Serializes the configuration into the given stream as text.
Definition: config.cc:103
PositioningSystems * positioning
The list of positioning systems.
Definition: config.hh:88
ConfigItem * clone() const
Clones this item.
Definition: config.cc:84
ZoneList * _zones
The list of zones.
Definition: config.hh:193
ScanLists * scanlists() const
Returns the list of scanlists.
Definition: config.cc:199
CommercialExtension * commercialExtension() const
Returns the commercial extension.
Definition: config.cc:277
ChannelList * _channels
The list of channels.
Definition: config.hh:191
SMSExtension * smsExtension() const
Returns the SMS settings extension.
Definition: config.cc:282
const Config * config() const
Returns the config, the item belongs to or nullptr if not part of a config.
Definition: config.cc:271
PositioningSystems * posSystems() const
Returns the list of positioning systems.
Definition: config.cc:204
bool requiresRoaming() const
Returns true if one of the digital channels has a roaming zone assigned.
Definition: config.cc:219
PositioningSystems * _gpsSystems
The list of GPS Systems.
Definition: config.hh:197
ZoneList * zones
The list of zones.
Definition: config.hh:84
SMSExtension * sms
Represents the extended SMS settings.
Definition: config.hh:97
void setTyTExtension(TyTConfigExtension *ext)
Sets the TyT settings extension.
Definition: config.cc:291
bool readCSV(const QString &filename, QString &errorMessage)
Imports a configuration from the given file.
Definition: config.cc:310
RadioSettings * settings
The global radio settings.
Definition: config.hh:74
void setModified(bool modified)
Sets the modified flag.
Definition: config.cc:98
bool _modified
If true, the configuration was modified.
Definition: config.hh:181
bool isModified() const
Returns true if the config was modified,.
Definition: config.cc:94
CommercialExtension * _commercialExtension
Owns the commercial extension.
Definition: config.hh:205
RXGroupLists * _rxGroupLists
The list of RX group lists.
Definition: config.hh:189
Implements a stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
The list of positioning systems.
Definition: gpssystem.hh:267
Represents the list of RX group lists within the generic configuration.
Definition: rxgrouplist.hh:68
Represents the list of configured DMR IDs (radio IDs) within the abstract config.
Definition: radioid.hh:125
Represents the common radio-global settings.
Definition: radiosettings.hh:15
Represents the list of roaming channels within the abstract device configuration.
Definition: roamingchannel.hh:99
Represents the list of roaming zones within the abstract device configuration.
Definition: roamingzone.hh:103
Extension collecting all settings associated with SMS messages.
Definition: smsextension.hh:55
Represents the list of scan lists.
Definition: scanlist.hh:112
Groups several extension for TyT devices.
Definition: tyt_extensions.hh:1025
Auto-updating DMR user database.
Definition: userdatabase.hh:23
Represents the list of zones within the generic configuration.
Definition: zone.hh:75