~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to digikam/tagdragdrop.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2009-11-21
 
7
 * Description : Qt Model for Tags - drag and drop handling
 
8
 *
 
9
 * Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
 
10
 *
 
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)
 
15
 * any later version.
 
16
 *
 
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.
 
21
 *
 
22
 * ============================================================ */
 
23
 
 
24
#ifndef TAGDRAGDROP_H
 
25
#define TAGDRAGDROP_H
 
26
 
 
27
// Local includes
 
28
 
 
29
#include "albummodeldragdrophandler.h"
 
30
#include "albummodel.h"
 
31
 
 
32
namespace Digikam
 
33
{
 
34
 
 
35
class TagDragDropHandler : public AlbumModelDragDropHandler
 
36
{
 
37
    Q_OBJECT
 
38
 
 
39
public:
 
40
 
 
41
    TagDragDropHandler(TagModel *model);
 
42
 
 
43
    TagModel *model() const { return static_cast<TagModel*>(m_model); }
 
44
 
 
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*> &);
 
49
 
 
50
Q_SIGNALS:
 
51
 
 
52
    void assignTags(const QList<int>& imageIDs, const QList<int>& tagIDs);
 
53
 
 
54
};
 
55
 
 
56
} // namespace Digikam
 
57
 
 
58
#endif /* TAGDRAGDROP_H */