File indexing completed on 2024-12-08 10:16:06
0001 /* 0002 SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef WIKIDATAQUERYMANAGER_H 0008 #define WIKIDATAQUERYMANAGER_H 0009 0010 #include <QObject> 0011 0012 class WikidataQuery; 0013 class QNetworkAccessManager; 0014 class QNetworkReply; 0015 0016 /** Executes wikidata queries. */ 0017 class WikidataQueryManager : public QObject 0018 { 0019 Q_OBJECT 0020 public: 0021 explicit WikidataQueryManager(QObject *parent = nullptr); 0022 ~WikidataQueryManager() override; 0023 0024 void execute(WikidataQuery *query); 0025 0026 private: 0027 void executeNextSubQuery(WikidataQuery *query); 0028 void subQueryFinished(WikidataQuery *query, QNetworkReply *reply); 0029 QNetworkAccessManager *m_nam; 0030 }; 0031 0032 #endif // WIKIDATAQUERYMANAGER_H