| LibDMRConf
    0.5.2
    A library to program DMR radios. | 
Auto-updating DMR user database. More...
#include <userdatabase.hh>
 
 | Classes | |
| class | User | 
| Represents the user information within the UserDatabase.  More... | |
| Public Slots | |
| void | download () | 
| Starts the download of the user database. | |
| Signals | |
| void | loaded () | 
| Gets emitted once the call-sign database has been loaded. | |
| void | error (const QString &msg) | 
| Gets emitted if the loading of the call-sign database fails. | |
| Public Member Functions | |
| UserDatabase (uint updatePeriodDays=30, QObject *parent=nullptr) | |
| Constructs the user-database.  More... | |
| qint64 | count () const | 
| Returns the number of users. | |
| bool | load () | 
| Loads all entries from the downloaded user database. | |
| bool | load (const QString &filename) | 
| Loads all entries from the downloaded user database at the specified location. | |
| void | sortUsers (uint id) | 
| Sorts users with respect to the distance to the given ID. | |
| const User & | user (int idx) const | 
| Returns the user with index idx. | |
| uint | dbAge () const | 
| Returns the age of the database in days. | |
| 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. | |
Auto-updating DMR user database.
This class repesents the complete DMR user database. The user database gets downloaded from https://www.radioid.net/static/users.json and kept up-to-date by re-downloading it periodically (by default every 30 days). This user database gets used in the GUI application to help assemble private call contacts and to assemble so-called CSV callsign databases, that are programmable to some DMR radios to resolve the DMR ID to callsigns and names.
| 
 | explicit | 
Constructs the user-database.
The constructor will download the current user database if it was not downloaded yet or if the downloaded version is older than updatePeriodDays days. 
 1.8.17
 1.8.17