More geometry accessors in wrapper classes.

svn path=/branches/work/kwin_composite/; revision=632603
icc-effect-5.14.5
Luboš Luňák 2007-02-11 18:36:57 +00:00
parent 47f5535e6a
commit 9704203415
2 changed files with 83 additions and 0 deletions

View File

@ -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();

28
scene.h
View File

@ -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()
{