Subversion Repositories Scribus

Rev

Rev 17572 | Rev 19728 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 1
/*
2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
6
*/
304 Franz 7
#ifndef MYPLUGIN_H
8
#define MYPLUGIN_H
9
 
2986 craig 10
#include "pluginapi.h"
3207 craig 11
#include "scplugin.h"
304 Franz 12
 
17572 craig 13
class ScribusDoc;
9603 subik 14
 
3207 craig 15
class PLUGIN_API SaveAsTemplatePlugin : public ScActionPlugin
16
{
17
        Q_OBJECT
304 Franz 18
 
3207 craig 19
        public:
20
                // Standard plugin implementation
21
                SaveAsTemplatePlugin();
22
                virtual ~SaveAsTemplatePlugin();
5781 cbradney 23
                virtual bool run(ScribusDoc* doc, QString target = QString::null);
3207 craig 24
                virtual const QString fullTrName() const;
25
                virtual const AboutData* getAboutData() const;
26
                virtual void deleteAboutData(const AboutData* about) const;
27
                virtual void languageChange();
5243 cbradney 28
                virtual void addToMainWindowMenu(ScribusMainWindow *) {};
304 Franz 29
 
3207 craig 30
                // Special features (none)
31
};
304 Franz 32
 
3207 craig 33
extern "C" PLUGIN_API int saveastemplateplugin_getPluginAPIVersion();
34
extern "C" PLUGIN_API ScPlugin* saveastemplateplugin_getPlugin();
35
extern "C" PLUGIN_API void saveastemplateplugin_freePlugin(ScPlugin* plugin);
304 Franz 36
 
37
 
17578 craig 38
class SATDialog;
1208 cbradney 39
 
1322 cbradney 40
 
304 Franz 41
class MenuSAT : public QObject
42
{
309 Franz 43
        Q_OBJECT
304 Franz 44
 
45
public:
3207 craig 46
        MenuSAT() {};
304 Franz 47
    ~MenuSAT() {};
48
 
49
public slots:
5781 cbradney 50
        void RunSATPlug(ScribusDoc*);
304 Franz 51
};
52
 
1225 tsoots 53
// static MenuSAT* satm;
304 Franz 54
 
1552 subik 55
class sat
304 Franz 56
{
57
private:
5781 cbradney 58
        ScribusDoc* m_Doc;
17578 craig 59
        SATDialog* dia;
304 Franz 60
        QString file;
61
        QString dir;
62
        QString tmplXmlFile;
320 Franz 63
        QString lang;
304 Franz 64
        void appendTmplXml();
65
        QString getTemplateTag();
320 Franz 66
        QString findTemplateXml(QString dir);
385 Franz 67
        void replaceIllegalChars(QString& s);
304 Franz 68
public:
69
        void createTmplXml();
70
        void createImages();
17578 craig 71
        sat(ScribusDoc* doc, SATDialog* satdia, QString fileName, QString tmplDir);
304 Franz 72
        ~sat();
73
};
74
 
1322 cbradney 75
static MenuSAT* Sat;
76
 
304 Franz 77
#endif