LibDMRConf
0.5.0
A library to program DMR radios.
|
Generic representation of a scan list. More...
#include <scanlist.hh>
Signals | |
void | modified () |
Gets emitted whenever the scanlist is modified. | |
Public Member Functions | |
ScanList (const QString &name, QObject *parent=nullptr) | |
Constructs a scan list with the given name. | |
int | count () const |
Returns the number of channels within the scanlist. | |
void | clear () |
Clears the scan list. | |
const QString & | name () const |
Returns the name of the scanlist. | |
bool | setName (const QString &name) |
Sets the name of the scanlist. | |
bool | contains (Channel *channel) const |
Returns true if the given channel is part of this scanlist. | |
Channel * | channel (int idx) const |
Returns the channel at the given index. | |
bool | addChannel (Channel *channel) |
Adds a channel to the scan list. | |
bool | remChannel (int idx) |
Removes the channel at the given index. | |
bool | remChannel (Channel *channel) |
Removes the given channel. | |
Channel * | priorityChannel () const |
Returns the priority channel. | |
void | setPriorityChannel (Channel *channel) |
Sets the priority channel. | |
Channel * | secPriorityChannel () const |
Returns the secondary priority channel. | |
void | setSecPriorityChannel (Channel *channel) |
Sets the secondary priority channel. | |
Channel * | txChannel () const |
Returns the TX channel. | |
void | setTXChannel (Channel *channel) |
Sets the TX channel. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Implementation of QAbstractListModel, returns the number of channels. | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Implementation of QAbstractListModel, returns the entry data at the given index. | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
Implementation of QAbstractListModel, returns the header data at the given section. | |
Protected Slots | |
void | onChannelDeleted (QObject *obj) |
Internal used callback to handle deleted channels. | |
Protected Attributes | |
QString | _name |
The scanlist name. | |
QVector< Channel * > | _channels |
The channel list. | |
Channel * | _priorityChannel |
The priority channel. | |
Channel * | _secPriorityChannel |
The secondary priority channel. | |
Channel * | _txChannel |
The transmit channel. | |
Generic representation of a scan list.