Scribus
Open source desktop publishing at your fingertips
|
This is a simple "Lens Effects" plugin for Scribus 1.3 and later. More...
#include <lenseffects.h>
Public Member Functions | |
virtual bool | run (ScribusDoc *doc, QString target=QString::null) |
Run the plug-in's main action. More... | |
virtual const QString | fullTrName () const |
Plug-in's human-readable, translated name. More... | |
virtual const AboutData * | getAboutData () const |
Return descriptive information about the plug-in. More... | |
virtual void | deleteAboutData (const AboutData *about) const |
virtual void | languageChange () |
Update all user-visible text to reflect current UI language. More... | |
virtual void | addToMainWindowMenu (ScribusMainWindow *) |
Allow plugins to add to a main menu. | |
Public Member Functions inherited from ScActionPlugin | |
ScActionPlugin () | |
ctor More... | |
virtual | ~ScActionPlugin ()=0 |
Pure virtual dtor - abstract class. | |
const ActionInfo & | actionInfo () const |
virtual bool | handleSelection (ScribusDoc *doc, int SelectedType=-1) |
handle the documents selection. More... | |
Public Member Functions inherited from ScPlugin | |
ScPlugin () | |
ctor, returns a new ScPlugin instance More... | |
virtual | ~ScPlugin ()=0 |
Destroy the ScPlugin instance. More... | |
virtual bool | newPrefsPanelWidget (QWidget *parent, PrefsPanel *&panel, QString &caption, QPixmap &icon) |
Create and return a prefs UI panel for the plugin. More... | |
virtual bool | newPrefsPanelWidget (QWidget *parent, Prefs_Pane *&panel, QString &caption, QPixmap &icon) |
const QString & | lastError () const |
Text summary of last error encountered. More... | |
bool | hasLastError () const |
Returns if lastError message is not empty. | |
void | clearLastError () |
Clear last error message. | |
const QString | pluginTypeName () const |
Returns human readable plugin type from plug-in's pluginType. | |
virtual void | setDoc (ScribusDoc *doc) |
hooks that plugins can use to detect if the current document was closed etc.. | |
virtual void | unsetDoc () |
virtual void | changedDoc (ScribusDoc *doc) |
Additional Inherited Members | |
Public Slots inherited from ScActionPlugin | |
virtual bool | cleanupPlugin () |
Deactivates the plugin for unloading / program quit. More... | |
virtual bool | run (QWidget *parent, ScribusDoc *doc, QString target=QString::null) |
Run the plug-in's main action. More... | |
virtual bool | run (ScribusDoc *doc, QIODevice *target) |
Run the plugin on a QIODevice. More... | |
virtual DeferredTask * | runAsync (QString target=QString::null) |
Run the plugin asynchronously. More... | |
virtual DeferredTask * | runAsync (QIODevice *target) |
Run the plugin asynchronously. More... | |
const QString & | runResult () const |
! Obsolete method - do not use this or rely on it in new code. | |
Protected Attributes inherited from ScActionPlugin | |
ActionInfo | m_actionInfo |
QString | m_runResult |
ScribusDoc * | m_Doc |
Protected Attributes inherited from ScPlugin | |
QString | m_lastError |
Human readable, translated version of last error to occur. | |
This is a simple "Lens Effects" plugin for Scribus 1.3 and later.
|
virtual |
Plug-in's human-readable, translated name.
Please don't use this for anything except display to the user. The results of testing the value of this can not be guaranteed, as its value may change depending on locale and change at runtime.
Implements ScPlugin.
|
virtual |
Return descriptive information about the plug-in.
Returns a structure containing descriptive information about the plug-in. This information is used in places like the Help->About Plug-ins menu item. The stucture MUST be deleted using deleteAboutData(AboutData* about) when finished with.
Every plugin MUST reimplement getAboutData(...) and deleteAboutData(...).
Implements ScPlugin.
|
virtual |
Update all user-visible text to reflect current UI language.
Updates the text on all widgets on the plug-in to reflect the new language. You should generally use this method to set all the widget text during construction. That ensures that text is not duplicated, and that when this method is called the text of all persistent widgets is correctly changed.
This method only needs to affect text in widgets that currently exists (displayed or otherwise).
Implements ScPlugin.
|
virtual |
Run the plug-in's main action.
Run the plug-in's default action synchronously, blocking the rest of the application until this method returns.
This method should generally call run(..., QIODevice* target) or run(..., QString target) to do the work. This is done by default, with the assumption that the target is a file. The argument is opened as QFile with IO_ReadOnly or IO_WriteOnly mode, depending on plugin type, and passed to run(..., QIODevice*). Override this if you need more flexibility.
The optional target argument is a plugin-defined string indicating what the plugin should operate on. It will typically be a filename to import from / export to. Nothing stops a plugin doing funky things like accepting a WebDAV URI, etc, however.
Plug-in authors might want to consider implementing this using the DeferredTask subclass used in runAsync, if the plug-in supports it.
target | Optional target to operate on (see above) |
Implements ScActionPlugin.