1
/** ===========================================================
4
* This file is a part of KDE project
5
* <a href="https://projects.kde.org/projects/extragear/libs/libmediawiki">libmediawiki</a>
8
* @brief a MediaWiki C++ interface for KDE
10
* @author Copyright (C) 2011-2013 by Gilles Caulier
11
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
12
* @author Copyright (C) 2010 by Ludovic Delfau
13
* <a href="mailto:ludovicdelfau at gmail dot com">ludovicdelfau at gmail dot com</a>
14
* @author Copyright (C) 2010 by Paolo de Vathaire
15
* <a href="mailto:paolo dot devathaire at gmail dot com">paolo dot devathaire at gmail dot com</a>
17
* This program is free software; you can redistribute it
18
* and/or modify it under the terms of the GNU General
19
* Public License as published by the Free Software Foundation;
20
* either version 2, or (at your option)
23
* This program is distributed in the hope that it will be useful,
24
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26
* GNU General Public License for more details.
28
* ============================================================ */
30
#ifndef MEDIAWIKI_QUERYIMAGES_H
31
#define MEDIAWIKI_QUERYIMAGES_H
40
#include "mediawiki_export.h"
47
class QueryImagesPrivate;
50
* @brief Query images job.
52
* Gets a list of all images used on pages.
54
class MEDIAWIKI_EXPORT QueryImages : public Job
57
Q_DECLARE_PRIVATE(QueryImages)
62
* @brief Indicates all possible error conditions found during the processing of the job.
67
* @brief A network error has occurred.
69
NetworkError = KJob::UserDefinedError + 1,
72
* @brief A XML error has occurred.
80
* @brief Constructs a query images job.
81
* @param mediawiki the mediawiki concerned by the job
82
* @param parent the QObject parent
84
explicit QueryImages(MediaWiki& mediawiki, QObject* const parent = 0);
87
* @brief Destroys a query images job.
89
virtual ~QueryImages();
92
* @brief Set the title.
93
* @param title the title of the page
95
void setTitle(const QString& title);
98
* @brief Set the limit.
99
* @param limit number of images returned by one signal #pages()
101
void setLimit(unsigned int limit);
104
* @brief Starts the job asynchronously.
106
virtual void start();
111
* @brief Provides a list of all images used on pages
113
* This signal can be emitted several times.
115
* @param pages list of all images used on pages
117
void images(const QList<Image> & images);
121
void doWorkSendRequest();
122
void doWorkProcessReply();
125
} // namespace mediawiki
127
#endif // MEDIAWIKI_QUERYIMAGES_H