digiKam
mediawiki_queryimages.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 Ludovic Delfau <ludovicdelfau 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_QUERYIMAGES_H
25 #define DIGIKAM_MEDIAWIKI_QUERYIMAGES_H
26 
27 // KDE includes
28 
29 #include <kjob.h>
30 
31 // Local includes
32 
33 #include "mediawiki_job.h"
34 #include "mediawiki_image.h"
35 
36 namespace MediaWiki
37 {
38 
39 class Iface;
40 class QueryImagesPrivate;
41 
47 class QueryImages : public Job
48 {
49  Q_OBJECT
50  Q_DECLARE_PRIVATE(QueryImages)
51 
52 public:
53 
57  enum
58  {
62  NetworkError = KJob::UserDefinedError + 1,
63 
67  XmlError
68  };
69 
70 public:
71 
77  explicit QueryImages(Iface& MediaWiki, QObject* const parent = nullptr);
78 
82  ~QueryImages() override;
83 
88  void setTitle(const QString& title);
89 
94  void setLimit(unsigned int limit);
95 
99  void start() override;
100 
101 Q_SIGNALS:
102 
110  void images(const QList<Image>& images);
111 
112 private Q_SLOTS:
113 
114  void doWorkSendRequest();
115  void doWorkProcessReply();
116 };
117 
118 } // namespace MediaWiki
119 
120 #endif // DIGIKAM_MEDIAWIKI_QUERYIMAGES_H
Definition: piwigotalker.h:48