Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 1931

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<class name="QBrush" doc="/**
&lt;p&gt;The &lt;a href=&quot;QBrush.html#QBrush(com.trolltech.qt.gui.QImage)&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt; class defines the fill pattern of shapes drawn by &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A brush has a style, a color, a gradient and a texture.&lt;/p&gt;
&lt;p&gt;The brush &lt;a href=&quot;QBrush.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt; defines the fill pattern using the Qt::BrushStyle enum. The default brush style is Qt::NoBrush (depending on how you construct a brush). This style tells the painter to not fill shapes. The standard style for filling is Qt::SolidPattern. The style can be set when the brush is created using the appropriate constructor, and in addition the &lt;a href=&quot;QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; function provides means for altering the style once the brush is constructed.&lt;/p&gt;
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;%2E%2E/images/brush-styles.png&quot; alt=&quot;Brush Styles&quot; /&gt;&lt;/p&gt;&lt;p&gt;The brush &lt;a href=&quot;QBrush.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; defines the color of the fill pattern. The color can either be one of Qt's predefined colors, Qt::GlobalColor, or any other custom &lt;a href=&quot;QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt;. The currently set color can be retrieved and altered using the &lt;a href=&quot;QBrush.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; functions, respectively.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QBrush.html#gradient()&quot;&gt;&lt;tt&gt;gradient&lt;/tt&gt;&lt;/a&gt; defines the gradient fill used when the current style is either Qt::LinearGradientPattern, Qt::RadialGradientPattern or Qt::ConicalGradientPattern. Gradient brushes are created by giving a &lt;a href=&quot;QGradient.html&quot;&gt;&lt;tt&gt;QGradient&lt;/tt&gt;&lt;/a&gt; as a constructor argument when creating the &lt;a href=&quot;QBrush.html#QBrush(com.trolltech.qt.gui.QImage)&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt;. Qt provides three different gradients: &lt;a href=&quot;QLinearGradient.html&quot;&gt;&lt;tt&gt;QLinearGradient&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QConicalGradient.html&quot;&gt;&lt;tt&gt;QConicalGradient&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QRadialGradient.html&quot;&gt;&lt;tt&gt;QRadialGradient&lt;/tt&gt;&lt;/a&gt; - all of which inherit &lt;a href=&quot;QGradient.html&quot;&gt;&lt;tt&gt;QGradient&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;        QRadialGradient gradient(50, 50, 50, 50, 50);
        gradient.setColorAt(0, QColor::fromRgbF(0, 1, 0, 1));
        gradient.setColorAt(1, QColor::fromRgbF(0, 0, 0, 0));

        QBrush brush(gradient);&lt;/pre&gt;
&lt;p&gt;The &lt;a href=&quot;QBrush.html#texture()&quot;&gt;&lt;tt&gt;texture&lt;/tt&gt;&lt;/a&gt; defines the pixmap used when the current style is Qt::TexturePattern. You can create a brush with a texture by providing the pixmap when the brush is created or by using &lt;a href=&quot;QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)&quot;&gt;&lt;tt&gt;setTexture&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note that applying &lt;a href=&quot;QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)&quot;&gt;&lt;tt&gt;setTexture&lt;/tt&gt;&lt;/a&gt; makes &lt;a href=&quot;QBrush.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt; == Qt::TexturePattern, regardless of previous style settings. Also, calling &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; will not make a difference if the style is a gradient. The same is the case if the style is Qt::TexturePattern style unless the current texture is a &lt;a href=&quot;QBitmap.html&quot;&gt;&lt;tt&gt;QBitmap&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;QBrush.html#isOpaque()&quot;&gt;&lt;tt&gt;isOpaque&lt;/tt&gt;&lt;/a&gt; function returns true if the brush is fully opaque otherwise false. A brush is considered opaque if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The alpha component of the &lt;a href=&quot;QBrush.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; is 255.&lt;/li&gt;
&lt;li&gt;Its &lt;a href=&quot;QBrush.html#texture()&quot;&gt;&lt;tt&gt;texture&lt;/tt&gt;&lt;/a&gt; does not have an alpha channel and is not a &lt;a href=&quot;QBitmap.html&quot;&gt;&lt;tt&gt;QBitmap&lt;/tt&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The colors in the &lt;a href=&quot;QBrush.html#gradient()&quot;&gt;&lt;tt&gt;gradient&lt;/tt&gt;&lt;/a&gt; all have an alpha component that is 255.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;table width=&quot;100%&quot; align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;1&quot; border=&quot;0&quot;&gt;
&lt;tr valign=&quot;top&quot; class=&quot;odd&quot;&gt;&lt;td&gt;&lt;img src=&quot;%2E%2E/images/brush-outline.png&quot; alt=&quot;Outlines&quot; /&gt;&lt;/td&gt;&lt;td&gt;To specify the style and color of lines and outlines, use the &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;'s &lt;a href=&quot;QPen.html&quot;&gt;pen&lt;/tt&gt;&lt;/a&gt; combined with Qt::PenStyle and Qt::GlobalColor:&lt;pre&gt;    QPainter painter(this);

    painter.setBrush(Qt::cyan);
    painter.setPen(Qt::darkCyan);
    painter.drawRect(0, 0, 100,100);

    painter.setBrush(Qt::NoBrush);
    painter.setPen(Qt::darkGreen);
    painter.drawRect(40, 40, 100, 100);&lt;/pre&gt;
&lt;p&gt;Note that, by default, &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; renders the outline (using the currently set pen) when drawing shapes. Use &lt;tt&gt;painter.setPen(Qt::NoPen)&lt;/tt&gt; to disable this behavior.&lt;/p&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;For more information about painting in general, see &lt;a href=&quot;%2E%2E/paintsystem.html&quot;&gt;The Paint System&lt;/tt&gt;&lt;/a&gt; documentation.&lt;/p&gt;

@see &lt;tt&gt;Qt::BrushStyle&lt;/tt&gt;
@see &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QColor.html&quot;&gt;&lt;tt&gt;QColor&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QBrush(com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Constructs a brush with a black color and a texture set to the given &lt;tt&gt;pixmap&lt;/tt&gt;. The style is set to Qt::TexturePattern.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)&quot;&gt;&lt;tt&gt;setTexture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QColor color, com.trolltech.qt.core.Qt.BrushStyle bs)" doc="/**
&lt;p&gt;Constructs a brush with the given &lt;tt&gt;color&lt;/tt&gt; and &lt;tt&gt;bs&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QBrush.html#QBrush(com.trolltech.qt.gui.QImage)&quot;&gt;&lt;tt&gt;QBrush&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;color&lt;/tt&gt;, Qt::SolidPattern). */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QColor color, com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Constructs a brush with the given &lt;tt&gt;color&lt;/tt&gt; and the custom pattern stored in &lt;tt&gt;pixmap&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;setPixmap&lt;/tt&gt; */"/>
    <method name="public QBrush()" doc="/**
&lt;p&gt;Constructs a default black brush with the style Qt::NoBrush (i.e&amp;#x2e; this brush will not fill shapes).&lt;/p&gt;
 */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QBrush brush)" doc="/**
&lt;p&gt;Constructs a copy of &lt;tt&gt;brush&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QGradient gradient)" doc="/**
&lt;p&gt;Constructs a brush based on the given &lt;tt&gt;gradient&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The brush style is set to the corresponding gradient style (either Qt::LinearGradientPattern, Qt::RadialGradientPattern or Qt::ConicalGradientPattern).&lt;/p&gt;
 */"/>
    <method name="public QBrush(com.trolltech.qt.core.Qt.BrushStyle bs)" doc="/**
&lt;p&gt;Constructs a black brush with the given &lt;tt&gt;bs&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QBrush(com.trolltech.qt.core.Qt.GlobalColor color, com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Constructs a brush with the given &lt;tt&gt;color&lt;/tt&gt; and the custom pattern stored in &lt;tt&gt;pixmap&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;The style is set to Qt::TexturePattern. The color will only have an effect for QBitmaps.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt;
@see &lt;tt&gt;setPixmap&lt;/tt&gt; */"/>
    <method name="public QBrush(com.trolltech.qt.gui.QImage image)" doc="/**
&lt;p&gt;Constructs a brush with a black color and a texture set to the given &lt;tt&gt;image&lt;/tt&gt;. The style is set to Qt::TexturePattern.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setTextureImage(com.trolltech.qt.gui.QImage)&quot;&gt;&lt;tt&gt;setTextureImage&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QColor color()" doc="/**
&lt;p&gt;Returns the brush color.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QGradient gradient()" doc="/**
&lt;p&gt;Returns the gradient describing this brush.&lt;/p&gt;
 */"/>
    <method name="public final boolean isOpaque()" doc="/**
&lt;p&gt;Returns true if the brush is fully opaque otherwise false. A brush is considered opaque if:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The alpha component of the &lt;a href=&quot;QBrush.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; is 255.&lt;/li&gt;
&lt;li&gt;Its &lt;a href=&quot;QBrush.html#texture()&quot;&gt;&lt;tt&gt;texture&lt;/tt&gt;&lt;/a&gt; does not have an alpha channel and is not a &lt;a href=&quot;QBitmap.html&quot;&gt;&lt;tt&gt;QBitmap&lt;/tt&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The colors in the &lt;a href=&quot;QBrush.html#gradient()&quot;&gt;&lt;tt&gt;gradient&lt;/tt&gt;&lt;/a&gt; all have an alpha component that is 255.&lt;/li&gt;
&lt;/ul&gt;
 */"/>
    <method name="public final com.trolltech.qt.gui.QMatrix matrix()" doc="/**
&lt;p&gt;Returns the current transformation matrix for the brush.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setMatrix(com.trolltech.qt.gui.QMatrix)&quot;&gt;&lt;tt&gt;setMatrix&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void setColor(com.trolltech.qt.core.Qt.GlobalColor color)" doc="/**
&lt;p&gt;Sets the brush color to the given &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void setColor(com.trolltech.qt.gui.QColor color)" doc="/**
&lt;p&gt;Sets the brush color to the given &lt;tt&gt;color&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;Note that calling &lt;a href=&quot;QBrush.html#setColor(com.trolltech.qt.gui.QColor)&quot;&gt;&lt;tt&gt;setColor&lt;/tt&gt;&lt;/a&gt; will not make a difference if the style is a gradient. The same is the case if the style is Qt::TexturePattern style unless the current texture is a &lt;a href=&quot;QBitmap.html&quot;&gt;&lt;tt&gt;QBitmap&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#color()&quot;&gt;&lt;tt&gt;color&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setMatrix(com.trolltech.qt.gui.QMatrix mat)" doc="/**
&lt;p&gt;Sets &lt;tt&gt;mat&lt;/tt&gt; as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; transformation matrix to produce the final result.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#matrix()&quot;&gt;&lt;tt&gt;matrix&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setStyle(com.trolltech.qt.core.Qt.BrushStyle arg__1)" doc="/**
&lt;p&gt;Sets the brush style to &lt;tt&gt;arg__1&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#style()&quot;&gt;&lt;tt&gt;style&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setTexture(com.trolltech.qt.gui.QPixmap pixmap)" doc="/**
&lt;p&gt;Sets the brush pixmap to &lt;tt&gt;pixmap&lt;/tt&gt;. The style is set to Qt::TexturePattern.&lt;/p&gt;
&lt;p&gt;The current brush color will only have an effect for monochrome pixmaps, i.e&amp;#x2e; for QPixmap::depth() == 1 (&lt;a href=&quot;QBitmap.html&quot;&gt;QBitmaps&lt;/a&gt;).&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#texture()&quot;&gt;&lt;tt&gt;texture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setTextureImage(com.trolltech.qt.gui.QImage image)" doc="/**
&lt;p&gt;Sets the brush image to &lt;tt&gt;image&lt;/tt&gt;. The style is set to Qt::TexturePattern.&lt;/p&gt;
&lt;p&gt;The current brush color will only have an effect for monochrome images, i.e&amp;#x2e; for QImage::depth() == 1.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#textureImage()&quot;&gt;&lt;tt&gt;textureImage&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setTransform(com.trolltech.qt.gui.QTransform arg__1)" doc="/**
&lt;p&gt;Sets &lt;tt&gt;arg__1&lt;/tt&gt; as an explicit transformation matrix on the current brush. The brush transformation matrix is merged with &lt;a href=&quot;QPainter.html&quot;&gt;&lt;tt&gt;QPainter&lt;/tt&gt;&lt;/a&gt; transformation matrix to produce the final result.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#transform()&quot;&gt;&lt;tt&gt;transform&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.core.Qt.BrushStyle style()" doc="/**
&lt;p&gt;Returns the brush style.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setStyle(com.trolltech.qt.core.Qt.BrushStyle)&quot;&gt;&lt;tt&gt;setStyle&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QPixmap texture()" doc="/**
&lt;p&gt;Returns the custom brush pattern, or a null pixmap if no custom brush pattern has been set.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setTexture(com.trolltech.qt.gui.QPixmap)&quot;&gt;&lt;tt&gt;setTexture&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QImage textureImage()" doc="/**
&lt;p&gt;Returns the custom brush pattern, or a null image if no custom brush pattern has been set.&lt;/p&gt;
&lt;p&gt;If the texture was set as a &lt;a href=&quot;QPixmap.html&quot;&gt;&lt;tt&gt;QPixmap&lt;/tt&gt;&lt;/a&gt; it will be converted to a &lt;a href=&quot;QImage.html&quot;&gt;&lt;tt&gt;QImage&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setTextureImage(com.trolltech.qt.gui.QImage)&quot;&gt;&lt;tt&gt;setTextureImage&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.gui.QTransform transform()" doc="/**
&lt;p&gt;Returns the current transformation matrix for the brush.&lt;/p&gt;

@see &lt;a href=&quot;QBrush.html#setTransform(com.trolltech.qt.gui.QTransform)&quot;&gt;&lt;tt&gt;setTransform&lt;/tt&gt;&lt;/a&gt; */"/>
</class>