Auto-updating DMR user database.
More...
#include <userdatabase.hh>
|
|
void | download () |
| | Starts the download of the user database.
|
| |
|
|
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.
|
| |
| void | readyChanged (bool ready) |
| | Gets emitted, once the database has been loaded or cleard.
|
| |
|
| | UserDatabase (bool parallel, unsigned updatePeriodDays=30, QObject *parent=nullptr) |
| | Constructs the user-database.
|
| |
|
qint64 | count () const |
| | Returns the number of users.
|
| |
|
bool | exists () const |
| | Retruns true, if the user database file exists.
|
| |
|
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.
|
| |
|
bool | ready () const |
| | Returns true, if the database has been loaded.
|
| |
|
void | sortUsers (unsigned id) |
| | Sorts users with respect to the distance to the given ID.
|
| |
|
void | sortUsers (const QSet< unsigned > &ids) |
| | Sorts users with respect to the minimum distance to the given IDs.
|
| |
|
const User & | user (int idx) const |
| | Returns the user with index idx.
|
| |
|
unsigned | 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.
|
| |
|
|
bool | ready |
| | Get notification, once the database has been loaded.
|
| |
Auto-updating DMR user database.
This class represents 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.
◆ UserDatabase()
| UserDatabase::UserDatabase |
( |
bool |
parallel, |
|
|
unsigned |
updatePeriodDays = 30, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
|
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.
◆ readyChanged
| void UserDatabase::readyChanged |
( |
bool |
ready | ) |
|
|
signal |
Gets emitted, once the database has been loaded or cleard.
- Warning
- This event might be emitted by another thread.
The documentation for this class was generated from the following files:
- /home/hannes/Software/qdmr/lib/userdatabase.hh
- /home/hannes/Software/qdmr/lib/userdatabase.cc