<class name="QStylePainter" doc="/**
&lt;p&gt;The &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; class is a convenience class for drawing &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt; elements inside a widget.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; extends &lt;a href=&quot;QPainter.html#QPainter(com.trolltech.qt.gui.QPaintDeviceInterface)&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; with a set of high-level &lt;tt&gt;draw...()&lt;/tt&gt; functions implemented on top of &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt;'s API. The advantage of using &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; is that the parameter lists get considerably shorter. Whereas a &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt; object must be able to draw on any widget using any painter (because the application normally has one &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt; object shared by all widget), a &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; is initialized with a widget, eliminating the need to specify the &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;, the &lt;a href=&quot;QPainter.html#QPainter(com.trolltech.qt.gui.QPaintDeviceInterface)&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;, and the &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt; for every function call.&lt;/p&gt;
&lt;p&gt;Example using &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt; directly:&lt;/p&gt;
&lt;pre&gt;    void MyWidget::paintEvent(QPaintEvent * &lt;span class=&quot;comment&quot;&gt;/* event *&amp;lt;!-- noop --&amp;gt;/&lt;/span&gt;)
    {
        QPainter painter(this);

        QStyleOptionFocusRect option;
        option.initFrom(this);
        option.backgroundColor = palette().color(QPalette::Background);

        style()-&amp;gt;drawPrimitive(QStyle::PE_FrameFocusRect, &amp;amp;option, &amp;amp;painter, this);
    }&lt;/pre&gt;
&lt;p&gt;Example using &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;    void MyWidget::paintEvent(QPaintEvent * &lt;span class=&quot;comment&quot;&gt;/* event *&amp;lt;!-- noop --&amp;gt;/&lt;/span&gt;)
    {
        QStylePainter painter(this);

        QStyleOptionFocusRect option;
        option.initFrom(this);
        option.backgroundColor = palette().color(QPalette::Background);

        painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
    }&lt;/pre&gt;

@see &lt;a href=&quot;QStyle.html&quot;&gt;&lt;tt&gt;QStyle&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QStyleOption.html&quot;&gt;&lt;tt&gt;QStyleOption&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QStylePainter(com.trolltech.qt.gui.QPaintDeviceInterface pd, com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Construct a &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; using &lt;tt&gt;pd&lt;/tt&gt; for its paint device, and attributes from &lt;tt&gt;w&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QStylePainter()" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public QStylePainter(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Construct a &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt; using widget &lt;tt&gt;w&lt;/tt&gt; for its paint device.&lt;/p&gt;
 */"/>
    <method name="public final boolean begin(com.trolltech.qt.gui.QPaintDeviceInterface pd, com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Begin painting operations on paint device &lt;tt&gt;pd&lt;/tt&gt; as if it was &lt;tt&gt;w&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;This is automatically called by the constructor that takes a &lt;a href=&quot;QPaintDevice.html&quot;&gt;&lt;tt&gt;QPaintDevice&lt;/tt&gt;&lt;/a&gt; and a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final boolean begin(com.trolltech.qt.gui.QWidget w)" doc="/**
&lt;p&gt;Begin painting operations on the specified &lt;tt&gt;w&lt;/tt&gt;. Returns true if the painter is ready to use; otherwise returns false.&lt;/p&gt;
&lt;p&gt;This is automatically called by the constructor that takes a &lt;a href=&quot;QWidget.html&quot;&gt;&lt;tt&gt;QWidget&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void drawComplexControl(com.trolltech.qt.gui.QStyle.ComplexControl cc, com.trolltech.qt.gui.QStyleOptionComplex opt)" doc="/**
&lt;p&gt;Use the widget's style to draw a complex control &lt;tt&gt;cc&lt;/tt&gt; specified by the &lt;a href=&quot;QStyleOptionComplex.html&quot;&gt;&lt;tt&gt;QStyleOptionComplex&lt;/tt&gt;&lt;/a&gt; &lt;tt&gt;opt&lt;/tt&gt;.&lt;/p&gt;

@see &lt;tt&gt;QStyle::drawComplexControl&lt;/tt&gt; */"/>
    <method name="public final void drawControl(com.trolltech.qt.gui.QStyle.ControlElement ce, com.trolltech.qt.gui.QStyleOption opt)" doc="/**
&lt;p&gt;Use the widget's style to draw a control element &lt;tt&gt;ce&lt;/tt&gt; specified by &lt;a href=&quot;QStyleOption.html&quot;&gt;&lt;tt&gt;QStyleOption&lt;/tt&gt;&lt;/a&gt; &lt;tt&gt;opt&lt;/tt&gt;.&lt;/p&gt;

@see &lt;tt&gt;QStyle::drawControl&lt;/tt&gt; */"/>
    <method name="public final void drawItemPixmap(com.trolltech.qt.core.QRect r, int flags, com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Draws the &lt;tt&gt;pixmap&lt;/tt&gt; in rectangle &lt;tt&gt;r&lt;/tt&gt;. The pixmap is aligned according to &lt;tt&gt;flags&lt;/tt&gt;.&lt;/p&gt;

@see &lt;tt&gt;QStyle::drawItemPixmap&lt;/tt&gt;
@see Qt::Alignment&lt;/tt&gt; */"/>
    <method name="public final void drawItemText(com.trolltech.qt.core.QRect r, int flags, com.trolltech.qt.gui.QPalette pal, boolean enabled, java.lang.String text, com.trolltech.qt.gui.QPalette.ColorRole textRole)" doc="/**
&lt;p&gt;Draws the &lt;tt&gt;text&lt;/tt&gt; in rectangle &lt;tt&gt;r&lt;/tt&gt; and palette &lt;tt&gt;pal&lt;/tt&gt;. The text is aligned and wrapped according to &lt;tt&gt;flags&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The pen color is specified with &lt;tt&gt;textRole&lt;/tt&gt;. The &lt;tt&gt;enabled&lt;/tt&gt; bool indicates whether or not the item is enabled; when reimplementing this bool should influence how the item is drawn.&lt;/p&gt;

@see &lt;tt&gt;QStyle::drawItemText&lt;/tt&gt;
@see Qt::Alignment&lt;/tt&gt; */"/>
    <method name="public final void drawItemText(com.trolltech.qt.core.QRect r, int flags, com.trolltech.qt.gui.QPalette pal, boolean enabled, java.lang.String text)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QStylePainter.html#drawItemText(com.trolltech.qt.core.QRect, int, com.trolltech.qt.gui.QPalette, boolean, java.lang.String, com.trolltech.qt.gui.QPalette.ColorRole)&quot;&gt;&lt;tt&gt;drawItemText&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;r&lt;/tt&gt;, &lt;tt&gt;flags&lt;/tt&gt;, &lt;tt&gt;pal&lt;/tt&gt;, &lt;tt&gt;enabled&lt;/tt&gt;, &lt;tt&gt;text&lt;/tt&gt;, QPalette::NoRole). */"/>
    <method name="public final void drawPrimitive(com.trolltech.qt.gui.QStyle.PrimitiveElement pe, com.trolltech.qt.gui.QStyleOption opt)" doc="/**
&lt;p&gt;Use the widget's style to draw a primitive element &lt;tt&gt;pe&lt;/tt&gt; specified by &lt;a href=&quot;QStyleOption.html&quot;&gt;&lt;tt&gt;QStyleOption&lt;/tt&gt;&lt;/a&gt; &lt;tt&gt;opt&lt;/tt&gt;.&lt;/p&gt;

@see &lt;tt&gt;QStyle::drawPrimitive&lt;/tt&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QStyle style()" doc="/**
&lt;p&gt;Return the current style used by the &lt;a href=&quot;QStylePainter.html#QStylePainter(com.trolltech.qt.gui.QWidget)&quot;&gt;&lt;tt&gt;QStylePainter&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
</class>
