Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoDrag.h
Show All 16 Lines | |||||
17 | * Boston, MA 02110-1301, USA. | 17 | * Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KODRAG_H | 20 | #ifndef KODRAG_H | ||
21 | #define KODRAG_H | 21 | #define KODRAG_H | ||
22 | 22 | | |||
23 | #include "kritaflake_export.h" | 23 | #include "kritaflake_export.h" | ||
24 | 24 | | |||
25 | #include <QList> | ||||
26 | | ||||
25 | class QMimeData; | 27 | class QMimeData; | ||
26 | class QString; | 28 | class QString; | ||
27 | class QByteArray; | 29 | class QByteArray; | ||
28 | class KoDragOdfSaveHelper; | 30 | class KoDragOdfSaveHelper; | ||
29 | class KoDragPrivate; | 31 | class KoDragPrivate; | ||
32 | class KoShape; | ||||
30 | 33 | | |||
31 | /** | 34 | /** | ||
32 | * Class for simplifying adding a odf to the clip board | 35 | * Class for simplifying adding a odf to the clip board | ||
33 | * | 36 | * | ||
34 | * For saving the odf a KoDragOdfSaveHelper class is used. | 37 | * For saving the odf a KoDragOdfSaveHelper class is used. | ||
35 | * It implements the writing of the body of the document. The | 38 | * It implements the writing of the body of the document. The | ||
36 | * setOdf takes care of saving styles and all the other | 39 | * setOdf takes care of saving styles and all the other | ||
37 | * common stuff. | 40 | * common stuff. | ||
38 | */ | 41 | */ | ||
39 | class KRITAFLAKE_EXPORT KoDrag | 42 | class KRITAFLAKE_EXPORT KoDrag | ||
40 | { | 43 | { | ||
41 | public: | 44 | public: | ||
42 | KoDrag(); | 45 | KoDrag(); | ||
43 | ~KoDrag(); | 46 | ~KoDrag(); | ||
44 | 47 | | |||
48 | | ||||
45 | /** | 49 | /** | ||
46 | * Set odf mime type | 50 | * Load SVG data into the current mime data | ||
47 | * | | |||
48 | * This calls helper.writeBody(); | | |||
49 | * | | |||
50 | * @param mimeType used for creating the odf document | | |||
51 | * @param helper helper for saving the body of the odf document | | |||
52 | */ | 51 | */ | ||
53 | bool setOdf(const char *mimeType, KoDragOdfSaveHelper &helper); | 52 | bool setSvg(const QList<KoShape*> shapes); | ||
54 | 53 | | |||
55 | /** | 54 | /** | ||
56 | * Add additional mimeTypes | 55 | * Add additional mimeTypes | ||
57 | */ | 56 | */ | ||
58 | void setData(const QString &mimeType, const QByteArray &data); | 57 | void setData(const QString &mimeType, const QByteArray &data); | ||
59 | 58 | | |||
60 | /** | 59 | /** | ||
61 | * Add the mimeData to the clipboard | 60 | * Add the mimeData to the clipboard | ||
Show All 17 Lines |