In file ../core/drag.h:

class KDNDDropZone : public QObject

Drop zone for KDE Drag 'n Drop

Inheritance:


public members:

KDNDDropZone ( QWidget* _parent, int _type )
Constructor
virtual ~KDNDDropZone ()
Destructor
virtual void drop ( char *_data, int _size, int _type, int _x, int _y )
Drop stuff
virtual void enter ( char *_data, int _size, int _type, int _x, int _y )
Enter the drop zone
virtual void leave ()
Leave the drop zone
virtual QStrList & getURLList ()
Gets a list of all URLs in the 'data'.
virtual const char* getData ()
Get the DnD data
virtual int getDataSize ()
Get the DND data size
virtual int getDataType ()
Get the DND data type
virtual int getMouseX ()
Get the mouse position.

Get the mouse position.
virtual int getAcceptType ()
Get the acceptance type
virtual bool accepts ( int _type )
Decide whether to accept this data in this drop zone
QWidget* getWidget ()
Return the QWidget associated with this drop zone.

signals
void dropAction ( KDNDDropZone * )
Drop has happened.
void dropEnter ( KDNDDropZone * )
Drop zone was entered.
void dropLeave ( KDNDDropZone * )
Drop zone was left.

protected members:

void parseURLList ()
fills 'urlList' with the URLs in 'dndData'.
QWidget *widget
The widget to which this DropZone is bound
char *dndData
The data of the last drop.
int acceptType
Tells which kind of data is accepted.
QStrList urlList
If 'dndType' is URL, then all URLs in 'dndData' are stored here.

Documentation

Drop zone for KDE Drag 'n Drop. You can create a DropZone for every widget. When the user makes a drop over this widget, the KDNDDropZone takes over control.
KDNDDropZone ( QWidget* _parent, int _type )
Create a DropZone for the widget _parent. Accept all drops of the type _type. _type may be DndURL for exampple.

virtual ~KDNDDropZone ()
Destructor

virtual void drop ( char *_data, int _size, int _type, int _x, int _y )
When a drop occures, this function is called. _data is the dropped data, _size its size, _type for example DndURL and _x and _y are the global coordinates of the drop.

virtual void enter ( char *_data, int _size, int _type, int _x, int _y )
The user is dragging an icon around and just entered the drop zone or he is still in the drop zone but moved the mouse.

virtual void leave ()
The dragging mouse left the DropZone.

virtual QStrList & getURLList ()
Many times, th dropped data is of the type DndURL. In this case this function splits up the ( perhaps ) multiple URLs in 'data' and returns a list of them. This list is only valid, as long as no XEvent is dispatched because if the DropZone receives a new drop event, the contents of this list will change.

virtual const char* getData ()
Get the DnD data

virtual int getDataSize ()
Get the DND data size

virtual int getDataType ()
Get the DND data type

virtual int getMouseX ()
Get the mouse position at which the item was dropped.

Get the mouse position at which the item was dropped.

virtual int getAcceptType ()
Get the acceptance type

virtual bool accepts ( int _type )
Decide whether to accept this data in this drop zone

QWidget* getWidget ()
Return the QWidget associated with this drop zone.

void dropAction ( KDNDDropZone * )
Drop has happened

void dropEnter ( KDNDDropZone * )
Drop zone was entered or mouse moved in DropZone.

void dropLeave ( KDNDDropZone * )
Drop zone was left.

void parseURLList ()
Works only if 'dndType' is DndURL.

char * dndData
Only valid during a call to 'dropAction'


this class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling