File indexing completed on 2025-01-05 03:53:31

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2012-02-02
0007  * Description : a tool to export items to ImageShack web service
0008  *
0009  * SPDX-FileCopyrightText: 2012      by Dodon Victor <dodonvictor at gmail dot com>
0010  * SPDX-FileCopyrightText: 2013-2018 by Caulier Gilles <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_IMAGE_SHACK_WINDOW_H
0017 #define DIGIKAM_IMAGE_SHACK_WINDOW_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QWidget>
0023 
0024 // Local includes
0025 
0026 #include "wstooldialog.h"
0027 #include "ditemslist.h"
0028 #include "dinfointerface.h"
0029 
0030 using namespace Digikam;
0031 
0032 namespace DigikamGenericImageShackPlugin
0033 {
0034 
0035 class ImageShackWindow : public WSToolDialog
0036 {
0037     Q_OBJECT
0038 
0039 public:
0040 
0041     explicit ImageShackWindow(DInfoInterface* const iface, QWidget* const parent);
0042     ~ImageShackWindow() override;
0043 
0044 public:
0045 
0046     DItemsList* getImagesList() const;
0047 
0048 Q_SIGNALS:
0049 
0050     void signalBusy(bool val);
0051 
0052 private Q_SLOTS:
0053 
0054     void slotImageListChanged();
0055     void slotStartTransfer();
0056     void slotBusy(bool val);
0057     void slotFinished();
0058     void slotCancelClicked();
0059 
0060     void slotJobInProgress(int step, int, const QString& format);
0061     void slotLoginDone(int errCode, const QString& errMsg);
0062     void slotGetGalleriesDone(int errCode, const QString& errMsg);
0063     void slotGetGalleries();
0064 
0065     void slotAddPhotoDone(int errCode, const QString& errMsg);
0066 
0067     void authenticate();
0068 
0069 private:
0070 
0071     void readSettings();
0072     void saveSettings();
0073 
0074     void authenticationDone(int errCode, const QString& errMsg);
0075 
0076     void uploadNextItem();
0077 
0078     void closeEvent(QCloseEvent* e) override;
0079 
0080 private Q_SLOTS:
0081 
0082     void slotChangeRegistrantionCode();
0083     void slotNewAlbumRequest();
0084 
0085 private:
0086 
0087     class Private;
0088     Private* const d;
0089 };
0090 
0091 } // namespace DigikamGenericImageShackPlugin
0092 
0093 #endif // DIGIKAM_IMAGE_SHACK_WINDOW_H