KRootPixmap Class Reference
#include <krootpixmap.h>
Inheritance diagram for KRootPixmap:

Detailed Description
Creates pseudo-transparent widgets.A pseudo-transparent widget is a widget with its background pixmap set to that part of the desktop background that it is currently obscuring. This gives a transparency effect.
To create a transparent widget, construct a KRootPixmap and pass it a pointer to your widget. That's it! Moving, resizing and background changes are handled automatically.
Instead of using the default behavior, you can ask KRootPixmap to emit a backgroundUpdated(const QPixmap &) signal whenever the background needs updating by using setCustomPainting(bool). Alternatively by reimplementing updateBackground(KSharedPixmap*) you can take complete control of the behavior.
- Author:
- Geert Jansen <jansen@kde.org>
- Version:
- Id
- krootpixmap.h 345292 2004-09-09 20:07:27Z staniek
Definition at line 46 of file krootpixmap.h.
Public Slots | |
virtual void | start () |
virtual void | stop () |
void | setFadeEffect (double opacity, const QColor &color) |
void | repaint (bool force) |
void | repaint () |
void | setCustomPainting (bool enable) |
void | enableExports () |
static QString | pixmapName (int desk) |
Signals | |
void | backgroundUpdated (const QPixmap &pm) |
Public Member Functions | |
KRootPixmap (QWidget *target, const char *name=0) | |
KRootPixmap (QWidget *target, QObject *parent, const char *name=0) | |
virtual | ~KRootPixmap () |
bool | isAvailable () const |
bool | isActive () const |
int | currentDesktop () const |
bool | customPainting () const |
KDE_DEPRECATED bool | checkAvailable (bool) |
const QColor & | color () const |
double | opacity () const |
Protected Member Functions | |
virtual bool | eventFilter (QObject *, QEvent *) |
virtual void | updateBackground (KSharedPixmap *) |
Constructor & Destructor Documentation
|
Constructs a KRootPixmap. The KRootPixmap will be created as a child of the target widget so it will be deleted automatically when the widget is destroyed.
Definition at line 46 of file krootpixmap.cpp. |
|
Constructs a KRootPixmap where the parent QObject and target QWidget are different.
Definition at line 52 of file krootpixmap.cpp. |
|
Destructs the object.
Definition at line 83 of file krootpixmap.cpp. |
Member Function Documentation
|
Emitted when the background needs updating and custom painting (see setCustomPainting(bool) ) is enabled.
|
|
Deprecated, use isAvailable() instead.
Definition at line 100 of file krootpixmap.h. |
|
Definition at line 106 of file krootpixmap.h. |
|
Returns the number of the current desktop.
Definition at line 90 of file krootpixmap.cpp. |
|
Returns true if custom painting is enabled, false otherwise.
Definition at line 93 of file krootpixmap.h. |
|
Asks KDesktop to export the desktop background as a KSharedPixmap. This method uses DCOP to call KBackgroundIface/setExport(int). Definition at line 268 of file krootpixmap.cpp. |
|
Reimplemented to filter the events from the target widget and track its movements.
Reimplemented from QObject. Definition at line 141 of file krootpixmap.cpp. |
|
Returns true if the KRootPixmap is active.
Definition at line 82 of file krootpixmap.h. |
|
Checks if pseudo-transparency is available.
Definition at line 247 of file krootpixmap.cpp. |
|
Definition at line 111 of file krootpixmap.h. |
|
Returns the name of the shared pixmap (only needed for low level access).
Definition at line 256 of file krootpixmap.cpp. |
|
Repaints the widget background. Normally, you shouldn't need this as it is handled automatically. This is equivalent to calling repaint( false ). Definition at line 202 of file krootpixmap.cpp. |
|
Repaints the widget background. Normally, you shouldn't need this as it is handled automatically.
Definition at line 208 of file krootpixmap.cpp. |
|
Enables custom handling of the background painting. If custom painting is enabled then KRootPixmap will emit a backgroundUpdated() signal when the background for the target widget changes, instead of applying the new background. Definition at line 157 of file krootpixmap.h. |
|
Sets the fade effect. This effect will fade the background to the specified color.
Definition at line 127 of file krootpixmap.cpp. |
|
Starts background handling.
Definition at line 103 of file krootpixmap.cpp. |
|
Stops background handling.
Definition at line 120 of file krootpixmap.cpp. |
|
Called when the pixmap has been updated. The default implementation applies the fade effect, then sets the target's background, or emits backgroundUpdated(const QPixmap &) depending on the painting mode. Definition at line 303 of file krootpixmap.cpp. |
The documentation for this class was generated from the following files: