File indexing completed on 2024-12-29 05:00:27
0001 /* 0002 * SPDX-FileCopyrightText: 2007 Tobias Koenig <tokoe@kde.org> 0003 * SPDX-FileCopyrightText: 2008 Anne-Marie Mahfouf <annma@kde.org> 0004 * SPDX-FileCopyrightText: 2013 Aaron Seigo <aseigo@kde.org> 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #pragma once 0010 0011 #include "potdprovider.h" 0012 // Qt 0013 #include <QRegularExpression> 0014 0015 class KJob; 0016 0017 /** 0018 * This class provides the image for the National Geographic's photo of the day. 0019 * Image URL is obtained from https://www.nationalgeographic.com/photo-of-the-day. 0020 */ 0021 class NatGeoProvider : public PotdProvider 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit NatGeoProvider(QObject *parent, const KPluginMetaData &data, const QVariantList &args); 0027 0028 private: 0029 void pageRequestFinished(KJob *job); 0030 void imageRequestFinished(KJob *job); 0031 0032 private: 0033 QRegularExpression re; 0034 };