File indexing completed on 2025-01-19 03:55:41

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2015-07-28
0007  * Description : Common widgets shared by Web Service tools
0008  *
0009  * SPDX-FileCopyrightText: 2013      by Pankaj Kumar <me at panks dot me>
0010  * SPDX-FileCopyrightText: 2015      by Shourya Singh Gupta <shouryasgupta at gmail dot com>
0011  * SPDX-FileCopyrightText: 2016-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_WS_SETTINGS_WIDGET_H
0018 #define DIGIKAM_WS_SETTINGS_WIDGET_H
0019 
0020 //Qt includes
0021 
0022 #include <QWidget>
0023 
0024 // Local includes
0025 
0026 #include "digikam_export.h"
0027 #include "ditemslist.h"
0028 #include "dinfointerface.h"
0029 #include "dprogresswdg.h"
0030 
0031 class QLabel;
0032 class QSpinBox;
0033 class QCheckBox;
0034 class QButtonGroup;
0035 class QComboBox;
0036 class QPushButton;
0037 class QGroupBox;
0038 class QGridLayout;
0039 class QVBoxLayout;
0040 class QHBoxLayout;
0041 
0042 namespace Digikam
0043 {
0044 
0045 class DIGIKAM_EXPORT WSSettingsWidget : public QWidget
0046 {
0047     Q_OBJECT
0048 
0049 public:
0050 
0051     explicit WSSettingsWidget(QWidget* const parent,
0052                               DInfoInterface* const iface,
0053                               const QString& toolName);
0054     ~WSSettingsWidget() override;
0055 
0056 public:
0057 
0058     void              replaceImageList(QWidget* const widget);
0059     void              addWidgetToSettingsBox(QWidget* const widget);
0060 
0061     QString           getDestinationPath()   const;
0062     QString           getAlbumTitle()        const;
0063 
0064     DItemsList*       imagesList()           const;
0065     DProgressWdg*     progressBar()          const;
0066 
0067     QWidget*          getSettingsBox()       const;
0068     QVBoxLayout*      getSettingsBoxLayout() const;
0069 
0070     QGroupBox*        getAlbumBox()          const;
0071     QGridLayout*      getAlbumBoxLayout()    const;
0072 
0073     QGroupBox*        getOptionsBox()        const;
0074     QGridLayout*      getOptionsBoxLayout()  const;
0075 
0076     QGroupBox*        getUploadBox()         const;
0077     QVBoxLayout*      getUploadBoxLayout()   const;
0078 
0079     QGroupBox*        getSizeBox()           const;
0080     QVBoxLayout*      getSizeBoxLayout()     const;
0081 
0082     QGroupBox*        getAccountBox()        const;
0083     QGridLayout*      getAccountBoxLayout()  const;
0084 
0085     QLabel*           getHeaderLbl()         const;
0086     QLabel*           getUserNameLabel()     const;
0087     QPushButton*      getChangeUserBtn()     const;
0088     QComboBox*        getDimensionCoB()      const;
0089     QPushButton*      getNewAlbmBtn()        const;
0090     QPushButton*      getReloadBtn()         const;
0091     QCheckBox*        getOriginalCheckBox()  const;
0092     QCheckBox*        getResizeCheckBox()    const;
0093     QCheckBox*        getPhotoIdCheckBox()   const;
0094     QSpinBox*         getDimensionSpB()      const;
0095     QSpinBox*         getImgQualitySpB()     const;
0096     QComboBox*        getAlbumsCoB()         const;
0097 
0098 public:
0099 
0100     virtual void updateLabels(const QString& name = QString(),
0101                               const QString& url = QString()) = 0;
0102 
0103 protected Q_SLOTS:
0104 
0105     void slotResizeChecked();
0106 
0107 private:
0108 
0109     class Private;
0110     Private* const d;
0111 };
0112 
0113 } // namespace Digikam
0114 
0115 #endif // DIGIKAM_WS_SETTINGS_WIDGET_H