LoadSavePlugin Class Reference
#include <loadsaveplugin.h>


Public Types | |
| enum | loadFlags { lfCreateDoc = 1, lfUseCurrentPage = 2, lfInsertPage = 4, lfInteractive = 8, lfScripted = 16 } |
Public Member Functions | |
| LoadSavePlugin () | |
| ~LoadSavePlugin () | |
| virtual bool | loadFile (const QString &fileName, const FileFormat &fmt, int flags, int index=0) |
| virtual bool | saveFile (const QString &fileName, const FileFormat &fmt) |
| 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, QMap< QString, multiLine > *Sty) |
| virtual bool | readColors (const QString &fileName, ColorList &colors) |
| virtual bool | readPageCount (const QString &fileName, int *num1, int *num2, QStringList &masterPageNames) |
Static Public Member Functions | |
| static const QStringList | fileDialogLoadFilter () |
| static const QStringList | fileDialogSaveFilter () |
| static const FileFormat * | getFormatById (const int id) |
| static const QList< FileFormat > & | supportedFormats () |
Protected Member Functions | |
| virtual bool | checkFlags (int flags) |
| Check a loadFlags combination. | |
| void | registerFormat (const 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. | |
Protected Attributes | |
| ScribusDoc * | m_Doc |
| ScribusView * | m_View |
| ScribusMainWindow * | m_ScMW |
| QProgressBar * | m_mwProgressBar |
| SCFonts * | m_AvailableFonts |
| QString | m_lastSavedFile |
Static Private Member Functions | |
| static QList< FileFormat > ::iterator | findFormat (unsigned int id, LoadSavePlugin *plug=0, QList< FileFormat >::iterator it=formats.begin()) |
| static QList< FileFormat > ::iterator | findFormat (const QString &extension, LoadSavePlugin *plug=0, QList< FileFormat >::iterator it=formats.begin()) |
| static void | printFormatList () |
| static const QStringList | getDialogFilter (bool forLoad) |
Static Private Attributes | |
| static QList< FileFormat > | formats |
Detailed Description
Definition at line 34 of file loadsaveplugin.h.
Member Enumeration Documentation
Definition at line 43 of file loadsaveplugin.h.
Constructor & Destructor Documentation
| LoadSavePlugin::LoadSavePlugin | ( | ) |
Definition at line 14 of file loadsaveplugin.cpp.
| LoadSavePlugin::~LoadSavePlugin | ( | ) |
Definition at line 24 of file loadsaveplugin.cpp.
Member Function Documentation
| const QStringList LoadSavePlugin::fileDialogLoadFilter | ( | ) | [static] |
Definition at line 43 of file loadsaveplugin.cpp.
References getDialogFilter().
Referenced by FileLoader::getLoadFilterString().
| const QStringList LoadSavePlugin::fileDialogSaveFilter | ( | ) | [static] |
| const FileFormat * LoadSavePlugin::getFormatById | ( | const int | id | ) | [static] |
Definition at line 34 of file loadsaveplugin.cpp.
References findFormat(), and formats.
Referenced by ScribusView::contentsDropEvent(), LegacyMode::importToPage(), PatternDialog::loadPattern(), PatternDialog::loadVectors(), BarcodeGenerator::okButton_pressed(), scribus_placeeps(), scribus_placeodg(), scribus_placesvg(), and scribus_placesxd().
| bool LoadSavePlugin::loadFile | ( | const QString & | fileName, | |
| const FileFormat & | fmt, | |||
| int | flags, | |||
| int | index = 0 | |||
| ) | [virtual] |
Reimplemented in ImportAIPlugin, OldScribusFormat, OODrawImportPlugin, Scribus12Format, Scribus134Format, Scribus13Format, ImportPSPlugin, SVGImportPlugin, and WMFImportPlugin.
Definition at line 96 of file loadsaveplugin.cpp.
Referenced by FileFormat::loadFile().
| bool LoadSavePlugin::saveFile | ( | const QString & | fileName, | |
| const FileFormat & | fmt | |||
| ) | [virtual] |
Reimplemented in OldScribusFormat, Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 85 of file loadsaveplugin.cpp.
Referenced by FileFormat::saveFile().
| const QString & LoadSavePlugin::lastSavedFile | ( | void | ) | [virtual] |
Definition at line 91 of file loadsaveplugin.cpp.
References m_lastSavedFile.
Referenced by FileFormat::lastSavedFile().
| virtual bool LoadSavePlugin::fileSupported | ( | QIODevice * | file, | |
| const QString & | fileName = QString::null | |||
| ) | const [pure virtual] |
Implemented in ImportAIPlugin, OODrawImportPlugin, Scribus12Format, Scribus134Format, Scribus13Format, ImportPSPlugin, SVGImportPlugin, and WMFImportPlugin.
| const QList< FileFormat > & LoadSavePlugin::supportedFormats | ( | ) | [static] |
Definition at line 29 of file loadsaveplugin.cpp.
References formats.
Referenced by FileLoader::findFormat(), and FileLoader::TestFile().
| void LoadSavePlugin::setupTargets | ( | ScribusDoc * | targetDoc, | |
| ScribusView * | targetView, | |||
| ScribusMainWindow * | targetMW, | |||
| QProgressBar * | targetMWPRogressBar, | |||
| SCFonts * | targetAvailableFonts | |||
| ) | [virtual] |
Definition at line 211 of file loadsaveplugin.cpp.
References m_AvailableFonts, m_Doc, m_mwProgressBar, m_ScMW, and m_View.
Referenced by FileFormat::setupTargets().
| void LoadSavePlugin::getReplacedFontData | ( | bool & | getNewReplacement, | |
| QMap< QString, QString > & | getReplacedFonts, | |||
| QList< ScFace > & | getDummyScFaces | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 220 of file loadsaveplugin.cpp.
Referenced by FileFormat::getReplacedFontData().
| bool LoadSavePlugin::loadPage | ( | const QString & | fileName, | |
| int | pageNumber, | |||
| bool | Mpage, | |||
| QString | renamedPageName = QString::null | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 224 of file loadsaveplugin.cpp.
Referenced by FileFormat::loadPage().
| bool LoadSavePlugin::readStyles | ( | const QString & | fileName, | |
| ScribusDoc * | doc, | |||
| StyleSet< ParagraphStyle > & | docParagraphStyles | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 229 of file loadsaveplugin.cpp.
Referenced by FileFormat::readStyles().
| bool LoadSavePlugin::readCharStyles | ( | const QString & | fileName, | |
| ScribusDoc * | doc, | |||
| StyleSet< CharStyle > & | docCharStyles | |||
| ) | [virtual] |
Reimplemented in Scribus134Format.
Definition at line 234 of file loadsaveplugin.cpp.
Referenced by FileFormat::readCharStyles().
| bool LoadSavePlugin::readLineStyles | ( | const QString & | fileName, | |
| QMap< QString, multiLine > * | Sty | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 239 of file loadsaveplugin.cpp.
Referenced by FileFormat::readLineStyles().
| bool LoadSavePlugin::readColors | ( | const QString & | fileName, | |
| ColorList & | colors | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 244 of file loadsaveplugin.cpp.
Referenced by FileFormat::readColors().
| bool LoadSavePlugin::readPageCount | ( | const QString & | fileName, | |
| int * | num1, | |||
| int * | num2, | |||
| QStringList & | masterPageNames | |||
| ) | [virtual] |
Reimplemented in Scribus12Format, Scribus134Format, and Scribus13Format.
Definition at line 249 of file loadsaveplugin.cpp.
Referenced by FileFormat::readPageCount().
| bool LoadSavePlugin::checkFlags | ( | int | flags | ) | [protected, virtual] |
Check a loadFlags combination.
Definition at line 104 of file loadsaveplugin.cpp.
References lfCreateDoc, lfInsertPage, and lfUseCurrentPage.
Referenced by WMFImportPlugin::import(), SVGImportPlugin::import(), OODrawImportPlugin::import(), ImportPSPlugin::import(), and ImportAIPlugin::import().
| void LoadSavePlugin::registerFormat | ( | const FileFormat & | fmt | ) | [protected] |
Register the passed format so it can be used by the app.
Definition at line 120 of file loadsaveplugin.cpp.
References FileFormat::formatId, formats, and FileFormat::priority.
Referenced by WMFImportPlugin::registerFormats(), SVGImportPlugin::registerFormats(), Scribus13Format::registerFormats(), Scribus134Format::registerFormats(), Scribus12Format::registerFormats(), OODrawImportPlugin::registerFormats(), OldScribusFormat::registerFormats(), ImportPSPlugin::registerFormats(), and ImportAIPlugin::registerFormats().
| void LoadSavePlugin::unregisterFormat | ( | unsigned int | id | ) | [protected] |
Unregister the format with format ID `id' that references by the calling plugin.
Definition at line 156 of file loadsaveplugin.cpp.
References findFormat(), and formats.
| void LoadSavePlugin::unregisterAll | ( | ) | [protected] |
Unregister all formats owned by the calling plugin.
Definition at line 163 of file loadsaveplugin.cpp.
References formats.
Referenced by WMFImportPlugin::languageChange(), SVGImportPlugin::languageChange(), Scribus13Format::languageChange(), Scribus134Format::languageChange(), Scribus12Format::languageChange(), OODrawImportPlugin::languageChange(), OldScribusFormat::languageChange(), ImportPSPlugin::languageChange(), ImportAIPlugin::languageChange(), ImportAIPlugin::~ImportAIPlugin(), ImportPSPlugin::~ImportPSPlugin(), OldScribusFormat::~OldScribusFormat(), OODrawImportPlugin::~OODrawImportPlugin(), Scribus12Format::~Scribus12Format(), Scribus134Format::~Scribus134Format(), Scribus13Format::~Scribus13Format(), SVGImportPlugin::~SVGImportPlugin(), and WMFImportPlugin::~WMFImportPlugin().
| QList< FileFormat >::iterator LoadSavePlugin::findFormat | ( | unsigned int | id, | |
| LoadSavePlugin * | plug = 0, |
|||
| QList< FileFormat >::iterator | it = formats.begin() | |||
| ) | [static, private] |
Definition at line 177 of file loadsaveplugin.cpp.
References formats.
Referenced by getFormatById(), and unregisterFormat().
| QList< FileFormat >::iterator LoadSavePlugin::findFormat | ( | const QString & | extension, | |
| LoadSavePlugin * | plug = 0, |
|||
| QList< FileFormat >::iterator | it = formats.begin() | |||
| ) | [static, private] |
| void LoadSavePlugin::printFormatList | ( | ) | [static, private] |
| const QStringList LoadSavePlugin::getDialogFilter | ( | bool | forLoad | ) | [static, private] |
Definition at line 53 of file loadsaveplugin.cpp.
References data, formats, and tr().
Referenced by fileDialogLoadFilter(), and fileDialogSaveFilter().
Member Data Documentation
ScribusDoc* LoadSavePlugin::m_Doc [protected] |
Definition at line 115 of file loadsaveplugin.h.
Referenced by WMFImportPlugin::import(), SVGImportPlugin::import(), OODrawImportPlugin::import(), ImportPSPlugin::import(), ImportAIPlugin::import(), Scribus13Format::loadFile(), Scribus134Format::loadFile(), Scribus12Format::loadFile(), Scribus13Format::loadPage(), Scribus134Format::loadPage(), Scribus12Format::loadPage(), Scribus13Format::PasteItem(), Scribus13Format::saveFile(), Scribus134Format::saveFile(), setupTargets(), Scribus134Format::writeBookmarks(), Scribus134Format::writeCheckerProfiles(), Scribus134Format::writeColors(), Scribus134Format::writeContent(), Scribus134Format::writeCStyles(), Scribus134Format::writeDocItemAttributes(), Scribus134Format::writeHyphenatorLists(), Scribus134Format::writeJavascripts(), Scribus134Format::writeLayers(), Scribus134Format::writeLinestyles(), Scribus134Format::writePageSets(), Scribus134Format::writePatterns(), Scribus134Format::writePdfOptions(), Scribus134Format::writePrintOptions(), Scribus134Format::writePStyles(), Scribus134Format::writeSections(), and Scribus134Format::writeTOC().
ScribusView* LoadSavePlugin::m_View [protected] |
Definition at line 116 of file loadsaveplugin.h.
Referenced by Scribus12Format::loadFile(), Scribus12Format::loadPage(), and setupTargets().
ScribusMainWindow* LoadSavePlugin::m_ScMW [protected] |
QProgressBar* LoadSavePlugin::m_mwProgressBar [protected] |
Definition at line 118 of file loadsaveplugin.h.
Referenced by Scribus13Format::loadFile(), Scribus134Format::loadFile(), Scribus12Format::loadFile(), Scribus13Format::saveFile(), setupTargets(), and Scribus134Format::writeContent().
SCFonts* LoadSavePlugin::m_AvailableFonts [protected] |
Definition at line 119 of file loadsaveplugin.h.
Referenced by Scribus13Format::AskForFont(), Scribus134Format::GetCStyle(), Scribus13Format::GetItemText(), Scribus134Format::GetItemText(), Scribus13Format::loadFile(), Scribus134Format::loadFile(), Scribus12Format::loadFile(), Scribus13Format::loadPage(), Scribus134Format::loadPage(), Scribus12Format::loadPage(), Scribus13Format::PasteItem(), Scribus134Format::PasteItem(), Scribus13Format::readParagraphStyle(), and setupTargets().
QString LoadSavePlugin::m_lastSavedFile [protected] |
Definition at line 120 of file loadsaveplugin.h.
Referenced by lastSavedFile(), and Scribus134Format::saveFile().
QList< FileFormat > LoadSavePlugin::formats [static, private] |
Definition at line 127 of file loadsaveplugin.h.
Referenced by findFormat(), getDialogFilter(), getFormatById(), printFormatList(), registerFormat(), supportedFormats(), unregisterAll(), and unregisterFormat().
The documentation for this class was generated from the following files:
