digiKam
geodragdrophandler.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2010-03-18
7  * Description : Drag-and-drop handler for geolocation interface
8  *
9  * Copyright (C) 2010-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Michael G. Hansen <mike at mghansen dot de>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_GEO_DRAG_DROP_HANDLER_H
26 #define DIGIKAM_GEO_DRAG_DROP_HANDLER_H
27 
28 // Local includes
29 
30 #include "geocoordinates.h"
31 #include "geoifacetypes.h"
32 #include "digikam_export.h"
33 
34 class QDropEvent;
35 
36 namespace Digikam
37 {
38 
39 class DIGIKAM_EXPORT GeoDragDropHandler : public QObject
40 {
41  Q_OBJECT
42 
43 public:
44 
45  explicit GeoDragDropHandler(QObject* const parent = nullptr);
46  ~GeoDragDropHandler() override;
47 
48  virtual Qt::DropAction accepts(const QDropEvent* e) = 0;
49  virtual bool dropEvent(const QDropEvent* e, const GeoCoordinates& dropCoordinates) = 0;
50  virtual QMimeData* createMimeData(const QList<QPersistentModelIndex>& modelIndices) = 0;
51 };
52 
53 } // namespace Digikam
54 
55 #endif // DIGIKAM_GEO_DRAG_DROP_HANDLER_H
Definition: geocoordinates.h:49
Definition: geodragdrophandler.h:40
virtual QMimeData * createMimeData(const QList< QPersistentModelIndex > &modelIndices)=0
virtual bool dropEvent(const QDropEvent *e, const GeoCoordinates &dropCoordinates)=0
virtual Qt::DropAction accepts(const QDropEvent *e)=0
Definition: datefolderview.cpp:43
DropAction
Definition: itemdragdrop.cpp:60