summaryrefslogtreecommitdiffstats
path: root/khexedit/draglabel.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /khexedit/draglabel.cc
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khexedit/draglabel.cc')
-rw-r--r--khexedit/draglabel.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/khexedit/draglabel.cc b/khexedit/draglabel.cc
index e20088c..8a98945 100644
--- a/khexedit/draglabel.cc
+++ b/khexedit/draglabel.cc
@@ -20,16 +20,16 @@
#include <stdlib.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kurldrag.h>
#include "draglabel.h"
-CDragLabel::CDragLabel( QWidget *parent )
- : QLabel( "draglabel", parent, "kde toolbar widget" )
+CDragLabel::CDragLabel( TQWidget *parent )
+ : TQLabel( "draglabel", parent, "kde toolbar widget" )
{
mValid = true;
mDragPending = false;
@@ -42,7 +42,7 @@ CDragLabel::~CDragLabel( void )
}
-void CDragLabel::mousePressEvent( QMouseEvent *e )
+void CDragLabel::mousePressEvent( TQMouseEvent *e )
{
if( mValid == false || e->button() != LeftButton || mUrl.isEmpty() == true )
{
@@ -54,7 +54,7 @@ void CDragLabel::mousePressEvent( QMouseEvent *e )
}
-void CDragLabel::mouseMoveEvent( QMouseEvent *e )
+void CDragLabel::mouseMoveEvent( TQMouseEvent *e )
{
if( mDragPending == true )
{
@@ -78,19 +78,19 @@ void CDragLabel::mouseMoveEvent( QMouseEvent *e )
}
}
-void CDragLabel::mouseReleaseEvent( QMouseEvent * )
+void CDragLabel::mouseReleaseEvent( TQMouseEvent * )
{
mDragPending = false;
}
-void CDragLabel::setUrl( const QString &url )
+void CDragLabel::setUrl( const TQString &url )
{
mUrl = url;
}
-void CDragLabel::setDragMask( const QPixmap pix )
+void CDragLabel::setDragMask( const TQPixmap pix )
{
mDragMask = pix;
}
@@ -103,7 +103,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
return;
}
- QString text;
+ TQString text;
int index = mUrl.findRev( '/', mUrl.length() );
if( index < 0 )
{
@@ -115,16 +115,16 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
}
int sep = 2;
- QRect rect = fontMetrics().boundingRect(text);
+ TQRect rect = fontMetrics().boundingRect(text);
int w = pixmap()->width() + rect.width() + sep + 2;
int h = fontMetrics().lineSpacing();
if( pixmap()->height() > h ) { h = pixmap()->height(); }
- QBitmap mask( w, h, TRUE );
- QPixmap dragPixmap( w, h );
+ TQBitmap mask( w, h, TRUE );
+ TQPixmap dragPixmap( w, h );
dragPixmap.fill( black );
- QPainter p;
+ TQPainter p;
p.begin( &mask );
p.setPen( white );
p.drawPixmap( 0, 0, mDragMask );
@@ -138,7 +138,7 @@ void CDragLabel::prepPixmap( KURLDrag &uriDrag )
dragPixmap.setMask( mask );
- QPoint hotspot( pixmap()->width(), pixmap()->height()/2 );
+ TQPoint hotspot( pixmap()->width(), pixmap()->height()/2 );
uriDrag.setPixmap( dragPixmap, hotspot );
}