File indexing completed on 2025-01-05 03:58:31

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2010-03-22
0007  * Description : Drag and drop handler for the item list
0008  *
0009  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2010      by Michael G. Hansen <mike at mghansen dot de>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_GPS_ITEM_LIST_DRAG_DROP_HANDLER_H
0017 #define DIGIKAM_GPS_ITEM_LIST_DRAG_DROP_HANDLER_H
0018 
0019 // Qt includes
0020 
0021 #include <QTreeView>
0022 
0023 // Local includes
0024 
0025 #include "mapdragdrophandler.h"
0026 #include "digikam_export.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class DIGIKAM_EXPORT ItemListDragDropHandler : public QObject
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     explicit ItemListDragDropHandler(QObject* const parent = nullptr);
0038     ~ItemListDragDropHandler() override;
0039 
0040     virtual QMimeData* createMimeData(const QList<QPersistentModelIndex>& modelIndices) = 0;
0041 };
0042 
0043 // -------------------------------------------------------------------------------------------------
0044 
0045 class DIGIKAM_EXPORT GPSItemListDragDropHandler : public ItemListDragDropHandler
0046 {
0047     Q_OBJECT
0048 
0049 public:
0050 
0051     explicit GPSItemListDragDropHandler(QObject* const parent = nullptr);
0052     ~GPSItemListDragDropHandler() override;
0053 
0054     QMimeData* createMimeData(const QList<QPersistentModelIndex>& modelIndices) override;
0055 };
0056 
0057 } // namespace Digikam
0058 
0059 #endif // DIGIKAM_GPS_ITEM_LIST_DRAG_DROP_HANDLER_H