From 0cee130c4e42f0555c2b2419e4284c5435031a0e Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 7 Apr 2008 03:27:10 +0000 Subject: [PATCH] add the View to the Containment::StyleOption, and some apidox for the members of the option svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=794325 --- applet.cpp | 1 + containment.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/applet.cpp b/applet.cpp index 88593493a..ede15b6f5 100644 --- a/applet.cpp +++ b/applet.cpp @@ -965,6 +965,7 @@ void Applet::paintWidget(QPainter *painter, const QStyleOptionGraphicsItem *opti if (v) { coption.desktop = v->effectiveDesktop(); + coption.view = v; } paintInterface(painter, &coption, QRect(QPoint(0,0), d->contentSize(this).toSize())); diff --git a/containment.h b/containment.h index d3ec2d045..737e970e3 100644 --- a/containment.h +++ b/containment.h @@ -40,6 +40,7 @@ class AppletHandle; class DataEngine; class Package; class Corona; +class View; /** * @short The base class for plugins that provide backgrounds and applet grouping containers @@ -72,7 +73,23 @@ class PLASMA_EXPORT Containment : public Applet explicit StyleOption(const StyleOption &other); explicit StyleOption(const QStyleOptionGraphicsItem &other); + /** + * The virtual desktop (starting at 0) that is currently + * being rendered. this should be used to determine which + * desktop is being rendered for at the current time + * rather than relying on the concept of "current desktop" + * since a containment may be displayed concurrently on + * more than one desktop with desktop effects such as + * desktop grid. + */ int desktop; + + /** + * The View, if any, that this containment is currently + * being rendered into. Note: this may be NULL, so be + * sure to check it before using it! + */ + Plasma::View *view; }; typedef QList List;