|
libdrmconf 0.15.1
A library to program DMR radios.
|
Downloads, periodically updates and provides a list of talk group IDs and their names. More...
#include <talkgroupdatabase.hh>


Public Slots | |
| void | download () |
| Starts the download of the talk group database. | |
Public Member Functions | |
| TalkGroupDatabase (unsigned updatePeriodDays=30, QObject *parent=nullptr) | |
| Constructs a talk group database. | |
| qint64 | count () const |
| Returns the number of talk groups. | |
| unsigned | dbAge () const |
| Returns the age of the database in days. | |
| TalkGroup | talkgroup (int index) const |
| Returns the talk group entry at the given index. | |
| bool | load () |
| Loads all entries from the downloaded talk group db. | |
| bool | load (const QString &filename) |
| Loads all entries from the talk group db at the specified location. | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| Implements the QAbstractTableModel interface, returns the number of rows (number of entries). | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| Implements the QAbstractTableModel interface, returns the number of columns. | |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| Implements the QAbstractTableModel interface, return the entry data. | |
Protected Attributes | |
| QVector< TalkGroup > | _talkgroups |
| Holds all talk groups as id->name table. | |
| QNetworkAccessManager | _network |
| The network access used for downloading. | |
Downloads, periodically updates and provides a list of talk group IDs and their names.
| TalkGroupDatabase::TalkGroupDatabase | ( | unsigned | updatePeriodDays = 30, |
| QObject * | parent = nullptr ) |
Constructs a talk group database.
| updatePeriodDays | Specifies the update period of the DB in days. |
| parent | Specifies the QObject parent. |