LibDMRConf  0.6.0
A library to program DMR radios.
Signals | Public Member Functions | Protected Slots | Protected Attributes | List of all members
RoamingZone Class Reference

Represents a RoamingZone within the abstract device configuration. More...

#include <roaming.hh>

Inheritance diagram for RoamingZone:
DefaultRoamingZone

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.
 
DigitalChannelchannel (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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ RoamingZone()

RoamingZone::RoamingZone ( const QString &  name,
QObject *  parent = nullptr 
)
explicit

Constructor.

Parameters
nameSpecifies the name of the roaming zone.
parentSpecifies the QObject parent of this zone.

Member Function Documentation

◆ addChannel()

bool RoamingZone::addChannel ( DigitalChannel ch,
int  row = -1 
)

Adds a channel to the roaming zone.

Parameters
chSpecifies the channel to add.
rowSpeicifies the index where to insert the channel (optional, default insert at end).

◆ channel()

DigitalChannel * RoamingZone::channel ( int  idx) const

Retunrs the digital channel, which is the member at index idx (0-based).

Parameters
idxSpecifies the index of the member channel.

The documentation for this class was generated from the following files: