digiKam
ipfswindow.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 : 2012-02-12
7  * Description : a tool to export images to IPFS web service
8  *
9  * Copyright (C) 2018 by Amar Lakshya <amar dot lakshya at xaviers dot edu dot in>
10  * Copyright (C) 2018-2020 by Caulier Gilles <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_IPFS_WINDOW_H
25 #define DIGIKAM_IPFS_WINDOW_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QLabel>
31 
32 // Local includes
33 
34 #include "ipfsimageslist.h"
35 #include "ipfstalker.h"
36 #include "wstooldialog.h"
37 #include "dinfointerface.h"
38 
39 using namespace Digikam;
40 
42 {
43 
44 class IpfsWindow : public WSToolDialog
45 {
46  Q_OBJECT
47 
48 public:
49 
50  explicit IpfsWindow(DInfoInterface* const iface, QWidget* const parent = nullptr);
51  ~IpfsWindow() override;
52 
53  void reactivate();
54 
55 public Q_SLOTS:
56 
57  // UI callbacks
58 
59  void slotUpload();
60  void slotFinished();
61  void slotCancel();
62 
63  // IpfsTalker callbacks
64 
65 /*
66  void apiAuthorized(bool success, const QString& username);
67  void apiAuthError(const QString& msg);
68 */
69  void apiProgress(unsigned int percent, const IpfsTalkerAction& action);
70  void apiRequestPin(const QUrl& url);
71  void apiSuccess(const IpfsTalkerResult& result);
72  void apiError(const QString& msg, const IpfsTalkerAction& action);
73  void apiBusy(bool busy);
74 
75 private:
76 
77  void closeEvent(QCloseEvent* e) override;
78  void setContinueUpload(bool state);
79  void readSettings();
80  void saveSettings();
81 
82 private:
83 
84  class Private;
85  Private* const d;
86 };
87 
88 } // namespace DigikamGenericIpfsPlugin
89 
90 #endif // DIGIKAM_IPFS_WINDOW_H
Definition: ipfswindow.h:45
Definition: dinfointerface.h:56
Definition: wstooldialog.h:43
Definition: ipfsimageslist.cpp:42
Definition: datefolderview.cpp:43