digiKam
gsreplacedlg.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-02-15
7  * Description : a tool to export items to Google web services
8  *
9  * Copyright (C) 2010 by Jens Mueller <tschenser at gmx dot de>
10  * Copyright (C) 2013-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_GS_REPLACE_DLG_H
25 #define DIGIKAM_GS_REPLACE_DLG_H
26 
27 // Qt includes
28 
29 #include <QDialog>
30 #include <QString>
31 #include <QUrl>
32 #include <QNetworkReply>
33 
34 // Local includes
35 
36 #include "dinfointerface.h"
37 #include "thumbnailloadthread.h"
38 
39 using namespace Digikam;
40 
42 {
43 
45 {
47  PWR_ADD = 1,
50  PWR_REPLACE_ALL = 4
51 };
52 
53 class ReplaceDialog : public QDialog
54 {
55  Q_OBJECT
56 
57 public:
58 
59  ReplaceDialog(QWidget* const parent,
60  const QString& caption,
61  DInfoInterface* const iface,
62  const QUrl& src,
63  const QUrl& dest);
64  ~ReplaceDialog() override;
65 
66  int getResult();
67 
68 public Q_SLOTS:
69 
70  void cancelPressed();
71  void addPressed();
72  void addAllPressed();
73  void replacePressed();
74  void replaceAllPressed();
75 
76 private Q_SLOTS:
77 
78  void slotFinished(QNetworkReply* reply);
79  void slotThumbnail(const LoadingDescription&, const QPixmap&);
80  void slotProgressTimerDone();
81 
82 private:
83 
84  QPixmap setProgressAnimation(const QPixmap& thumb, const QPixmap& pix);
85 
86 private:
87 
88  class Private;
89  Private* const d;
90 };
91 
92 } // namespace DigikamGenericGoogleServicesPlugin
93 
94 #endif // DIGIKAM_GS_REPLACE_DLG_H
Definition: dinfointerface.h:56
Definition: loadingdescription.h:45
Definition: gdmpform.cpp:46
ReplaceDialog_Result
Definition: gsreplacedlg.h:45
@ PWR_REPLACE_ALL
Definition: gsreplacedlg.h:50
@ PWR_ADD_ALL
Definition: gsreplacedlg.h:48
@ PWR_ADD
Definition: gsreplacedlg.h:47
@ PWR_REPLACE
Definition: gsreplacedlg.h:49
@ PWR_CANCEL
Definition: gsreplacedlg.h:46
Definition: datefolderview.cpp:43