digiKam
vkauthwidget.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_VK_AUTH_WIDGET_H
25 #define DIGIKAM_VK_AUTH_WIDGET_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QString>
31 #include <QGroupBox>
32 
33 class KJob;
34 
35 namespace Vkontakte
36 {
37  class VkApi;
38 }
39 
41 {
42 
43 class VKAuthWidget : public QGroupBox
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit VKAuthWidget(QWidget* const parent, Vkontakte::VkApi* const vkapi);
50  ~VKAuthWidget() override;
51 
52  QString albumsURL() const;
53 
54 Q_SIGNALS:
55 
58 
59 public Q_SLOTS:
60 
61  void slotStartAuthentication(bool forceLogout);
62 
63 private Q_SLOTS:
64 
65  void slotChangeUserClicked();
66  void slotUpdateAuthInfo();
67  void slotStartGetUserInfo();
68  void slotGetUserInfoDone(KJob* kjob);
69 
70 private:
71 
72  void handleVkError(KJob* kjob);
73 
74 private:
75 
76  class Private;
77  Private* const d;
78 };
79 
80 } // namespace DigikamGenericVKontaktePlugin
81 
82 #endif // DIGIKAM_VK_AUTH_WIDGET_H
Definition: vkauthwidget.h:44
VKAuthWidget(QWidget *const parent, Vkontakte::VkApi *const vkapi)
Definition: vkauthwidget.cpp:69
~VKAuthWidget() override
Definition: vkauthwidget.cpp:103
void slotStartAuthentication(bool forceLogout)
Definition: vkauthwidget.cpp:110
QString albumsURL() const
Definition: vkauthwidget.cpp:187
Definition: vkalbumchooser.cpp:52