Warning, file /include/QtGui/qimagewriter.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QIMAGEWRITER_H
0005 #define QIMAGEWRITER_H
0006
0007 #include <QtGui/qtguiglobal.h>
0008 #include <QtCore/qbytearray.h>
0009 #include <QtCore/qcoreapplication.h>
0010 #include <QtCore/qlist.h>
0011 #include <QtGui/qimageiohandler.h>
0012
0013 QT_BEGIN_NAMESPACE
0014
0015
0016 class QIODevice;
0017 class QImage;
0018
0019 class QImageWriterPrivate;
0020 class Q_GUI_EXPORT QImageWriter
0021 {
0022 Q_DECLARE_TR_FUNCTIONS(QImageWriter)
0023 public:
0024 enum ImageWriterError {
0025 UnknownError,
0026 DeviceError,
0027 UnsupportedFormatError,
0028 InvalidImageError
0029 };
0030
0031 QImageWriter();
0032 explicit QImageWriter(QIODevice *device, const QByteArray &format);
0033 explicit QImageWriter(const QString &fileName, const QByteArray &format = QByteArray());
0034 ~QImageWriter();
0035
0036 void setFormat(const QByteArray &format);
0037 QByteArray format() const;
0038
0039 void setDevice(QIODevice *device);
0040 QIODevice *device() const;
0041
0042 void setFileName(const QString &fileName);
0043 QString fileName() const;
0044
0045 void setQuality(int quality);
0046 int quality() const;
0047
0048 void setCompression(int compression);
0049 int compression() const;
0050
0051 void setSubType(const QByteArray &type);
0052 QByteArray subType() const;
0053 QList<QByteArray> supportedSubTypes() const;
0054
0055 void setOptimizedWrite(bool optimize);
0056 bool optimizedWrite() const;
0057
0058 void setProgressiveScanWrite(bool progressive);
0059 bool progressiveScanWrite() const;
0060
0061 QImageIOHandler::Transformations transformation() const;
0062 void setTransformation(QImageIOHandler::Transformations orientation);
0063
0064 void setText(const QString &key, const QString &text);
0065
0066 bool canWrite() const;
0067 bool write(const QImage &image);
0068
0069 ImageWriterError error() const;
0070 QString errorString() const;
0071
0072 bool supportsOption(QImageIOHandler::ImageOption option) const;
0073
0074 static QList<QByteArray> supportedImageFormats();
0075 static QList<QByteArray> supportedMimeTypes();
0076 static QList<QByteArray> imageFormatsForMimeType(const QByteArray &mimeType);
0077
0078 private:
0079 Q_DISABLE_COPY(QImageWriter)
0080 QImageWriterPrivate *d;
0081 };
0082
0083 QT_END_NAMESPACE
0084
0085 #endif