kexi
KexiGradientWidget Class Reference
#include <kexigradientwidget.h>
Detailed Description
A simple widget that can use different types of gradients as the background.
Definition at line 35 of file kexigradientwidget.h.
Public Types | |
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 50 of file kexigradientwidget.h.
Gradient type specification. See GradientType for more details (part of the KDEFX library)
Definition at line 60 of file kexigradientwidget.h.
Member Function Documentation
void KexiGradientWidget::setDisplayMode | ( | DisplayMode | mode | ) | [inline] |
Set the displaymode mode. The widget will be updated automatically.
Definition at line 86 of file kexigradientwidget.h.
DisplayMode KexiGradientWidget::displayMode | ( | ) | const [inline] |
Get the current displaymode.
Definition at line 95 of file kexigradientwidget.h.
void KexiGradientWidget::setGradientType | ( | GradientType | type | ) | [inline] |
Set the gradient-type.
Definition at line 102 of file kexigradientwidget.h.
GradientType KexiGradientWidget::gradientType | ( | ) | const [inline] |
Get the current gradient-type.
Definition at line 111 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 117 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 124 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 134 of file kexigradientwidget.h.
QColor KexiGradientWidget::gradientColor1 | ( | ) | const [inline] |
QColor KexiGradientWidget::gradientColor2 | ( | ) | const [inline] |
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 150 of file kexigradientwidget.h.
bool KexiGradientWidget::eventFilter | ( | QObject * | object, | |
QEvent * | event | |||
) | [protected, virtual] |
Definition at line 219 of file kexigradientwidget.cpp.
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 235 of file kexigradientwidget.h.
The documentation for this class was generated from the following files: