swift
Loading...
Searching...
No Matches
vatsimmetarreader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_CORE_VATSIM_VATSIMMETARREADER_H
7#define SWIFT_CORE_VATSIM_VATSIMMETARREADER_H
8
9#include <QObject>
10
15#include "misc/weather/metar.h"
18
19class QNetworkReply;
20
21namespace swift::core::vatsim
22{
25 {
27
28 public:
31
35
40
41 signals:
44
46 void dataRead(swift::misc::network::CEntityFlags::Entity entity,
47 swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url);
48
49 protected:
50 // CThreadedReader overrides
51 void doWorkImpl() override;
52
53 private:
56 void decodeMetars(QNetworkReply *nwReply);
57
59 void read();
60
62 void reloadSettings();
63
64 private:
68 this, &CVatsimMetarReader::reloadSettings
69 };
70 };
71} // namespace swift::core::vatsim
72#endif // SWIFT_CORE_VATSIM_VATSIMMETARREADER_H
Periodically executes doWorkImpl() in a separate thread.
void metarsRead(const swift::misc::weather::CMetarList &metars)
METARs have been read and converted to swift::misc::weather::CMetarList.
void dataRead(swift::misc::network::CEntityFlags::Entity entity, swift::misc::network::CEntityFlags::ReadState state, int number, const QUrl &url)
Data have been read.
virtual swift::misc::weather::CMetarList getMetars() const
Get METARs.
CVatsimMetarReader(QObject *owner)
Constructor.
virtual swift::misc::weather::CMetar getMetarForAirport(const swift::misc::aviation::CAirportIcaoCode &icao) const
Get METAR for airport.
void doWorkImpl()
This method does the actual work in the derived class.
const QObject * owner() const
Owner of the worker.
Definition worker.h:352
Class template for accessing a specific value in the CSettingsCache.
Value object encapsulating information of airport ICAO data.
Value object encapsulating information about METAR FIXME: runway visibilities FIXME: runway wind shea...
Definition metar.h:38
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
#define SWIFT_CORE_EXPORT
Export a class or function from the library.