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 "tyt_extensions.hh"
100 explicit Config(QObject *parent =
nullptr);
153 bool readCSV(
const QString &filename, QString &errorMessage);
155 bool readCSV(QTextStream &stream, QString &errorMessage);
Container class holding all channels (analog and digital) for a specific configuration (Config).
Definition: channel.hh:544
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:69
RoamingZoneList * _roamingZones
The list of roaming zones.
Definition: config.hh:196
ContactList * _contacts
The list of contacts.
Definition: config.hh:182
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:409
ScanLists * scanLists
The list of scan lists.
Definition: config.hh:85
TyTConfigExtension * tytExtension
Represents the config extension for TyT devices.
Definition: config.hh:96
bool copy(const ConfigItem &other)
Copies the given item into this one.
Definition: config.cc:62
ScanLists * _scanlists
The list of scan lists.
Definition: config.hh:190
RoamingChannelList * roamingChannels
The list of roaming channels.
Definition: config.hh:89
RoamingChannelList * _roamingChannels
The list of roaming channels.
Definition: config.hh:194
ContactList * contacts
The list of contacts.
Definition: config.hh:77
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:360
void onConfigModified()
Iternal callback.
Definition: config.cc:300
bool readYAML(const QString &filename, const ErrorStack &err=ErrorStack())
Imports a configuration from the given YAML file.
Definition: config.cc:325
RXGroupLists * rxGroupLists() const
Returns the list of RX group lists.
Definition: config.cc:185
RadioSettings * _settings
Radio wide settings.
Definition: config.hh:178
RadioIDList * _radioIDs
The list of radio IDs.
Definition: config.hh:180
bool requiresGPS() const
Returns true if one of the channels has a GPS or APRS system assigned.
Definition: config.cc:236
ChannelList * channels
The list of channels.
Definition: config.hh:81
bool populate(YAML::Node &node, const Context &context, const ErrorStack &err=ErrorStack())
Recursively serializes the configuration to YAML nodes.
Definition: config.cc:118
RXGroupLists * groupLists
The list of group lists.
Definition: config.hh:79
Config(QObject *parent=nullptr)
Constructs an empty configuration.
Definition: config.cc:20
void clear()
Clears the complete configuration.
Definition: config.cc:253
RoamingZoneList * roamingZones
The list of roaming zones.
Definition: config.hh:91
ChannelList * channelList() const
Returns the list of channels.
Definition: config.cc:190
CommercialExtension * commercial
Represents the config extension for encryption keys.
Definition: config.hh:94
TyTConfigExtension * _tytExtension
Owns the TyT settings extension.
Definition: config.hh:198
RadioIDList * radioIDs
The list of radio IDs.
Definition: config.hh:75
bool toYAML(QTextStream &stream, const ErrorStack &err=ErrorStack())
Serializes the configuration into the given stream as text.
Definition: config.cc:101
PositioningSystems * positioning
The list of positioning systems.
Definition: config.hh:87
ConfigItem * clone() const
Clones this item.
Definition: config.cc:82
ZoneList * _zones
The list of zones.
Definition: config.hh:188
ScanLists * scanlists() const
Returns the list of scanlists.
Definition: config.cc:200
CommercialExtension * commercialExtension() const
Returns the commercial extension.
Definition: config.cc:278
ChannelList * _channels
The list of channels.
Definition: config.hh:186
const Config * config() const
Returns the config, the item belongs to or nullptr if not part of a config.
Definition: config.cc:272
PositioningSystems * posSystems() const
Returns the list of positioning systems.
Definition: config.cc:205
bool requiresRoaming() const
Returns true if one of the digital channels has a roaming zone assigned.
Definition: config.cc:220
PositioningSystems * _gpsSystems
The list of GPS Systems.
Definition: config.hh:192
ZoneList * zones
The list of zones.
Definition: config.hh:83
void setTyTExtension(TyTConfigExtension *ext)
Sets the TyT settings extension.
Definition: config.cc:287
bool readCSV(const QString &filename, QString &errorMessage)
Imports a configuration from the given file.
Definition: config.cc:306
RadioSettings * settings
The global radio settings.
Definition: config.hh:73
void setModified(bool modified)
Sets the modified flag.
Definition: config.cc:96
bool _modified
If true, the configuration was modified.
Definition: config.hh:176
bool isModified() const
Returns true if the config was modified,.
Definition: config.cc:92
CommercialExtension * _commercialExtension
Owns the commercial extension.
Definition: config.hh:200
RXGroupLists * _rxGroupLists
The list of RX group lists.
Definition: config.hh:184
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:126
Represents the common radio-global settings.
Definition: radiosettings.hh:14
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:101
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