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        : 04-10-2009
0007  * Description : main widget of the import dialog
0008  *
0009  * SPDX-FileCopyrightText: 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  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_FT_IMPORT_WIDGET_H
0017 #define DIGIKAM_FT_IMPORT_WIDGET_H
0018 
0019 // Qt includes
0020 
0021 #include <QUrl>
0022 #include <QWidget>
0023 
0024 // Local includes
0025 
0026 #include "dinfointerface.h"
0027 #include "ditemslist.h"
0028 
0029 using namespace Digikam;
0030 
0031 namespace DigikamGenericFileTransferPlugin
0032 {
0033 
0034 /**
0035  * Helper widget for the import tool.
0036  */
0037 class FTImportWidget: public QWidget
0038 {
0039     Q_OBJECT
0040 
0041 public:
0042 
0043     /**
0044      * Constructor.
0045      *
0046      * @param parent the parent widget
0047      * @param interface application interface to use
0048      */
0049     explicit FTImportWidget(QWidget* const parent, DInfoInterface* const iface);
0050 
0051     /**
0052      * Destructor.
0053      */
0054     ~FTImportWidget() override;
0055 
0056     /**
0057      * Returns the current list of source urls to import contained in the
0058      * image list.
0059      *
0060      * @return list of urls, potentially from remote system
0061      */
0062     QList<QUrl> sourceUrls() const;
0063 
0064     /**
0065      * Returns the image list used to manage images to import.
0066      *
0067      * @return pointer to the image list
0068      */
0069     DItemsList* imagesList() const;
0070 
0071     /**
0072      * Returns the upload widget for specifying the target location.
0073      *
0074      * @return pointer to the widget
0075      */
0076     QWidget* uploadWidget() const;
0077 
0078 private Q_SLOTS:
0079 
0080     void slotShowImportDialogClicked(bool);
0081 
0082 private:
0083 
0084     class Private;
0085     Private* const d;
0086 };
0087 
0088 } // namespace DigikamGenericFileTransferPlugin
0089 
0090 #endif // DIGIKAM_FT_IMPORT_WIDGET_H