Back to index

scribus-ng  1.3.4.dfsg+svn20071115
satemplate.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 MYPLUGIN_H
00008 #define MYPLUGIN_H
00009 
00010 #include <qobject.h>
00011 #include <qdatetime.h>
00012 #include <qdir.h>
00013 
00014 #include "pluginapi.h"
00015 #include "scplugin.h"
00016 
00017 class PLUGIN_API SaveAsTemplatePlugin : public ScActionPlugin
00018 {
00019        Q_OBJECT
00020 
00021        public:
00022               // Standard plugin implementation
00023               SaveAsTemplatePlugin();
00024               virtual ~SaveAsTemplatePlugin();
00025               virtual bool run(ScribusDoc* doc, QString target = QString::null);
00026               virtual const QString fullTrName() const;
00027               virtual const AboutData* getAboutData() const;
00028               virtual void deleteAboutData(const AboutData* about) const;
00029               virtual void languageChange();
00030               virtual void addToMainWindowMenu(ScribusMainWindow *) {};
00031 
00032               // Special features (none)
00033 };
00034 
00035 extern "C" PLUGIN_API int saveastemplateplugin_getPluginAPIVersion();
00036 extern "C" PLUGIN_API ScPlugin* saveastemplateplugin_getPlugin();
00037 extern "C" PLUGIN_API void saveastemplateplugin_freePlugin(ScPlugin* plugin);
00038 
00039 
00040 class satdialog;
00041 
00042 
00043 class MenuSAT : public QObject
00044 {
00045        Q_OBJECT
00046 
00047 public:
00048        MenuSAT() {};
00049     ~MenuSAT() {};
00050 
00051 public slots:
00052        void RunSATPlug(ScribusDoc*);
00053 };
00054 
00055 // static MenuSAT* satm;
00056 
00057 class sat
00058 {
00059 private:
00060        ScribusDoc* m_Doc;
00061        satdialog* dia;
00062        QString file;
00063        QString dir;
00064        QString tmplXmlFile;
00065        QString lang;
00066        void appendTmplXml();
00067        QString getTemplateTag();
00068        QString findTemplateXml(QString dir);
00069        void replaceIllegalChars(QString& s);
00070 public:
00071        void createTmplXml();
00072        void createImages();
00073        sat(ScribusDoc* doc, satdialog* satdia, QString fileName, QString tmplDir);
00074        ~sat();
00075 };
00076 
00077 static MenuSAT* Sat;
00078 
00079 #endif