akonadi
dragdropmanager.cpp
48 Collection collection = m_view->model()->data(index, EntityTreeModel::CollectionRole).value<Collection>();
52 collection = m_view->model()->data(index.parent(), EntityTreeModel::CollectionRole).value<Collection>();
139 if ((targetCollection.rights() & (Collection::CanCreateCollection | Collection::CanCreateItem)) &&
143 if ((targetCollection.rights() & (Collection::CanCreateCollection | Collection::CanCreateItem)) &&
160 kDebug() << "Cannot drop here:" << event->possibleActions() << m_view->model()->supportedDragActions() << m_view->model()->supportedDropActions();
219 moveDropAction = popup.addAction(KIcon(QString::fromLatin1("go-jump")), i18n("&Move Here") + QLatin1Char('\t') + sequence);
225 copyDropAction = popup.addAction(KIcon(QString::fromLatin1("edit-copy")), i18n("&Copy Here") + QLatin1Char('\t') + sequence);
231 linkAction = popup.addAction(KIcon(QLatin1String("edit-link")), i18n("&Link Here") + QLatin1Char('\t') + sequence);
235 popup.addAction(KIcon(QString::fromLatin1("process-stop")), i18n("C&ancel") + QLatin1Char('\t') + QKeySequence(Qt::Key_Escape).toString());
271 sourceDeletable = (source.rights() & Collection::CanDeleteCollection) && !source.hasAttribute<SpecialCollectionAttribute>() && !source.isVirtual();
Qt::KeyboardModifiers keyboardModifiers()
Qt::DropActions possibleActions() const
void setMimeData(QMimeData *data)
void setPixmap(const QPixmap &pixmap)
const QPoint & pos() const
bool contains(const QString &str, Qt::CaseSensitivity cs) const
An Attribute that stores the special collection type of a collection.
Definition: specialcollectionattribute_p.h:39
T value() const
void chop(int n)
Qt::DropAction exec(QFlags< Qt::DropAction > supportedActions)
bool isValid() const
QModelIndex parent() const
Rights rights() const
Returns the rights the user has on the collection.
Definition: collection.cpp:99
bool isNull() const
QPoint pos()
QString toString(SequenceFormat format) const
char * toString(const T &value)
QVariant data(int role) const
typedef DropActions
bool hasAttribute(const QByteArray &name) const
Returns true if the entity has an attribute of the given type name, false otherwise.
Definition: entity.cpp:148
QStringList contentMimeTypes() const
Returns a list of possible content mimetypes, e.g.
Definition: collection.cpp:115
QString fromLatin1(const char *str, int size)
QChar * data()
bool isVirtual() const
Returns whether the collection is virtual, for example a search collection.
Definition: collection.cpp:261
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.