KWeatherCore

pendingweatherforecast.h
1 /*
2  * SPDX-FileCopyrightText: 2020-2021 Han Young <[email protected]>
3  * SPDX-FileCopyrightText: 2020 Devin Lin <[email protected]>
4  *
5  * SPDX-License-Identifier: LGPL-2.0-or-later
6  */
7 #pragma once
8 #include "weatherforecast.h"
9 #include <QObject>
10 #include <kweathercore/kweathercore_export.h>
11 
12 namespace KWeatherCore
13 {
14 class PendingWeatherForecastPrivate;
15 /**
16  * @short The PendingWeatherForecast class contains the reply to an asynchronous
17  * weather forecast request.
18  *
19  * @see WeatherForecastSource
20  *
21  * @author Han Young <[email protected]>
22  */
23 class KWEATHERCORE_EXPORT PendingWeatherForecast : public QObject
24 {
25  Q_OBJECT
26 public:
27  /**
28  * value pointer to the shared weather data
29  * the pointer is nullptr until finished() raised
30  * @return
31  */
32  WeatherForecast value() const;
33  /**
34  * isFinished if the call has finished
35  * @return
36  */
37  bool isFinished() const;
38 
39 Q_SIGNALS:
40  /**
41  * signals the call has finished
42  */
43  void finished();
44  /**
45  * indicate there is a network error
46  */
47  void networkError();
48 
49 protected:
50  friend class WeatherForecastSourcePrivate;
51  explicit PendingWeatherForecast(double latitude,
52  double longitude,
53  const QUrl &url,
54  const QString &timezone = QString(),
55  const std::vector<Sunrise> &sunrise = std::vector<Sunrise>());
57 
58 private:
59  PendingWeatherForecastPrivate *d = nullptr;
60 };
61 }
The WeatherForecast class contains the weather information of one location for days.
The PendingWeatherForecast class contains the reply to an asynchronous weather forecast request...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Oct 22 2021 23:03:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.