|
libdrmconf 0.14.1
A library to program DMR radios.
|
Implements the database of all known transponder. More...
#include <transponderdatabase.hh>


Public Types | |
| typedef QVector< Transponder >::const_iterator | const_iterator |
| Just a const iterator over all transponder. | |
Public Slots | |
| void | load () |
| Downloads and loads all transponder information. | |
| void | download () |
| Starts the download of the transponder. | |
Signals | |
| void | loaded () |
| Gets emitted once the transponder has been loaded. | |
| void | error (const QString &msg) |
| Gets emitted if the loading one of the sources fails. | |
Public Member Functions | |
| TransponderDatabase (bool autoLoad, unsigned int updatePeriod=7, QObject *parent=nullptr) | |
| Constructor. | |
| unsigned int | dbAge () const |
| The current age of the cache. | |
| const Transponder & | getAt (unsigned int idx) const |
| Returns the i-th transponder. | |
| int | rowCount (const QModelIndex &parent) const |
| Implements the QAbstractTableModel interface. | |
| int | columnCount (const QModelIndex &parent) const |
| Implements the QAbstractTableModel interface. | |
| QVariant | data (const QModelIndex &index, int role) const |
| Implements the QAbstractTableModel interface. | |
| const_iterator | begin () const |
| Returns an iterator, pointing at the first transponder. | |
| const_iterator | end () const |
| Returns an iterator, pointing right after the last transponder. | |
Protected Member Functions | |
| bool | load (const QString &filename) |
| Loads the transponder information from the given file. | |
Implements the database of all known transponder.
|
explicit |
Constructor.
| autoLoad | If true, the transponder information gets downloaded and loaded automatically. |
| updatePeriod | Specifies the maximum age of the cache in days. |
| parent | The QObject parent. |
| int TransponderDatabase::columnCount | ( | const QModelIndex & | parent | ) | const |
Implements the QAbstractTableModel interface.
Returns the number of columns in the table.
| QVariant TransponderDatabase::data | ( | const QModelIndex & | index, |
| int | role ) const |
Implements the QAbstractTableModel interface.
Returns the data for the cell.
| int TransponderDatabase::rowCount | ( | const QModelIndex & | parent | ) | const |
Implements the QAbstractTableModel interface.
Returns the number of rows in the table. That is, the number of transponder.