Scripting binding to show/hide an outline
REVIEW: 104540
This commit is contained in:
parent
611e225fd6
commit
ca25da7089
2 changed files with 31 additions and 0 deletions
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
#include "workspace_wrapper.h"
|
||||
#include "../client.h"
|
||||
#include "../outline.h"
|
||||
|
||||
#include <QtGui/QDesktopWidget>
|
||||
|
||||
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue