# class KStatefulBrush

###

Module | kdeui
Namespace |
Class | KStatefulBrush
Inherits |

### methods

- KStatefulBrush ( )

  returns ctor
  KDE 4.1.0 and later only

  Construct a "default" stateful brush. For such an instance, all overloads of KStatefulBrush.brush will return a default brush (i.e. `QBrush()`).

- KStatefulBrush (a0, a1, a2)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.ForegroundRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

  Construct a stateful brush from given color set and foreground role, using the colors from the given KConfig (if null, the system colors are used).

- KStatefulBrush (a0, a1, a2)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.BackgroundRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

  Construct a stateful brush from given color set and background role, using the colors from the given KConfig (if null, the system colors are used).

- KStatefulBrush (a0, a1, a2)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.DecorationRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

  Construct a stateful brush from given color set and decoration role, using the colors from the given KConfig (if null, the system colors are used).

- KStatefulBrush (a0, a1)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | QBrush |
  a1 | KSharedConfigPtr | KSharedConfigPtr()

  Construct a stateful background brush from a specified QBrush (or QColor, via QBrush's implicit constructor). The various states are determined from the base QBrush (which fills in the Active state) according to the same rules used to build stateful color schemes from the system color scheme. The state effects from the given KConfig are used (if null, the system state effects are used).

- KStatefulBrush (a0, background, a1)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | QBrush |
  background | QBrush |
  a1 | KSharedConfigPtr | KSharedConfigPtr()

  Construct a stateful foreground/decoration brush from a specified QBrush (or QColor, via QBrush's implicit constructor). The various states are determined from the base QBrush (which fills in the Active state) according to the same rules used to build stateful color schemes from the system color scheme. The state effects from the given KConfig are used (if null, the system state effects are used).

  background - The background brush (or color) corresponding to the KColorScheme.NormalBackground role and QPalette.Active state for this foreground/decoration color.

- KStatefulBrush (a0)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  a0 | KStatefulBrush |

  Construct a copy of another KStatefulBrush.

- KStatefulBrush ( )

  returns ctor
  before KDE 4.1.0 only

- KStatefulBrush (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.ForegroundRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

- KStatefulBrush (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.BackgroundRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

- KStatefulBrush (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KColorScheme.ColorSet |
  a1 | KColorScheme.DecorationRole |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

- KStatefulBrush (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QBrush |
  a1 | KSharedConfigPtr | KSharedConfigPtr()

- KStatefulBrush (a0, a1, a2)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QBrush |
  a1 | QBrush |
  a2 | KSharedConfigPtr | KSharedConfigPtr()

- brush (a0)

  returns QBrush

  Argument | Type | Default
  --- | --- | ---
  a0 | QPalette.ColorGroup |

  Retrieve the brush for the specified widget state. This is used when you know explicitly what state is wanted. Otherwise one of overloads is often more convenient.

- brush (a0)

  returns QBrush

  Argument | Type | Default
  --- | --- | ---
  a0 | QPalette |

  Retrieve the brush, using a QPalette reference to determine the correct state. Use when your painting code has easy access to the QPalette that it is supposed to be using. The state used in this instance is the currentColorGroup of the palette.

- brush (a0)

  returns QBrush

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget |

  Retrieve the brush, using a QWidget pointer to determine the correct state. Use when you have a pointer to the widget that you are painting. The state used is the current state of the widget.

  If you pass an invalid widget, you will get a default brush (i.e. `QBrush()`).