Scribus
Open source desktop publishing at your fingertips
ScGTPlugin Class Referenceabstract

Super class for all text importer plugins. More...

#include <scgtplugin.h>

Inheritance diagram for ScGTPlugin:
Collaboration diagram for ScGTPlugin:

Public Member Functions

virtual QString fileFormatName () const =0
 Returns the file format's name that this plugin can import or QString::null. More...
 
virtual QStringList fileExtensions () const =0
 Returns file extensions this plugin can handle or an empty list if. More...
 
virtual void run (const QString &filename, const QString &encoding=QString::null)
 Run the plugin and import from the file filename More...
 
virtual void run (const QString &text)
 Run the plugin and do the magic with the text and. More...
 
- Public Member Functions inherited from ScPlugin
 ScPlugin ()
 ctor, returns a new ScPlugin instance More...
 
virtual ~ScPlugin ()=0
 Destroy the ScPlugin instance. More...
 
virtual const QString fullTrName () const =0
 Plug-in's human-readable, translated name. 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)
 
virtual const AboutDatagetAboutData () const =0
 Return descriptive information about the plug-in. More...
 
virtual void deleteAboutData (const AboutData *about) const =0
 
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.
 
virtual void languageChange ()=0
 Update all user-visible text to reflect current UI language. More...
 
const QString pluginTypeName () const
 Returns human readable plugin type from plug-in's pluginType.
 
virtual void addToMainWindowMenu (ScribusMainWindow *)=0
 Allow plugins to add to a main menu.
 
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

- Protected Attributes inherited from ScPlugin
QString m_lastError
 Human readable, translated version of last error to occur.
 

Detailed Description

Super class for all text importer plugins.

See also
ScPlugin
Date
2006-06-05
Author
Riku Leino riku@.nosp@m.scri.nosp@m.bus.i.nosp@m.nfo
Note
KK2006

Member Function Documentation

virtual QStringList ScGTPlugin::fileExtensions ( ) const
pure virtual

Returns file extensions this plugin can handle or an empty list if.

this plugin is a text/style formatter plugin.

Returns
file extensions this plugin can handle
virtual QString ScGTPlugin::fileFormatName ( ) const
pure virtual

Returns the file format's name that this plugin can import or QString::null.

if this plugin doesn't handle files.

Returns
file format's name or QString::null if this plugin doesn't handle files
virtual void ScGTPlugin::run ( const QString &  filename,
const QString &  encoding = QString::null 
)
inlinevirtual

Run the plugin and import from the file filename

This function is ment to be overriden by all file format plugins. Once the file decoding and text and style has been sorted out use the function forward() to pass the text and it's style forward to a text frame or to another plugin.

See also
forward()
Parameters
filenamename of the file that is wanted to be imported
encodingencoding as selected by a user in the import file dialog
virtual void ScGTPlugin::run ( const QString &  text)
inlinevirtual

Run the plugin and do the magic with the text and.

style.

This function is ment to be overriden by all text and style handler plugins.

Parameters
texttext to work with

The documentation for this class was generated from the following file: