<class name="QStyleOptionFrameV2" doc="/** <p>The <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> class is used to describe the parameters necessary for drawing a frame in Qt 4.1 or above.</p> <p><a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> inherits <a href="QStyleOptionFrame.html#QStyleOptionFrame(int)"><tt>QStyleOptionFrame</tt></a> which is used for drawing several built-in Qt widgets, including <a href="QFrame.html"><tt>QFrame</tt></a>, <a href="QGroupBox.html"><tt>QGroupBox</tt></a>, <a href="QLineEdit.html"><tt>QLineEdit</tt></a>, and <a href="QMenu.html"><tt>QMenu</tt></a>.</p> <p>An instance of the <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> class has <a href="QStyleOption.html#type()">type</tt></a> <a href="QStyleOption.html#OptionType-enum"><tt>SO_Frame</tt></a> and <a href="QStyleOption.html#version()">version</tt></a> 2. The type is used internally by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a>, its subclasses, and qstyleoption_cast() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass and your own styles. The version is used by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.</p> <p>If you create your own <a href="QStyle.html"><tt>QStyle</tt></a> subclass, you should handle both <a href="QStyleOptionFrame.html#QStyleOptionFrame(int)"><tt>QStyleOptionFrame</tt></a> and <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a>. One way to achieve this is to use the <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> copy constructor. For example:</p> <pre> QStyleOptionFrame *option; if (const QStyleOptionFrame *frameOption = qstyleoption_cast&lt;const QStyleOptionFrame *&gt;(option)) { QStyleOptionFrameV2 frameOptionV2(*frameOption); <span class="comment">// draw the frame using frameOptionV2</span> }</pre> <p>In the example above: If the <tt>frameOption</tt>'s version is 1, <a href="QStyleOptionFrameV2.html#FrameFeature-enum"><tt>FrameFeature</tt></a> is set to <a href="QStyleOptionFrameV2.html#FrameFeature-enum">None</tt></a> for <tt>frameOptionV2</tt>. If <tt>frameOption</tt>'s version is 2, the constructor will simply copy the <tt>frameOption</tt>'s <a href="QStyleOptionFrameV2.html#FrameFeature-enum"><tt>FrameFeature</tt></a> value.</p> <p>For an example demonstrating how style options can be used, see the Styles</tt> example.</p> @see <a href="QStyleOptionFrame.html#QStyleOptionFrame(int)"><tt>QStyleOptionFrame</tt></a> @see <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> */"> <method name="public QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrameV2 other)" doc="/** <p>Constructs a <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> copy of the <tt>other</tt> style option.</p> */"/> <method name="public QStyleOptionFrameV2()" doc="/** <p>Constructs a <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> object.</p> */"/> <method name="protected QStyleOptionFrameV2(int version)" doc="/** <p>This method is used internally by Qt Jambi. Do not use it in your applications.</p> */"/> <method name="public QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame other)" doc="/** <p>Constructs a <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> copy of the <tt>other</tt> style option which can be either of the <a href="QStyleOptionFrameV2.html#QStyleOptionFrameV2(com.trolltech.qt.gui.QStyleOptionFrame)"><tt>QStyleOptionFrameV2</tt></a> or <a href="QStyleOptionFrame.html#QStyleOptionFrame(int)"><tt>QStyleOptionFrame</tt></a> types.</p> <p>If the <tt>other</tt> style option's version is 1, the new style option's <a href="QStyleOptionFrameV2.html#FrameFeature-enum"><tt>FrameFeature</tt></a> value is set to <tt>QStyleOptionFrameV2::None</tt>. If its version is 2, its <a href="QStyleOptionFrameV2.html#FrameFeature-enum"><tt>FrameFeature</tt></a> value is simply copied to the new style option.</p> @see <a href="QStyleOption.html#version()">version</tt></a> */"/> <enum name="StyleOptionVersion" doc="/** <p>This enum is used to hold information about the version of the style option, and is defined for each <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclass.</p> <p>The version is used by <a href="QStyleOption.html#QStyleOption(int, int)"><tt>QStyleOption</tt></a> subclasses to implement extensions without breaking compatibility. If you use qstyleoption_cast(), you normally don't need to check it.</p> @see <a href="QStyleOptionFrame.html#StyleOptionType-enum"><tt>StyleOptionType</tt></a> */"> <enum-value name="Version" doc="/** <p>2</p> */"/> </enum> <enum name="FrameFeature" doc="/** <p>This enum describles the different types of features a frame can have.</p> */"> <enum-value name="None" doc="/** <p>Indicates a normal frame.</p> */"/> <enum-value name="Flat" doc="/** <p>Indicates a flat frame.</p> */"/> </enum> <method name="public final com.trolltech.qt.gui.QStyleOptionFrameV2.FrameFeatures features()"/> <method name="public final void setFeatures(com.trolltech.qt.gui.QStyleOptionFrameV2.FrameFeatures features)"/> </class>