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

« back to all changes in this revision

Viewing changes to libs/models/albummodeldragdrophandler.cpp

  • 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:
23
23
 
24
24
#include "albummodeldragdrophandler.h"
25
25
 
 
26
// Qt includes
 
27
 
 
28
#include <QMimeData>
 
29
 
26
30
// Local includes
27
31
 
28
32
#include "abstractalbummodel.h"
40
44
    return m_model;
41
45
}
42
46
 
43
 
bool AlbumModelDragDropHandler::dropEvent(QAbstractItemView *, QDropEvent *, const QModelIndex &)
 
47
bool AlbumModelDragDropHandler::dropEvent(QAbstractItemView *, const QDropEvent *, const QModelIndex &)
44
48
{
45
49
    return false;
46
50
}
47
51
 
48
 
Qt::DropAction AlbumModelDragDropHandler::accepts(const QMimeData *, const QModelIndex &)
 
52
Qt::DropAction AlbumModelDragDropHandler::accepts(const QDropEvent *, const QModelIndex &)
49
53
{
50
54
    return Qt::IgnoreAction;
51
55
}
60
64
    return 0;
61
65
}
62
66
 
 
67
bool AlbumModelDragDropHandler::acceptsMimeData(const QMimeData *mime)
 
68
{
 
69
    QStringList modelTypes = mimeTypes();
 
70
    for (int i = 0; i < modelTypes.count(); ++i)
 
71
    {
 
72
        if (mime->hasFormat(modelTypes.at(i))) //&& (e->dropAction() & model->supportedDropActions()))
 
73
            return true;
 
74
    }
 
75
    return false;
 
76
}
63
77
 
64
78
}
65
79