File indexing completed on 2025-07-06 10:21:33
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2002-2003, 2005 Rob Buis <buis@kde.org> 0003 * SPDX-FileCopyrightText: 2005-2006 Tim Beaulen <tbscope@gmail.com> 0004 * SPDX-FileCopyrightText: 2005, 2007-2009 Jan Hambrecht <jaham@gmx.net> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef SVGIMPORT_H 0010 #define SVGIMPORT_H 0011 0012 #include <KoFilter.h> 0013 #include <KoXmlReaderForward.h> 0014 #include <QVariant> 0015 0016 class KoShape; 0017 class KarbonDocument; 0018 0019 class SvgImport : public KoFilter 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 SvgImport(QObject* parent, const QVariantList&); 0025 ~SvgImport() override; 0026 0027 KoFilter::ConversionStatus convert(const QByteArray& from, const QByteArray& to) override; 0028 0029 protected: 0030 0031 /// The main entry point for the conversion 0032 void convert(const KoXmlElement &rootElement); 0033 0034 /// Builds the document from the given shapes list 0035 void buildDocument(const QList<KoShape*> &toplevelShapes, const QList<KoShape*> &shapes); 0036 0037 private: 0038 KarbonDocument * m_document; 0039 }; 0040 0041 #endif