.TH "KStyle" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdefx Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KStyle \- Simplifies and extends the \fBQStyle\fP API to make style coding easier.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kstyle.h>\fP
.PP
Inherits \fBQCommonStyle\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "typedef uint \fBKStyleFlags\fP"
.br
.ti -1c
.RI "enum \fBKStyleOption\fP { \fBDefault\fP =  0x00000000, \fBAllowMenuTransparency\fP =  0x00000001, \fBFilledFrameWorkaround\fP =  0x00000002 }"
.br
.ti -1c
.RI "enum \fBKStyleScrollBarType\fP { \fBWindowsStyleScrollBar\fP =  0x00000000, \fBPlatinumStyleScrollBar\fP =  0x00000001, \fBThreeButtonScrollBar\fP =  0x00000002, \fBNextStyleScrollBar\fP =  0x00000004 }"
.br
.ti -1c
.RI "enum \fBKStylePrimitive\fP { \fBKPE_DockWindowHandle\fP, \fBKPE_ToolBarHandle\fP, \fBKPE_GeneralHandle\fP, \fBKPE_SliderGroove\fP, \fBKPE_SliderHandle\fP, \fBKPE_ListViewExpander\fP, \fBKPE_ListViewBranch\fP }"
.br
.ti -1c
.RI "enum \fBKStylePixelMetric\fP { \fBKPM_MenuItemSeparatorHeight\fP =  0x00000001, \fBKPM_MenuItemHMargin\fP =  0x00000002, \fBKPM_MenuItemVMargin\fP =  0x00000004, \fBKPM_MenuItemHFrame\fP =  0x00000008, \fBKPM_MenuItemVFrame\fP =  0x00000010, \fBKPM_MenuItemCheckMarkHMargin\fP =  0x00000020, \fBKPM_MenuItemArrowHMargin\fP =  0x00000040, \fBKPM_MenuItemTabSpacing\fP =  0x00000080, \fBKPM_ListViewBranchThickness\fP =  0x00000100 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKStyle\fP (\fBKStyleFlags\fP flags=KStyle::Default, \fBKStyleScrollBarType\fP sbtype=KStyle::WindowsStyleScrollBar)"
.br
.ti -1c
.RI "\fB~KStyle\fP ()"
.br
.ti -1c
.RI "void \fBsetScrollBarType\fP (\fBKStyleScrollBarType\fP sbtype)"
.br
.ti -1c
.RI "\fBKStyleFlags\fP \fBstyleFlags\fP () const "
.br
.ti -1c
.RI "virtual void \fBrenderMenuBlendPixmap\fP (\fBKPixmap\fP &pix, const \fBQColorGroup\fP &cg, const \fBQPopupMenu\fP *popup) const "
.br
.ti -1c
.RI "virtual void \fBdrawKStylePrimitive\fP (\fBKStylePrimitive\fP kpe, \fBQPainter\fP *p, const \fBQWidget\fP *widget, const \fBQRect\fP &r, const \fBQColorGroup\fP &cg, SFlags flags=Style_Default, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "int \fBkPixelMetric\fP (KStylePixelMetric kpm, const \fBQWidget\fP *widget=0) const "
.br
.ti -1c
.RI "void \fBpolish\fP (\fBQWidget\fP *widget)"
.br
.ti -1c
.RI "void \fBunPolish\fP (\fBQWidget\fP *widget)"
.br
.ti -1c
.RI "void \fBpolishPopupMenu\fP (\fBQPopupMenu\fP *)"
.br
.ti -1c
.RI "void \fBdrawPrimitive\fP (PrimitiveElement pe, \fBQPainter\fP *p, const \fBQRect\fP &r, const \fBQColorGroup\fP &cg, SFlags flags=Style_Default, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "void \fBdrawControl\fP (ControlElement element, \fBQPainter\fP *p, const \fBQWidget\fP *widget, const \fBQRect\fP &r, const \fBQColorGroup\fP &cg, SFlags flags=Style_Default, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "void \fBdrawComplexControl\fP (ComplexControl control, \fBQPainter\fP *p, const \fBQWidget\fP *widget, const \fBQRect\fP &r, const \fBQColorGroup\fP &cg, SFlags flags=Style_Default, SCFlags controls=SC_All, SCFlags active=SC_None, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "SubControl \fBquerySubControl\fP (ComplexControl control, const \fBQWidget\fP *widget, const \fBQPoint\fP &pos, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "\fBQRect\fP \fBquerySubControlMetrics\fP (ComplexControl control, const \fBQWidget\fP *widget, SubControl sc, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "int \fBpixelMetric\fP (PixelMetric m, const \fBQWidget\fP *widget=0) const "
.br
.ti -1c
.RI "\fBQRect\fP \fBsubRect\fP (SubRect r, const \fBQWidget\fP *widget) const "
.br
.ti -1c
.RI "\fBQPixmap\fP \fBstylePixmap\fP (StylePixmap stylepixmap, const \fBQWidget\fP *widget=0, const \fBQStyleOption\fP &=QStyleOption::Default) const "
.br
.ti -1c
.RI "int \fBstyleHint\fP (StyleHint sh, const \fBQWidget\fP *w=0, const \fBQStyleOption\fP &opt=QStyleOption::Default, QStyleHintReturn *shr=0) const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQString\fP \fBdefaultStyle\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "bool \fBeventFilter\fP (\fBQObject\fP *object, \fBQEvent\fP *event)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Related Functions"
(Note that these are not member functions.) 
.in +1c
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawNextButton\fP (\fBQPainter\fP *p, const \fBQRect\fP &r, const \fBQColorGroup\fP &g, bool sunken=false, const \fBQBrush\fP *fill=0)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawNextButton\fP (\fBQPainter\fP *p, int x, int y, int w, int h, const \fBQColorGroup\fP &g, bool sunken=false, const \fBQBrush\fP *fill=0)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawBeButton\fP (\fBQPainter\fP *p, \fBQRect\fP &r, const \fBQColorGroup\fP &g, bool sunken=false, const \fBQBrush\fP *fill=0)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawBeButton\fP (\fBQPainter\fP *p, int x, int y, int w, int h, const \fBQColorGroup\fP &g, bool sunken=false, const \fBQBrush\fP *fill=0)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawRoundButton\fP (\fBQPainter\fP *p, const \fBQRect\fP &r, const \fBQColorGroup\fP &g, bool sunken=false)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawRoundButton\fP (\fBQPainter\fP *p, int x, int y, int w, int h, const \fBQColorGroup\fP &g, bool sunken=false)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkRoundMaskRegion\fP (\fBQRegion\fP &r, int x, int y, int w, int h)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkDrawRoundMask\fP (\fBQPainter\fP *p, int x, int y, int w, int h, bool clear=false)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkColorBitmaps\fP (\fBQPainter\fP *p, const \fBQColorGroup\fP &g, int x, int y, \fBQBitmap\fP *lightColor=0, \fBQBitmap\fP *midColor=0, \fBQBitmap\fP *midlightColor=0, \fBQBitmap\fP *darkColor=0, \fBQBitmap\fP *blackColor=0, \fBQBitmap\fP *whiteColor=0)"
.br
.ti -1c
.RI "KDEFX_EXPORT void \fBkColorBitmaps\fP (\fBQPainter\fP *p, const \fBQColorGroup\fP &g, int x, int y, int w, int h, bool isXBitmaps=true, const uchar *lightColor=0, const uchar *midColor=0, const uchar *midlightColor=0, const uchar *darkColor=0, const uchar *blackColor=0, const uchar *whiteColor=0)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Simplifies and extends the \fBQStyle\fP API to make style coding easier. 

The KStyle class provides a simple internal menu transparency engine which attempts to use XRender for accelerated blending where requested, or falls back to fast internal software tinting/blending routines. It also simplifies more complex portions of the \fBQStyle\fP API, such as the PopupMenuItems, ScrollBars and Sliders by providing extra 'primitive elements' which are simple to implement by the style writer.
.PP
\fBSee also:\fP
.RS 4
\fBQStyle::QStyle\fP 
.PP
\fBQCommonStyle::QCommonStyle\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Karol Szwed (gallium@kde.org) 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkstyle.h\fP 346190 2004-09-13 13:28:29Z staniek 
.RE
.PP
.RE
.PP

.PP
Definition at line 57 of file kstyle.h.
.SH "Member Typedef Documentation"
.PP 
.SS "typedef uint \fBKStyle::KStyleFlags\fP"
.PP
KStyle Flags:. 
.PP
.PD 0
.IP "\(bu" 2
Default - Default style setting, where menu transparency and the FilledFrameWorkaround are disabled.
.PP
.PD 0
.IP "\(bu" 2
AllowMenuTransparency - Enable this flag to use KStyle's internal menu transparency engine.
.PP
.PD 0
.IP "\(bu" 2
FilledFrameWorkaround - Enable this flag to facilitate proper repaints of QMenuBars and QToolBars when the style chooses to paint the interior of a \fBQFrame\fP. The style primitives in question are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses this workaround to enable painting of gradients in menubars and toolbars.
.PP

.PP
Definition at line 79 of file kstyle.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKStyle::KStyleOption\fP"
.PP
\fBEnumeration values: \fP
.in +1c
.TP
\fB\fIDefault \fP\fP
All options disabled. 
.TP
\fB\fIAllowMenuTransparency \fP\fP
Internal transparency enabled. 
.TP
\fB\fIFilledFrameWorkaround \fP\fP
Filled frames enabled. 
.PP
Definition at line 80 of file kstyle.h.
.SS "enum \fBKStyle::KStyleScrollBarType\fP"
.PP
KStyle ScrollBarType:. 
.PP
Allows the style writer to easily select what type of scrollbar should be used without having to duplicate large amounts of source code by implementing the complex control CC_ScrollBar.
.PP
.PD 0
.IP "\(bu" 2
WindowsStyleScrollBar - Two button scrollbar with the previous button at the top/left, and the next button at the bottom/right.
.PP
.PD 0
.IP "\(bu" 2
PlatinumStyleScrollBar - Two button scrollbar with both the previous and next buttons at the bottom/right.
.PP
.PD 0
.IP "\(bu" 2
ThreeButtonScrollBar - KDE style three button scrollbar with two previous buttons, and one next button. The next button is always at the bottom/right, whilst the two previous buttons are on either end of the scrollbar.
.PP
.PD 0
.IP "\(bu" 2
NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but with the buttons grouped on the opposite end of the scrollbar.
.PP
\fBSee also:\fP
.RS 4
\fBKStyle::KStyle()\fP
.RE
.PP

.PP
\fBEnumeration values: \fP
.in +1c
.TP
\fB\fIWindowsStyleScrollBar \fP\fP
two button, windows style 
.TP
\fB\fIPlatinumStyleScrollBar \fP\fP
two button, platinum style 
.TP
\fB\fIThreeButtonScrollBar \fP\fP
three buttons, KDE style 
.TP
\fB\fINextStyleScrollBar \fP\fP
two button, NeXT style 
.PP
Definition at line 109 of file kstyle.h.
.SS "enum \fBKStyle::KStylePrimitive\fP"
.PP
KStyle Primitive Elements:. 
.PP
The KStyle class extends the Qt's Style API by providing certain simplifications for parts of \fBQStyle\fP. To do this, the KStylePrimitive elements were defined, which are very similar to Qt's PrimitiveElement.
.PP
The first three Handle primitives simplify and extend PE_DockWindowHandle, so do not reimplement PE_DockWindowHandle if you want the KStyle handle simplifications to be operable. Similarly do not reimplement CC_Slider, SC_SliderGroove and SC_SliderHandle when using the KStyle slider primitives. KStyle automatically double-buffers slider painting when they are drawn via these KStyle primitives to avoid flicker.
.PP
.PD 0
.IP "\(bu" 2
KPE_DockWindowHandle - This primitive is already implemented in KStyle, and paints a bevelled rect with the DockWindow caption text. Re-implement this primitive to perform other more fancy effects when drawing the dock window handle.
.PP
.PD 0
.IP "\(bu" 2
KPE_ToolBarHandle - This primitive must be reimplemented. It currently only paints a filled rectangle as default behavior. This primitive is used to render \fBQToolBar\fP handles.
.PP
.PD 0
.IP "\(bu" 2
KPE_GeneralHandle - This primitive must be reimplemented. It is used to render general handles that are not part of a \fBQToolBar\fP or \fBQDockWindow\fP, such as the applet handles used in Kicker. The default implementation paints a filled rect of arbitrary color.
.PP
.PD 0
.IP "\(bu" 2
KPE_SliderGroove - This primitive must be reimplemented. It is used to paint the slider groove. The default implementation paints a filled rect of arbitrary color.
.PP
.PD 0
.IP "\(bu" 2
KPE_SliderHandle - This primitive must be reimplemented. It is used to paint the slider handle. The default implementation paints a filled rect of arbitrary color.
.PP
.PD 0
.IP "\(bu" 2
KPE_ListViewExpander - This primitive is already implemented in KStyle. It is used to draw the Expand/Collapse element in QListViews. To indicate the expanded state, the style flags are set to Style_Off, while Style_On implies collapsed.
.PP
.PD 0
.IP "\(bu" 2
KPE_ListViewBranch - This primitive is already implemented in KStyle. It is used to draw the ListView branches where necessary.
.PP

.PP
Definition at line 227 of file kstyle.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KStyle::KStyle (\fBKStyleFlags\fP flags = \fCKStyle::Default\fP, \fBKStyleScrollBarType\fP sbtype = \fCKStyle::WindowsStyleScrollBar\fP)"
.PP
Constructs a KStyle object. 
.PP
Select the appropriate KStyle flags and scrollbar type for your style. The user's style preferences selected in KControl are read by using \fBQSettings\fP and are automatically applied to the style. As a fallback, KStyle paints progressbars and tabbars. It inherits from \fBQCommonStyle\fP for speed, so don't expect much to be implemented.
.PP
It is advisable to use a currently implemented style such as the HighColor style as a foundation for any new KStyle, so the limited number of drawing fallbacks should not prove problematic.
.PP
\fBParameters:\fP
.RS 4
\fIflags\fP the style to be applied 
.br
\fIsbtype\fP the scroll bar type 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStyle::KStyleFlags\fP 
.PP
\fBKStyle::KStyleScrollBarType\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Karol Szwed (gallium@kde.org)
.RE
.PP

.PP
Definition at line 173 of file kstyle.cpp.
.PP
References AllowMenuTransparency, QPixmap::defaultDepth(), FilledFrameWorkaround, QSettings::readBoolEntry(), QSettings::readDoubleEntry(), QSettings::readEntry(), and QSettings::readNumEntry().
.SS "KStyle::~\fBKStyle\fP ()"
.PP
Destructs the KStyle object. 
.PP

.PP
Definition at line 226 of file kstyle.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBQString\fP KStyle::defaultStyle ()\fC [static]\fP"
.PP
Returns the default widget style depending on color depth. 
.PP

.PP
Definition at line 238 of file kstyle.cpp.
.SS "void KStyle::setScrollBarType (\fBKStyleScrollBarType\fP sbtype)"
.PP
Modifies the scrollbar type used by the style. 
.PP
This function is only provided for convenience. It allows you to make a late decision about what scrollbar type to use for the style after performing some processing in your style's constructor. In most situations however, setting the scrollbar type via the KStyle constructor should suffice. 
.PP
\fBParameters:\fP
.RS 4
\fIsbtype\fP the scroll bar type 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStyle::KStyleScrollBarType\fP
.RE
.PP

.PP
Definition at line 290 of file kstyle.cpp.
.SS "\fBKStyle::KStyleFlags\fP KStyle::styleFlags () const"
.PP
Returns the KStyle flags used to initialize the style. 
.PP
This is used solely for the kcmstyle module, and hence is internal.
.PP
Definition at line 295 of file kstyle.cpp.
.SS "void KStyle::renderMenuBlendPixmap (\fBKPixmap\fP & pix, const \fBQColorGroup\fP & cg, const \fBQPopupMenu\fP * popup) const\fC [virtual]\fP"
.PP
This virtual function defines the pixmap used to blend between the popup menu and the background to create different menu transparency effects. 
.PP
For example, you can fill the pixmap 'pix' with a gradient based on the popup's colorGroup, a texture, or some other fancy painting routine. KStyle will then internally blend this pixmap with a snapshot of the background behind the popupMenu to create the illusion of transparency.
.PP
This virtual is never called if XRender/Software blending is disabled by the user in KDE's style control module.
.PP
Definition at line 300 of file kstyle.cpp.
.PP
References QString::fill().
.SS "void KStyle::drawKStylePrimitive (\fBKStylePrimitive\fP kpe, \fBQPainter\fP * p, const \fBQWidget\fP * widget, const \fBQRect\fP & r, const \fBQColorGroup\fP & cg, SFlags flags = \fCStyle_Default\fP, const \fBQStyleOption\fP & = \fCQStyleOption::Default\fP) const\fC [virtual]\fP"
.PP
This function is identical to Qt's \fBQStyle::drawPrimitive()\fP, except that it adds one further parameter, 'widget', that can be used to determine the widget state of the KStylePrimitive in question. 
.PP
\fBSee also:\fP
.RS 4
\fBKStyle::KStylePrimitive\fP 
.PP
\fBQStyle::drawPrimitive\fP 
.PP
\fBQStyle::drawComplexControl\fP
.RE
.PP

.PP
Definition at line 307 of file kstyle.cpp.
.PP
References QPainter::begin(), QWidget::caption(), QPainter::drawLine(), QPainter::drawPoints(), QPainter::drawText(), QPainter::end(), QPainter::fillRect(), QApplication::flushX(), QApplication::font(), QPixmap::height(), QWidget::parentWidget(), QFont::pointSize(), QPixmap::rect(), QPixmap::resize(), QWMatrix::rotate(), QPainter::setFont(), QPainter::setPen(), QPointArray::setPoint(), QFont::setPointSize(), QPixmap::width(), QWidget::x(), QPixmap::xForm(), and QWidget::y().
.SH "Friends And Related Function Documentation"
.PP 
.SS "KDEFX_EXPORT void kDrawNextButton (\fBQPainter\fP * p, const \fBQRect\fP & r, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP, const \fBQBrush\fP * fill = \fC0\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Draws a Next-style button (solid black shadow with light and midlight highlight).
.PP
\fBParameters:\fP
.RS 4
\fIp\fP The painter to use for drawing the button. 
.br
\fIr\fP Specifies the rect in which to draw the button. 
.br
\fIg\fP Specifies the shading colors. 
.br
\fIsunken\fP Whether to draw the button as sunken (pressed) or not. 
.br
\fIfill\fP The brush to use for filling the interior of the button. Pass \fInull\fP to prevent the button from being filled. 
.RE
.PP

.PP
Definition at line 43 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kDrawNextButton (\fBQPainter\fP * p, int x, int y, int w, int h, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP, const \fBQBrush\fP * fill = \fC0\fP)\fC [related]\fP"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 21 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kDrawBeButton (\fBQPainter\fP * p, \fBQRect\fP & r, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP, const \fBQBrush\fP * fill = \fC0\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Draws a Be-style button.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP The painter to use for drawing the button. 
.br
\fIr\fP Specifies the rect in which to draw the button. 
.br
\fIg\fP Specifies the shading colors. 
.br
\fIsunken\fP Whether to draw the button as sunken (pressed) or not. 
.br
\fIfill\fP The brush to use for filling the interior of the button. Pass \fInull\fP to prevent the button from being filled. 
.RE
.PP

.PP
Definition at line 93 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kDrawBeButton (\fBQPainter\fP * p, int x, int y, int w, int h, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP, const \fBQBrush\fP * fill = \fC0\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 49 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kDrawRoundButton (\fBQPainter\fP * p, const \fBQRect\fP & r, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Draws a rounded oval button. This function doesn't fill the button. See \fBkRoundMaskRegion()\fP for setting masks for fills.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP The painter to use for drawing the button. 
.br
\fIr\fP Specifies the rect in which to draw the button. 
.br
\fIg\fP Specifies the shading colors. 
.br
\fIsunken\fP Whether to draw the button as sunken (pressed) or not. 
.RE
.PP

.PP
Definition at line 99 of file kdrawutil.cpp.
.PP
References QPointArray::putPoints().
.SS "KDEFX_EXPORT void kDrawRoundButton (\fBQPainter\fP * p, int x, int y, int w, int h, const \fBQColorGroup\fP & g, bool sunken = \fCfalse\fP)\fC [related]\fP"
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 139 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kRoundMaskRegion (\fBQRegion\fP & r, int x, int y, int w, int h)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Sets a region to the pixels covered by a round button of the given size. You can use this to set clipping regions.
.PP
\fBParameters:\fP
.RS 4
\fIr\fP Reference to the region to set. 
.br
\fIx\fP The X coordinate of the button. 
.br
\fIy\fP The Y coordinate of the button. 
.br
\fIw\fP The width of the button. 
.br
\fIh\fP The height of the button.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBkDrawRoundButton()\fP and \fBkDrawRoundMask()\fP 
.RE
.PP

.PP
Definition at line 197 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kDrawRoundMask (\fBQPainter\fP * p, int x, int y, int w, int h, bool clear = \fCfalse\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Paints the pixels covered by a round button of the given size with Qt::color1. This function is useful in \fBQStyle::drawControlMask()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIp\fP The painter to use for drawing the button. 
.br
\fIx\fP The X coordinate of the button. 
.br
\fIy\fP The Y coordinate of the button. 
.br
\fIw\fP The width of the button. 
.br
\fIh\fP The height of the button. 
.br
\fIclear\fP Whether to clear the rectangle specified by \fC\fP(x, y, w, h) to Qt::color0 before drawing the mask. 
.RE
.PP

.PP
Definition at line 148 of file kdrawutil.cpp.
.PP
References QPointArray::translate().
.SS "KDEFX_EXPORT void kColorBitmaps (\fBQPainter\fP * p, const \fBQColorGroup\fP & g, int x, int y, \fBQBitmap\fP * lightColor = \fC0\fP, \fBQBitmap\fP * midColor = \fC0\fP, \fBQBitmap\fP * midlightColor = \fC0\fP, \fBQBitmap\fP * darkColor = \fC0\fP, \fBQBitmap\fP * blackColor = \fC0\fP, \fBQBitmap\fP * whiteColor = \fC0\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
Paints the provided bitmaps in the painter, using the supplied colorgroup for the foreground colors. There's one bitmap for each color. If you want to skip a color, pass \fInull\fP for the corresponding bitmap.
.PP
\fBNote:\fP
.RS 4
The bitmaps will be self-masked automatically if not masked prior to calling this routine.
.RE
.PP
\fBParameters:\fP
.RS 4
\fIp\fP The painter to use for drawing the bitmaps. 
.br
\fIg\fP Specifies the shading colors. 
.br
\fIx\fP The X coordinate at which to draw the bitmaps. 
.br
\fIy\fP The Y coordinate at which to draw the bitmaps. 
.br
\fIlightColor\fP The bitmap to use for the light part. 
.br
\fImidColor\fP The bitmap to use for the mid part. 
.br
\fImidlightColor\fP The bitmap to use for the midlight part. 
.br
\fIdarkColor\fP The bitmap to use for the dark part. 
.br
\fIblackColor\fP The bitmap to use for the black part. 
.br
\fIwhiteColor\fP The bitmap to use for the white part.
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQColorGroup\fP 
.RE
.PP

.PP
Definition at line 217 of file kdrawutil.cpp.
.SS "KDEFX_EXPORT void kColorBitmaps (\fBQPainter\fP * p, const \fBQColorGroup\fP & g, int x, int y, int w, int h, bool isXBitmaps = \fCtrue\fP, const uchar * lightColor = \fC0\fP, const uchar * midColor = \fC0\fP, const uchar * midlightColor = \fC0\fP, const uchar * darkColor = \fC0\fP, const uchar * blackColor = \fC0\fP, const uchar * whiteColor = \fC0\fP)\fC [related]\fP"
.PP
\fC#include\fP \fC<\fBkdrawutil.h\fP>\fP 
.PP
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
.PP
Definition at line 239 of file kdrawutil.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdefx Library from the source code.
