Scribus
Open source desktop publishing at your fingertips
satemplate.h
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 */
7 #ifndef MYPLUGIN_H
8 #define MYPLUGIN_H
9 
10 #include "pluginapi.h"
11 #include "scplugin.h"
12 
13 class ScribusDoc;
14 
15 class PLUGIN_API SaveAsTemplatePlugin : public ScActionPlugin
16 {
17  Q_OBJECT
18 
19  public:
20  // Standard plugin implementation
22  virtual ~SaveAsTemplatePlugin();
23  virtual bool run(ScribusDoc* doc, QString target = QString::null);
24  virtual const QString fullTrName() const;
25  virtual const AboutData* getAboutData() const;
26  virtual void deleteAboutData(const AboutData* about) const;
27  virtual void languageChange();
29 
30  // Special features (none)
31 };
32 
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);
36 
37 
38 class SATDialog;
39 
40 
41 class MenuSAT : public QObject
42 {
43  Q_OBJECT
44 
45 public:
46  MenuSAT() {};
47  ~MenuSAT() {};
48 
49 public slots:
50  void RunSATPlug(ScribusDoc*);
51 };
52 
53 // static MenuSAT* satm;
54 
55 class sat
56 {
57 private:
58  ScribusDoc* m_Doc;
59  SATDialog* dia;
60  QString file;
61  QString dir;
62  QString tmplXmlFile;
63  QString lang;
64  void appendTmplXml();
65  QString getTemplateTag();
66  QString findTemplateXml(QString dir);
67  void replaceIllegalChars(QString& s);
68 public:
69  void createTmplXml();
70  void createImages();
71  sat(ScribusDoc* doc, SATDialog* satdia, QString fileName, QString tmplDir);
72  ~sat();
73 };
74 
75 //static MenuSAT* Sat;
76 
77 #endif
A plug-in that performs a single action.
Definition: scplugin.h:248
virtual const QString fullTrName() const =0
Plug-in's human-readable, translated name.
Abstract super class for all Scribus plug-ins.
Definition: scplugin.h:90
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
virtual bool run(ScribusDoc *doc, QString target=QString::null)=0
Run the plug-in's main action.
virtual void languageChange()=0
Update all user-visible text to reflect current UI language.
the Document Class
Definition: scribusdoc.h:90
ScPlugin provides an interface to ask plugins for information about themselves.
Definition: scplugin.h:103
Definition: satemplate.h:41
Definition: satdialog.h:17
Definition: satemplate.h:55
virtual const AboutData * getAboutData() const =0
Return descriptive information about the plug-in.
virtual void addToMainWindowMenu(ScribusMainWindow *)
Allow plugins to add to a main menu.
Definition: satemplate.h:28
Definition: satemplate.h:15