digiKam
vkalbumchooser.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_ALBUM_CHOOSER_H
25 #define DIGIKAM_VK_ALBUM_CHOOSER_H
26 
27 // Qt includes
28 
29 #include <QString>
30 #include <QGroupBox>
31 
32 // LibKvkontakte includes
33 
34 #include "vkontakte_albuminfo.h"
35 
36 // Local includes
37 
38 #include "vknewalbumdlg.h"
39 
40 class KJob;
41 
42 namespace Vkontakte
43 {
44  class VkApi;
45 }
46 
48 {
49 
50 class VKAlbumChooser : public QGroupBox
51 {
52  Q_OBJECT
53 
54 public:
55 
56  explicit VKAlbumChooser(QWidget* const parent, Vkontakte::VkApi* const vkapi);
57  ~VKAlbumChooser() override;
58 
59 public:
60 
61  void clearList();
62 
64  bool getCurrentAlbumId(int &out);
65  void selectAlbum(int aid);
66 
67 private Q_SLOTS:
68 
69  void slotNewAlbumRequest();
70  void slotEditAlbumRequest();
71  void slotDeleteAlbumRequest();
72  void slotReloadAlbumsRequest();
73 
74  void slotStartAlbumCreation(const VKNewAlbumDlg::AlbumProperties& album);
75  void slotStartAlbumEditing(int aid, const VKNewAlbumDlg::AlbumProperties& album);
76  void slotStartAlbumDeletion(int aid);
77  void slotStartAlbumsReload();
78 
79  void slotAlbumCreationDone(KJob* kjob);
80  void slotAlbumEditingDone(KJob* kjob);
81  void slotAlbumDeletionDone(KJob* kjob);
82  void slotAlbumsReloadDone(KJob* kjob);
83 
84 private:
85 
86  void updateBusyStatus(bool busy);
87  void handleVkError(KJob* kjob);
88 
89 private:
90 
91  class Private;
92  Private* const d;
93 };
94 
95 } // namespace DigikamGenericVKontaktePlugin
96 
97 #endif // DIGIKAM_VK_ALBUM_CHOOSER_H
Definition: vkalbumchooser.h:51
bool getCurrentAlbumInfo(VKNewAlbumDlg::AlbumProperties &out)
Definition: vkalbumchooser.cpp:162
void selectAlbum(int aid)
Definition: vkalbumchooser.cpp:199
void clearList()
Clear the list of albums.
Definition: vkalbumchooser.cpp:157
~VKAlbumChooser() override
Definition: vkalbumchooser.cpp:149
VKAlbumChooser(QWidget *const parent, Vkontakte::VkApi *const vkapi)
Definition: vkalbumchooser.cpp:85
bool getCurrentAlbumId(int &out)
Definition: vkalbumchooser.cpp:182
Definition: vkalbumchooser.cpp:52