WMFImportPlugin Class Reference
A class providing the plugin interface implementation for this plugin. More...
#include <wmfimportplugin.h>


Public Slots | |
| virtual bool | import (QString filename=QString::null, int flags=lfUseCurrentPage|lfInteractive) |
| Run the WMF import. | |
Public Member Functions | |
| WMFImportPlugin () | |
| virtual | ~WMFImportPlugin () |
| virtual const QString | fullTrName () const |
| Plug-in's human-readable, translated name. | |
| virtual const AboutData * | getAboutData () const |
| Return descriptive information about the plug-in. | |
| virtual void | deleteAboutData (const AboutData *about) const |
| virtual void | languageChange () |
| Update all user-visible text to reflect current UI language. | |
| virtual bool | fileSupported (QIODevice *file, const QString &fileName=QString::null) const |
| virtual bool | loadFile (const QString &fileName, const FileFormat &fmt, int flags, int index=0) |
| virtual void | addToMainWindowMenu (ScribusMainWindow *) |
| Allow plugins to add to a main menu. | |
Private Member Functions | |
| void | registerFormats () |
Private Attributes | |
| ScrAction * | importAction |
Detailed Description
A class providing the plugin interface implementation for this plugin.Definition at line 20 of file wmfimportplugin.h.
Constructor & Destructor Documentation
| WMFImportPlugin::WMFImportPlugin | ( | ) |
| WMFImportPlugin::~WMFImportPlugin | ( | ) | [virtual] |
Member Function Documentation
| const QString WMFImportPlugin::fullTrName | ( | ) | const [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.
Definition at line 87 of file wmfimportplugin.cpp.
References tr().
| const ScActionPlugin::AboutData * WMFImportPlugin::getAboutData | ( | ) | const [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(...).
- See also:
- ScPlugin::deleteAboutData
Implements ScPlugin.
Definition at line 92 of file wmfimportplugin.cpp.
References ScPlugin::AboutData::authors, ScPlugin::AboutData::description, ScPlugin::AboutData::license, ScPlugin::AboutData::shortDescription, and tr().
| void WMFImportPlugin::deleteAboutData | ( | const AboutData * | about | ) | const [virtual] |
| void WMFImportPlugin::languageChange | ( | ) | [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.
Definition at line 79 of file wmfimportplugin.cpp.
References importAction, registerFormats(), tr(), and LoadSavePlugin::unregisterAll().
Referenced by WMFImportPlugin().
| bool WMFImportPlugin::fileSupported | ( | QIODevice * | file, | |
| const QString & | fileName = QString::null | |||
| ) | const [virtual] |
| bool WMFImportPlugin::loadFile | ( | const QString & | fileName, | |
| const FileFormat & | fmt, | |||
| int | flags, | |||
| int | index = 0 | |||
| ) | [virtual] |
| void WMFImportPlugin::addToMainWindowMenu | ( | ScribusMainWindow * | ) | [virtual] |
Allow plugins to add to a main menu.
Implements ScPlugin.
Definition at line 67 of file wmfimportplugin.cpp.
References MenuManager::addMenuItem(), importAction, and ScribusMainWindow::scrMenuMgr.
| bool WMFImportPlugin::import | ( | QString | filename = QString::null, |
|
| int | flags = lfUseCurrentPage|lfInteractive | |||
| ) | [virtual, slot] |
Run the WMF import.
- Parameters:
-
filename a file name to import
- Return values:
-
true for success
Definition at line 135 of file wmfimportplugin.cpp.
References LoadSavePlugin::checkFlags(), ScribusMainWindow::doc, PrefsContext::get(), PrefsFile::getPluginContext(), WMFImport::import(), WMFImport::importCanceled, WMFImport::importFailed, FormatsManager::instance(), PrefsManager::instance(), LoadSavePlugin::lfInteractive, LoadSavePlugin::m_Doc, PrefsManager::prefsFile, ScribusCore::primaryMainWindow(), ScCore, ScribusDoc::scMW(), CustomFDialog::selectedFile(), PrefsContext::set(), tr(), CommonStrings::trWarning, WMFImport::unsupported, and FormatsManager::WMF.
| void WMFImportPlugin::registerFormats | ( | ) | [private] |
Definition at line 109 of file wmfimportplugin.cpp.
References FormatsManager::extensionsForFormat(), FileFormat::filter, FileFormat::formatId, FORMATID_WMFIMPORT, FormatsManager::instance(), FileFormat::load, FormatsManager::mimetypeOfFormat(), FileFormat::mimeTypes, FileFormat::nameMatch, FormatsManager::nameOfFormat(), FileFormat::priority, LoadSavePlugin::registerFormat(), FileFormat::save, FileFormat::trName, and FormatsManager::WMF.
Referenced by languageChange().
Member Data Documentation
ScrAction* WMFImportPlugin::importAction [private] |
Definition at line 47 of file wmfimportplugin.h.
Referenced by addToMainWindowMenu(), and languageChange().
The documentation for this class was generated from the following files:
