summaryrefslogtreecommitdiffstats
path: root/kget/droptarget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kget/droptarget.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kget/droptarget.cpp')
-rw-r--r--kget/droptarget.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kget/droptarget.cpp b/kget/droptarget.cpp
index 97bb01e2..eeea1486 100644
--- a/kget/droptarget.cpp
+++ b/kget/droptarget.cpp
@@ -24,7 +24,7 @@
*
***************************************************************************/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kaction.h>
#include <kapplication.h>
@@ -38,7 +38,7 @@
#include <kurldrag.h>
#include "kmainwidget.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -50,13 +50,13 @@
#include "settings.h"
#include "droptarget.h"
-DropTarget::DropTarget(KMainWindow * mainWin):QWidget()
+DropTarget::DropTarget(KMainWindow * mainWin):TQWidget()
{
int x = ksettings.dropPosition.x();
int y = ksettings.dropPosition.y();
- QRect desk = KGlobalSettings::desktopGeometry(this);
- QPixmap bgnd = UserIcon( "target" );
+ TQRect desk = KGlobalSettings::desktopGeometry(this);
+ TQPixmap bgnd = UserIcon( "target" );
if (x != -1 &&
x >= desk.left() && y >= desk.top() &&
@@ -89,10 +89,10 @@ DropTarget::DropTarget(KMainWindow * mainWin):QWidget()
popupMenu->insertTitle(kapp->caption());
popupMenu->setCheckable(true);
- pop_Max = popupMenu->insertItem(i18n("Maximize"), this, SLOT(toggleMinimizeRestore()));
- pop_Min = popupMenu->insertItem(i18n("Minimize"), this, SLOT(toggleMinimizeRestore()));
+ pop_Max = popupMenu->insertItem(i18n("Maximize"), this, TQT_SLOT(toggleMinimizeRestore()));
+ pop_Min = popupMenu->insertItem(i18n("Minimize"), this, TQT_SLOT(toggleMinimizeRestore()));
- pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, SLOT(toggleSticky()));
+ pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, TQT_SLOT(toggleSticky()));
popupMenu->insertSeparator();
mainWin->action("drop_target")->plug(popupMenu);
popupMenu->insertSeparator();
@@ -116,7 +116,7 @@ DropTarget::~DropTarget()
void
-DropTarget::mousePressEvent(QMouseEvent * e)
+DropTarget::mousePressEvent(TQMouseEvent * e)
{
if (e->button() == LeftButton)
{
@@ -124,15 +124,15 @@ DropTarget::mousePressEvent(QMouseEvent * e)
// oldX = 0;
// oldY = 0;
isdragging = true;
- dx = QCursor::pos().x() - pos().x();
- dy = QCursor::pos().y() - pos().y();
+ dx = TQCursor::pos().x() - pos().x();
+ dy = TQCursor::pos().y() - pos().y();
}
else if (e->button() == RightButton)
{
popupMenu->setItemEnabled(pop_Min, kmain->isVisible());
popupMenu->setItemEnabled(pop_Max, kmain->isHidden());
- popupMenu->popup(QCursor::pos());
+ popupMenu->popup(TQCursor::pos());
}
else if (e->button() == MidButton)
{
@@ -141,7 +141,7 @@ DropTarget::mousePressEvent(QMouseEvent * e)
}
-void DropTarget::resizeEvent(QResizeEvent *)
+void DropTarget::resizeEvent(TQResizeEvent *)
{
#ifdef Q_WS_X11
XShapeCombineMask(x11Display(), winId(), ShapeBounding, 0, 0, mask.handle(), ShapeSet);
@@ -149,23 +149,23 @@ void DropTarget::resizeEvent(QResizeEvent *)
}
-void DropTarget::dragEnterEvent(QDragEnterEvent * event)
+void DropTarget::dragEnterEvent(TQDragEnterEvent * event)
{
event->accept(KURLDrag::canDecode(event)
- || QTextDrag::canDecode(event));
+ || TQTextDrag::canDecode(event));
}
-void DropTarget::dropEvent(QDropEvent * event)
+void DropTarget::dropEvent(TQDropEvent * event)
{
KURL::List list;
- QString str;
+ TQString str;
if (KURLDrag::decode(event, list))
{
kmain->addTransfers(list);
}
- else if (QTextDrag::decode(event, str))
+ else if (TQTextDrag::decode(event, str))
{
kmain->addTransfer(str);
}
@@ -200,7 +200,7 @@ void DropTarget::toggleMinimizeRestore()
}
/** No descriptions */
-void DropTarget::mouseMoveEvent(QMouseEvent * e)
+void DropTarget::mouseMoveEvent(TQMouseEvent * e)
{
/*
if (oldX == 0)
@@ -211,18 +211,18 @@ void DropTarget::mouseMoveEvent(QMouseEvent * e)
}
+*/
if (isdragging)
- move( QCursor::pos().x() - dx, QCursor::pos().y() - dy );
+ move( TQCursor::pos().x() - dx, TQCursor::pos().y() - dy );
// move(x() + (e->x() - oldX), y() + (e->y() - oldY)); // <<--
}
-void DropTarget::mouseReleaseEvent(QMouseEvent *)
+void DropTarget::mouseReleaseEvent(TQMouseEvent *)
{
isdragging = false;
}
/** No descriptions */
-void DropTarget::mouseDoubleClickEvent(QMouseEvent * e)
+void DropTarget::mouseDoubleClickEvent(TQMouseEvent * e)
{
if (e->button() == LeftButton)
toggleMinimizeRestore();