• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdefx
 

tdefx

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
TDEStyle Class Reference

#include <tdestyle.h>

Inherits TQCommonStyle.

Public Types

enum  TDEStyleOption { Default = 0x00000000 , AllowMenuTransparency = 0x00000001 , FilledFrameWorkaround = 0x00000002 }
 
enum  TDEStyleScrollBarType { WindowsStyleScrollBar = 0x00000000 , PlatinumStyleScrollBar = 0x00000001 , ThreeButtonScrollBar = 0x00000002 , NextStyleScrollBar = 0x00000004 }
 
enum  TDEStylePrimitive {
  KPE_DockWindowHandle , KPE_ToolBarHandle , KPE_GeneralHandle , KPE_SliderGroove ,
  KPE_SliderHandle , KPE_ListViewExpander , KPE_ListViewBranch
}
 
enum  TDEStylePixelMetric {
  KPM_MenuItemSeparatorHeight = 0x00000001 , KPM_MenuItemHMargin = 0x00000002 , KPM_MenuItemVMargin = 0x00000004 , KPM_MenuItemHFrame = 0x00000008 ,
  KPM_MenuItemVFrame = 0x00000010 , KPM_MenuItemCheckMarkHMargin = 0x00000020 , KPM_MenuItemArrowHMargin = 0x00000040 , KPM_MenuItemTabSpacing = 0x00000080 ,
  KPM_ListViewBranchThickness = 0x00000100
}
 
typedef uint TDEStyleFlags
 

Public Member Functions

 TDEStyle (TDEStyleFlags flags=TDEStyle::Default, TDEStyleScrollBarType sbtype=TDEStyle::WindowsStyleScrollBar)
 
 ~TDEStyle ()
 
void setScrollBarType (TDEStyleScrollBarType sbtype)
 
TDEStyleFlags styleFlags () const
 
virtual void renderMenuBlendPixmap (KPixmap &pix, const TQColorGroup &cg, const TQPopupMenu *popup) const
 
virtual void drawTDEStylePrimitive (TDEStylePrimitive kpe, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags=Style_Default, const TQStyleOption &=TQStyleOption::Default) const
 
virtual void drawTDEStylePrimitive (TDEStylePrimitive kpe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags=Style_Default, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
int kPixelMetric (TDEStylePixelMetric kpm, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget=0) const
 
void polish (const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *)
 
void unPolish (const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *)
 
void polishPopupMenu (const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
 
void drawPrimitive (PrimitiveElement pe, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags=Style_Default, const TQStyleOption &=TQStyleOption::Default) const
 
void drawControl (ControlElement element, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags=Style_Default, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
void drawComplexControl (ComplexControl control, TQPainter *p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect &r, const TQColorGroup &cg, SFlags flags=Style_Default, SCFlags controls=SC_All, SCFlags active=SC_None, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
SubControl querySubControl (ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQPoint &pos, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
TQRect querySubControlMetrics (ComplexControl control, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, SubControl sc, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
int pixelMetric (PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget *widget=0) const
 
TQRect subRect (SubRect r, const TQStyleControlElementData &ceData, const ControlElementFlags elementFlags, const TQWidget *widget=0) const
 
TQPixmap stylePixmap (StylePixmap stylepixmap, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &=TQStyleOption::Default, const TQWidget *widget=0) const
 
int styleHint (StyleHint sh, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQStyleOption &opt=TQStyleOption::Default, TQStyleHintReturn *shr=0, const TQWidget *w=0) const
 

Static Public Member Functions

static TQString defaultStyle ()
 

Protected Member Functions

virtual bool objectEventHandler (const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *source, TQEvent *e)
 
virtual void virtual_hook (int id, void *data)
 

Related Functions

(Note that these are not member functions.)

TDEFX_EXPORT void kDrawNextButton (TQPainter *p, const TQRect &r, const TQColorGroup &g, bool sunken=false, const TQBrush *fill=0)
 
TDEFX_EXPORT void kDrawNextButton (TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken=false, const TQBrush *fill=0)
 
TDEFX_EXPORT void kDrawBeButton (TQPainter *p, TQRect &r, const TQColorGroup &g, bool sunken=false, const TQBrush *fill=0)
 
TDEFX_EXPORT void kDrawBeButton (TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken=false, const TQBrush *fill=0)
 
TDEFX_EXPORT void kDrawRoundButton (TQPainter *p, const TQRect &r, const TQColorGroup &g, bool sunken=false)
 
TDEFX_EXPORT void kDrawRoundButton (TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken=false)
 
TDEFX_EXPORT void kRoundMaskRegion (TQRegion &r, int x, int y, int w, int h)
 
TDEFX_EXPORT void kDrawRoundMask (TQPainter *p, int x, int y, int w, int h, bool clear=false)
 
TDEFX_EXPORT void kColorBitmaps (TQPainter *p, const TQColorGroup &g, int x, int y, TQBitmap *lightColor=0, TQBitmap *midColor=0, TQBitmap *midlightColor=0, TQBitmap *darkColor=0, TQBitmap *blackColor=0, TQBitmap *whiteColor=0)
 
TDEFX_EXPORT void kColorBitmaps (TQPainter *p, const TQColorGroup &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)
 

Detailed Description

Simplifies and extends the TQStyle API to make style coding easier.

The TDEStyle 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 TQStyle API, such as the PopupMenuItems, ScrollBars and Sliders by providing extra "primitive elements" which are simple to implement by the style writer.

See also
TQStyle::QStyle
TQCommonStyle::QCommonStyle
Author
Karol Szwed (galli.nosp@m.um@k.nosp@m.de.or.nosp@m.g)
Version
$Id$

Definition at line 57 of file tdestyle.h.

Member Typedef Documentation

◆ TDEStyleFlags

typedef uint TDEStyle::TDEStyleFlags

TDEStyle Flags:

  • Default - Default style setting, where menu transparency and the FilledFrameWorkaround are disabled.
  • AllowMenuTransparency - Enable this flag to use TDEStyle's internal menu transparency engine.
  • FilledFrameWorkaround - Enable this flag to facilitate proper repaints of QMenuBars and QToolBars when the style chooses to paint the interior of a TQFrame. 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.

Definition at line 80 of file tdestyle.h.

Member Enumeration Documentation

◆ TDEStyleOption

enum TDEStyle::TDEStyleOption
Enumerator
Default 

All options disabled.

AllowMenuTransparency 

Internal transparency enabled.

FilledFrameWorkaround 

Filled frames enabled.

Definition at line 81 of file tdestyle.h.

◆ TDEStylePixelMetric

enum TDEStyle::TDEStylePixelMetric

Definition at line 270 of file tdestyle.h.

◆ TDEStylePrimitive

enum TDEStyle::TDEStylePrimitive

TDEStyle Primitive Elements:

The TDEStyle class extends the Qt's Style API by providing certain simplifications for parts of TQStyle. To do this, the TDEStylePrimitive elements were defined, which are very similar to Qt's PrimitiveElement.

The first three Handle primitives simplify and extend PE_DockWindowHandle, so do not reimplement PE_DockWindowHandle if you want the TDEStyle handle simplifications to be operable. Similarly do not reimplement CC_Slider, SC_SliderGroove and SC_SliderHandle when using the TDEStyle slider primitives. TDEStyle automatically double-buffers slider painting when they are drawn via these TDEStyle primitives to avoid flicker.

  • KPE_DockWindowHandle - This primitive is already implemented in TDEStyle, 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.
  • KPE_ToolBarHandle - This primitive must be reimplemented. It currently only paints a filled rectangle as default behavior. This primitive is used to render TQToolBar handles.
  • KPE_GeneralHandle - This primitive must be reimplemented. It is used to render general handles that are not part of a TQToolBar or TQDockWindow, such as the applet handles used in Kicker. The default implementation paints a filled rect of arbitrary color.
  • 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.
  • 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.
  • KPE_ListViewExpander - This primitive is already implemented in TDEStyle. 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.
  • KPE_ListViewBranch - This primitive is already implemented in TDEStyle. It is used to draw the ListView branches where necessary.

Definition at line 228 of file tdestyle.h.

◆ TDEStyleScrollBarType

enum TDEStyle::TDEStyleScrollBarType

TDEStyle ScrollBarType:

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.

  • WindowsStyleScrollBar - Two button scrollbar with the previous button at the top/left, and the next button at the bottom/right.
  • PlatinumStyleScrollBar - Two button scrollbar with both the previous and next buttons at the bottom/right.
  • 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.
  • NextStyleScrollBar - Similar to the PlatinumStyle scroll bar, but with the buttons grouped on the opposite end of the scrollbar.
See also
TDEStyle::TDEStyle()
Enumerator
WindowsStyleScrollBar 

two button, windows style

PlatinumStyleScrollBar 

two button, platinum style

ThreeButtonScrollBar 

three buttons, KDE style

NextStyleScrollBar 

two button, NeXT style

Definition at line 110 of file tdestyle.h.

Constructor & Destructor Documentation

◆ TDEStyle()

TDEStyle::TDEStyle ( TDEStyleFlags  flags = TDEStyle::Default,
TDEStyleScrollBarType  sbtype = TDEStyle::WindowsStyleScrollBar 
)

Constructs a TDEStyle object.

Select the appropriate TDEStyle flags and scrollbar type for your style. The user's style preferences selected in KControl are read by using TQSettings and are automatically applied to the style. As a fallback, TDEStyle paints progressbars and tabbars. It inherits from TQCommonStyle for speed, so don't expect much to be implemented.

It is advisable to use a currently implemented style such as the HighColor style as a foundation for any new TDEStyle, so the limited number of drawing fallbacks should not prove problematic.

Parameters
flagsthe style to be applied
sbtypethe scroll bar type
See also
TDEStyle::TDEStyleFlags
TDEStyle::TDEStyleScrollBarType
Author
Karol Szwed (galli.nosp@m.um@k.nosp@m.de.or.nosp@m.g)

Definition at line 189 of file tdestyle.cpp.

◆ ~TDEStyle()

TDEStyle::~TDEStyle ( )

Destructs the TDEStyle object.

Definition at line 244 of file tdestyle.cpp.

Member Function Documentation

◆ defaultStyle()

TQString TDEStyle::defaultStyle ( )
static

Returns the default widget style depending on color depth.

Definition at line 256 of file tdestyle.cpp.

◆ drawComplexControl()

void TDEStyle::drawComplexControl ( ComplexControl  control,
TQPainter *  p,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQRect &  r,
const TQColorGroup &  cg,
SFlags  flags = Style_Default,
SCFlags  controls = SC_All,
SCFlags  active = SC_None,
const TQStyleOption &  opt = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const

Definition at line 1112 of file tdestyle.cpp.

◆ drawControl()

void TDEStyle::drawControl ( ControlElement  element,
TQPainter *  p,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQRect &  r,
const TQColorGroup &  cg,
SFlags  flags = Style_Default,
const TQStyleOption &  opt = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const

Definition at line 667 of file tdestyle.cpp.

◆ drawPrimitive()

void TDEStyle::drawPrimitive ( PrimitiveElement  pe,
TQPainter *  p,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQRect &  r,
const TQColorGroup &  cg,
SFlags  flags = Style_Default,
const TQStyleOption &  opt = TQStyleOption::Default 
) const

Definition at line 572 of file tdestyle.cpp.

◆ drawTDEStylePrimitive() [1/2]

void TDEStyle::drawTDEStylePrimitive ( TDEStylePrimitive  kpe,
TQPainter *  p,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQRect &  r,
const TQColorGroup &  cg,
SFlags  flags = Style_Default,
const TQStyleOption &  = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const
virtual

This function is identical to Qt's TQStyle::drawPrimitive(), except that it adds one further parameter, 'widget', that can be used to determine the widget state of the TDEStylePrimitive in question.

See also
TDEStyle::TDEStylePrimitive
TQStyle::drawPrimitive
TQStyle::drawComplexControl

Definition at line 358 of file tdestyle.cpp.

◆ drawTDEStylePrimitive() [2/2]

void TDEStyle::drawTDEStylePrimitive ( TDEStylePrimitive  kpe,
TQPainter *  p,
const TQWidget *  widget,
const TQRect &  r,
const TQColorGroup &  cg,
SFlags  flags = Style_Default,
const TQStyleOption &  opt = TQStyleOption::Default 
) const
virtual

Definition at line 346 of file tdestyle.cpp.

◆ kPixelMetric()

int TDEStyle::kPixelMetric ( TDEStylePixelMetric  kpm,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQWidget *  widget = 0 
) const

Definition at line 546 of file tdestyle.cpp.

◆ objectEventHandler()

bool TDEStyle::objectEventHandler ( const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
void *  source,
TQEvent *  e 
)
protectedvirtual

Definition at line 1915 of file tdestyle.cpp.

◆ pixelMetric()

int TDEStyle::pixelMetric ( PixelMetric  m,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQWidget *  widget = 0 
) const

Definition at line 991 of file tdestyle.cpp.

◆ polish()

void TDEStyle::polish ( const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
void *  ptr 
)

Definition at line 264 of file tdestyle.cpp.

◆ polishPopupMenu()

void TDEStyle::polishPopupMenu ( const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
void *  ptr 
)

Definition at line 307 of file tdestyle.cpp.

◆ querySubControl()

TQStyle::SubControl TDEStyle::querySubControl ( ComplexControl  control,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQPoint &  pos,
const TQStyleOption &  opt = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const

Definition at line 1418 of file tdestyle.cpp.

◆ querySubControlMetrics()

TQRect TDEStyle::querySubControlMetrics ( ComplexControl  control,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
SubControl  sc,
const TQStyleOption &  opt = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const

Definition at line 1436 of file tdestyle.cpp.

◆ renderMenuBlendPixmap()

void TDEStyle::renderMenuBlendPixmap ( KPixmap &  pix,
const TQColorGroup &  cg,
const TQPopupMenu *  popup 
) const
virtual

This virtual function defines the pixmap used to blend between the popup menu and the background to create different menu transparency effects.

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. TDEStyle will then internally blend this pixmap with a snapshot of the background behind the popupMenu to create the illusion of transparency.

This virtual is never called if XRender/Software blending is disabled by the user in KDE's style control module.

Definition at line 340 of file tdestyle.cpp.

◆ setScrollBarType()

void TDEStyle::setScrollBarType ( TDEStyleScrollBarType  sbtype)

Modifies the scrollbar type used by the style.

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 TDEStyle constructor should suffice.

Parameters
sbtypethe scroll bar type
See also
TDEStyle::TDEStyleScrollBarType

Definition at line 330 of file tdestyle.cpp.

◆ styleFlags()

TDEStyle::TDEStyleFlags TDEStyle::styleFlags ( ) const

Returns the TDEStyle flags used to initialize the style.

This is used solely for the kcmstyle module, and hence is internal.

Definition at line 335 of file tdestyle.cpp.

◆ styleHint()

int TDEStyle::styleHint ( StyleHint  sh,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQStyleOption &  opt = TQStyleOption::Default,
TQStyleHintReturn *  shr = 0,
const TQWidget *  w = 0 
) const

Definition at line 1856 of file tdestyle.cpp.

◆ stylePixmap()

TQPixmap TDEStyle::stylePixmap ( StylePixmap  stylepixmap,
const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
const TQStyleOption &  opt = TQStyleOption::Default,
const TQWidget *  widget = 0 
) const

Definition at line 1822 of file tdestyle.cpp.

◆ subRect()

TQRect TDEStyle::subRect ( SubRect  r,
const TQStyleControlElementData &  ceData,
const ControlElementFlags  elementFlags,
const TQWidget *  widget = 0 
) const

Definition at line 969 of file tdestyle.cpp.

◆ unPolish()

void TDEStyle::unPolish ( const TQStyleControlElementData &  ceData,
ControlElementFlags  elementFlags,
void *  ptr 
)

Definition at line 288 of file tdestyle.cpp.

◆ virtual_hook()

void TDEStyle::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 2381 of file tdestyle.cpp.

Friends And Related Function Documentation

◆ kColorBitmaps() [1/2]

TDEFX_EXPORT void kColorBitmaps ( TQPainter *  p,
const TQColorGroup &  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 
)
related

#include <kdrawutil.h> This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 239 of file kdrawutil.cpp.

◆ kColorBitmaps() [2/2]

TDEFX_EXPORT void kColorBitmaps ( TQPainter *  p,
const TQColorGroup &  g,
int  x,
int  y,
TQBitmap *  lightColor = 0,
TQBitmap *  midColor = 0,
TQBitmap *  midlightColor = 0,
TQBitmap *  darkColor = 0,
TQBitmap *  blackColor = 0,
TQBitmap *  whiteColor = 0 
)
related

#include <kdrawutil.h>

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 null for the corresponding bitmap.

Note
The bitmaps will be self-masked automatically if not masked prior to calling this routine.
Parameters
pThe painter to use for drawing the bitmaps.
gSpecifies the shading colors.
xThe X coordinate at which to draw the bitmaps.
yThe Y coordinate at which to draw the bitmaps.
lightColorThe bitmap to use for the light part.
midColorThe bitmap to use for the mid part.
midlightColorThe bitmap to use for the midlight part.
darkColorThe bitmap to use for the dark part.
blackColorThe bitmap to use for the black part.
whiteColorThe bitmap to use for the white part.
See also
QColorGroup

Definition at line 217 of file kdrawutil.cpp.

◆ kDrawBeButton() [1/2]

TDEFX_EXPORT void kDrawBeButton ( TQPainter *  p,
int  x,
int  y,
int  w,
int  h,
const TQColorGroup &  g,
bool  sunken = false,
const TQBrush *  fill = 0 
)
related

#include <kdrawutil.h> This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 49 of file kdrawutil.cpp.

◆ kDrawBeButton() [2/2]

TDEFX_EXPORT void kDrawBeButton ( TQPainter *  p,
TQRect &  r,
const TQColorGroup &  g,
bool  sunken = false,
const TQBrush *  fill = 0 
)
related

#include <kdrawutil.h>

Draws a Be-style button.

Parameters
pThe painter to use for drawing the button.
rSpecifies the rect in which to draw the button.
gSpecifies the shading colors.
sunkenWhether to draw the button as sunken (pressed) or not.
fillThe brush to use for filling the interior of the button. Pass null to prevent the button from being filled.

Definition at line 93 of file kdrawutil.cpp.

◆ kDrawNextButton() [1/2]

TDEFX_EXPORT void kDrawNextButton ( TQPainter *  p,
const TQRect &  r,
const TQColorGroup &  g,
bool  sunken = false,
const TQBrush *  fill = 0 
)
related

#include <kdrawutil.h>

Draws a Next-style button (solid black shadow with light and midlight highlight).

Parameters
pThe painter to use for drawing the button.
rSpecifies the rect in which to draw the button.
gSpecifies the shading colors.
sunkenWhether to draw the button as sunken (pressed) or not.
fillThe brush to use for filling the interior of the button. Pass null to prevent the button from being filled.

Definition at line 43 of file kdrawutil.cpp.

◆ kDrawNextButton() [2/2]

TDEFX_EXPORT void kDrawNextButton ( TQPainter *  p,
int  x,
int  y,
int  w,
int  h,
const TQColorGroup &  g,
bool  sunken = false,
const TQBrush *  fill = 0 
)
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 21 of file kdrawutil.cpp.

◆ kDrawRoundButton() [1/2]

TDEFX_EXPORT void kDrawRoundButton ( TQPainter *  p,
const TQRect &  r,
const TQColorGroup &  g,
bool  sunken = false 
)
related

#include <kdrawutil.h>

Draws a rounded oval button. This function doesn't fill the button. See kRoundMaskRegion() for setting masks for fills.

Parameters
pThe painter to use for drawing the button.
rSpecifies the rect in which to draw the button.
gSpecifies the shading colors.
sunkenWhether to draw the button as sunken (pressed) or not.

Definition at line 99 of file kdrawutil.cpp.

◆ kDrawRoundButton() [2/2]

TDEFX_EXPORT void kDrawRoundButton ( TQPainter *  p,
int  x,
int  y,
int  w,
int  h,
const TQColorGroup &  g,
bool  sunken = false 
)
related

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 139 of file kdrawutil.cpp.

◆ kDrawRoundMask()

TDEFX_EXPORT void kDrawRoundMask ( TQPainter *  p,
int  x,
int  y,
int  w,
int  h,
bool  clear = false 
)
related

#include <kdrawutil.h>

Paints the pixels covered by a round button of the given size with TQt::color1. This function is useful in TQStyle::drawControlMask().

Parameters
pThe painter to use for drawing the button.
xThe X coordinate of the button.
yThe Y coordinate of the button.
wThe width of the button.
hThe height of the button.
clearWhether to clear the rectangle specified by (x, y, w, h) to TQt::color0 before drawing the mask.

Definition at line 148 of file kdrawutil.cpp.

◆ kRoundMaskRegion()

TDEFX_EXPORT void kRoundMaskRegion ( TQRegion &  r,
int  x,
int  y,
int  w,
int  h 
)
related

#include <kdrawutil.h>

Sets a region to the pixels covered by a round button of the given size. You can use this to set clipping regions.

Parameters
rReference to the region to set.
xThe X coordinate of the button.
yThe Y coordinate of the button.
wThe width of the button.
hThe height of the button.
See also
kDrawRoundButton() and kDrawRoundMask()

Definition at line 197 of file kdrawutil.cpp.


The documentation for this class was generated from the following files:
  • tdestyle.h
  • kdrawutil.h
  • tdestyle.cpp

tdefx

Skip menu "tdefx"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdefx

Skip menu "tdefx"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdefx by doxygen 1.9.4
This website is maintained by Timothy Pearson.