// qimagewriter.sip generated by MetaSIP on Fri Sep 28 17:07:47 2007 // // This file is part of the QtGui Python extension module. // // Copyright (c) 2007 // Phil Thompson // // This file is part of PyQt. // // This copy of PyQt is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License version 2 as published by // the Free Software Foundation and appearing in the file LICENSE included in the // packaging of this file. // // PyQt is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with // PyQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class QImageWriter { %TypeHeaderCode #include %End public: enum ImageWriterError { UnknownError, DeviceError, UnsupportedFormatError, }; QImageWriter(); QImageWriter(QIODevice *device, const QByteArray &format); QImageWriter(const QString &fileName, const QByteArray &format = QByteArray()); ~QImageWriter(); void setFormat(const QByteArray &format); QByteArray format() const; void setDevice(QIODevice *device); QIODevice *device() const; void setFileName(const QString &fileName); QString fileName() const; void setQuality(int quality); int quality() const; void setGamma(float gamma); float gamma() const; void setDescription(const QString &description); QString description() const; bool canWrite() const; bool write(const QImage &image) /ReleaseGIL/; QImageWriter::ImageWriterError error() const; QString errorString() const; static QList supportedImageFormats(); void setText(const QString &key, const QString &text); %If (Qt_4_2_0 -) bool supportsOption(QImageIOHandler::ImageOption option) const; %End %If (Qt_4_3_0 -) void setCompression(int compression); %End %If (Qt_4_3_0 -) int compression() const; %End private: QImageWriter(const QImageWriter &); };