lib

#include <KoStoreDrag.h>

Public Member Functions

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

Static Public Member Functions

static bool canDecode (const char *nativeMimeType, TQMimeSource *e)
static TQCString 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 TQBuffer, 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::KoStoreDrag ( const char * nativeMimeType,
TQWidget * dragSource = 0L,
const char * name = 0L )

Constructor.

Parameters
nativeMimeTypethe app's native mimetype.
dragSourcemust be 0 when copying to the clipboard.
nameobject name for this drag.

Definition at line 27 of file KoStoreDrag.cpp.

Member Function Documentation

◆ canDecode()

bool KoStoreDrag::canDecode ( const char * nativeMimeType,
TQMimeSource * e )
static

Definition at line 32 of file KoStoreDrag.cpp.

◆ mimeType()

TQCString 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.cpp.


The documentation for this class was generated from the following files: