Scribus
Open source desktop publishing at your fingertips
scriptplugin.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 SCRIPTPLUG_H
8 #define SCRIPTPLUG_H
9 
10 #include "cmdvar.h"
11 #include "scplugin.h"
12 #include "pluginapi.h"
13 //Added by qt3to4:
14 #include <QByteArray>
15 #include <QPixmap>
16 
17 class QString;
18 class QPixmap;
19 class QWidget;
20 class PrefsPanel;
21 
22 class PLUGIN_API ScriptPlugin : public ScPersistentPlugin
23 {
24  Q_OBJECT
25 
26  public:
27  // Standard plugin implementation
28  ScriptPlugin();
29  virtual ~ScriptPlugin();
30  virtual bool initPlugin();
31  virtual bool cleanupPlugin();
32  virtual const QString fullTrName() const;
33  virtual const AboutData* getAboutData() const;
34  virtual void deleteAboutData(const AboutData* about) const;
35  virtual void languageChange();
36  virtual bool newPrefsPanelWidget(QWidget* parent, PrefsPanel*& panel,
37  QString& caption, QPixmap& icon);
38  virtual bool newPrefsPanelWidget(QWidget* parent, Prefs_Pane*& panel,
39  QString& caption, QPixmap& icon);
40  virtual void addToMainWindowMenu(ScribusMainWindow *);
41 
42  // Special features (none)
43  QByteArray pythonHome;
44 };
45 
46 extern "C" PLUGIN_API int scriptplugin_getPluginAPIVersion();
47 extern "C" PLUGIN_API ScPlugin* scriptplugin_getPlugin();
48 extern "C" PLUGIN_API void scriptplugin_freePlugin(ScPlugin* plugin);
49 
51 /*static */PyObject *scribus_retval(PyObject *self, PyObject* args);
52 /*static */PyObject *scribus_getval(PyObject *self);
53 
54 #endif // CMSPLUG_H
virtual bool newPrefsPanelWidget(QWidget *parent, PrefsPanel *&panel, QString &caption, QPixmap &icon)
Create and return a prefs UI panel for the plugin.
Definition: scplugin.cpp:30
virtual bool cleanupPlugin()=0
Deactivates the plugin for unloading / program quit.
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
virtual void addToMainWindowMenu(ScribusMainWindow *)=0
Allow plugins to add to a main menu.
This Class is the base class for your application. It sets up the main window and providing a menubar...
Definition: scribus.h:123
virtual void languageChange()=0
Update all user-visible text to reflect current UI language.
virtual bool initPlugin()=0
Initialize the plugin.
ScPlugin provides an interface to ask plugins for information about themselves.
Definition: scplugin.h:103
A plug-in that is resident for the lifetime of the app.
Definition: scplugin.h:454
A base class for all preferences panels.
Definition: prefspanel.h:21
Definition: prefs_pane.h:14
virtual const AboutData * getAboutData() const =0
Return descriptive information about the plug-in.
Definition: scriptplugin.h:22