digiKam
mediawiki_queryinfo.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2011-03-22
7  * Description : a Iface C++ interface
8  *
9  * Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2011 by Alexandre Mendes <alex dot mendes1988 at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_MEDIAWIKI_QUERYINFO_H
25 #define DIGIKAM_MEDIAWIKI_QUERYINFO_H
26 
27 // Qt includes
28 
29 #include <QList>
30 #include <QString>
31 #include <QUrl>
32 #include <QDateTime>
33 
34 // Local includes
35 
36 #include "mediawiki_page.h"
37 #include "mediawiki_protection.h"
38 #include "mediawiki_job.h"
39 
40 
41 namespace MediaWiki
42 {
43 
44 class Iface;
45 class QueryInfoPrivate;
46 
52 class QueryInfo : public Job
53 {
54  Q_OBJECT
55  Q_DECLARE_PRIVATE(QueryInfo)
56 
57 public:
58 
64  explicit QueryInfo(Iface& MediaWiki, QObject* const parent = nullptr);
65 
69  ~QueryInfo() override;
70 
74  void start() override;
75 
80  void setPageName(const QString& title);
81 
86  void setToken(const QString& token);
87 
92  void setPageId(unsigned int id);
93 
98  void setRevisionId(unsigned int id);
99 
100 Q_SIGNALS:
101 
106  void page(const Page& p);
107  void protection(const QVector<Protection>& protect);
108 
109 private Q_SLOTS:
110 
114  void doWorkSendRequest();
115 
116  void doWorkProcessReply();
117 };
118 
119 } // namespace MediaWiki
120 
121 #endif // DIGIKAM_MEDIAWIKI_QUERYINFO_H