1 /* This file is part of the KDE project 2 * Copyright (C) 2008 Thorsten Zachmann <zachmann@kde.org> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef KOTEXTPASTE_H 21 #define KOTEXTPASTE_H 22 23 #include <KoOdfPaste.h> 24 #include "kotext_export.h" 25 26 class KoTextEditor; 27 class KoShapeController; 28 class KUndo2Command; 29 class KoCanvasBase; 30 31 #include <QSharedPointer> 32 namespace Soprano 33 { 34 class Model; 35 } 36 37 class KOTEXT_EXPORT KoTextPaste : public KoOdfPaste 38 { 39 public: 40 /** 41 * Note: RdfModel ownership is not taken. You must ensure that it remains 42 * valid for the lifetime of the object. 43 * 44 * @param editor the KoTextEditor the text will be read into 45 * @param shapeController the shapecontroller that gives access to the document's shapes and resourcemanager 46 * @param rdfModel the rdfModel we'll insert the tuples into 47 */ 48 KoTextPaste(KoTextEditor *editor, KoShapeController *shapeController, QSharedPointer<Soprano::Model> rdfModel, KoCanvasBase *canvas, KUndo2Command *cmd); 49 ~KoTextPaste() override; 50 51 protected: 52 /// reimplemented 53 bool process(const KoXmlElement &body, KoOdfReadStore &odfStore) override; 54 55 class Private; 56 Private * const d; 57 }; 58 59 #endif /* KOTEXTPASTE_H */ 60