lib Library API Documentation

KoStoreDrag Class Reference

A generic drag object that holds a store (e.g. More...

#include <koStoreDrag.h>

Inheritance diagram for KoStoreDrag:

QStoredDrag List of all members.

Public Member Functions

 KoStoreDrag (const char *nativeMimeType, QWidget *dragSource=0L, const char *name=0L)

Static Public Member Functions

bool canDecode (const char *nativeMimeType, QMimeSource *e)
QCString mimeType (const char *nativeMimeType)

Detailed Description

A generic drag object that holds a store (e.g.

KoZipStore) in memory. This allows to drag-n-drop and copy-paste complex koffice objects. As per usual with dragobjects, an instance of KoStoreDrag must be created on the "sending" side (dragging or copying). The "receiving" side (dropping or pasting) only uses provides()/canDecode() and encodedData().

To create the data in memory, create a QBuffer on a QByteArray, then KoStore::createStore( theBuffer, .... ), save the data into the store and delete it. Finally, call setEncodedData().

Definition at line 36 of file koStoreDrag.h.


Constructor & Destructor Documentation

KoStoreDrag::KoStoreDrag const char *  nativeMimeType,
QWidget dragSource = 0L,
const char *  name = 0L
 

Parameters:
nativeMimeType the app's native mimetype.
dragSource must be 0 when copying to the clipboard

Definition at line 27 of file koStoreDrag.cc.

References KoStoreDrag().

Referenced by KoStoreDrag().


Member Function Documentation

QCString KoStoreDrag::mimeType const char *  nativeMimeType  )  [static]
 

Returns the mimetype of the clipboard data for a given application, depending on the application's native mimetype.

Definition at line 22 of file koStoreDrag.cc.

References mimeType().

Referenced by mimeType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 06:54:22 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003