Back to index

scribus-ng  1.3.4.dfsg+svn20071115
svgexplugin.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef SVGPLUG_H
00008 #define SVGPLUG_H
00009 
00010 #include <qobject.h>
00011 #include <qdom.h>
00012 #include "pluginapi.h"
00013 #include "loadsaveplugin.h"
00014 
00015 #ifdef HAVE_CAIRO
00016        #include <cairo.h>
00017 //     #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 1, 6)
00018               #define USECAIRO
00019               #include "scpainter.h"
00020 //     #else
00021 //            #undef USECAIRO
00022 //     #endif
00023 #else
00024        #undef USECAIRO
00025 #endif
00026 
00027 class QString;
00028 class ScribusDoc;
00029 class ScribusMainWindow;
00030 class ScribusView;
00031 class PageItem;
00032 class Page;
00033 class ScText;
00034 
00035 class PLUGIN_API SVGExportPlugin : public ScActionPlugin
00036 {
00037        Q_OBJECT
00038 
00039        public:
00040               // Standard plugin implementation
00041               SVGExportPlugin();
00042               virtual ~SVGExportPlugin();
00049               virtual bool run(ScribusDoc* doc=0, QString filename = QString::null);
00050               virtual const QString fullTrName() const;
00051               virtual const AboutData* getAboutData() const;
00052               virtual void deleteAboutData(const AboutData* about) const;
00053               virtual void languageChange();
00054               virtual void addToMainWindowMenu(ScribusMainWindow *) {};
00055 
00056               // Special features (none)
00057 };
00058 
00059 extern "C" PLUGIN_API int svgexplugin_getPluginAPIVersion();
00060 extern "C" PLUGIN_API ScPlugin* svgexplugin_getPlugin();
00061 extern "C" PLUGIN_API void svgexplugin_freePlugin(ScPlugin* plugin);
00062 
00063 class SVGExPlug : public QObject
00064 {
00065     Q_OBJECT
00066 
00067 public:
00073        SVGExPlug( ScribusDoc* doc );
00074        ~SVGExPlug();
00075 
00076        bool doExport( QString fName ); 
00077 
00078 private:
00079        ScribusDoc* m_Doc;
00080        ScribusMainWindow* m_ScMW;
00081        ScribusView* m_View;
00082 #ifndef USECAIRO
00083 
00091               void ProcessPage(Page *Seite, QDomDocument *docu, QDomElement *elem);
00092               QString SetClipPathImage(PageItem *ite);
00098               QString SetClipPath(PageItem *ite);
00105               QString FToStr(double c);
00112               QString IToStr(int c);
00119               void SetTextProps(QDomElement *tp, ScText *hl);
00127               QString SetFarbe(QString farbe, int shad);
00134               QString GetMultiStroke(struct SingleLine *sl, PageItem *Item);
00135               int GradCount;
00136               int ClipCount;
00137 #endif
00138 };
00139 
00140 #endif // CMSPLUG_H