1#ifndef TRANSPONDERDATABASE_HH
2#define TRANSPONDERDATABASE_HH
4#include <QAbstractTableModel>
5#include <QNetworkAccessManager>
29 unsigned int satellite()
const;
33 const QString &name()
const;
39 static Transponder fromSATNOGS(
const QJsonObject &obj);
42 unsigned int _satellite;
57 typedef QVector<Transponder>::const_iterator const_iterator;
60 explicit TransponderDatabase(
bool autoLoad,
unsigned int updatePeriod = 7, QObject *parent =
nullptr);
62 unsigned int dbAge()
const;
66 int rowCount(
const QModelIndex &parent)
const;
67 int columnCount(
const QModelIndex &parent)
const;
68 QVariant data(
const QModelIndex &index,
int role)
const;
70 const_iterator begin()
const;
71 const_iterator end()
const;
88 void downloadFinished(QNetworkReply *reply);
91 bool load(
const QString &filename);
95 unsigned int _updatePeriod;
97 QVector<Transponder> _transponders;
99 QNetworkAccessManager _network;
Definition transponderdatabase.hh:53
void error(const QString &msg)
Gets emitted if the loading one of the sources fails.
void download()
Starts the download of the transponder.
Definition transponderdatabase.cc:255
void loaded()
Gets emitted once the transponder has been loaded.
Helper type to encode frequencies without any rounding error.
Definition frequency.hh:11
Definition transponderdatabase.hh:12