digiKam
flickrwindow.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 : 2005-17-06
7  * Description : a tool to export images to Flickr web service
8  *
9  * Copyright (C) 2005-2008 by Vardhman Jain <vardhman at gmail dot com>
10  * Copyright (C) 2008-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_FLICKR_WINDOW_H
25 #define DIGIKAM_FLICKR_WINDOW_H
26 
27 // Qt includes
28 
29 #include <QUrl>
30 #include <QHash>
31 #include <QList>
32 #include <QPair>
33 #include <QLabel>
34 #include <QDialog>
35 #include <QLineEdit>
36 #include <QComboBox>
37 
38 // Local includes
39 
40 #include "wscomboboxintermediate.h"
41 #include "dinfointerface.h"
42 #include "wstooldialog.h"
43 
44 using namespace Digikam;
45 
47 {
48 
49 class FlickrWindow : public WSToolDialog
50 {
51  Q_OBJECT
52 
53 public:
54 
55  explicit FlickrWindow(DInfoInterface* const iface,
56  QWidget* const parent,
57  const QString& serviceName = QLatin1String("Flickr"));
58  ~FlickrWindow() override;
59 
64  void reactivate();
65 
66  void setItemsList(const QList<QUrl>& urls);
67 
68 private Q_SLOTS:
69 
70  void slotLinkingSucceeded();
71  void slotBusy(bool val);
72  void slotError(const QString& msg);
73  void slotFinished();
74  void slotUser1();
75  void slotCancelClicked();
76 
77  void slotCreateNewPhotoSet();
78  void slotUserChangeRequest();
79  void slotRemoveAccount();
80  void slotPopulatePhotoSetComboBox();
81  void slotAddPhotoNext();
82  void slotAddPhotoSucceeded(const QString& photoId);
83  void slotAddPhotoFailed(const QString& msg);
84  void slotAddPhotoSetSucceeded();
85  void slotListPhotoSetsFailed(const QString& msg);
86  void slotAddPhotoCancelAndClose();
87  void slotAuthCancel();
88  void slotImageListChanged();
89  void slotReloadPhotoSetRequest();
90 
91 private:
92 
93  QString guessSensibleSetName(const QList<QUrl>& urlList) const;
94 
95  void closeEvent(QCloseEvent*) override;
96  void readSettings(const QString& uname);
97  void writeSettings();
98 
99  void setUiInProgressState(bool inProgress);
100 
101 private:
102 
103  class Private;
104  Private* const d;
105 };
106 
107 } // namespace DigikamGenericFlickrPlugin
108 
109 #endif // DIGIKAM_FLICKR_WINDOW_H
Definition: flickrwindow.h:50
Definition: dinfointerface.h:56
Definition: wstooldialog.h:43
Definition: flickritem.h:37
Definition: datefolderview.cpp:43