File indexing completed on 2025-03-09 03:52:14

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-09-28
0007  * Description : a tool to export image to a KIO accessible
0008  *               location
0009  *
0010  * SPDX-FileCopyrightText: 2006-2009 by Johannes Wienke <languitar at semipol dot de>
0011  * SPDX-FileCopyrightText: 2011-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_FT_EXPORT_WIDGET_H
0018 #define DIGIKAM_FT_EXPORT_WIDGET_H
0019 
0020 // Qt includes
0021 
0022 #include <QWidget>
0023 #include <QUrl>
0024 #include <QList>
0025 
0026 // Local includes
0027 
0028 #include "dinfointerface.h"
0029 #include "ditemslist.h"
0030 
0031 using namespace Digikam;
0032 
0033 namespace DigikamGenericFileTransferPlugin
0034 {
0035 
0036 class FTExportWidget: public QWidget
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041 
0042     /**
0043      * Constructor.
0044      *
0045      * @param parent the parent widget
0046      */
0047     explicit FTExportWidget(DInfoInterface* const iface, QWidget* const parent);
0048 
0049     /**
0050      * Destructor.
0051      */
0052     ~FTExportWidget()               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      * Sets the target url this widget should point at.
0066      */
0067     void setTargetUrl(const QUrl& url);
0068 
0069     QList<QUrl> history()    const;
0070     void setHistory(const QList<QUrl>& urls);
0071 
0072 private Q_SLOTS:
0073 
0074     void slotLabelUrlChanged();
0075     void slotShowTargetDialogClicked(bool checked);
0076 
0077 Q_SIGNALS:
0078 
0079     void signalTargetUrlChanged(const QUrl& target);
0080 
0081 private:
0082 
0083     void updateTargetLabel();
0084 
0085 private:
0086 
0087     class Private;
0088     Private* const d;
0089 };
0090 
0091 } // namespace DigikamGenericFileTransferPlugin
0092 
0093 #endif // DIGIKAM_FT_EXPORT_WIDGET_H