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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2014-09-30
0007  * Description : a tool to export items to Piwigo web service
0008  *
0009  * SPDX-FileCopyrightText: 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
0010  * SPDX-FileCopyrightText: 2006      by Colin Guthrie <kde at colin dot guthr dot ie>
0011  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  * SPDX-FileCopyrightText: 2008      by Andrea Diamantini <adjam7 at gmail dot com>
0013  * SPDX-FileCopyrightText: 2010-2014 by Frederic Coiffier <frederic dot coiffier at free dot com>
0014  *
0015  * SPDX-License-Identifier: GPL-2.0-or-later
0016  *
0017  * ============================================================ */
0018 
0019 #ifndef DIGIKAM_PIWIGO_WINDOW_H
0020 #define DIGIKAM_PIWIGO_WINDOW_H
0021 
0022 // Qt includes
0023 
0024 #include <QList>
0025 
0026 // Local includes
0027 
0028 #include "piwigoitem.h"
0029 #include "wstooldialog.h"
0030 #include "dinfointerface.h"
0031 
0032 using namespace Digikam;
0033 
0034 namespace DigikamGenericPiwigoPlugin
0035 {
0036 
0037 class PiwigoWindow : public WSToolDialog
0038 {
0039     Q_OBJECT
0040 
0041 public:
0042 
0043     explicit PiwigoWindow(DInfoInterface* const iface,
0044                           QWidget* const parent);
0045     ~PiwigoWindow() override;
0046 
0047 private:
0048 
0049     void connectSignals();
0050     void readSettings();
0051     QString cleanName(const QString&) const;
0052     void setUiInProgressState(bool inProgress);
0053 
0054 private Q_SLOTS:
0055 
0056     void slotDoLogin();
0057     void slotLoginFailed(const QString& msg);
0058     void slotBusy(bool val);
0059     void slotProgressInfo(const QString& msg);
0060     void slotError(const QString& msg);
0061     void slotAlbums(const QList<PiwigoAlbum>& albumList);
0062     void slotAlbumSelected();
0063     void slotAddPhoto();
0064     void slotAddPhotoNext();
0065     void slotAddPhotoSucceeded();
0066     void slotAddPhotoFailed(const QString& msg);
0067     void slotAddPhotoCancel();
0068     void slotEnableSpinBox(int n);
0069     void slotSettings();
0070     void slotReloadAlbums();
0071 
0072 private:
0073 
0074     class Private;
0075     Private* const d;
0076 };
0077 
0078 } // namespace DigikamGenericPiwigoPlugin
0079 
0080 #endif // DIGIKAM_PIWIGO_WINDOW_H