digiKam
vkontakte_photojob.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-02-19
7  * Description : a tool to export images to VKontakte web service
8  *
9  * Copyright (C) 2011-2015 by Alexander Potashev <aspotashev at gmail dot com>
10  * Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles 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_VKONTAKTE_PHOTOJOBBASE_H
25 #define DIGIKAM_VKONTAKTE_PHOTOJOBBASE_H
26 
27 #include "vkontakte_jobs.h"
28 
29 // Local includes
30 
31 #include "vkontakte_userinfo.h"
32 
33 namespace Vkontakte
34 {
35 
36 // KJobWithSubjob::doKill will be inherited
37 class PhotoJob : public KJobWithSubjob
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit PhotoJob(const QUrl& url);
44  ~PhotoJob() override;
45 
46  void start() override;
47  QImage photo() const;
48 
49 private Q_SLOTS:
50 
51  void jobFinished(KJob* kjob);
52 
53 private:
54 
55  // Disable
56  explicit PhotoJob(QObject*) = delete;
57 
58 private:
59 
60  class Private;
61  Private* const d;
62 };
63 
64 } // namespace Vkontakte
65 
66 #endif // DIGIKAM_VKONTAKTE_PHOTOJOBBASE_H