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

Represents the list of roaming zones within the abstract device configuration. More...

#include <roaming.hh>

Inheritance diagram for RoamingZoneList:

Signals

void modified ()
 Gets emitted whenever the zone list or any of its zones is modified.
 

Public Member Functions

 RoamingZoneList (QObject *parent=nullptr)
 Constructor.
 
int count () const
 Returns the number of roaming zones.
 
void clear ()
 Clears the roaming zone list.
 
int indexOf (RoamingZone *zone) const
 Returns the index of the given roaming zone within this list. More...
 
QSet< DigitalChannel * > uniqueChannels () const
 Returns a set of unique channels used in all roaming zones.
 
void uniqueChannels (QSet< DigitalChannel * > &channels) const
 Adds all channels of all roaming zones to the given set.
 
RoamingZonezone (int idx) const
 Returns the roaming zone at the given index.
 
bool addZone (RoamingZone *zone, int row=-1)
 Adds a roaming zone to the list at the given row. More...
 
bool remZone (int idx)
 Removes the roaming zone at the given index.
 
bool remZone (RoamingZone *zone)
 Removes the given roaming zone from the list.
 
bool moveUp (int row)
 Moves the roaming zone at the given row one up.
 
bool moveDown (int row)
 Moves the roaming zone 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 onZoneDeleted (QObject *obj)
 Internal used callback to handle deleted roaming zones.
 

Protected Attributes

QVector< RoamingZone * > _zones
 The list of roaming zones.
 

Detailed Description

Represents the list of roaming zones within the abstract device configuration.

Member Function Documentation

◆ addZone()

bool RoamingZoneList::addZone ( RoamingZone zone,
int  row = -1 
)

Adds a roaming zone to the list at the given row.

If row<0, the roaming zone is appended to the list.

◆ indexOf()

int RoamingZoneList::indexOf ( RoamingZone zone) const

Returns the index of the given roaming zone within this list.

Returns
Index or -1 if zone is not a member.

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