diff options
Diffstat (limited to 'ksvg/plugin')
-rw-r--r-- | ksvg/plugin/backends/agg/AggCanvasFactory.h | 2 | ||||
-rw-r--r-- | ksvg/plugin/backends/libart/LibartCanvasFactory.h | 2 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_factory.cpp | 4 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_factory.h | 4 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_plugin.cpp | 56 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_plugin.h | 2 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_widget.cpp | 12 | ||||
-rw-r--r-- | ksvg/plugin/ksvg_widget.h | 2 | ||||
-rw-r--r-- | ksvg/plugin/svgcreator.cpp | 6 | ||||
-rw-r--r-- | ksvg/plugin/svgcreator.h | 2 |
10 files changed, 46 insertions, 46 deletions
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.h b/ksvg/plugin/backends/agg/AggCanvasFactory.h index e0785460..185c7a98 100644 --- a/ksvg/plugin/backends/agg/AggCanvasFactory.h +++ b/ksvg/plugin/backends/agg/AggCanvasFactory.h @@ -35,7 +35,7 @@ public: AggCanvasFactory(); virtual ~AggCanvasFactory(); - virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); + virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList()); }; }; diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.h b/ksvg/plugin/backends/libart/LibartCanvasFactory.h index 6afd958d..f13d43c1 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasFactory.h +++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.h @@ -35,7 +35,7 @@ public: LibartCanvasFactory(); virtual ~LibartCanvasFactory(); - virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); + virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList()); }; } diff --git a/ksvg/plugin/ksvg_factory.cpp b/ksvg/plugin/ksvg_factory.cpp index b856da64..43cd12bf 100644 --- a/ksvg/plugin/ksvg_factory.cpp +++ b/ksvg/plugin/ksvg_factory.cpp @@ -19,10 +19,10 @@ */ #include <tdeaboutdata.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdelocale.h> #include <tdeglobal.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include "ksvg_plugin.h" #include "ksvg_factory.moc" diff --git a/ksvg/plugin/ksvg_factory.h b/ksvg/plugin/ksvg_factory.h index 0141915e..3c19ca70 100644 --- a/ksvg/plugin/ksvg_factory.h +++ b/ksvg/plugin/ksvg_factory.h @@ -29,7 +29,7 @@ class TDEInstance; class KSVGPluginFactory : public KParts::Factory { -Q_OBJECT +TQ_OBJECT public: KSVGPluginFactory(TQObject *parent = 0, const char *name = 0); @@ -46,7 +46,7 @@ private: class KSVGPluginBrowserExtension : public KParts::BrowserExtension { -Q_OBJECT +TQ_OBJECT friend class KSVGPlugin; diff --git a/ksvg/plugin/ksvg_plugin.cpp b/ksvg/plugin/ksvg_plugin.cpp index 48cf6d56..94414715 100644 --- a/ksvg/plugin/ksvg_plugin.cpp +++ b/ksvg/plugin/ksvg_plugin.cpp @@ -24,7 +24,7 @@ #include <tdefiledialog.h> #include <tdelocale.h> #include <tdetempfile.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tdeaboutapplication.h> #include "ksvg_widget.h" @@ -96,7 +96,7 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const ksvgd->doc = 0; ksvgd->window = new KSVGWidget(this, wparent, "Rendering Widget"); - connect(ksvgd->window, TQT_SIGNAL(browseURL(const TQString &)), this, TQT_SLOT(browseURL(const TQString &))); + connect(ksvgd->window, TQ_SIGNAL(browseURL(const TQString &)), this, TQ_SLOT(browseURL(const TQString &))); ksvgd->window->show(); KParts::Part::setWidget(ksvgd->window); @@ -110,26 +110,26 @@ KSVGPlugin::KSVGPlugin(TQWidget *wparent, const char *, TQObject *parent, const if(!ksvgd->canvas) return; - ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); - - ksvgd->zoomInAction = KStdAction::zoomIn(this, TQT_SLOT(slotZoomIn()), actionCollection()); - ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQT_SLOT(slotZoomOut()), actionCollection()); - ksvgd->zoomResetAction = new TDEAction(i18n("Zoom &Reset"), "viewmag", this, TQT_SLOT(slotZoomReset()), actionCollection(), "zoom_reset"); - ksvgd->stopAnimationsAction = new TDEAction(i18n("&Stop Animations"), "process-stop", Key_Escape, this, TQT_SLOT(slotStop()), actionCollection(), "stop_anims"); - ksvgd->viewSourceAction = new TDEAction(i18n("View &Source"), "text-x-generic-template", Key_F6, this, TQT_SLOT(slotViewSource()), actionCollection(), "view_source"); - ksvgd->viewMemoryAction = new TDEAction(i18n("View &Memory"), "text-x-generic-template", Key_F7, this, TQT_SLOT(slotViewMemory()), actionCollection(), "view_memory"); - ksvgd->saveToPNG = new TDEAction(i18n("Save to PNG..."), "save", 0, this, TQT_SLOT(slotSaveToPNG()), actionCollection(), "save_to_png"); -// ksvgd->aboutApp = KStdAction::aboutApp(this, TQT_SLOT(slotAboutKSVG()), actionCollection());//, "KSVG"); - ksvgd->aboutApp = new TDEAction(i18n("About KSVG"), "image-svg+xml", 0, this, TQT_SLOT(slotAboutKSVG()), actionCollection(), "help_about_app"); - ksvgd->fontKerningAction = new TDEToggleAction(i18n("Use Font &Kerning"), "zoom-fit-best", Key_F8, this, TQT_SLOT(slotFontKerning()), actionCollection(), "font_kerning"); - ksvgd->progressiveAction = new TDEToggleAction(i18n("Use &Progressive Rendering"), "", Key_F9, this, TQT_SLOT(slotProgressiveRendering()), actionCollection(), "progressive"); - - KSimpleConfig config("ksvgpluginrc", true); + ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window); + + ksvgd->zoomInAction = KStdAction::zoomIn(this, TQ_SLOT(slotZoomIn()), actionCollection()); + ksvgd->zoomOutAction = KStdAction::zoomOut(this, TQ_SLOT(slotZoomOut()), actionCollection()); + ksvgd->zoomResetAction = new TDEAction(i18n("Zoom &Reset"), "viewmag", this, TQ_SLOT(slotZoomReset()), actionCollection(), "zoom_reset"); + ksvgd->stopAnimationsAction = new TDEAction(i18n("&Stop Animations"), "process-stop", Key_Escape, this, TQ_SLOT(slotStop()), actionCollection(), "stop_anims"); + ksvgd->viewSourceAction = new TDEAction(i18n("View &Source"), "text-x-generic-template", Key_F6, this, TQ_SLOT(slotViewSource()), actionCollection(), "view_source"); + ksvgd->viewMemoryAction = new TDEAction(i18n("View &Memory"), "text-x-generic-template", Key_F7, this, TQ_SLOT(slotViewMemory()), actionCollection(), "view_memory"); + ksvgd->saveToPNG = new TDEAction(i18n("Save to PNG..."), "save", 0, this, TQ_SLOT(slotSaveToPNG()), actionCollection(), "save_to_png"); +// ksvgd->aboutApp = KStdAction::aboutApp(this, TQ_SLOT(slotAboutKSVG()), actionCollection());//, "KSVG"); + ksvgd->aboutApp = new TDEAction(i18n("About KSVG"), "image-svg+xml", 0, this, TQ_SLOT(slotAboutKSVG()), actionCollection(), "help_about_app"); + ksvgd->fontKerningAction = new TDEToggleAction(i18n("Use Font &Kerning"), "zoom-fit-best", Key_F8, this, TQ_SLOT(slotFontKerning()), actionCollection(), "font_kerning"); + ksvgd->progressiveAction = new TDEToggleAction(i18n("Use &Progressive Rendering"), "", Key_F9, this, TQ_SLOT(slotProgressiveRendering()), actionCollection(), "progressive"); + + TDESimpleConfig config("ksvgpluginrc", true); config.setGroup("Rendering"); ksvgd->fontKerningAction->setChecked(config.readBoolEntry("FontKerning", true)); ksvgd->progressiveAction->setChecked(config.readBoolEntry("ProgressiveRendering", true)); - ksvgd->renderingBackendAction = new TDESelectAction(i18n("Rendering &Backend"), 0, this, TQT_SLOT(slotRenderingBackend()), actionCollection(), "rendering_backend"); + ksvgd->renderingBackendAction = new TDESelectAction(i18n("Rendering &Backend"), 0, this, TQ_SLOT(slotRenderingBackend()), actionCollection(), "rendering_backend"); TQStringList items; TQPtrList<KSVG::CanvasInfo> canvasList = KSVG::CanvasFactory::self()->canvasList(); @@ -204,12 +204,12 @@ bool KSVGPlugin::openURL(const KURL &url) ksvgd->doc->addToDocumentDict(ksvgd->doc->handle(), ksvgd->doc); ksvgd->doc->setReferrer(ksvgd->extension->urlArgs().metaData()["referrer"]); - connect(ksvgd->doc, TQT_SIGNAL(finishedParsing(bool, const TQString &)), this, TQT_SLOT(slotParsingFinished(bool, const TQString &))); - connect(ksvgd->doc, TQT_SIGNAL(finishedRendering()), this, TQT_SLOT(slotRenderingFinished())); - connect(ksvgd->doc, TQT_SIGNAL(gotDescription(const TQString &)), this, TQT_SLOT(slotSetDescription(const TQString &))); - connect(ksvgd->doc, TQT_SIGNAL(gotTitle(const TQString &)), this, TQT_SLOT(slotSetTitle(const TQString &))); - connect(ksvgd->doc, TQT_SIGNAL(gotURL(const TQString &)), this, TQT_SLOT(slotGotURL(const TQString &))); - connect(ksvgd->window, TQT_SIGNAL(redraw(const TQRect &)), this, TQT_SLOT(slotRedraw(const TQRect &))); + connect(ksvgd->doc, TQ_SIGNAL(finishedParsing(bool, const TQString &)), this, TQ_SLOT(slotParsingFinished(bool, const TQString &))); + connect(ksvgd->doc, TQ_SIGNAL(finishedRendering()), this, TQ_SLOT(slotRenderingFinished())); + connect(ksvgd->doc, TQ_SIGNAL(gotDescription(const TQString &)), this, TQ_SLOT(slotSetDescription(const TQString &))); + connect(ksvgd->doc, TQ_SIGNAL(gotTitle(const TQString &)), this, TQ_SLOT(slotSetTitle(const TQString &))); + connect(ksvgd->doc, TQ_SIGNAL(gotURL(const TQString &)), this, TQ_SLOT(slotGotURL(const TQString &))); + connect(ksvgd->window, TQ_SIGNAL(redraw(const TQRect &)), this, TQ_SLOT(slotRedraw(const TQRect &))); ksvgd->backgroundPixmap->fill(); bitBlt(ksvgd->window, 0, 0, ksvgd->backgroundPixmap, 0, 0, ksvgd->backgroundPixmap->width(), ksvgd->backgroundPixmap->height()); @@ -266,7 +266,7 @@ void KSVGPlugin::slotViewMemory() void KSVGPlugin::slotFontKerning() { - KSimpleConfig config("ksvgpluginrc", false); + TDESimpleConfig config("ksvgpluginrc", false); config.setGroup("Rendering"); config.writeEntry("FontKerning", ksvgd->fontKerningAction->isChecked()); @@ -283,14 +283,14 @@ void KSVGPlugin::slotFontKerning() void KSVGPlugin::slotProgressiveRendering() { - KSimpleConfig config("ksvgpluginrc", false); + TDESimpleConfig config("ksvgpluginrc", false); config.setGroup("Rendering"); config.writeEntry("ProgressiveRendering", ksvgd->progressiveAction->isChecked()); } void KSVGPlugin::slotRenderingBackend() { - KSimpleConfig config("ksvgpluginrc", false); + TDESimpleConfig config("ksvgpluginrc", false); config.setGroup("Canvas"); config.writeEntry("ActiveCanvas", KSVG::CanvasFactory::self()->internalNameFor(ksvgd->renderingBackendAction->currentText())); config.sync(); @@ -299,7 +299,7 @@ void KSVGPlugin::slotRenderingBackend() if(!ksvgd->canvas) return; - ksvgd->canvas->setup(TQT_TQPAINTDEVICE(ksvgd->backgroundPixmap), TQT_TQPAINTDEVICE(ksvgd->window)); + ksvgd->canvas->setup(ksvgd->backgroundPixmap, ksvgd->window); openURL(m_url); } diff --git a/ksvg/plugin/ksvg_plugin.h b/ksvg/plugin/ksvg_plugin.h index 7097f728..de35bd62 100644 --- a/ksvg/plugin/ksvg_plugin.h +++ b/ksvg/plugin/ksvg_plugin.h @@ -34,7 +34,7 @@ namespace KSVG class KSVGPlugin : public KParts::ReadOnlyPart { -Q_OBJECT +TQ_OBJECT public: KSVGPlugin(TQWidget *parentWidget, const char *wname, TQObject *parent, const char *name, unsigned int width = 0, unsigned int height = 0); diff --git a/ksvg/plugin/ksvg_widget.cpp b/ksvg/plugin/ksvg_widget.cpp index 2e65f012..be8d0559 100644 --- a/ksvg/plugin/ksvg_widget.cpp +++ b/ksvg/plugin/ksvg_widget.cpp @@ -31,7 +31,7 @@ KSVGWidget::KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name) : TQWidget(parent, name), m_part(part) { setMouseTracking(true); - setFocusPolicy(TQ_WheelFocus); + setFocusPolicy(TQWidget::WheelFocus); setBackgroundMode(NoBackground); @@ -74,11 +74,11 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T } int button = 0; - if(event->stateAfter() & Qt::LeftButton) + if(event->stateAfter() & TQt::LeftButton) button = 1; - else if(event->stateAfter() & Qt::MidButton) + else if(event->stateAfter() & TQt::MidButton) button = 2; - else if(event->stateAfter() & Qt::RightButton) + else if(event->stateAfter() & TQt::RightButton) button = 3; KSVG::SVGMouseEventImpl *mev = new KSVG::SVGMouseEventImpl(id, // type @@ -104,7 +104,7 @@ KSVG::SVGMouseEventImpl *KSVGWidget::newMouseEvent(KSVG::SVGEvent::EventId id, T void KSVGWidget::mouseMoveEvent(TQMouseEvent *event) { - if(event->state() & TQt::ControlButton && event->state() & Qt::LeftButton) + if(event->state() & TQt::ControlButton && event->state() & TQt::LeftButton) { if(m_panningPos.isNull()) m_panningPos = event->pos(); @@ -186,7 +186,7 @@ void KSVGWidget::mousePressEvent(TQMouseEvent *event) if(event->state() & TQt::ControlButton) return; - if(event->button() == Qt::RightButton) + if(event->button() == TQt::RightButton) { if(part() && part()->factory()) { diff --git a/ksvg/plugin/ksvg_widget.h b/ksvg/plugin/ksvg_widget.h index eadc57a7..e2c194b3 100644 --- a/ksvg/plugin/ksvg_widget.h +++ b/ksvg/plugin/ksvg_widget.h @@ -30,7 +30,7 @@ class KSVGPlugin; class KSVGWidget : public TQWidget { -Q_OBJECT +TQ_OBJECT public: KSVGWidget(KSVGPlugin *part, TQWidget *parent, const char *name); diff --git a/ksvg/plugin/svgcreator.cpp b/ksvg/plugin/svgcreator.cpp index 60328855..a3c5d825 100644 --- a/ksvg/plugin/svgcreator.cpp +++ b/ksvg/plugin/svgcreator.cpp @@ -59,16 +59,16 @@ bool SVGCreator::create(const TQString &path, int width, int height, TQImage &im pix.fill(TQt::white); KSVG::KSVGCanvas *c = KSVG::CanvasFactory::self()->loadCanvas(width, height); - c->setup(TQT_TQPAINTDEVICE(&pix), TQT_TQPAINTDEVICE(&pix)); + c->setup(&pix, &pix); doc->attach(c); - connect(doc, TQT_SIGNAL(finishedRendering()), TQT_SLOT(slotFinished())); + connect(doc, TQ_SIGNAL(finishedRendering()), TQ_SLOT(slotFinished())); doc->open( KURL::fromPathOrURL(path)); m_finished = false; while(!m_finished) { - kapp->processOneEvent(); + tdeApp->processOneEvent(); } doc->deref(); diff --git a/ksvg/plugin/svgcreator.h b/ksvg/plugin/svgcreator.h index f788895b..faf5b308 100644 --- a/ksvg/plugin/svgcreator.h +++ b/ksvg/plugin/svgcreator.h @@ -26,7 +26,7 @@ class SVGCreator : public TQObject, public ThumbCreator { - Q_OBJECT + TQ_OBJECT public: SVGCreator(); |