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/test/external | |
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/test/external')
-rw-r--r-- | ksvg/test/external/SVGTestWidget.cc | 20 | ||||
-rw-r--r-- | ksvg/test/external/SVGTestWidget.h | 3 | ||||
-rw-r--r-- | ksvg/test/external/printnodetest.h | 3 |
3 files changed, 14 insertions, 12 deletions
diff --git a/ksvg/test/external/SVGTestWidget.cc b/ksvg/test/external/SVGTestWidget.cc index aa968e24..ba17bc37 100644 --- a/ksvg/test/external/SVGTestWidget.cc +++ b/ksvg/test/external/SVGTestWidget.cc @@ -16,11 +16,11 @@ using namespace KSVG; SVGTestWidget::SVGTestWidget(const KURL &url) { - setBackgroundColor(Qt::white); + setBackgroundColor(TQt::white); setMouseTracking(true); - setFocusPolicy(WheelFocus); + setFocusPolicy(TQ_WheelFocus); - m_doc = DocumentFactory::self()->requestDocument(this, TQT_SLOT(slotRenderingFinished())); + m_doc = DocumentFactory::self()->requestDocument(TQT_TQOBJECT(this), TQT_SLOT(slotRenderingFinished())); if(!m_doc) return; @@ -29,7 +29,7 @@ SVGTestWidget::SVGTestWidget(const KURL &url) if(!m_canvas) return; - m_canvas->setup(this, this); + m_canvas->setup(TQT_TQPAINTDEVICE(this), TQT_TQPAINTDEVICE(this)); if(!DocumentFactory::self()->attachCanvas(m_canvas, m_doc)) return; @@ -104,10 +104,10 @@ KSVG::SVGMouseEventImpl *newMouseEvent(SVGDocument *doc, KSVG::SVGEventImpl::Eve 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); @@ -185,7 +185,7 @@ void SVGTestWidget::keyReleaseEvent(TQKeyEvent *event) } SVGSVGElementImpl *root = m_doc->rootElement(); if(!root) return; - if(event->key() == Qt::Key_Minus) + if(event->key() == TQt::Key_Minus) { erase(0, 0, m_canvas->width(), m_canvas->height()); float zoomFactor = root->currentScale() / 1.2; @@ -193,7 +193,7 @@ void SVGTestWidget::keyReleaseEvent(TQKeyEvent *event) m_doc->syncCachedMatrices(); m_canvas->update(zoomFactor); } - else if(event->key() == Qt::Key_Plus) + else if(event->key() == TQt::Key_Plus) { float zoomFactor = root->currentScale() * 1.2; root->setCurrentScale(zoomFactor); diff --git a/ksvg/test/external/SVGTestWidget.h b/ksvg/test/external/SVGTestWidget.h index 676f3269..d3ad6b77 100644 --- a/ksvg/test/external/SVGTestWidget.h +++ b/ksvg/test/external/SVGTestWidget.h @@ -6,9 +6,10 @@ #include "SVGDocument.h" #include "KSVGCanvas.h" -class SVGTestWidget : public QWidget +class SVGTestWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: SVGTestWidget(const KURL &url); ~SVGTestWidget(); diff --git a/ksvg/test/external/printnodetest.h b/ksvg/test/external/printnodetest.h index 19385014..ac1bdbf8 100644 --- a/ksvg/test/external/printnodetest.h +++ b/ksvg/test/external/printnodetest.h @@ -8,9 +8,10 @@ namespace KSVG { class SVGDocument; -class Worker : public QObject +class Worker : public TQObject { Q_OBJECT + TQ_OBJECT public: Worker(const KURL &url); ~Worker(); |