4 #include "configobject.hh"
5 #include "configreference.hh"
7 #include "tyt_extensions.hh"
17 Q_CLASSINFO(
"IdPrefix",
"scan")
33 Q_INVOKABLE
explicit ScanList(QObject *parent=
nullptr);
117 explicit ScanLists(QObject *parent =
nullptr);
Represents a list of weak references to channels (analog and digital).
Definition: configreference.hh:163
Represents a reference to a channel.
Definition: configreference.hh:123
The base class of all channels (analog and digital) of a codeplug configuration.
Definition: channel.hh:34
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 stack of error messages to provide a pretty formatted error traceback.
Definition: errorstack.hh:41
Generic representation of a scan list.
Definition: scanlist.hh:15
ScanList & operator=(const ScanList &other)
Copies the given scan list.
Definition: scanlist.cc:38
ChannelReference * secondary
The secondary channel.
Definition: scanlist.hh:22
ConfigItem * clone() const
Clones this item.
Definition: scanlist.cc:44
void clear()
Clears the scan list.
Definition: scanlist.cc:54
Channel * channel(int idx) const
Returns the channel at the given index.
Definition: scanlist.cc:84
ChannelRefList * channels
The list of channels.
Definition: scanlist.hh:26
ChannelReference _secondary
The secondary priority channel.
Definition: scanlist.hh:100
ChannelReference _primary
The priority channel.
Definition: scanlist.hh:98
void setSecondaryChannel(Channel *channel)
Sets the secondary priority channel.
Definition: scanlist.cc:147
TyTScanListExtension * tytScanListExtension() const
Returns the TyT scan-list extension instance (if set).
Definition: scanlist.cc:175
ChannelReference * primary()
Returns the primary channel reference.
bool remChannel(int idx)
Removes the channel at the given index.
Definition: scanlist.cc:97
Channel * primaryChannel() const
Returns the priority channel.
Definition: scanlist.cc:120
Channel * revertChannel() const
Returns the TX channel.
Definition: scanlist.cc:164
int count() const
Returns the number of channels within the scanlist.
Definition: scanlist.cc:74
ChannelRefList _channels
The channel list.
Definition: scanlist.hh:96
Q_INVOKABLE ScanList(QObject *parent=nullptr)
Default constructor.
Definition: scanlist.cc:17
ChannelReference * revert
The revert channel.
Definition: scanlist.hh:24
Channel * secondaryChannel() const
Returns the secondary priority channel.
Definition: scanlist.cc:142
ChannelReference * primary
The primary channel.
Definition: scanlist.hh:20
void setPrimaryChannel(Channel *channel)
Sets the priority channel.
Definition: scanlist.cc:125
ChannelReference _revert
The transmit channel.
Definition: scanlist.hh:102
ChannelReference * revert()
Returns the revert channel reference.
bool contains(Channel *channel) const
Returns true if the given channel is part of this scanlist.
Definition: scanlist.cc:79
ChannelReference * secondary()
Returns the secondary channel reference.
int addChannel(Channel *channel, int idx=-1)
Adds a channel to the scan list.
Definition: scanlist.cc:89
void setRevertChannel(Channel *channel)
Sets the TX channel.
Definition: scanlist.cc:169
TyTScanListExtension * _tyt
TyT scan-list settings extension.
Definition: scanlist.hh:104
void setTyTScanListExtension(TyTScanListExtension *tyt)
Sets the TyT scan-list extension.
Definition: scanlist.cc:179
TyTScanListExtension * tyt
The TyT scan-list extension.
Definition: scanlist.hh:29
ChannelRefList * channels()
Returns the channels of the scan list.
Represents the list of scan lists.
Definition: scanlist.hh:112
int add(ConfigObject *obj, int row=-1, bool unique=true)
Adds an element to the list.
Definition: scanlist.cc:207
ScanList * scanlist(int idx) const
Returns the scanlist at the given index.
Definition: scanlist.cc:200
ScanLists(QObject *parent=nullptr)
Constructs an empty list.
Definition: scanlist.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: scanlist.cc:214
Represents device specific scan-list settings for TyT devices.
Definition: tyt_extensions.hh:214