digiKam
albumdragdrop.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 : 2009-04-16
7  * Description : Qt Model for Albums - drag and drop handling
8  *
9  * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
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_ALBUM_DRAG_DROP_H
26 #define DIGIKAM_ALBUM_DRAG_DROP_H
27 
28 // Local includes
29 
31 #include "albummodel.h"
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit AlbumDragDropHandler(AlbumModel* const model);
43 
44  AlbumModel* model() const;
45 
46  bool dropEvent(QAbstractItemView* view,
47  const QDropEvent* e,
48  const QModelIndex& droppedOn) override;
49 
50  Qt::DropAction accepts(const QDropEvent* e,
51  const QModelIndex& dropIndex) override;
52 
53  QStringList mimeTypes() const override;
54  QMimeData* createMimeData(const QList<Album*>&) override;
55 };
56 
57 } // namespace Digikam
58 
59 #endif // DIGIKAM_ALBUM_DRAG_DROP_H
Definition: albumdragdrop.h:37
QMimeData * createMimeData(const QList< Album * > &) override
Definition: albumdragdrop.cpp:436
QStringList mimeTypes() const override
Definition: albumdragdrop.cpp:424
AlbumDragDropHandler(AlbumModel *const model)
Definition: albumdragdrop.cpp:54
Qt::DropAction accepts(const QDropEvent *e, const QModelIndex &dropIndex) override
Definition: albumdragdrop.cpp:364
bool dropEvent(QAbstractItemView *view, const QDropEvent *e, const QModelIndex &droppedOn) override
Definition: albumdragdrop.cpp:64
AlbumModel * model() const
Definition: albumdragdrop.cpp:59
Definition: albummodeldragdrophandler.h:39
Definition: albummodel.h:40
Definition: datefolderview.cpp:43
DropAction
Definition: itemdragdrop.cpp:60