From 97042034151e7a70437b8d6a311e2c36c80f6e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Sun, 11 Feb 2007 18:36:57 +0000 Subject: [PATCH] More geometry accessors in wrapper classes. svn path=/branches/work/kwin_composite/; revision=632603 --- effects.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ scene.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/effects.h b/effects.h index 57b54ce7f3..2f35926f0a 100644 --- a/effects.h +++ b/effects.h @@ -177,6 +177,14 @@ class EffectWindow bool isOnCurrentDesktop() const; bool isOnAllDesktops() const; int desktop() const; // prefer isOnXXX() + int x() const; + int y() const; + int width() const; + int height() const; + QRect geometry() const; + QPoint pos() const; + QSize size() const; + QRect rect() const; void setWindow( Toplevel* w ); // internal void setSceneWindow( Scene::Window* w ); // internal @@ -243,6 +251,53 @@ Scene::Window* EffectWindow::sceneWindow() } inline +int EffectWindow::x() const + { + return toplevel->x(); + } + +inline +int EffectWindow::y() const + { + return toplevel->y(); + } + +inline +int EffectWindow::width() const + { + return toplevel->width(); + } + +inline +int EffectWindow::height() const + { + return toplevel->height(); + } + +inline +QRect EffectWindow::geometry() const + { + return toplevel->geometry(); + } + +inline +QSize EffectWindow::size() const + { + return toplevel->size(); + } + +inline +QPoint EffectWindow::pos() const + { + return toplevel->pos(); + } + +inline +QRect EffectWindow::rect() const + { + return toplevel->rect(); + } +inline EffectWindow* effectWindow( Toplevel* w ) { EffectWindow* ret = w->effectWindow(); diff --git a/scene.h b/scene.h index ab7c9e3b76..93bce24ed6 100644 --- a/scene.h +++ b/scene.h @@ -126,6 +126,10 @@ class Scene::Window int y() const; int width() const; int height() const; + QRect geometry() const; + QPoint pos() const; + QSize size() const; + QRect rect() const; // access to the internal window class // TODO eventually get rid of this Toplevel* window(); @@ -196,6 +200,30 @@ int Scene::Window::height() const return toplevel->height(); } +inline +QRect Scene::Window::geometry() const + { + return toplevel->geometry(); + } + +inline +QSize Scene::Window::size() const + { + return toplevel->size(); + } + +inline +QPoint Scene::Window::pos() const + { + return toplevel->pos(); + } + +inline +QRect Scene::Window::rect() const + { + return toplevel->rect(); + } + inline Toplevel* Scene::Window::window() {