kexi
KexiGradientWidget Class Reference
#include <kexigradientwidget.h>
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 | |
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.
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
|
Get the current displaymode. Definition at line 96 of file kexigradientwidget.h. |
|
Manage list of child-widgets. Add the new child-widget to our list of known widgets. ... and install 'this' as the child's event-filter. Remove the child-widget from the list of known widgets. Manage custombackground-list. p_currentChild will be == 0L, when the user sets it's palette manually. In this case, it has to be added to the customBackground-list. Check if the widget whose PaletteChange-event we handle isn't the widget we set the background in rebuildCache(). Add the new child to the list of widgets, we don't set the background ourselves if it isn't in the list. If the palette is now the default-palette again, remove it from the "don't set background in rebuildCache()"-list and rebuild the cache, so it again will get the gradient background. Definition at line 219 of file kexigradientwidget.cpp. |
|
Definition at line 142 of file kexigradientwidget.h. |
|
Definition at line 145 of file kexigradientwidget.h. |
|
Get the current gradient-type. Definition at line 112 of file kexigradientwidget.h. |
|
Rebuild the background-pixmap if necessary. Draw the widget as usual Definition at line 205 of file kexigradientwidget.cpp. |
|
The cache needs to be rebuild once the widget is set up completely. Definition at line 236 of file kexigradientwidget.h. |
|
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. |
|
Set the displaymode mode. The widget will be updated automatically. Definition at line 87 of file kexigradientwidget.h. |
|
Set color #1 for the gradient-effect. color is the new color. Definition at line 118 of file kexigradientwidget.h. |
|
Set color #2 for the gradient-effect. color is the new color. Definition at line 125 of file kexigradientwidget.h. |
|
Set both colors for the gradient. color1 is the first color, color2 the second. Definition at line 135 of file kexigradientwidget.h. |
|
Set the gradient-type. Definition at line 103 of file kexigradientwidget.h. |
The documentation for this class was generated from the following files: