File indexing completed on 2025-01-19 03:52:56

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2019-03-27
0007  * Description : a tool to export items to a local storage
0008  *
0009  * SPDX-FileCopyrightText: 2006-2009 by Johannes Wienke <languitar at semipol dot de>
0010  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2019-2020 by Maik Qualmann <metzpinguin at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_FC_EXPORT_WIDGET_H
0018 #define DIGIKAM_FC_EXPORT_WIDGET_H
0019 
0020 // Qt includes
0021 
0022 #include <QWidget>
0023 #include <QUrl>
0024 
0025 // Local includes
0026 
0027 #include "dinfointerface.h"
0028 #include "fccontainer.h"
0029 #include "ditemslist.h"
0030 
0031 using namespace Digikam;
0032 
0033 namespace DigikamGenericFileCopyPlugin
0034 {
0035 
0036 class FCExportWidget: public QWidget
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041 
0042     /**
0043      * Constructor.
0044      *
0045      * @param parent the parent widget
0046      */
0047     explicit FCExportWidget(DInfoInterface* const iface, QWidget* const parent);
0048 
0049     /**
0050      * Destructor.
0051      */
0052     ~FCExportWidget() override;
0053 
0054     /**
0055      * Returns a pointer to the imagelist that is displayed.
0056      */
0057     DItemsList* imagesList() const;
0058 
0059     /**
0060      * Returns the currently selected target url. Maybe invalid.
0061      */
0062     QUrl targetUrl() const;
0063 
0064     /**
0065      * Returns settings container.
0066      */
0067     FCContainer getSettings() const;
0068 
0069     /**
0070      * Set widget from settings container.
0071      */
0072     void setSettings(const FCContainer& settings);
0073 
0074 private Q_SLOTS:
0075 
0076     void slotLabelUrlChanged();
0077 
0078     void slotFileCopyButtonChanged(bool enabled);
0079 
0080 Q_SIGNALS:
0081 
0082     void signalTargetUrlChanged(const QUrl& target);
0083 
0084 private:
0085 
0086     class Private;
0087     Private* const d;
0088 };
0089 
0090 } // namespace DigikamGenericFileCopyPlugin
0091 
0092 #endif // DIGIKAM_FC_EXPORT_WIDGET_H