diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp
index c5b684a01b..287b3ee31a 100644
--- a/scripting/workspace_wrapper.cpp
+++ b/scripting/workspace_wrapper.cpp
@@ -21,6 +21,7 @@ along with this program. If not, see .
#include "workspace_wrapper.h"
#include "../client.h"
+#include "../outline.h"
#include
@@ -208,4 +209,19 @@ void WorkspaceWrapper::setupClientConnections(KWin::Client *client)
connect(client, SIGNAL(clientMaximizedStateChanged(KWin::Client*,bool,bool)), SIGNAL(clientMaximizeSet(KWin::Client*,bool,bool)));
}
+void WorkspaceWrapper::showOutline(const QRect &geometry)
+{
+ Workspace::self()->outline()->show(geometry);
+}
+
+void WorkspaceWrapper::showOutline(int x, int y, int width, int height)
+{
+ Workspace::self()->outline()->show(QRect(x, y, width, height));
+}
+
+void WorkspaceWrapper::hideOutline()
+{
+ Workspace::self()->outline()->hide();
+}
+
} // KWin
diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h
index 76d60bf5c4..a15f7778f7 100644
--- a/scripting/workspace_wrapper.h
+++ b/scripting/workspace_wrapper.h
@@ -252,6 +252,21 @@ public Q_SLOTS:
void slotWindowToDesktopUp();
void slotWindowToDesktopDown();
+ /**
+ * Shows an outline at the specified @p geometry.
+ * If an outline is already shown the outline is moved to the new position.
+ * Use @link hideOutline to remove the outline again.
+ **/
+ void showOutline(const QRect &geometry);
+ /**
+ * Overloaded method for convenience.
+ **/
+ void showOutline(int x, int y, int width, int height);
+ /**
+ * Hides the outline previously shown by @link showOutline.
+ **/
+ void hideOutline();
+
private Q_SLOTS:
void setupClientConnections(KWin::Client* client);
};