File indexing completed on 2024-06-09 04:20:47

0001 /*
0002  * SPDX-FileCopyrightText: 2017 Boudewijn Rempt <boud@valdyas.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 #ifndef HTMLWRITER_H
0008 #define HTMLWRITER_H
0009 
0010 #include <QList>
0011 #include <QSizeF>
0012 
0013 class KoShapeLayer;
0014 class KoShapeGroup;
0015 class KoShape;
0016 class KoPathShape;
0017 class QIODevice;
0018 class QString;
0019 class HtmlSavingContext;
0020 
0021 // Implements writing shapes to HTML
0022 class HtmlWriter
0023 {
0024 public:
0025     HtmlWriter(const QList<KoShape*> &toplevelShapes);
0026     virtual ~HtmlWriter();
0027 
0028     bool save(QIODevice &outputDevice);
0029 
0030     QStringList errors() const;
0031     QStringList warnings() const;
0032 
0033 private:
0034 
0035     void saveShapes(const QList<KoShape*> shapes, HtmlSavingContext &savingContext);
0036 
0037     QList<KoShape*> m_toplevelShapes;
0038     QStringList m_errors;
0039     QStringList m_warnings;
0040 };
0041 
0042 #endif // HTMLWRITER_H