diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /ksvg/plugin/ksvg_widget.cpp | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/plugin/ksvg_widget.cpp')
-rw-r--r-- | ksvg/plugin/ksvg_widget.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ksvg/plugin/ksvg_widget.cpp b/ksvg/plugin/ksvg_widget.cpp index 0f1b9d3e..8cfb4baa 100644 --- a/ksvg/plugin/ksvg_widget.cpp +++ b/ksvg/plugin/ksvg_widget.cpp @@ -27,11 +27,11 @@ #include "SVGDocumentImpl.h" #include "SVGSVGElementImpl.h" -KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name) -: TQWidget(parent, name), m_part(part) +KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *tqparent, const char *name) +: TQWidget(tqparent, name), m_part(part) { setMouseTracking(true); - setFocusPolicy(WheelFocus); + setFocusPolicy(TQ_WheelFocus); setBackgroundMode(NoBackground); @@ -90,10 +90,10 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T event->globalY(), // screenYArg, clientX, // clientXArg clientY, // clientYArg - (event->state() & Qt::ControlButton), // ctrlKeyArg - (event->state() & Qt::AltButton), // altKeyArg - (event->state() & Qt::ShiftButton), // shiftKeyArg - (event->state() & Qt::MetaButton), // metaKeyArg + (event->state() & TQt::ControlButton), // ctrlKeyArg + (event->state() & TQt::AltButton), // altKeyArg + (event->state() & TQt::ShiftButton), // shiftKeyArg + (event->state() & TQt::MetaButton), // metaKeyArg button, // buttonArg 0); @@ -104,7 +104,7 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) { - if(event->state() & TQMouseEvent::ControlButton && event->state() & TQMouseEvent::LeftButton) + if(event->state() & TQt::ControlButton && event->state() & Qt::LeftButton) { if(m_panningPos.isNull()) m_panningPos = event->pos(); @@ -113,7 +113,7 @@ void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) return; } - else if(event->state() & TQMouseEvent::ControlButton) + else if(event->state() & TQt::ControlButton) return; KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEMOVE_EVENT, event); @@ -183,10 +183,10 @@ void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) void KSVGWidget::mousePressEvent(TQMouseEvent *event) { - if(event->state() & TQMouseEvent::ControlButton) + if(event->state() & TQt::ControlButton) return; - if(event->button() == RightButton) + if(event->button() == Qt::RightButton) { if(part() && part()->factory()) { @@ -213,7 +213,7 @@ void KSVGWidget::mouseReleaseEvent(TQMouseEvent *event) m_panningPos.setY(0); } - if(event->state() & TQMouseEvent::ControlButton) + if(event->state() & TQt::ControlButton) return; KSVG::SVGMouseEventImpl *mev = newMouseEvent(KSVG::SVGEvent::MOUSEUP_EVENT, event); @@ -234,7 +234,7 @@ void KSVGWidget::mouseReleaseEvent(TQMouseEvent *event) void KSVGWidget::keyPressEvent(TQKeyEvent *ke) { - if(ke->stateAfter() & TQMouseEvent::ControlButton) + if(ke->stateAfter() & TQt::ControlButton) { setCursor(KCursor::sizeAllCursor()); return; @@ -246,7 +246,7 @@ void KSVGWidget::keyPressEvent(TQKeyEvent *ke) void KSVGWidget::keyReleaseEvent(TQKeyEvent *ke) { - if(ke->state() & TQMouseEvent::ControlButton) + if(ke->state() & TQt::ControlButton) { setCursor(KCursor::arrowCursor()); return; |