• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-runtime API Reference
  • KDE Home
  • Contact Us
 

DragAndDrop

Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
DeclarativeDragArea Class Reference

#include <DeclarativeDragArea.h>

Inheritance diagram for DeclarativeDragArea:
Inheritance graph
[legend]

Signals

void dataChanged ()
 
void defaultActionChanged ()
 
void delegateChanged ()
 
void delegateImageChanged ()
 
void dragStarted ()
 
void drop (int action)
 
void enabledChanged ()
 
void sourceChanged ()
 
void startDragDistanceChanged ()
 
void supportedActionsChanged ()
 
void targetChanged ()
 

Public Member Functions

 DeclarativeDragArea (QDeclarativeItem *parent=0)
 
 ~DeclarativeDragArea ()
 
Qt::DropAction defaultAction () const
 
QDeclarativeComponent * delegate () const
 
QVariant delegateImage () const
 
bool isEnabled () const
 
DeclarativeMimeData * mimeData () const
 
void resetDelegate ()
 
void resetSource ()
 
void setDefaultAction (Qt::DropAction action)
 
void setDelegate (QDeclarativeComponent *delegate)
 
void setDelegateImage (const QVariant &image)
 
void setEnabled (bool enabled)
 
void setSource (QDeclarativeItem *source)
 
void setStartDragDistance (int distance)
 
void setSupportedActions (Qt::DropActions actions)
 
QDeclarativeItem * source () const
 
int startDragDistance () const
 
Qt::DropActions supportedActions () const
 
QDeclarativeItem * target () const
 

Protected Member Functions

void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
void mousePressEvent (QGraphicsSceneMouseEvent *)
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *)
 
bool sceneEventFilter (QGraphicsItem *item, QEvent *event)
 

Properties

Qt::DropAction defaultAction
 
QDeclarativeComponent delegate
 
QVariant delegateImage
 
bool enabled
 
DeclarativeMimeData mimeData
 
QDeclarativeItem source
 
int startDragDistance
 
Qt::DropActions supportedActions
 
QDeclarativeItem target
 

Detailed Description

Definition at line 32 of file DeclarativeDragArea.h.

Constructor & Destructor Documentation

DeclarativeDragArea::DeclarativeDragArea ( QDeclarativeItem *  parent = 0)

A DragArea is used to make an item draggable.

Definition at line 39 of file DeclarativeDragArea.cpp.

DeclarativeDragArea::~DeclarativeDragArea ( )

Definition at line 54 of file DeclarativeDragArea.cpp.

Member Function Documentation

void DeclarativeDragArea::dataChanged ( )
signal
Qt::DropAction DeclarativeDragArea::defaultAction ( ) const
void DeclarativeDragArea::defaultActionChanged ( )
signal
QDeclarativeComponent* DeclarativeDragArea::delegate ( ) const
void DeclarativeDragArea::delegateChanged ( )
signal
QVariant DeclarativeDragArea::delegateImage ( ) const
void DeclarativeDragArea::delegateImageChanged ( )
signal
void DeclarativeDragArea::dragStarted ( )
signal
void DeclarativeDragArea::drop ( int  action)
signal
void DeclarativeDragArea::enabledChanged ( )
signal
bool DeclarativeDragArea::isEnabled ( ) const

Definition at line 155 of file DeclarativeDragArea.cpp.

DeclarativeMimeData* DeclarativeDragArea::mimeData ( ) const
void DeclarativeDragArea::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 193 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::mousePressEvent ( QGraphicsSceneMouseEvent *  )
inlineprotected

Definition at line 134 of file DeclarativeDragArea.h.

void DeclarativeDragArea::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  )
inlineprotected

Definition at line 135 of file DeclarativeDragArea.h.

void DeclarativeDragArea::resetDelegate ( )

Definition at line 77 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::resetSource ( )

Definition at line 99 of file DeclarativeDragArea.cpp.

bool DeclarativeDragArea::sceneEventFilter ( QGraphicsItem *  item,
QEvent *  event 
)
protected

Definition at line 237 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setDefaultAction ( Qt::DropAction  action)

Definition at line 185 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setDelegate ( QDeclarativeComponent *  delegate)

Definition at line 70 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setDelegateImage ( const QVariant &  image)

Definition at line 139 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setEnabled ( bool  enabled)

Definition at line 159 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setSource ( QDeclarativeItem *  source)

Definition at line 91 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setStartDragDistance ( int  distance)

Definition at line 123 of file DeclarativeDragArea.cpp.

void DeclarativeDragArea::setSupportedActions ( Qt::DropActions  actions)

Definition at line 172 of file DeclarativeDragArea.cpp.

QDeclarativeItem* DeclarativeDragArea::source ( ) const
void DeclarativeDragArea::sourceChanged ( )
signal
int DeclarativeDragArea::startDragDistance ( ) const
void DeclarativeDragArea::startDragDistanceChanged ( )
signal
Qt::DropActions DeclarativeDragArea::supportedActions ( ) const
void DeclarativeDragArea::supportedActionsChanged ( )
signal
QDeclarativeItem* DeclarativeDragArea::target ( ) const
void DeclarativeDragArea::targetChanged ( )
signal

Property Documentation

Qt::DropAction DeclarativeDragArea::defaultAction
readwrite

The default action will be performed during a drag when no modificators are pressed.

Definition at line 76 of file DeclarativeDragArea.h.

QDeclarativeComponent * DeclarativeDragArea::delegate
readwrite

The delegate is the item that will be displayed next to the mouse cursor during the drag and drop operation.

It usually consists of a large, semi-transparent icon representing the data being dragged.

The delegate is the item that will be displayed next to the mouse cursor during the drag and drop operation. It usually consists of a large, semi-transparent icon representing the data being dragged.

Definition at line 40 of file DeclarativeDragArea.h.

QVariant DeclarativeDragArea::delegateImage
readwrite

an image to be used as delegate.

if present overrides the delegate property. in can be either a QImage or a QIcon

Definition at line 86 of file DeclarativeDragArea.h.

bool DeclarativeDragArea::enabled
readwrite

If false no drag operation will be generate.

Definition at line 60 of file DeclarativeDragArea.h.

DeclarativeMimeData * DeclarativeDragArea::mimeData
read

the mime data of the drag operation

See also
DeclarativeMimeData

Definition at line 55 of file DeclarativeDragArea.h.

QDeclarativeItem * DeclarativeDragArea::source
readwrite

The QML element that is the source of the resulting drag and drop operation.

This can be defined to any item, and will be available to the DropArea as event.data.source

The QML element that is the source of this drag and drop operation. This can be defined to any item, and will be available to the DropArea as event.data.source

Definition at line 46 of file DeclarativeDragArea.h.

int DeclarativeDragArea::startDragDistance
readwrite

distance in pixel after which a drag event will get started

Definition at line 81 of file DeclarativeDragArea.h.

Qt::DropActions DeclarativeDragArea::supportedActions
readwrite

Supported operations, a combination of Qt.CopyAction Qt.MoveAction Qt.LinkAction Qt.ActionMask Qt.IgnoreAction Qt.TargetMoveAction.

Definition at line 71 of file DeclarativeDragArea.h.

QDeclarativeItem * DeclarativeDragArea::target
read

Definition at line 49 of file DeclarativeDragArea.h.


The documentation for this class was generated from the following files:
  • DeclarativeDragArea.h
  • DeclarativeDragArea.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:02:44 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

DragAndDrop

Skip menu "DragAndDrop"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kde-runtime API Reference

Skip menu "kde-runtime API Reference"
  • KCMShell
  • KNotify
  • Plasma Runtime
  •     PlasmaCore
  •     DragAndDrop
  •     PlasmaComponents
  •     PlasmaExtraComponents
  •     QtExtraComponents

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal