summaryrefslogtreecommitdiffstats
path: root/src/eventinfo.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/eventinfo.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/eventinfo.cpp')
-rw-r--r--src/eventinfo.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/eventinfo.cpp b/src/eventinfo.cpp
index f6c0746..3a63c30 100644
--- a/src/eventinfo.cpp
+++ b/src/eventinfo.cpp
@@ -19,21 +19,21 @@ EventInfo::EventInfo()
}
-EventInfo::EventInfo( ItemView *itemView, QEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQEvent *e )
{
Q_UNUSED(itemView);
Q_UNUSED(e);
reset();
}
-EventInfo::EventInfo( ItemView *itemView, QMouseEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQMouseEvent *e )
{
pos = e->pos()/itemView->zoomLevel();
globalPos = e->globalPos();
isRightClick = e->button() == Qt::RightButton;
- ctrlPressed = e->state() & QMouseEvent::ControlButton;
- shiftPressed = e->state() & QMouseEvent::ShiftButton;
- altPressed = e->state() & QMouseEvent::AltButton;
+ ctrlPressed = e->state() & TQt::ControlButton;
+ shiftPressed = e->state() & TQt::ShiftButton;
+ altPressed = e->state() & TQt::AltButton;
if ( ItemDocument * id = dynamic_cast<ItemDocument*>(itemView->document()) )
qcanvasItemClickedOn = id->itemAtTop(pos);
itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None;
@@ -42,14 +42,14 @@ EventInfo::EventInfo( ItemView *itemView, QMouseEvent *e )
}
-EventInfo::EventInfo( ItemView *itemView, QWheelEvent *e )
+EventInfo::EventInfo( ItemView *itemView, TQWheelEvent *e )
{
pos = e->pos()/itemView->zoomLevel();
globalPos = e->globalPos();
isRightClick = false;
- ctrlPressed = e->state() & QMouseEvent::ControlButton;
- shiftPressed = e->state() & QMouseEvent::ShiftButton;
- altPressed = e->state() & QMouseEvent::AltButton;
+ ctrlPressed = e->state() & TQt::ControlButton;
+ shiftPressed = e->state() & TQt::ShiftButton;
+ altPressed = e->state() & TQt::AltButton;
if ( ItemDocument * id = dynamic_cast<ItemDocument*>(itemView->document()) )
qcanvasItemClickedOn = id->itemAtTop(pos);
itemRtti = qcanvasItemClickedOn ? qcanvasItemClickedOn->rtti() : ItemDocument::RTTI::None;
@@ -73,60 +73,60 @@ void EventInfo::reset()
}
-QMouseEvent *EventInfo::mousePressEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mousePressEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonPress,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonPress,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseReleaseEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseReleaseEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonRelease,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonRelease,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseDoubleClickEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseDoubleClickEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseButtonDblClick,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseButtonDblClick,
+ pos + TQPoint( dx, dy ),
(isRightClick ? Qt::RightButton : Qt::LeftButton),
(isRightClick ? Qt::RightButton : Qt::LeftButton) |
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QMouseEvent *EventInfo::mouseMoveEvent( int dx, int dy ) const
+TQMouseEvent *EventInfo::mouseMoveEvent( int dx, int dy ) const
{
- return new QMouseEvent( QEvent::MouseMove,
- pos + QPoint( dx, dy ),
+ return new TQMouseEvent( TQEvent::MouseMove,
+ pos + TQPoint( dx, dy ),
Qt::NoButton,
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ) );
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ) );
}
-QWheelEvent *EventInfo::wheelEvent( int dx, int dy ) const
+TQWheelEvent *EventInfo::wheelEvent( int dx, int dy ) const
{
- return new QWheelEvent( pos + QPoint( dx, dy ),
+ return new TQWheelEvent( pos + TQPoint( dx, dy ),
scrollDelta,
- (ctrlPressed ? Qt::ControlButton : 0 ) |
- (shiftPressed ? Qt::ShiftButton : 0 ) |
- (altPressed ? Qt::AltButton : 0 ),
+ (ctrlPressed ? TQt::ControlButton : 0 ) |
+ (shiftPressed ? TQt::ShiftButton : 0 ) |
+ (altPressed ? TQt::AltButton : 0 ),
scrollOrientation );
}