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 <QExplicitlySharedDataPointer>
10 #include <QObject>
11 #include <kweathercore/kweathercore_export.h>
12 
13 namespace KWeatherCore
14 {
15 class PendingWeatherForecastPrivate;
16 /**
17  * @short The PendingWeatherForecast class contains the reply to an asynchronous
18  * weather forecast request.
19  *
20  * @see WeatherForecastSource
21  *
22  * @author Han Young <[email protected]>
23  */
24 class KWEATHERCORE_EXPORT PendingWeatherForecast : public QObject
25 {
26  Q_OBJECT
27 public:
28  /**
29  * value pointer to the shared weather data
30  * the pointer is nullptr until finished() raised
31  * @return
32  */
34  /**
35  * isFinished if the call has finished
36  * @return
37  */
38  bool isFinished() const;
39 
40 Q_SIGNALS:
41  /**
42  * signals the call has finished
43  */
44  void finished();
45  /**
46  * indicate there is a network error
47  */
48  void networkError();
49 
50 protected:
51  friend class WeatherForecastSourcePrivate;
52  explicit PendingWeatherForecast(
53  double latitude,
54  double longitude,
55  const QUrl &url,
56  const QString &timezone = QString(),
57  const std::vector<Sunrise> &sunrise = std::vector<Sunrise>());
58  explicit PendingWeatherForecast(
60 
61 private:
62  PendingWeatherForecastPrivate *d = nullptr;
63 };
64 }
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 Thu Jul 29 2021 23:03:41 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.