File indexing completed on 2024-04-28 04:42:42

0001 /*
0002  * SPDX-FileCopyrightText: 2020-2021 Han Young <hanyoung@protonmail.com>
0003  * SPDX-FileCopyrightText: 2020 Devin Lin <espidev@gmail.com>
0004  *
0005  * SPDX-License-Identifier: LGPL-2.0-or-later
0006  */
0007 
0008 #pragma once
0009 
0010 #include "reply.h"
0011 
0012 class QNetworkAccessManager;
0013 namespace KWeatherCore
0014 {
0015 class GeoTimezonePrivate;
0016 /**
0017  * @short Class to obtain timezone via coordinate
0018  *
0019  * This is a class to obtain timezone via coordinate and signals finished() with
0020  * a QString
0021  *
0022  * @author Han Young <hanyoung@protonmail.com>
0023  */
0024 class KWEATHERCORE_EXPORT GeoTimezone : public Reply
0025 {
0026     Q_OBJECT
0027 public:
0028     /**
0029      * GeoTimezone
0030      * @param latitude latitude for the request location
0031      * @param longitude longitude for the request location
0032      */
0033     GeoTimezone(QNetworkAccessManager *nam, double latitude, double longitude, QObject *parent = nullptr);
0034 
0035     /** The result IANA timezone string. */
0036     QString timezone() const;
0037 
0038 private:
0039     Q_DECLARE_PRIVATE(GeoTimezone)
0040 };
0041 }