<class name="QIconEngine" doc="/** <p>The <a href="QIconEngine.html#QIconEngine()"><tt>QIconEngine</tt></a> class provides an abstract base class for <a href="QIcon.html"><tt>QIcon</tt></a> renderers.</p> <p><b>Use <a href="QIconEngineV2.html"><tt>QIconEngineV2</tt></a> instead.</b></p> <p>An icon engine provides the rendering functions for a <a href="QIcon.html"><tt>QIcon</tt></a>. Each icon has a corresponding icon engine that is responsible for drawing the icon with a requested size, mode and state.</p> <p>The icon is rendered by the <a href="QIconEngine.html#paint(com.trolltech.qt.gui.QPainter, com.trolltech.qt.core.QRect, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>paint</tt></a> function, and the icon can additionally be obtained as a pixmap with the <a href="QIconEngine.html#pixmap(com.trolltech.qt.core.QSize, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>pixmap</tt></a> function (the default implementation simply uses <a href="QIconEngine.html#paint(com.trolltech.qt.gui.QPainter, com.trolltech.qt.core.QRect, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>paint</tt></a> to achieve this). The <a href="QIconEngine.html#addPixmap(com.trolltech.qt.gui.QPixmap, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>addPixmap</tt></a> function can be used to add new pixmaps to the icon engine, and is used by <a href="QIcon.html"><tt>QIcon</tt></a> to add specialized custom pixmaps.</p> <p>The <a href="QIconEngine.html#paint(com.trolltech.qt.gui.QPainter, com.trolltech.qt.core.QRect, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>paint</tt></a>, <a href="QIconEngine.html#pixmap(com.trolltech.qt.core.QSize, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>pixmap</tt></a>, and <a href="QIconEngine.html#addPixmap(com.trolltech.qt.gui.QPixmap, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>addPixmap</tt></a> functions are all virtual, and can therefore be reimplemented in subclasses of <a href="QIconEngine.html#QIconEngine()"><tt>QIconEngine</tt></a>.</p> @see <a href="QIconEngineV2.html"><tt>QIconEngineV2</tt></a> @see <tt>QIconEnginePlugin</tt> */"> <method name="public QIconEngine()"/> <method name="public com.trolltech.qt.core.QSize actualSize(com.trolltech.qt.core.QSize size, com.trolltech.qt.gui.QIcon.Mode mode, com.trolltech.qt.gui.QIcon.State state)" doc="/** <p>Returns the actual size of the icon the engine provides for the requested <tt>size</tt>, <tt>mode</tt> and <tt>state</tt>. The default implementation returns the given <tt>size</tt>.</p> */"/> <method name="public void addFile(java.lang.String fileName, com.trolltech.qt.core.QSize size, com.trolltech.qt.gui.QIcon.Mode mode, com.trolltech.qt.gui.QIcon.State state)" doc="/** <p>Called by QIcon::addFile(). Adds a specialized pixmap from the file with the given <tt>fileName</tt>, <tt>size</tt>, <tt>mode</tt> and <tt>state</tt>. The default pixmap-based engine stores any supplied file names, and it loads the pixmaps on demand instead of using scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra files.</p> */"/> <method name="public void addPixmap(com.trolltech.qt.gui.QPixmap pixmap, com.trolltech.qt.gui.QIcon.Mode mode, com.trolltech.qt.gui.QIcon.State state)" doc="/** <p>Called by QIcon::addPixmap(). Adds a specialized <tt>pixmap</tt> for the given <tt>mode</tt> and <tt>state</tt>. The default pixmap-based engine stores any supplied pixmaps, and it uses them instead of scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra pixmaps.</p> */"/> <method name="public abstract void paint(com.trolltech.qt.gui.QPainter painter, com.trolltech.qt.core.QRect rect, com.trolltech.qt.gui.QIcon.Mode mode, com.trolltech.qt.gui.QIcon.State state)" doc="/** <p>Uses the given <tt>painter</tt> to paint the icon with the required <tt>mode</tt> and <tt>state</tt> into the rectangle <tt>rect</tt>.</p> */"/> <method name="public com.trolltech.qt.gui.QPixmap pixmap(com.trolltech.qt.core.QSize size, com.trolltech.qt.gui.QIcon.Mode mode, com.trolltech.qt.gui.QIcon.State state)" doc="/** <p>Returns the icon as a pixmap with the required <tt>size</tt>, <tt>mode</tt>, and <tt>state</tt>. The default implementation creates a new pixmap and calls <a href="QIconEngine.html#paint(com.trolltech.qt.gui.QPainter, com.trolltech.qt.core.QRect, com.trolltech.qt.gui.QIcon.Mode, com.trolltech.qt.gui.QIcon.State)"><tt>paint</tt></a> to fill it.</p> */"/> </class>