From e7366c97c998679efa80cf61c88e64a11a3d3c33 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: rename the following methods: tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksnapshot/ksnapshot.cpp | 4 ++-- ksnapshot/ksnapshot.h | 12 ++++++------ ksnapshot/regiongrabber.cpp | 4 ++-- ksnapshot/regiongrabber.h | 2 +- ksnapshot/windowgrabber.cpp | 30 +++++++++++++++--------------- 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'ksnapshot') diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp index e24b8ded..881f67a2 100644 --- a/ksnapshot/ksnapshot.cpp +++ b/ksnapshot/ksnapshot.cpp @@ -58,9 +58,9 @@ #define kApp KApplication::kApplication() -KSnapshot::KSnapshot(TQWidget *tqparent, const char *name, bool grabCurrent) +KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent) : DCOPObject("interface"), - KDialogBase(tqparent, name, true, TQString(), Help|User1, User1, + KDialogBase(parent, name, true, TQString(), Help|User1, User1, true, KStdGuiItem::quit() ) { grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ); diff --git a/ksnapshot/ksnapshot.h b/ksnapshot/ksnapshot.h index 99f0d8c1..c0d5becc 100644 --- a/ksnapshot/ksnapshot.h +++ b/ksnapshot/ksnapshot.h @@ -26,8 +26,8 @@ class KSnapshotPreview : public TQLabel TQ_OBJECT public: - KSnapshotPreview(TQWidget *tqparent, const char *name = 0) - : TQLabel(tqparent, name) + KSnapshotPreview(TQWidget *parent, const char *name = 0) + : TQLabel(parent, name) { tqsetAlignment(AlignHCenter | AlignVCenter); setCursor(TQCursor(TQt::PointingHandCursor)); @@ -40,13 +40,13 @@ class KSnapshotPreview : public TQLabel // does unexpected things when painting directly onto the pixmap TQPixmap pixmap(pm); TQPixmap handle(15, 15); - TQBitmap tqmask(15, 15, true); + TQBitmap mask(15, 15, true); { - TQPainter p(&tqmask); + TQPainter p(&mask); tqstyle().tqdrawPrimitive(TQStyle::PE_SizeGrip, &p, TQRect(0, 0, 15, 15), tqpalette().active()); p.end(); - handle.setMask(tqmask); + handle.setMask(mask); } { @@ -95,7 +95,7 @@ class KSnapshot : public KDialogBase, virtual public KSnapshotIface TQ_OBJECT public: - KSnapshot(TQWidget *tqparent= 0, const char *name= 0, bool grabCurrent=false); + KSnapshot(TQWidget *parent= 0, const char *name= 0, bool grabCurrent=false); ~KSnapshot(); enum CaptureMode { FullScreen=0, WindowUnderCursor=1, Region=2, ChildWindow=3 }; diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp index c14eb9b3..74ac960a 100644 --- a/ksnapshot/regiongrabber.cpp +++ b/ksnapshot/regiongrabber.cpp @@ -28,8 +28,8 @@ #include -SizeTip::SizeTip( TQWidget *tqparent, const char *name ) - : TQLabel( tqparent, name, WStyle_Customize | WX11BypassWM | +SizeTip::SizeTip( TQWidget *parent, const char *name ) + : TQLabel( parent, name, WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop | WStyle_NoBorder | WStyle_Tool ) { setMargin( 2 ); diff --git a/ksnapshot/regiongrabber.h b/ksnapshot/regiongrabber.h index 1c9f4a3a..3cc1961e 100644 --- a/ksnapshot/regiongrabber.h +++ b/ksnapshot/regiongrabber.h @@ -28,7 +28,7 @@ class TQTimer; class SizeTip : public TQLabel { public: - SizeTip( TQWidget *tqparent, const char *name=0 ); + SizeTip( TQWidget *parent, const char *name=0 ); ~SizeTip() {} void setTip( const TQRect &rect ); diff --git a/ksnapshot/windowgrabber.cpp b/ksnapshot/windowgrabber.cpp index a468d7c5..189fb856 100644 --- a/ksnapshot/windowgrabber.cpp +++ b/ksnapshot/windowgrabber.cpp @@ -61,11 +61,11 @@ void getWindowsRecursive( std::vector& windows, Window w, windows.push_back( r ); } - Window root, tqparent; + Window root, parent; Window* tqchildren; unsigned int ntqchildren; - if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { + if( XQueryTree( qt_xdisplay(), w, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { for( unsigned int i = 0; i < ntqchildren; ++i ) { getWindowsRecursive( windows, tqchildren[ i ], x, y, depth + 1 ); } @@ -94,11 +94,11 @@ Window findRealWindow( Window w, int depth = 0 ) if( type != None ) return w; } - Window root, tqparent; + Window root, parent; Window* tqchildren; unsigned int ntqchildren; Window ret = None; - if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { + if( XQueryTree( qt_xdisplay(), w, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { for( unsigned int i = 0; i < ntqchildren && ret == None; ++i ) @@ -114,11 +114,11 @@ Window windowUnderCursor( bool includeDecorations = true ) { Window root; Window child; - uint tqmask; + uint mask; int rootX, rootY, winX, winY; XGrabServer( qt_xdisplay() ); XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, - &rootX, &rootY, &winX, &winY, &tqmask ); + &rootX, &rootY, &winX, &winY, &mask ); if( child == None ) child = qt_xrootwin(); if( !includeDecorations ) { @@ -138,8 +138,8 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) int tmp1, tmp2; //Check whether the extension is available if ( XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ) ) { - TQBitmap tqmask( w, h ); - //As the first step, get the tqmask from XShape. + TQBitmap mask( w, h ); + //As the first step, get the mask from XShape. int count, order; XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, ShapeBounding, &count, &order ); @@ -148,7 +148,7 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) //Since the border area is part of the window, we use bounding // to limit our work region if (rects) { - //Create a TQRegion from the rectangles describing the bounding tqmask. + //Create a TQRegion from the rectangles describing the bounding mask. TQRegion contents; for ( int pos = 0; pos < count; pos++ ) contents += TQRegion( rects[pos].x, rects[pos].y, @@ -170,14 +170,14 @@ TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) TQRegion maskedAway = bbox - contents; TQMemArray maskedAwayRects = maskedAway.tqrects(); - //Construct a bitmap tqmask from the rectangles - TQPainter p(&tqmask); + //Construct a bitmap mask from the rectangles + TQPainter p(&mask); p.fillRect(0, 0, w, h, TQt::color1); for (uint pos = 0; pos < maskedAwayRects.count(); pos++) p.fillRect(maskedAwayRects[pos], TQt::color0); p.end(); - pm.setMask(tqmask); + pm.setMask(mask); } } #endif @@ -218,16 +218,16 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations ) XGrabServer( qt_xdisplay() ); Window child = windowUnderCursor( includeDecorations ); XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); - Window tqparent; + Window parent; Window* tqchildren; unsigned int ntqchildren; - if( XQueryTree( qt_xdisplay(), child, &root, &tqparent, + if( XQueryTree( qt_xdisplay(), child, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { if( tqchildren != NULL ) XFree( tqchildren ); int newx, newy; Window dummy; - if( XTranslateCoordinates( qt_xdisplay(), tqparent, qt_xrootwin(), + if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), x, y, &newx, &newy, &dummy )) { x = newx; y = newy; -- cgit v1.2.3