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
This commit is contained in:
Aaron J. Seigo 2008-04-07 03:27:10 +00:00
parent 4b783d9b9a
commit 0cee130c4e
2 changed files with 18 additions and 0 deletions

View File

@ -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()));

View File

@ -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<Applet*> List;