digiKam
yfwindow.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 : 2010-11-15
7  * Description : a tool to export items to YandexFotki web service
8  *
9  * Copyright (C) 2010 by Roman Tsisyk <roman at tsisyk dot com>
10  * Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
11  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12  * Copyright (C) 2009 by Luka Renko <lure at kubuntu dot org>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_YF_WINDOW_H
27 #define DIGIKAM_YF_WINDOW_H
28 
29 // Qt includes
30 
31 #include <QWidget>
32 
33 // Local includes
34 
35 #include "wstooldialog.h"
36 #include "yfalbum.h"
37 #include "yfphoto.h"
38 #include "dinfointerface.h"
39 
40 class QCloseEvent;
41 
42 using namespace Digikam;
43 
44 namespace DigikamGenericYFPlugin
45 {
46 
47 class YFWindow : public WSToolDialog
48 {
49  Q_OBJECT
50 
51 public:
52 
53  explicit YFWindow(DInfoInterface* const iface, QWidget* const parent, bool import = false);
54  ~YFWindow() override;
55 
56 public:
57 
62  void reactivate();
63 
64  QString getDestinationPath() const;
65 
66 private Q_SLOTS:
67 
69  void slotChangeUserClicked();
70 
71  void slotError();
72  void slotGetSessionDone();
73  void slotGetTokenDone();
74  void slotGetServiceDone();
75 
76  void slotListAlbumsDone(const QList<YandexFotkiAlbum>& albumsList);
77  void slotListPhotosDone(const QList <YFPhoto>& photosList);
78  void slotListPhotosDoneForUpload(const QList <YFPhoto>& photosList);
79  void slotListPhotosDoneForDownload(const QList <YFPhoto>& photosList);
80  void slotUpdatePhotoDone(const YFPhoto&);
81  void slotUpdateAlbumDone();
82 
83  void slotNewAlbumRequest();
84  void slotReloadAlbumsRequest();
85 
86  void slotStartTransfer();
87  void slotCancelClicked();
88  void slotFinished();
89 
90 private:
91 
92  void closeEvent(QCloseEvent* event) override;
93 
94  void readSettings();
95  void writeSettings();
96 
97  void reset();
98  void updateControls(bool val);
99  void updateLabels();
100 
101  void authenticate(bool forceAuthWindow);
102  void updateNextPhoto();
103 
104 private:
105 
106  class Private;
107  Private* const d;
108 };
109 
110 } // namespace DigikamGenericYFPlugin
111 
112 #endif // DIGIKAM_YF_WINDOW_H
Definition: yfphoto.h:38
Definition: yfwindow.h:48
Definition: dinfointerface.h:56
Definition: wstooldialog.h:43
Definition: piwigotalker.h:48
Definition: yfalbum.cpp:27
Definition: datefolderview.cpp:43