1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : Qt Model for Tags - drag and drop handling
9
* Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
11
* This program is free software; you can redistribute it
12
* and/or modify it under the terms of the GNU General
13
* Public License as published by the Free Software Foundation;
14
* either version 2, or (at your option)
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* ============================================================ */
29
#include "albummodeldragdrophandler.h"
30
#include "albummodel.h"
35
class TagDragDropHandler : public AlbumModelDragDropHandler
41
TagDragDropHandler(TagModel *model);
43
TagModel *model() const { return static_cast<TagModel*>(m_model); }
45
virtual bool dropEvent(QAbstractItemView *view, const QDropEvent *e, const QModelIndex& droppedOn);
46
virtual Qt::DropAction accepts(const QDropEvent *e, const QModelIndex& dropIndex);
47
virtual QStringList mimeTypes() const;
48
virtual QMimeData *createMimeData(const QList<Album*> &);
52
void assignTags(const QList<int>& imageIDs, const QList<int>& tagIDs);
56
} // namespace Digikam
58
#endif /* TAGDRAGDROP_H */