summaryrefslogtreecommitdiffstats
path: root/kdeui/ksharedpixmap.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeui/ksharedpixmap.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/ksharedpixmap.cpp')
-rw-r--r--kdeui/ksharedpixmap.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kdeui/ksharedpixmap.cpp b/kdeui/ksharedpixmap.cpp
index 8af8d7277..002b4290f 100644
--- a/kdeui/ksharedpixmap.cpp
+++ b/kdeui/ksharedpixmap.cpp
@@ -13,12 +13,12 @@
*/
#include "config.h"
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qwindowdefs.h>
-#include <qwidget.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqwindowdefs.h>
+#include <tqwidget.h>
#ifdef Q_WS_X11
@@ -58,11 +58,11 @@ public:
Atom pixmap;
Atom target;
Atom selection;
- QRect rect;
+ TQRect rect;
};
KSharedPixmap::KSharedPixmap()
- : QWidget(0L, "shpixmap comm window")
+ : TQWidget(0L, "shpixmap comm window")
{
d = new KSharedPixmapPrivate;
init();
@@ -78,16 +78,16 @@ KSharedPixmap::~KSharedPixmap()
void KSharedPixmap::init()
{
d->pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false);
- QCString atom;
+ TQCString atom;
atom.sprintf("target prop for window %lx", static_cast<unsigned long int>(winId()));
d->target = XInternAtom(qt_xdisplay(), atom.data(), false);
d->selection = None;
}
-bool KSharedPixmap::isAvailable(const QString & name) const
+bool KSharedPixmap::isAvailable(const TQString & name) const
{
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (sel == None)
return false;
@@ -95,16 +95,16 @@ bool KSharedPixmap::isAvailable(const QString & name) const
}
-bool KSharedPixmap::loadFromShared(const QString & name, const QRect & rect)
+bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
{
d->rect = rect;
if (d->selection != None)
// already active
return false;
- QPixmap::resize(0, 0); // invalidate
+ TQPixmap::resize(0, 0); // invalidate
- QString str = QString("KDESHPIXMAP:%1").arg(name);
+ TQString str = TQString("KDESHPIXMAP:%1").arg(name);
d->selection = XInternAtom(qt_xdisplay(), str.latin1(), true);
if (d->selection == None)
return false;
@@ -167,7 +167,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
if (d->rect.isEmpty())
{
- QPixmap::resize(width, height);
+ TQPixmap::resize(width, height);
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
0, 0, width, height, 0, 0);
@@ -182,11 +182,11 @@ bool KSharedPixmap::x11Event(XEvent *event)
// background tile for the rectangle "rect".
//Check for origin off screen
- QPoint origin(0, 0);
+ TQPoint origin(0, 0);
if( d->rect.topLeft().x() < 0 || d->rect.topLeft().y() < 0 ) {
//Save the offset and relocate the rect corners
- QPoint tl = d->rect.topLeft();
- QPoint br = d->rect.bottomRight();
+ TQPoint tl = d->rect.topLeft();
+ TQPoint br = d->rect.bottomRight();
if( tl.x() < 0 ) {
origin.setX( abs( tl.x() ) );
tl.setX( 0 );
@@ -195,7 +195,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
origin.setY( abs( tl.y() ) );
tl.setY( 0 );
}
- QRect adjustedRect( tl, br );
+ TQRect adjustedRect( tl, br );
d->rect = adjustedRect;
}
@@ -204,7 +204,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
unsigned xa = d->rect.x() % width, ya = d->rect.y() % height;
unsigned t1w = QMIN(width-xa,tw), t1h = QMIN(height-ya,th);
- QPixmap::resize( tw+origin.x(), th+origin.y() );
+ TQPixmap::resize( tw+origin.x(), th+origin.y() );
XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
xa, ya, t1w+origin.x(), t1h+origin.y(), origin.x(), origin.y() );