Enroute Flight Navigation
A navigation app for VFR pilots
FlarmnetDB.h
1/***************************************************************************
2 * Copyright (C) 2021-2026 by Stefan Kebekus *
3 * stefan.kebekus@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21#pragma once
22
23#include <QCache>
24#include <QObject>
25
26#include "dataManagement/Downloadable_SingleFile.h"
27
28namespace Traffic {
29
30
37class FlarmnetDB : public QObject {
38 Q_OBJECT
39
40public:
47 FlarmnetDB(QObject* parent=nullptr);
48
49 ~FlarmnetDB() override = default;
50
51 //
52 // Methods
53 //
54
66 Q_INVOKABLE QString registration(const QString& key);
67
68private slots:
69 // The title says everything
70 void clearCache();
71
72 // The title says everything
73 void deferredInitialization();
74
75 // The title says everything
76 void findFlarmnetDBDownloadable();
77
78private:
79 Q_DISABLE_COPY_MOVE(FlarmnetDB)
80
81 auto registrationFromFile(const QString& key) -> QString;
82
83 QPointer<DataManagement::Downloadable_SingleFile> flarmnetDBDownloadable;
84
85 QCache<QString, QString> m_cache;
86};
87
88} // namespace Traffic
FlarmnetDB(QObject *parent=nullptr)
Default constructor.
Q_INVOKABLE QString registration(const QString &key)
Find registration for a given key.