File indexing completed on 2024-05-12 05:29:38
0001 /* 0002 * SPDX-FileCopyrightText: 2007-2009 Shawn Starr <shawn.starr@rogers.com> 0003 * SPDX-FileCopyrightText: 2012 Luís Gabriel Lima <lampih@gmail.com> 0004 * SPDX-FileCopyrightText: 2017-2018 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 * SPDX-FileCopyrightText: 2022 Ismael Asensio <isma.af@gmail.com> 0006 * 0007 * SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #ifndef WEATHERAPPLET_H 0011 #define WEATHERAPPLET_H 0012 0013 #include <Plasma5Support/DataEngineConsumer> 0014 #include <Plasma/Applet> 0015 0016 class WeatherApplet : public Plasma::Applet, public Plasma5Support::DataEngineConsumer 0017 { 0018 Q_OBJECT 0019 // used for making this information available to the config pages 0020 Q_PROPERTY(bool needsToBeSquare MEMBER m_needsToBeSquare NOTIFY needsToBeSquareChanged FINAL) 0021 0022 Q_PROPERTY(QVariantMap providers MEMBER m_providers NOTIFY providersChanged FINAL) 0023 0024 public: 0025 WeatherApplet(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 0026 ~WeatherApplet() override; 0027 0028 Q_SIGNALS: 0029 void needsToBeSquareChanged(); 0030 void providersChanged(); 0031 0032 private: 0033 void setDefaultUnits(); 0034 0035 private: 0036 QVariantMap m_providers; 0037 bool m_needsToBeSquare = false; 0038 }; 0039 0040 #endif