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

Represents the list of zones within the generic configuration. More...

#include <zone.hh>

Inheritance diagram for ZoneList:

Signals

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

Public Member Functions

 ZoneList (QObject *parent=nullptr)
 Constructs an empty list of zones.
 
int count () const
 Returns the number of zones.
 
void clear ()
 Clears the zone list.
 
Zonezone (int idx) const
 Returns the zone at the given index.
 
bool addZone (Zone *zone, int row=-1)
 Adds a zone to the list at the given row. More...
 
bool remZone (int idx)
 Removes the zone at the given index.
 
bool remZone (Zone *zone)
 Removes the given zone from the list.
 
bool moveUp (int row)
 Moves the zone at the given row one up.
 
bool moveDown (int row)
 Moves the 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 Zones.
 

Protected Attributes

QVector< Zone * > _zones
 The list of zones.
 

Detailed Description

Represents the list of zones within the generic configuration.

Member Function Documentation

◆ addZone()

bool ZoneList::addZone ( Zone zone,
int  row = -1 
)

Adds a zone to the list at the given row.

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


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