From 22893bd07772790ca2190fc1f382968b89abbbf1 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 28 Nov 2007 21:46:17 +0000 Subject: [PATCH] change of heart after trying a few more things out: make containment type something that can be externally set. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742774 --- containment.cpp | 11 +++++++++-- containment.h | 7 ++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/containment.cpp b/containment.cpp index 4423e9b34..c9df6152a 100644 --- a/containment.cpp +++ b/containment.cpp @@ -59,7 +59,8 @@ public: location(Floating), screen(-1), immutable(false), - toolbox(0) + toolbox(0), + type(Containment::DesktopContainment) { } @@ -76,6 +77,7 @@ public: int screen; bool immutable; DesktopToolbox *toolbox; + Containment::Type type; }; Containment::Containment(QGraphicsItem* parent, @@ -162,7 +164,12 @@ void Containment::containmentConstraintsUpdated(Plasma::Constraints constraints) Containment::Type Containment::containmentType() const { - return DesktopContainment; + return d->type; +} + +void Containment::setContainmentType(Containment::Type type) +{ + d->type = type; } Corona* Containment::corona() const diff --git a/containment.h b/containment.h index c81a801e2..3e35ef1a5 100644 --- a/containment.h +++ b/containment.h @@ -103,7 +103,12 @@ class PLASMA_EXPORT Containment : public Applet /** * Returns the type of containment */ - virtual Type containmentType() const; + Type containmentType() const; + + /** + * Sets the type of this containment. + */ + void setContainmentType(Containment::Type type); /** * Returns the current form factor the applets in this Containment