summaryrefslogtreecommitdiffstats
path: root/ksnapshot/regiongrabber.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /ksnapshot/regiongrabber.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksnapshot/regiongrabber.cpp')
-rw-r--r--ksnapshot/regiongrabber.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp
index 3522b74b..ede99aee 100644
--- a/ksnapshot/regiongrabber.cpp
+++ b/ksnapshot/regiongrabber.cpp
@@ -28,8 +28,8 @@
#include <kglobalsettings.h>
-SizeTip::SizeTip( TQWidget *parent, const char *name )
- : TQLabel( parent, name, WStyle_Customize | WX11BypassWM |
+SizeTip::SizeTip( TQWidget *tqparent, const char *name )
+ : TQLabel( tqparent, name, WStyle_Customize | WX11BypassWM |
WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool )
{
setMargin( 2 );
@@ -41,8 +41,8 @@ SizeTip::SizeTip( TQWidget *parent, const char *name )
void SizeTip::setTip( const TQRect &rect )
{
- TQString tip = TQString( "%1x%2" ).arg( rect.width() )
- .arg( rect.height() );
+ TQString tip = TQString( "%1x%2" ).tqarg( rect.width() )
+ .tqarg( rect.height() );
setText( tip );
adjustSize();
@@ -52,7 +52,7 @@ void SizeTip::setTip( const TQRect &rect )
void SizeTip::positionTip( const TQRect &rect )
{
- TQRect tipRect = geometry();
+ TQRect tipRect = tqgeometry();
tipRect.moveTopLeft( TQPoint( 0, 0 ) );
if ( rect.intersects( tipRect ) )
@@ -60,8 +60,8 @@ void SizeTip::positionTip( const TQRect &rect )
TQRect deskR = KGlobalSettings::desktopGeometry( TQPoint( 0, 0 ) );
tipRect.moveCenter( TQPoint( deskR.width()/2, deskR.height()/2 ) );
- if ( !rect.contains( tipRect, true ) && rect.intersects( tipRect ) )
- tipRect.moveBottomRight( geometry().bottomRight() );
+ if ( !rect.tqcontains( tipRect, true ) && rect.intersects( tipRect ) )
+ tipRect.moveBottomRight( tqgeometry().bottomRight() );
}
move( tipRect.topLeft() );
@@ -92,7 +92,7 @@ void RegionGrabber::initGrabber()
TQDesktopWidget desktopWidget;
TQRect desktopSize;
if ( desktopWidget.isVirtualDesktop() )
- desktopSize = desktopWidget.geometry();
+ desktopSize = desktopWidget.tqgeometry();
else
desktopSize = desktopWidget.screenGeometry( qt_xrootwin() );
@@ -104,7 +104,7 @@ void RegionGrabber::initGrabber()
void RegionGrabber::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
{
mouseDown = true;
grabRect = TQRect( e->pos(), e->pos() );
@@ -168,8 +168,8 @@ void RegionGrabber::drawRubber()
p.setPen( TQPen( color0, 1 ) );
p.setBrush( NoBrush );
- style().drawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, colorGroup(),
- TQStyle::Style_Default, TQStyleOption( colorGroup().base() ) );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, grabRect, tqcolorGroup(),
+ TQStyle::Style_Default, TQStyleOption( tqcolorGroup().base() ) );
p.end();
}