LibDMRConf
0.6.0
A library to program DMR radios.
|
Represents a RoamingZone within the abstract device configuration. More...
#include <roaming.hh>
Signals | |
void | modified () |
Gets emitted whenever the zone list or any of its zones is modified. | |
Public Member Functions | |
RoamingZone (const QString &name, QObject *parent=nullptr) | |
Constructor. More... | |
int | count () const |
Returns the number of zones. | |
void | clear () |
Clears the zone list. | |
const QString & | name () const |
Returns the name of the roaming zone. | |
void | setName (const QString &name) |
Sets the name of the roaming zone. | |
DigitalChannel * | channel (int idx) const |
Retunrs the digital channel, which is the member at index idx (0-based). More... | |
bool | addChannel (DigitalChannel *ch, int row=-1) |
Adds a channel to the roaming zone. More... | |
bool | remChannel (int row) |
Removes the channel from the roaming zone at index row . | |
bool | remChannel (DigitalChannel *ch) |
Removes the given channel from the roaming zone. | |
bool | moveUp (int row) |
Moves the channel at the given row one up. | |
bool | moveDown (int row) |
Moves the channel at the given row one down. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Implementation of QAbstractListModel, returns the number of rows. | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Implementation of QAbstractListModel, returns the item 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 |
Holds the name of the roaming zone. | |
QVector< DigitalChannel * > | _channel |
Holds the actual channels of the roaming zone. | |
Represents a RoamingZone within the abstract device configuration.
A roaming zone collects a set of repeaters that act as alternatives to eachother. When a selected repeater gets out of range, another one might be found automaticall from within the roaming zone.
|
explicit |
Constructor.
name | Specifies the name of the roaming zone. |
parent | Specifies the QObject parent of this zone. |
bool RoamingZone::addChannel | ( | DigitalChannel * | ch, |
int | row = -1 |
||
) |
Adds a channel to the roaming zone.
ch | Specifies the channel to add. |
row | Speicifies the index where to insert the channel (optional, default insert at end). |
DigitalChannel * RoamingZone::channel | ( | int | idx | ) | const |
Retunrs the digital channel, which is the member at index idx
(0-based).
idx | Specifies the index of the member channel. |