summaryrefslogtreecommitdiffstats
path: root/kig/misc/screeninfo.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kig/misc/screeninfo.cc
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/misc/screeninfo.cc')
-rw-r--r--kig/misc/screeninfo.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/kig/misc/screeninfo.cc b/kig/misc/screeninfo.cc
index c1418876..91a6cb74 100644
--- a/kig/misc/screeninfo.cc
+++ b/kig/misc/screeninfo.cc
@@ -19,12 +19,12 @@
#include <cmath>
-ScreenInfo::ScreenInfo( const Rect& docRect, const QRect& viewRect )
+ScreenInfo::ScreenInfo( const Rect& docRect, const TQRect& viewRect )
: mkrect( docRect.normalized() ), mqrect( viewRect.normalize() )
{
}
-Rect ScreenInfo::fromScreen( const QRect& r ) const
+Rect ScreenInfo::fromScreen( const TQRect& r ) const
{
return Rect(
fromScreen( r.topLeft() ),
@@ -32,7 +32,7 @@ Rect ScreenInfo::fromScreen( const QRect& r ) const
).normalized();
}
-Coordinate ScreenInfo::fromScreen( const QPoint& p ) const
+Coordinate ScreenInfo::fromScreen( const TQPoint& p ) const
{
// invert the y-axis: 0 is at the bottom !
Coordinate t( p.x(), mqrect.height() - p.y() );
@@ -41,18 +41,18 @@ Coordinate ScreenInfo::fromScreen( const QPoint& p ) const
return t + mkrect.bottomLeft();
}
-QPoint ScreenInfo::toScreen( const Coordinate& p ) const
+TQPoint ScreenInfo::toScreen( const Coordinate& p ) const
{
Coordinate t = p - mkrect.bottomLeft();
t *= mqrect.width();
t /= mkrect.width();
// invert the y-axis: 0 is at the bottom !
- return QPoint( (int) t.x, mqrect.height() - (int) t.y );
+ return TQPoint( (int) t.x, mqrect.height() - (int) t.y );
}
-QRect ScreenInfo::toScreen( const Rect& r ) const
+TQRect ScreenInfo::toScreen( const Rect& r ) const
{
- return QRect(
+ return TQRect(
toScreen( r.bottomLeft() ),
toScreen( r.topRight() )
).normalize();
@@ -60,8 +60,8 @@ QRect ScreenInfo::toScreen( const Rect& r ) const
double ScreenInfo::pixelWidth() const
{
- Coordinate a = fromScreen( QPoint( 0, 0 ) );
- Coordinate b = fromScreen( QPoint( 0, 1000 ) );
+ Coordinate a = fromScreen( TQPoint( 0, 0 ) );
+ Coordinate b = fromScreen( TQPoint( 0, 1000 ) );
return std::fabs( b.y - a.y ) / 1000;
}
@@ -75,12 +75,12 @@ void ScreenInfo::setShownRect( const Rect& r )
mkrect = r;
}
-const QRect ScreenInfo::viewRect() const
+const TQRect ScreenInfo::viewRect() const
{
return mqrect;
}
-void ScreenInfo::setViewRect( const QRect& r )
+void ScreenInfo::setViewRect( const TQRect& r )
{
mqrect = r;
}