#include <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 TQColor &color) |
| virtual void | polish () |
Public Member Functions | |
| KexiGradientWidget (TQWidget *parent=0, const char *name=0, WFlags f=0) | |
| virtual void | setPaletteBackgroundPixmap (const TQPixmap &pixmap) |
| virtual const TQColor & | paletteBackgroundColor () const |
| void | setDisplayMode (DisplayMode mode) |
| DisplayMode | displayMode () const |
| void | setGradientType (GradientType type) |
| GradientType | gradientType () const |
| void | setGradientColor1 (const TQColor &color) |
| void | setGradientColor2 (const TQColor &color) |
| void | setGradientColors (const TQColor &color1, const TQColor &color2) |
| TQColor | gradientColor1 () const |
| TQColor | gradientColor2 () const |
| void | setBlendOpacity (double opacity) |
| double | blendOpacity () const |
Protected Member Functions | |
| virtual bool | eventFilter (TQObject *object, TQEvent *event) |
| virtual void | enabledChange (bool enabled) |
| virtual void | paletteChange (const TQPalette &pal) |
| virtual void | paintEvent (TQPaintEvent *e) |
| virtual void | resizeEvent (TQResizeEvent *e) |
| virtual void | styleChange (TQStyle &style) |
Detailed Description
A simple widget that can use different types of gradients as the background.
Definition at line 35 of file kexigradientwidget.h.
Member Enumeration Documentation
◆ DisplayMode
Modes for displaying the gradient.
Definition at line 51 of file kexigradientwidget.h.
◆ GradientType
Gradient type specification. See GradientType for more details (part of the TDEFX library)
Definition at line 61 of file kexigradientwidget.h.
Constructor & Destructor Documentation
◆ KexiGradientWidget()
| KexiGradientWidget::KexiGradientWidget | ( | TQWidget * | parent = 0, |
| const char * | name = 0, | ||
| WFlags | f = 0 ) |
Definition at line 32 of file kexigradientwidget.cpp.
◆ ~KexiGradientWidget()
|
virtual |
Definition at line 48 of file kexigradientwidget.cpp.
Member Function Documentation
◆ blendOpacity()
|
inline |
Definition at line 156 of file kexigradientwidget.h.
◆ displayMode()
|
inline |
Get the current displaymode.
Definition at line 96 of file kexigradientwidget.h.
◆ enabledChange()
|
inlineprotectedvirtual |
Definition at line 163 of file kexigradientwidget.h.
◆ eventFilter()
|
protectedvirtual |
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.
◆ gradientColor1()
|
inline |
- Returns
- the color #1 used for the gradient.
Definition at line 142 of file kexigradientwidget.h.
◆ gradientColor2()
|
inline |
- Returns
- the color #2 used for the gradient.
Definition at line 145 of file kexigradientwidget.h.
◆ gradientType()
|
inline |
Get the current gradient-type.
Definition at line 112 of file kexigradientwidget.h.
◆ paintEvent()
|
protectedvirtual |
Rebuild the background-pixmap if necessary.
Draw the widget as usual
Definition at line 205 of file kexigradientwidget.cpp.
◆ paletteBackgroundColor()
|
virtual |
Definition at line 353 of file kexigradientwidget.cpp.
◆ paletteChange()
|
inlineprotectedvirtual |
Definition at line 168 of file kexigradientwidget.h.
◆ polish
|
inlinevirtualslot |
The cache needs to be rebuild once the widget is set up completely.
Definition at line 236 of file kexigradientwidget.h.
◆ resizeEvent()
|
inlineprotectedvirtual |
Definition at line 175 of file kexigradientwidget.h.
◆ setBlendOpacity()
|
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.
◆ setDisplayMode()
|
inline |
Set the displaymode mode. The widget will be updated automatically.
Definition at line 87 of file kexigradientwidget.h.
◆ setGradientColor1()
|
inline |
Set color #1 for the gradient-effect. color is the new color.
Definition at line 118 of file kexigradientwidget.h.
◆ setGradientColor2()
|
inline |
Set color #2 for the gradient-effect. color is the new color.
Definition at line 125 of file kexigradientwidget.h.
◆ setGradientColors()
|
inline |
Set both colors for the gradient. color1 is the first color, color2 the second.
Definition at line 135 of file kexigradientwidget.h.
◆ setGradientType()
|
inline |
Set the gradient-type.
Definition at line 103 of file kexigradientwidget.h.
◆ setPaletteBackgroundColor
|
virtualslot |
Definition at line 345 of file kexigradientwidget.cpp.
◆ setPaletteBackgroundPixmap()
|
inlinevirtual |
Definition at line 76 of file kexigradientwidget.h.
◆ styleChange()
|
inlineprotectedvirtual |
Definition at line 180 of file kexigradientwidget.h.
The documentation for this class was generated from the following files:
