7 #include "ImportImageExtensions.h" 8 #ifdef ENGAUGE_JPEG2000 10 #endif // ENGAUGE_JPEG2000 12 #include <QImageReader> 22 QList<QByteArray>::const_iterator itr;
23 QList<QByteArray> supportedImageFormats = QImageReader::supportedImageFormats();
24 QStringList supportedImageFormatStrings;
25 for (itr = supportedImageFormats.begin (); itr != supportedImageFormats.end (); itr++) {
26 QByteArray arr = *itr;
27 QString extensionAsWildcard = QString (
"*.%1").arg (QString (arr));
28 supportedImageFormatStrings << extensionAsWildcard;
30 #ifdef ENGAUGE_JPEG2000 33 #endif // ENGAUGE_JPEG2000 36 supportedImageFormatStrings <<
"*.pdf";
39 supportedImageFormatStrings.sort();
41 return supportedImageFormatStrings;
46 QString valueToTest = QString (
"*.%1").arg (fileExtension.toLower());
Wrapper around OpenJPEG library, in C, for opening jpeg2000 files.
bool offers(const QString &fileExtension) const
Return true if specified file extension is supported.
ImportImageExtensions()
Single constructor.
QStringList supportedImageWildcards() const
List the supported jpeg2000 file extensions, for filtering import files.
QStringList fileExtensionsWithAsterisks() const
File extensions for use in file dialogs.