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 */