kexi

KexiGradientWidget Class Reference

#include <kexigradientwidget.h>

List of all members.


Detailed Description

A simple QWidget that can use different types of gradients as the background.

Author:
Christian Nitschkowski

Definition at line 36 of file kexigradientwidget.h.


Public Types

 NoGradient
 FadedGradient
 SimpleGradient
 VerticalGradient = KImageEffect::VerticalGradient
 HorizontalGradient = KImageEffect::HorizontalGradient
 DiagonalGradient = KImageEffect::DiagonalGradient
 CrossDiagonalGradient = KImageEffect::CrossDiagonalGradient
 PyramidGradient = KImageEffect::PyramidGradient
 RectangleGradient = KImageEffect::RectangleGradient
 PipeCrossGradient = KImageEffect::PipeCrossGradient
 EllipticGradient = KImageEffect::EllipticGradient
enum  DisplayMode { NoGradient, FadedGradient, SimpleGradient }
enum  GradientType {
  VerticalGradient = KImageEffect::VerticalGradient, HorizontalGradient = KImageEffect::HorizontalGradient, DiagonalGradient = KImageEffect::DiagonalGradient, CrossDiagonalGradient = KImageEffect::CrossDiagonalGradient,
  PyramidGradient = KImageEffect::PyramidGradient, RectangleGradient = KImageEffect::RectangleGradient, PipeCrossGradient = KImageEffect::PipeCrossGradient, EllipticGradient = KImageEffect::EllipticGradient
}

Public Slots

virtual void setPaletteBackgroundColor (const QColor &color)
virtual void polish ()

Public Member Functions

 KexiGradientWidget (QWidget *parent=0, const char *name=0, WFlags f=0)
virtual ~KexiGradientWidget ()
virtual void setPaletteBackgroundPixmap (const QPixmap &pixmap)
virtual const QColor & paletteBackgroundColor () const
void setDisplayMode (DisplayMode mode)
DisplayMode displayMode () const
void setGradientType (GradientType type)
GradientType gradientType () const
void setGradientColor1 (const QColor &color)
void setGradientColor2 (const QColor &color)
void setGradientColors (const QColor &color1, const QColor &color2)
QColor gradientColor1 () const
QColor gradientColor2 () const
void setBlendOpacity (double opacity)
double blendOpacity () const

Protected Member Functions

virtual bool eventFilter (QObject *object, QEvent *event)
virtual void enabledChange (bool enabled)
virtual void paletteChange (const QPalette &pal)
virtual void paintEvent (QPaintEvent *e)
virtual void resizeEvent (QResizeEvent *e)
virtual void styleChange (QStyle &style)

Properties

DisplayMode displayMode []
GradientType gradientType []
QColor gradientColor1 []
QColor gradientColor2 []
double blendOpacity []

Member Enumeration Documentation

Modes for displaying the gradient.

Enumerator:
NoGradient  No gradient at all. Will behave just like a QWidget.
FadedGradient  Gradient will be faded with the widgets background.
SimpleGradient  Gradient will replace the usual widget background.

Definition at line 51 of file kexigradientwidget.h.

Gradient type specification. See GradientType for more details (part of the KDEFX library)

Definition at line 61 of file kexigradientwidget.h.


Member Function Documentation

DisplayMode KexiGradientWidget::displayMode (  )  const [inline]

Get the current displaymode.

Definition at line 96 of file kexigradientwidget.h.

bool KexiGradientWidget::eventFilter ( QObject *  object,
QEvent *  event 
) [protected, virtual]

Definition at line 219 of file kexigradientwidget.cpp.

QColor KexiGradientWidget::gradientColor1 (  )  const [inline]

Returns:
the color #1 used for the gradient.

Definition at line 142 of file kexigradientwidget.h.

QColor KexiGradientWidget::gradientColor2 (  )  const [inline]

Returns:
the color #2 used for the gradient.

Definition at line 145 of file kexigradientwidget.h.

GradientType KexiGradientWidget::gradientType (  )  const [inline]

Get the current gradient-type.

Definition at line 112 of file kexigradientwidget.h.

void KexiGradientWidget::paintEvent ( QPaintEvent *  e  )  [protected, virtual]

Definition at line 205 of file kexigradientwidget.cpp.

virtual void KexiGradientWidget::polish (  )  [inline, virtual, slot]

The cache needs to be rebuild once the widget is set up completely.

Definition at line 236 of file kexigradientwidget.h.

void KexiGradientWidget::setBlendOpacity ( double  opacity  )  [inline]

Sets the opacity of the gradient when fading with background. opacity has to be between 0.0 and 1.0.

Definition at line 151 of file kexigradientwidget.h.

void KexiGradientWidget::setDisplayMode ( DisplayMode  mode  )  [inline]

Set the displaymode mode. The widget will be updated automatically.

Definition at line 87 of file kexigradientwidget.h.

void KexiGradientWidget::setGradientColor1 ( const QColor &  color  )  [inline]

Set color #1 for the gradient-effect. color is the new color.

Definition at line 118 of file kexigradientwidget.h.

void KexiGradientWidget::setGradientColor2 ( const QColor &  color  )  [inline]

Set color #2 for the gradient-effect. color is the new color.

Definition at line 125 of file kexigradientwidget.h.

void KexiGradientWidget::setGradientColors ( const QColor &  color1,
const QColor &  color2 
) [inline]

Set both colors for the gradient. color1 is the first color, color2 the second.

Definition at line 135 of file kexigradientwidget.h.

void KexiGradientWidget::setGradientType ( GradientType  type  )  [inline]

Set the gradient-type.

Definition at line 103 of file kexigradientwidget.h.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys