summaryrefslogtreecommitdiffstats
path: root/kwin/placement.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 20:16:47 +0000
commit495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 (patch)
treedaabcb652c07b9a17cad88ca50b63a2d91ead4a3 /kwin/placement.cpp
parent50001f1757f97510e80cb1990e2f2d5b00144c2a (diff)
downloadtdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.tar.gz
tdebase-495d08bc2db58ee7fc4ea55a7158f2f61b82fc56.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/placement.cpp')
-rw-r--r--kwin/placement.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kwin/placement.cpp b/kwin/placement.cpp
index a9862ce27..4911d7256 100644
--- a/kwin/placement.cpp
+++ b/kwin/placement.cpp
@@ -35,7 +35,7 @@ Placement::Placement(Workspace* w)
}
/*!
- Places the client \a c according to the workspace's layout policy
+ Places the client \a c according to the workspace's tqlayout policy
*/
void Placement::place(Client* c, TQRect& area )
{
@@ -452,7 +452,7 @@ void Placement::placeDialog(Client* c, TQRect& area, Policy nextPlacement )
void Placement::placeUnderMouse(Client* c, TQRect& area, Policy /*next*/ )
{
area = checkArea( c, area );
- TQRect geom = c->geometry();
+ TQRect geom = c->tqgeometry();
geom.moveCenter( TQCursor::pos());
c->move( geom.topLeft());
c->keepInArea( area ); // make sure it's kept inside workarea
@@ -507,8 +507,8 @@ void Placement::placeOnMainWindow(Client* c, TQRect& area, Policy nextPlacement
place( c, area, Centered );
return;
}
- TQRect geom = c->geometry();
- geom.moveCenter( place_on->geometry().center());
+ TQRect geom = c->tqgeometry();
+ geom.moveCenter( place_on->tqgeometry().center());
c->move( geom.topLeft());
// get area again, because the mainwindow may be on different xinerama screen
area = checkArea( c, TQRect());
@@ -523,7 +523,7 @@ void Placement::placeMaximizing(Client* c, TQRect& area, Policy nextPlacement )
{
if( m_WorkspacePtr->clientArea( MaximizeArea, c ) == area )
c->maximize( Client::MaximizeFull );
- else // if the geometry doesn't match default maximize area (xinerama case?),
+ else // if the tqgeometry doesn't match default maximize area (xinerama case?),
{ // it's probably better to use the given area
c->setGeometry( area );
}
@@ -538,7 +538,7 @@ void Placement::placeMaximizing(Client* c, TQRect& area, Policy nextPlacement )
TQRect Placement::checkArea( const Client* c, const TQRect& area )
{
if( area.isNull())
- return m_WorkspacePtr->clientArea( PlacementArea, c->geometry().center(), c->desktop());
+ return m_WorkspacePtr->clientArea( PlacementArea, c->tqgeometry().center(), c->desktop());
return area;
}
@@ -591,7 +591,7 @@ const char* Placement::policyToString( Policy policy )
void Workspace::slotWindowPackLeft()
{
if( active_client && active_client->isMovable())
- active_client->move( packPositionLeft( active_client, active_client->geometry().left(), true ),
+ active_client->move( packPositionLeft( active_client, active_client->tqgeometry().left(), true ),
active_client->y());
}
@@ -599,7 +599,7 @@ void Workspace::slotWindowPackRight()
{
if( active_client && active_client->isMovable())
active_client->move(
- packPositionRight( active_client, active_client->geometry().right(), true )
+ packPositionRight( active_client, active_client->tqgeometry().right(), true )
- active_client->width() + 1, active_client->y());
}
@@ -607,14 +607,14 @@ void Workspace::slotWindowPackUp()
{
if( active_client && active_client->isMovable())
active_client->move( active_client->x(),
- packPositionUp( active_client, active_client->geometry().top(), true ));
+ packPositionUp( active_client, active_client->tqgeometry().top(), true ));
}
void Workspace::slotWindowPackDown()
{
if( active_client && active_client->isMovable())
active_client->move( active_client->x(),
- packPositionDown( active_client, active_client->geometry().bottom(), true ) - active_client->height() + 1 );
+ packPositionDown( active_client, active_client->tqgeometry().bottom(), true ) - active_client->height() + 1 );
}
void Workspace::slotWindowGrowHorizontal()
@@ -627,16 +627,16 @@ void Client::growHorizontal()
{
if( !isResizable() || isShade())
return;
- TQRect geom = geometry();
+ TQRect geom = tqgeometry();
geom.setRight( workspace()->packPositionRight( this, geom.right(), true ));
TQSize adjsize = adjustedSize( geom.size(), SizemodeFixedW );
- if( geometry().size() == adjsize && geom.size() != adjsize && xSizeHint.width_inc > 1 ) // take care of size increments
+ if( tqgeometry().size() == adjsize && geom.size() != adjsize && xSizeHint.width_inc > 1 ) // take care of size increments
{
int newright = workspace()->packPositionRight( this, geom.right() + xSizeHint.width_inc - 1, true );
// check that it hasn't grown outside of the area, due to size increments
// TODO this may be wrong?
if( workspace()->clientArea( MovementArea,
- TQPoint(( x() + newright ) / 2, geometry().center().y()), desktop()).right() >= newright )
+ TQPoint(( x() + newright ) / 2, tqgeometry().center().y()), desktop()).right() >= newright )
geom.setRight( newright );
}
geom.setSize( adjustedSize( geom.size(), SizemodeFixedW ));
@@ -653,7 +653,7 @@ void Client::shrinkHorizontal()
{
if( !isResizable() || isShade())
return;
- TQRect geom = geometry();
+ TQRect geom = tqgeometry();
geom.setRight( workspace()->packPositionLeft( this, geom.right(), false ));
if( geom.width() <= 1 )
return;
@@ -672,15 +672,15 @@ void Client::growVertical()
{
if( !isResizable() || isShade())
return;
- TQRect geom = geometry();
+ TQRect geom = tqgeometry();
geom.setBottom( workspace()->packPositionDown( this, geom.bottom(), true ));
TQSize adjsize = adjustedSize( geom.size(), SizemodeFixedH );
- if( geometry().size() == adjsize && geom.size() != adjsize && xSizeHint.height_inc > 1 ) // take care of size increments
+ if( tqgeometry().size() == adjsize && geom.size() != adjsize && xSizeHint.height_inc > 1 ) // take care of size increments
{
int newbottom = workspace()->packPositionDown( this, geom.bottom() + xSizeHint.height_inc - 1, true );
// check that it hasn't grown outside of the area, due to size increments
if( workspace()->clientArea( MovementArea,
- TQPoint( geometry().center().x(), ( y() + newbottom ) / 2 ), desktop()).bottom() >= newbottom )
+ TQPoint( tqgeometry().center().x(), ( y() + newbottom ) / 2 ), desktop()).bottom() >= newbottom )
geom.setBottom( newbottom );
}
geom.setSize( adjustedSize( geom.size(), SizemodeFixedH ));
@@ -698,7 +698,7 @@ void Client::shrinkVertical()
{
if( !isResizable() || isShade())
return;
- TQRect geom = geometry();
+ TQRect geom = tqgeometry();
geom.setBottom( workspace()->packPositionUp( this, geom.bottom(), false ));
if( geom.height() <= 1 )
return;
@@ -712,7 +712,7 @@ int Workspace::packPositionLeft( const Client* cl, int oldx, bool left_edge ) co
int newx = clientArea( MovementArea, cl ).left();
if( oldx <= newx ) // try another Xinerama screen
newx = clientArea( MovementArea,
- TQPoint( cl->geometry().left() - 1, cl->geometry().center().y()), cl->desktop()).left();
+ TQPoint( cl->tqgeometry().left() - 1, cl->tqgeometry().center().y()), cl->desktop()).left();
if( oldx <= newx )
return oldx;
for( ClientList::ConstIterator it = clients.begin();
@@ -721,10 +721,10 @@ int Workspace::packPositionLeft( const Client* cl, int oldx, bool left_edge ) co
{
if( !(*it)->isShown( false ) || !(*it)->isOnDesktop( active_client->desktop()))
continue;
- int x = left_edge ? (*it)->geometry().right() + 1 : (*it)->geometry().left() - 1;
+ int x = left_edge ? (*it)->tqgeometry().right() + 1 : (*it)->tqgeometry().left() - 1;
if( x > newx && x < oldx
- && !( cl->geometry().top() > (*it)->geometry().bottom() // they overlap in Y direction
- || cl->geometry().bottom() < (*it)->geometry().top()))
+ && !( cl->tqgeometry().top() > (*it)->tqgeometry().bottom() // they overlap in Y direction
+ || cl->tqgeometry().bottom() < (*it)->tqgeometry().top()))
newx = x;
}
return newx;
@@ -735,7 +735,7 @@ int Workspace::packPositionRight( const Client* cl, int oldx, bool right_edge )
int newx = clientArea( MovementArea, cl ).right();
if( oldx >= newx ) // try another Xinerama screen
newx = clientArea( MovementArea,
- TQPoint( cl->geometry().right() + 1, cl->geometry().center().y()), cl->desktop()).right();
+ TQPoint( cl->tqgeometry().right() + 1, cl->tqgeometry().center().y()), cl->desktop()).right();
if( oldx >= newx )
return oldx;
for( ClientList::ConstIterator it = clients.begin();
@@ -744,10 +744,10 @@ int Workspace::packPositionRight( const Client* cl, int oldx, bool right_edge )
{
if( !(*it)->isShown( false ) || !(*it)->isOnDesktop( cl->desktop()))
continue;
- int x = right_edge ? (*it)->geometry().left() - 1 : (*it)->geometry().right() + 1;
+ int x = right_edge ? (*it)->tqgeometry().left() - 1 : (*it)->tqgeometry().right() + 1;
if( x < newx && x > oldx
- && !( cl->geometry().top() > (*it)->geometry().bottom()
- || cl->geometry().bottom() < (*it)->geometry().top()))
+ && !( cl->tqgeometry().top() > (*it)->tqgeometry().bottom()
+ || cl->tqgeometry().bottom() < (*it)->tqgeometry().top()))
newx = x;
}
return newx;
@@ -758,7 +758,7 @@ int Workspace::packPositionUp( const Client* cl, int oldy, bool top_edge ) const
int newy = clientArea( MovementArea, cl ).top();
if( oldy <= newy ) // try another Xinerama screen
newy = clientArea( MovementArea,
- TQPoint( cl->geometry().center().x(), cl->geometry().top() - 1 ), cl->desktop()).top();
+ TQPoint( cl->tqgeometry().center().x(), cl->tqgeometry().top() - 1 ), cl->desktop()).top();
if( oldy <= newy )
return oldy;
for( ClientList::ConstIterator it = clients.begin();
@@ -767,10 +767,10 @@ int Workspace::packPositionUp( const Client* cl, int oldy, bool top_edge ) const
{
if( !(*it)->isShown( false ) || !(*it)->isOnDesktop( cl->desktop()))
continue;
- int y = top_edge ? (*it)->geometry().bottom() + 1 : (*it)->geometry().top() - 1;
+ int y = top_edge ? (*it)->tqgeometry().bottom() + 1 : (*it)->tqgeometry().top() - 1;
if( y > newy && y < oldy
- && !( cl->geometry().left() > (*it)->geometry().right() // they overlap in X direction
- || cl->geometry().right() < (*it)->geometry().left()))
+ && !( cl->tqgeometry().left() > (*it)->tqgeometry().right() // they overlap in X direction
+ || cl->tqgeometry().right() < (*it)->tqgeometry().left()))
newy = y;
}
return newy;
@@ -781,7 +781,7 @@ int Workspace::packPositionDown( const Client* cl, int oldy, bool bottom_edge )
int newy = clientArea( MovementArea, cl ).bottom();
if( oldy >= newy ) // try another Xinerama screen
newy = clientArea( MovementArea,
- TQPoint( cl->geometry().center().x(), cl->geometry().bottom() + 1 ), cl->desktop()).bottom();
+ TQPoint( cl->tqgeometry().center().x(), cl->tqgeometry().bottom() + 1 ), cl->desktop()).bottom();
if( oldy >= newy )
return oldy;
for( ClientList::ConstIterator it = clients.begin();
@@ -790,10 +790,10 @@ int Workspace::packPositionDown( const Client* cl, int oldy, bool bottom_edge )
{
if( !(*it)->isShown( false ) || !(*it)->isOnDesktop( cl->desktop()))
continue;
- int y = bottom_edge ? (*it)->geometry().top() - 1 : (*it)->geometry().bottom() + 1;
+ int y = bottom_edge ? (*it)->tqgeometry().top() - 1 : (*it)->tqgeometry().bottom() + 1;
if( y < newy && y > oldy
- && !( cl->geometry().left() > (*it)->geometry().right()
- || cl->geometry().right() < (*it)->geometry().left()))
+ && !( cl->tqgeometry().left() > (*it)->tqgeometry().right()
+ || cl->tqgeometry().right() < (*it)->tqgeometry().left()))
newy = y;
}
return newy;