1.1 --- a/file.cpp Tue Jun 06 14:58:11 2006 +0000
1.2 +++ b/file.cpp Tue Aug 15 11:42:10 2006 +0000
1.3 @@ -303,3 +303,38 @@
1.4 }
1.5 }
1.6
1.7 +ImageIO::ImageIO ()
1.8 +{
1.9 + // Create list with supported image types
1.10 + // foreach (QByteArray format, QImageWriter::supportedImageFormats())
1.11 + // imageTypes.append( tr("%1...").arg(QString(format).toUpper()));
1.12 + imageFilters.append ("Images (*.png *.jpg *.jpeg *.bmp *.bmp *.ppm *.xpm *.xbm)");
1.13 + imageTypes.append ("PNG");
1.14 + imageFilters.append ("Portable Network Graphics (*.png)");
1.15 + imageTypes.append ("PNG");
1.16 + imageFilters.append ("Joint Photographic Experts Group (*.jpg)");
1.17 + imageTypes.append ("JPG");
1.18 + imageFilters.append ("Joint Photographic Experts Group (*.jpeg)");
1.19 + imageTypes.append ("JPG");
1.20 + imageFilters.append ("Windows Bitmap (*.bmp)");
1.21 + imageTypes.append ("BMP");
1.22 + imageFilters.append ("Portable Pixmap (*.ppm)");
1.23 + imageTypes.append ("PPM");
1.24 + imageFilters.append ("X11 Bitmap (*.xpm)");
1.25 + imageTypes.append ("XPM");
1.26 + imageFilters.append ("X11 Bitmap (*.xbm)");
1.27 + imageTypes.append ("XBM");
1.28 +}
1.29 +
1.30 +QStringList ImageIO::getFilters()
1.31 +{
1.32 + return imageFilters;
1.33 +}
1.34 +
1.35 +QString ImageIO::getType(QString filter)
1.36 +{
1.37 + for (int i=0;i<imageFilters.count()+1;i++)
1.38 + if (imageFilters.at(i)==filter) return imageTypes.at(i);
1.39 +}
1.40 +
1.41 +