File indexing completed on 2025-11-30 11:38:11
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2002, 2003 The Karbon Developers 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef __XAMLEXPORT_H__ 0008 #define __XAMLEXPORT_H__ 0009 0010 #include <KoFilter.h> 0011 0012 #include "vvisitor.h" 0013 #include "vgradient.h" 0014 0015 #include "xamlgraphiccontext.h" 0016 0017 #include <QStack> 0018 #include <QTextStream> 0019 #include <QByteArray> 0020 #include <QVariantList> 0021 0022 class QTextStream; 0023 class VColor; 0024 class VPath; 0025 class KarbonDocument; 0026 class VFill; 0027 class VGroup; 0028 class VSubpath; 0029 class VStroke; 0030 class VText; 0031 0032 0033 class XAMLExport : public KoFilter, private VVisitor 0034 { 0035 Q_OBJECT 0036 0037 public: 0038 XAMLExport(KoFilter* parent, const char* name, const QVariantList&); 0039 virtual ~XAMLExport() {} 0040 0041 virtual KoFilter::ConversionStatus convert(const QByteArray& from, const QByteArray& to); 0042 0043 private: 0044 virtual void visitVPath(VPath& composite); 0045 virtual void visitVDocument(KarbonDocument& document); 0046 virtual void visitVGroup(VGroup& group); 0047 virtual void visitVSubpath(VSubpath& path); 0048 //virtual void visitVText( VText& text ); 0049 0050 void getStroke(const VStroke& stroke); 0051 void getColorStops(const QVector<VColorStop*> &colorStops); 0052 void getFill(const VFill& fill); 0053 void getGradient(const VGradient& grad); 0054 void getHexColor(QTextStream *, const VColor& color); 0055 QString getID(VObject *obj); 0056 0057 QTextStream* m_stream; 0058 QTextStream* m_defs; 0059 QTextStream* m_body; 0060 0061 QStack<XAMLGraphicsContext*> m_gc; 0062 }; 0063 0064 #endif 0065