12 #ifndef _UTIL_FORMATs_H
13 #define _UTIL_FORMATs_H
21 #include <QStringList>
22 #include "scribusapi.h"
25 bool SCRIBUS_API extensionIndicatesEPS(
const QString &ext);
26 bool SCRIBUS_API extensionIndicatesEPSorPS(
const QString &ext);
27 bool SCRIBUS_API extensionIndicatesJPEG(
const QString &ext);
28 bool SCRIBUS_API extensionIndicatesPDF(
const QString &ext);
29 bool SCRIBUS_API extensionIndicatesPSD(
const QString &ext);
30 bool SCRIBUS_API extensionIndicatesPattern(
const QString &ext);
31 bool SCRIBUS_API extensionIndicatesTIFF(
const QString &ext);
32 QString SCRIBUS_API getImageType(QString filename);
38 enum ScImageFormatType
40 ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152|4194304,
42 IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152|4194304,
44 IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152|4194304,
46 VECTORIMAGES = 1|64|1024|2048|16384|32768|131072|262144|4194304,
47 RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576|2097152,
115 static void deleteInstance();
116 void imageFormatSupported(
const QString&);
118 QString nameOfFormat(
int type);
121 QStringList mimetypeOfFormat(
int type);
124 QString extensionsForFormat(
int type);
127 QString extensionListForFormat(
int type,
int listType);
130 QString fileDialogFormatList(
int type);
133 QMap<int, QString> m_fmtNames;
134 QMap<int, QStringList> m_fmtMimeTypes;
135 QMap<int, QStringList> m_fmts;
136 QStringList m_fmtList;
138 QList<QByteArray> m_qtSupportedImageFormats;
139 QList<QByteArray> m_supportedImageFormats;
140 void updateSupportedImageFormats(QList<QByteArray>& supportedImageFormats);
141 void fileTypeStrings(
int type, QString& formatList, QString& formatText, QString& formatAll,
bool lowerCaseOnly=
false);