![]() |
Scribus
Open source desktop publishing at your fingertips
|
Superclass for all file import/export/load/save plugins. More...
#include <loadsaveplugin.h>
Public Member Functions | |
virtual bool | loadElements (const QString &data, QString fileDir, int toLayer, double Xp_in, double Yp_in, bool loc) |
virtual bool | loadFile (const QString &fileName, const FileFormat &fmt, int flags, int index=0) |
virtual bool | loadPalette (const QString &fileName) |
virtual bool | saveFile (const QString &fileName, const FileFormat &fmt) |
virtual bool | savePalette (const QString &fileName) |
virtual QString | saveElements (double xp, double yp, double wp, double hp, Selection *selection, QByteArray &prevData) |
virtual const QString & | lastSavedFile (void) |
virtual bool | fileSupported (QIODevice *file, const QString &fileName=QString::null) const =0 |
virtual void | setupTargets (ScribusDoc *targetDoc, ScribusView *targetView, ScribusMainWindow *targetMW, QProgressBar *targetMWPRogressBar, SCFonts *targetAvailableFonts) |
virtual void | getReplacedFontData (bool &getNewReplacement, QMap< QString, QString > &getReplacedFonts, QList< ScFace > &getDummyScFaces) |
virtual bool | loadPage (const QString &fileName, int pageNumber, bool Mpage, QString renamedPageName=QString::null) |
virtual bool | readStyles (const QString &fileName, ScribusDoc *doc, StyleSet< ParagraphStyle > &docParagraphStyles) |
virtual bool | readCharStyles (const QString &fileName, ScribusDoc *doc, StyleSet< CharStyle > &docCharStyles) |
virtual bool | readLineStyles (const QString &fileName, QHash< QString, multiLine > *Sty) |
virtual bool | readColors (const QString &fileName, ColorList &colors) |
virtual bool | readPageCount (const QString &fileName, int *num1, int *num2, QStringList &masterPageNames) |
virtual QImage | readThumbnail (const QString &fileName) |
![]() | |
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 AboutData * | getAboutData () 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) |
Static Public Member Functions | |
static const QStringList | getExtensionsForColors (const int id=47) |
static const QStringList | getExtensionsForImport (const int id=47) |
static const QStringList | getExtensionsForPreview (const int id=47) |
static const QStringList | fileDialogLoadFilter () |
static const QStringList | fileDialogSaveFilter () |
static const FileFormat * | getFormatById (const int id) |
static FileFormat * | getFormatByID (int id) |
static FileFormat * | getFormatByExt (const QString ext) |
static const QList< FileFormat > & | supportedFormats () |
Protected Member Functions | |
virtual bool | checkFlags (int flags) |
Check a loadFlags combination. | |
void | registerFormat (FileFormat &fmt) |
Register the passed format so it can be used by the app. | |
void | unregisterFormat (unsigned int id) |
Unregister the format with format ID `id' that references by the calling plugin. | |
void | unregisterAll () |
Unregister all formats owned by the calling plugin. | |
virtual void | setFileReadError () |
virtual void | setDomParsingError (const QString &msg, int line, int column) |
Protected Attributes | |
ScribusDoc * | m_Doc |
ScribusView * | m_View |
ScribusMainWindow * | m_ScMW |
QProgressBar * | m_mwProgressBar |
SCFonts * | m_AvailableFonts |
QString | m_lastSavedFile |
UndoManager *const | undoManager |
![]() | |
QString | m_lastError |
Human readable, translated version of last error to occur. | |
Superclass for all file import/export/load/save plugins.
This class provides the interface common to all file load/save/import/export plugins. It provides the facilities for discovering what format(s) a plugin supports, how they should be identified, etc.