<class name="QPictureIO" doc="/** <p><b>This class is obsolete.</b> It is provided to keep old source code working. We strongly advise against using it in new code.</p> <p>The <a href="QPictureIO.html#QPictureIO()"><tt>QPictureIO</tt></a> class contains parameters for loading and saving pictures.</p> <p><a href="QPictureIO.html#QPictureIO()"><tt>QPictureIO</tt></a> contains a <a href="%2E%2E/core/QIODevice.html"><tt>QIODevice</tt></a> object that is used for picture data I/O. The programmer can install new picture file formats in addition to those that Qt provides.</p> <p>You don't normally need to use this class; QPicture::load(), QPicture::save().</p> @see <a href="QPicture.html"><tt>QPicture</tt></a> @see <a href="QPixmap.html"><tt>QPixmap</tt></a> @see <a href="%2E%2E/core/QFile.html"><tt>QFile</tt></a> */"> <method name="public QPictureIO()" doc="/** <p>Constructs a <a href="QPictureIO.html#QPictureIO()"><tt>QPictureIO</tt></a> object with all parameters set to zero.</p> */"/> <method name="public final java.lang.String description()" doc="/** <p>Returns the picture description string.</p> @see <a href="QPictureIO.html#setDescription(java.lang.String)"><tt>setDescription</tt></a> */"/> <method name="public final java.lang.String fileName()" doc="/** <p>Returns the file name currently set.</p> @see <a href="QPictureIO.html#setFileName(java.lang.String)"><tt>setFileName</tt></a> */"/> <method name="public final float gamma()" doc="/** <p>Returns the gamma value at which the picture will be viewed.</p> @see <a href="QPictureIO.html#setGamma(float)"><tt>setGamma</tt></a> */"/> <method name="public final com.trolltech.qt.core.QIODevice ioDevice()" doc="/** <p>Returns the IO device currently set.</p> @see <a href="QPictureIO.html#setIODevice(com.trolltech.qt.core.QIODevice)"><tt>setIODevice</tt></a> */"/> <method name="public final com.trolltech.qt.gui.QPicture picture()" doc="/** <p>Returns the picture currently set.</p> @see <a href="QPictureIO.html#setPicture(com.trolltech.qt.gui.QPicture)"><tt>setPicture</tt></a> */"/> <method name="public final int quality()" doc="/** <p>Returns the quality of the written picture, related to the compression ratio.</p> @see <a href="QPictureIO.html#setQuality(int)"><tt>setQuality</tt></a> @see <tt>QPicture::save</tt> */"/> <method name="public final boolean read()" doc="/** <p>Reads an picture into memory and returns true if the picture was successfully read; otherwise returns false.</p> <p>Before reading an picture you must set an IO device or a file name. If both an IO device and a file name have been set, the IO device will be used.</p> <p>Setting the picture file format string is optional.</p> <p>Note that this function does <i>not</i> set the format</tt> used to read the picture. If you need that information, use the <a href="QPictureIO.html#pictureFormat(com.trolltech.qt.core.QIODevice)"><tt>pictureFormat</tt></a> static functions.</p> <p>Example:</p> <pre> QPictureIO iio; QPixmap pixmap; iio.setFileName(&quot;vegeburger.pic&quot;); if (iio.read()) { <span class="comment">// OK</span> QPicture picture = iio.picture(); QPainter painter(&amp;pixmap); painter.drawPicture(0, 0, picture); }</pre> @see <a href="QPictureIO.html#setIODevice(com.trolltech.qt.core.QIODevice)"><tt>setIODevice</tt></a> @see <a href="QPictureIO.html#setFileName(java.lang.String)"><tt>setFileName</tt></a> @see <tt>setFormat</tt> @see <a href="QPictureIO.html#write()"><tt>write</tt></a> @see <tt>QPixmap::load</tt> */"/> <method name="public final void setDescription(java.lang.String arg__1)" doc="/** <p>Sets the picture description string for picture handlers that support picture descriptions to <tt>arg__1</tt>.</p> <p>Currently, no picture format supported by Qt uses the description string.</p> @see <a href="QPictureIO.html#description()"><tt>description</tt></a> */"/> <method name="public final void setFileName(java.lang.String arg__1)" doc="/** <p>Sets the name of the file to read or write an picture from to <tt>arg__1</tt>.</p> @see <a href="QPictureIO.html#fileName()"><tt>fileName</tt></a> @see <a href="QPictureIO.html#setIODevice(com.trolltech.qt.core.QIODevice)"><tt>setIODevice</tt></a> */"/> <method name="public final void setGamma(float arg__1)" doc="/** <p>Sets the gamma value at which the picture will be viewed to <tt>arg__1</tt>. If the picture format stores a gamma value for which the picture is intended to be used, then this setting will be used to modify the picture. Setting to 0.0 will disable gamma correction (i.e&#x2e; any specification in the file will be ignored).</p> <p>The default value is 0.0&#x2e;</p> @see <a href="QPictureIO.html#gamma()"><tt>gamma</tt></a> */"/> <method name="public final void setIODevice(com.trolltech.qt.core.QIODevice arg__1)" doc="/** <p>Sets the IO device to be used for reading or writing an picture.</p> <p>Setting the IO device allows pictures to be read/written to any block-oriented <a href="%2E%2E/core/QIODevice.html"><tt>QIODevice</tt></a>.</p> <p>If <tt>arg__1</tt> is not null, this IO device will override file name settings.</p> @see <a href="QPictureIO.html#setFileName(java.lang.String)"><tt>setFileName</tt></a> */"/> <method name="public final void setPicture(com.trolltech.qt.gui.QPicture arg__1)" doc="/** <p>Sets the picture to <tt>arg__1</tt>.</p> @see <a href="QPictureIO.html#picture()"><tt>picture</tt></a> */"/> <method name="public final void setQuality(int arg__1)" doc="/** <p>Sets the quality of the written picture to <tt>arg__1</tt>, related to the compression ratio.</p> <p><tt>arg__1</tt> must be in the range -1..100. Specify 0 to obtain small compressed files, 100 for large uncompressed files. (-1 signifies the default compression.)</p> @see <a href="QPictureIO.html#quality()"><tt>quality</tt></a> @see <tt>QPicture::save</tt> */"/> <method name="public final void setStatus(int arg__1)" doc="/** <p>Sets the picture IO status to <tt>arg__1</tt>. A non-zero value indicates an error, whereas 0 means that the IO operation was successful.</p> @see <a href="QPictureIO.html#status()"><tt>status</tt></a> */"/> <method name="public final int status()" doc="/** <p>Returns the picture's IO status. A non-zero value indicates an error, whereas 0 means that the IO operation was successful.</p> @see <a href="QPictureIO.html#setStatus(int)"><tt>setStatus</tt></a> */"/> <method name="public final boolean write()" doc="/** <p>Writes an picture to an IO device and returns true if the picture was successfully written; otherwise returns false.</p> <p>Before writing an picture you must set an IO device or a file name. If both an IO device and a file name have been set, the IO device will be used.</p> <p>The picture will be written using the specified picture format.</p> <p>Example:</p> <pre> QPictureIO iio; QPicture picture; QPainter painter(&amp;picture); painter.drawPixmap(0, 0, pixmap); iio.setPicture(picture); iio.setFileName(&quot;vegeburger.pic&quot;); iio.setFormat(&quot;PIC&quot;); if (iio.write()) return true; <span class="comment">// returned true if written successfully</span></pre> @see <a href="QPictureIO.html#setIODevice(com.trolltech.qt.core.QIODevice)"><tt>setIODevice</tt></a> @see <a href="QPictureIO.html#setFileName(java.lang.String)"><tt>setFileName</tt></a> @see <tt>setFormat</tt> @see <a href="QPictureIO.html#read()"><tt>read</tt></a> @see <tt>QPixmap::save</tt> */"/> <method name="public native static java.util.List<com.trolltech.qt.core.QByteArray> inputFormats()" doc="/** <p>Returns a sorted list of picture formats that are supported for picture input.</p> */"/> <method name="public native static java.util.List<com.trolltech.qt.core.QByteArray> outputFormats()" doc="/** <p>Returns a sorted list of picture formats that are supported for picture output.</p> */"/> <method name="public native static com.trolltech.qt.core.QByteArray pictureFormat(java.lang.String fileName)" doc="/** <p>Returns a string that specifies the picture format of the file <tt>fileName</tt>, or null if the file cannot be read or if the format is not recognized.</p> */"/> <method name="public static com.trolltech.qt.core.QByteArray pictureFormat(com.trolltech.qt.core.QIODevice arg__1)" doc="/** <p>Returns a string that specifies the picture format of the picture read from IO device <tt>arg__1</tt>, or 0 if the device cannot be read or if the format is not recognized.</p> <p>Make sure that <tt>arg__1</tt> is at the right position in the device (for example, at the beginning of the file).</p> @see <tt>QIODevice::at</tt> */"/> </class>