r19757 by fschmid - Make all of the extra imageformats Qt can handle available for us.
scribus-commit
scribus-commit at lists.scribus.net
Sat Jan 17 08:17:21 UTC 2015
Author: fschmid
Date: Sat Jan 17 08:17:21 2015
New Revision: 19757
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19757
Log:
Make all of the extra imageformats Qt can handle available for us.
Modified:
trunk/Scribus/scribus/util_formats.cpp
trunk/Scribus/scribus/util_formats.h
Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19757&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Sat Jan 17 08:17:21 2015
@@ -65,6 +65,7 @@
#endif
m_fmtNames[FormatsManager::UNICONV] = QObject::tr("UniConvertor File");
m_fmtNames[FormatsManager::PCT] = QObject::tr("Macintosh Pict File");
+ m_fmtNames[FormatsManager::QT] = QObject::tr("Qt supported File");
m_fmtMimeTypes.insert(FormatsManager::EPS, QStringList() << "application/postscript");
m_fmtMimeTypes.insert(FormatsManager::GIF, QStringList() << "image/gif");
@@ -85,6 +86,7 @@
m_fmtMimeTypes.insert(FormatsManager::WPG, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::PCT, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::ORA, QStringList() << "");
+ m_fmtMimeTypes.insert(FormatsManager::QT, QStringList() << "");
QMapIterator<int, QStringList> i(m_fmts);
while (i.hasNext())
@@ -93,8 +95,24 @@
m_fmtList << i.value().first().toUpper();
}
- m_qtSupportedImageFormats=QImageReader::supportedImageFormats();
- m_supportedImageFormats=m_qtSupportedImageFormats;
+ m_qtSupportedImageFormats = QImageReader::supportedImageFormats();
+ QStringList qtFmts;
+ for (int qf = 0; qf < m_qtSupportedImageFormats.count(); qf++)
+ {
+ QString fmt = m_qtSupportedImageFormats[qf];
+ bool found = false;
+ QMapIterator<int, QStringList> i(m_fmts);
+ while (i.hasNext())
+ {
+ i.next();
+ if (i.value().contains(fmt))
+ found = true;
+ }
+ if (!found)
+ qtFmts.append(fmt);
+ }
+ m_fmts.insert(FormatsManager::QT, qtFmts);
+ m_supportedImageFormats = m_qtSupportedImageFormats;
updateSupportedImageFormats(m_supportedImageFormats);
}
Modified: trunk/Scribus/scribus/util_formats.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19757&path=/trunk/Scribus/scribus/util_formats.h
==============================================================================
--- trunk/Scribus/scribus/util_formats.h (original)
+++ trunk/Scribus/scribus/util_formats.h Sat Jan 17 08:17:21 2015
@@ -37,13 +37,13 @@
enum ScImageFormatType
{
- ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152,
+ ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152|4194304,
#ifdef GMAGICK_FOUND
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152|4194304, // all Types suitable for Image Frames
#else
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152|4194304, // all Types suitable for Image Frames
#endif
- VECTORIMAGES = 1|64|1024|2048|16384|32768|131072|262144, // All pure vector image types
+ VECTORIMAGES = 1|64|1024|2048|16384|32768|131072|262144|4194304, // All pure vector image types
RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576|2097152, // All pure rastor image types
EPS = 1, // Encapsulated PostScript
GIF = 2, // GIF files
@@ -68,7 +68,8 @@
PCT = 262144, // Mac Pict
BMP = 524288, // BMP
PGF = 1048576, // PGF
- ORA = 2097152 // ORA
+ ORA = 2097152, // ORA
+ QT = 4194304 // Qt
};
/*
More information about the scribus-commit
mailing list