libdrmconf 0.13.3
A library to program DMR radios.
Loading...
Searching...
No Matches
TransponderDatabase Class Reference

Implements the database of all known transponder. More...

#include <transponderdatabase.hh>

Inheritance diagram for TransponderDatabase:
Collaboration diagram for TransponderDatabase:

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 TranspondergetAt (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.

Detailed Description

Implements the database of all known transponder.

Constructor & Destructor Documentation

◆ TransponderDatabase()

TransponderDatabase::TransponderDatabase ( bool autoLoad,
unsigned int updatePeriod = 7,
QObject * parent = nullptr )
explicit

Constructor.

Parameters
autoLoadIf true, the transponder information gets downloaded and loaded automatically.
updatePeriodSpecifies the maximum age of the cache in days.
parentThe QObject parent.

Member Function Documentation

◆ columnCount()

int TransponderDatabase::columnCount ( const QModelIndex & parent) const

Implements the QAbstractTableModel interface.

Returns the number of columns in the table.

◆ data()

QVariant TransponderDatabase::data ( const QModelIndex & index,
int role ) const

Implements the QAbstractTableModel interface.

Returns the data for the cell.

◆ rowCount()

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.


The documentation for this class was generated from the following files:
  • /builddir/build/BUILD/qdmr-0.13.3-build/qdmr-0.13.3/lib/transponderdatabase.hh
  • /builddir/build/BUILD/qdmr-0.13.3-build/qdmr-0.13.3/lib/transponderdatabase.cc