From 85d9343669f00d5b4a4c6c1aba1811fa6fd14d5a Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 9 Jun 2010 13:18:04 +0000 Subject: [PATCH] add a toolBoxOpen getter to complete the property svn path=/trunk/KDE/kdelibs/; revision=1136303 --- containment.cpp | 5 +++++ containment.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/containment.cpp b/containment.cpp index 64ade0b25..f1b0f6ad1 100644 --- a/containment.cpp +++ b/containment.cpp @@ -1812,6 +1812,11 @@ void Containment::setToolBoxOpen(bool open) } } +bool Containment::isToolBoxOpen() const +{ + return (d->toolBox && d->toolBox.data()->isShowing()); +} + void Containment::openToolBox() { if (d->toolBox && !d->toolBox.data()->isShowing()) { diff --git a/containment.h b/containment.h index 7045b59db..f4e6f8df6 100644 --- a/containment.h +++ b/containment.h @@ -311,6 +311,12 @@ class PLASMA_EXPORT Containment : public Applet */ void setToolBoxOpen(bool open); + /** + * @return true if the toolbox is open + * @since 4.5 + */ + bool isToolBoxOpen() const; + /** * Open the Containment's toolbox */