Warning, file /office/calligra/libs/text/KoTextDrag.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002  * Copyright ( C ) 2007 Thorsten Zachmann <zachmann@kde.org>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KOTEXTDRAG_H
0021 #define KOTEXTDRAG_H
0022 
0023 #include "kotext_export.h"
0024 
0025 class QMimeData;
0026 class QString;
0027 class QByteArray;
0028 class KoTextOdfSaveHelper;
0029 
0030 /**
0031  * Class for simplifying adding a odf text with tracked changes to the clip board
0032  *
0033  * For saving the odf a KoDragOdfSaveHelper class is used.
0034  * It implements the writing of the body of the document. The
0035  * setOdf takes care of saving styles and tracked changes and all the other
0036  * common stuff.
0037  */
0038 class KOTEXT_EXPORT KoTextDrag
0039 {
0040 public:
0041     KoTextDrag();
0042     ~KoTextDrag();
0043 
0044     /**
0045      * Set odf mime type
0046      *
0047      * This calls helper.writeBody();
0048      *
0049      * @param mimeType used for creating the odf document
0050      * @param helper helper for saving the body of the odf document
0051      */
0052     bool setOdf(const char * mimeType, KoTextOdfSaveHelper &helper);
0053 
0054     /**
0055      * Add additional mimeTypes
0056      */
0057     void setData(const QString & mimeType, const QByteArray & data);
0058 
0059     /**
0060      * Get the mime data
0061      *
0062      * This transfers the ownership of the mimeData to the caller
0063      */
0064     QMimeData *takeMimeData();
0065 
0066 private:
0067     QMimeData *m_mimeData;
0068 };
0069 
0070 #endif /* KOTEXTDRAG_H */