libs/flake

KoDrag Class Reference

Class for simplifying adding a odf to the clip board. More...

#include <KoDrag.h>

List of all members.

Public Member Functions

 KoDrag ()
 ~KoDrag ()
void addToClipboard ()
QMimeDatamimeData ()
void setData (const QString &mimeType, const QByteArray &data)
bool setOdf (const char *mimeType, KoDragOdfSaveHelper &helper)

Detailed Description

Class for simplifying adding a odf to the clip board.

For saving the odf a KoDragOdfSaveHelper class is used. It implements the writing of the body of the document. The setOdf takes care of saving styles and all the other common stuff.

Definition at line 38 of file KoDrag.h.


Constructor & Destructor Documentation

KoDrag::KoDrag (  ) 

Definition at line 41 of file KoDrag.cpp.

KoDrag::~KoDrag (  ) 

Definition at line 46 of file KoDrag.cpp.


Member Function Documentation

void KoDrag::addToClipboard (  ) 

Add the the mimeData to the clipboard.

Definition at line 131 of file KoDrag.cpp.

QMimeData * KoDrag::mimeData (  ) 

Get the mime data.

This transfers the ownership of the mimeData to the caller

This function is for use in automated tests

Definition at line 139 of file KoDrag.cpp.

void KoDrag::setData ( const QString mimeType,
const QByteArray data 
)

Add additional mimeTypes.

Definition at line 123 of file KoDrag.cpp.

bool KoDrag::setOdf ( const char *  mimeType,
KoDragOdfSaveHelper helper 
)

Set odf mime type.

This calls helper.writeBody();

Parameters:
mimeType used for creating the odf document
helper helper for saving the body of the odf document

Definition at line 53 of file KoDrag.cpp.


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