FormatsManager Class Reference
#include <util_formats.h>

Public Types | |
| enum | ScImageFormatType { ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096, IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512, VECTORIMAGES = 1|64|1024|2048, RASTORIMAGES = 2|4|8|32|512, EPS = 1, GIF = 2, JPEG = 4, PAT = 8, PDF = 16, PNG = 32, PS = 64, PSD = 128, TIFF = 256, XPM = 512, WMF = 1024, SVG = 2048, AI = 4096 } |
Public Member Functions | |
| FormatsManager () | |
| ~FormatsManager () | |
| void | imageFormatSupported (const QString &) |
| QString | nameOfFormat (int type) |
| Returns the name of a format, eg "Encapsulated PostScript". | |
| QStringList | mimetypeOfFormat (int type) |
| Returns the mimetypes of a format, eg "application/postscript". | |
| QString | extensionsForFormat (int type) |
| Returns in the form of "EPS (*.eps *.EPS *.epsf *.EPSF *.epsi *.EPSI)". | |
| QString | extensionListForFormat (int type, int listType) |
| Returns in the form of "*.eps *.epsf *.epsi" or "eps|epsf|epsi". | |
| QString | fileDialogFormatList (int type) |
| Returns in the form of "All Supported Formats (*.eps *.EPS *.epsf *.EPSF *.epsi *.EPSI);;EPS (*.eps *.EPS);;EPSI (*.epsf *.EPSF);;EPSI (*.epsi *.EPSI);;All Files (*)". | |
Static Public Member Functions | |
| static FormatsManager * | instance () |
| Returns a pointer to the FormatsManager instance. | |
| static void | deleteInstance () |
| Deletes the FormatsManager Instance Must be called when FormatsManager is no longer needed. | |
Protected Member Functions | |
| void | updateSupportedImageFormats (QList< QByteArray > &supportedImageFormats) |
| void | fileTypeStrings (int type, QString &formatList, QString &formatText, QString &formatAll, bool lowerCaseOnly=false) |
Protected Attributes | |
| QMap< int, QString > | m_fmtNames |
| QMap< int, QStringList > | m_fmtMimeTypes |
| QMap< int, QStringList > | m_fmts |
| QStringList | m_fmtList |
| QList< QByteArray > | m_qtSupportedImageFormats |
| QList< QByteArray > | m_supportedImageFormats |
Static Private Attributes | |
| static FormatsManager * | _instance = 0 |
| The only instance of FormatsManager available. | |
Detailed Description
Definition at line 33 of file util_formats.h.
Member Enumeration Documentation
- Enumerator:
-
ALLIMAGES IMAGESIMGFRAME VECTORIMAGES RASTORIMAGES EPS GIF JPEG PAT PDF PNG PS PSD TIFF XPM WMF SVG AI
Definition at line 37 of file util_formats.h.
Constructor & Destructor Documentation
| FormatsManager::FormatsManager | ( | ) |
Definition at line 17 of file util_formats.cpp.
References AI, EPS, GIF, JPEG, m_fmtList, m_fmtMimeTypes, m_fmtNames, m_fmts, m_qtSupportedImageFormats, m_supportedImageFormats, PAT, PDF, PNG, PS, PSD, SVG, TIFF, tr(), updateSupportedImageFormats(), WMF, and XPM.
Referenced by instance().
| FormatsManager::~FormatsManager | ( | ) |
Definition at line 73 of file util_formats.cpp.
Member Function Documentation
| FormatsManager * FormatsManager::instance | ( | ) | [static] |
Returns a pointer to the FormatsManager instance.
- Returns:
- A pointer to the FormatsManager instance
Definition at line 77 of file util_formats.cpp.
References _instance, and FormatsManager().
Referenced by Annota::GetFile(), Annot::GetNIcon(), WMFImportPlugin::import(), SVGImportPlugin::import(), ImportPSPlugin::import(), ImportAIPlugin::import(), ColorManager::importColors(), ScribusMainWindow::initScMW(), InsertAFrame::locateImageFile(), WMFImportPlugin::registerFormats(), SVGImportPlugin::registerFormats(), ImportPSPlugin::registerFormats(), ImportAIPlugin::registerFormats(), SVGExportPlugin::run(), and ScribusMainWindow::slotGetContent().
| void FormatsManager::deleteInstance | ( | ) | [static] |
Deletes the FormatsManager Instance Must be called when FormatsManager is no longer needed.
Definition at line 85 of file util_formats.cpp.
References _instance.
Referenced by ScribusMainWindow::closeEvent().
| void FormatsManager::imageFormatSupported | ( | const QString & | ext | ) |
Definition at line 92 of file util_formats.cpp.
| QString FormatsManager::nameOfFormat | ( | int | type | ) |
Returns the name of a format, eg "Encapsulated PostScript".
Definition at line 112 of file util_formats.cpp.
References m_fmtNames.
Referenced by WMFImportPlugin::registerFormats(), SVGImportPlugin::registerFormats(), ImportPSPlugin::registerFormats(), and ImportAIPlugin::registerFormats().
| QStringList FormatsManager::mimetypeOfFormat | ( | int | type | ) |
Returns the mimetypes of a format, eg "application/postscript".
Definition at line 124 of file util_formats.cpp.
References m_fmtMimeTypes.
Referenced by WMFImportPlugin::registerFormats(), SVGImportPlugin::registerFormats(), ImportPSPlugin::registerFormats(), and ImportAIPlugin::registerFormats().
| QString FormatsManager::extensionsForFormat | ( | int | type | ) |
Returns in the form of "EPS (*.eps *.EPS *.epsf *.EPSF *.epsi *.EPSI)".
Definition at line 136 of file util_formats.cpp.
References fileTypeStrings().
Referenced by WMFImportPlugin::registerFormats(), SVGImportPlugin::registerFormats(), ImportPSPlugin::registerFormats(), and ImportAIPlugin::registerFormats().
| QString FormatsManager::extensionListForFormat | ( | int | type, | |
| int | listType | |||
| ) |
Returns in the form of "*.eps *.epsf *.epsi" or "eps|epsf|epsi".
Definition at line 150 of file util_formats.cpp.
References GIF, JPEG, m_fmts, and m_supportedImageFormats.
| QString FormatsManager::fileDialogFormatList | ( | int | type | ) |
Returns in the form of "All Supported Formats (*.eps *.EPS *.epsf *.EPSF *.epsi *.EPSI);;EPS (*.eps *.EPS);;EPSI (*.epsf *.EPSF);;EPSI (*.epsi *.EPSI);;All Files (*)".
Definition at line 143 of file util_formats.cpp.
References fileTypeStrings().
Referenced by ImportPSPlugin::import(), and ImportAIPlugin::import().
| void FormatsManager::updateSupportedImageFormats | ( | QList< QByteArray > & | supportedImageFormats | ) | [protected] |
| void FormatsManager::fileTypeStrings | ( | int | type, | |
| QString & | formatList, | |||
| QString & | formatText, | |||
| QString & | formatAll, | |||
| bool | lowerCaseOnly = false | |||
| ) | [protected] |
Definition at line 190 of file util_formats.cpp.
References GIF, JPEG, m_fmtNames, m_fmts, m_supportedImageFormats, and tr().
Referenced by extensionsForFormat(), and fileDialogFormatList().
Member Data Documentation
QMap<int, QString> FormatsManager::m_fmtNames [protected] |
Definition at line 116 of file util_formats.h.
Referenced by fileTypeStrings(), FormatsManager(), and nameOfFormat().
QMap<int, QStringList> FormatsManager::m_fmtMimeTypes [protected] |
Definition at line 117 of file util_formats.h.
Referenced by FormatsManager(), and mimetypeOfFormat().
QMap<int, QStringList> FormatsManager::m_fmts [protected] |
Definition at line 118 of file util_formats.h.
Referenced by extensionListForFormat(), fileTypeStrings(), FormatsManager(), and updateSupportedImageFormats().
QStringList FormatsManager::m_fmtList [protected] |
QList<QByteArray> FormatsManager::m_qtSupportedImageFormats [protected] |
QList<QByteArray> FormatsManager::m_supportedImageFormats [protected] |
Definition at line 122 of file util_formats.h.
Referenced by extensionListForFormat(), fileTypeStrings(), and FormatsManager().
FormatsManager * FormatsManager::_instance = 0 [static, private] |
The only instance of FormatsManager available.
FormatsManager is singleton and the instance can be queried with the method instance().
Definition at line 133 of file util_formats.h.
Referenced by deleteInstance(), and instance().
The documentation for this class was generated from the following files:
