From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- plugins/scan/scan.cpp | 16 ++++++++-------- plugins/scan/scan.h | 7 ++++--- 2 files changed, 12 insertions(+), 11 deletions(-) (limited to 'plugins/scan') diff --git a/plugins/scan/scan.cpp b/plugins/scan/scan.cpp index 5929f3bd..a6d64634 100644 --- a/plugins/scan/scan.cpp +++ b/plugins/scan/scan.cpp @@ -33,12 +33,12 @@ typedef KGenericFactory ScanFactory; K_EXPORT_COMPONENT_FACTORY( kofficescan, ScanFactory( "kscan_plugin" ) ) -Scan::Scan(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name), scanDialog( 0 ) +Scan::Scan(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name), scanDialog( 0 ) { setInstance(ScanFactory::instance()); - (void) new KAction(i18n("&Scan Image..."), SmallIcon("scanner"), 0, this, SLOT(slotScan()), actionCollection(), "scan_image"); + (void) new KAction(i18n("&Scan Image..."), SmallIcon("scanner"), 0, this, TQT_SLOT(slotScan()), actionCollection(), "scan_image"); } Scan::~Scan() @@ -50,13 +50,13 @@ void Scan::slotScan() { if ( !scanDialog ) { - scanDialog = KScanDialog::getScanDialog( dynamic_cast( parent() ) ); + scanDialog = KScanDialog::getScanDialog( dynamic_cast( tqparent() ) ); if ( scanDialog ) { scanDialog->setMinimumSize(300, 300); - connect(scanDialog, SIGNAL(finalImage(const QImage &, int)), - this, SLOT(slotShowImage(const QImage &))); + connect(scanDialog, TQT_SIGNAL(finalImage(const TQImage &, int)), + this, TQT_SLOT(slotShowImage(const TQImage &))); } else { @@ -71,12 +71,12 @@ void Scan::slotScan() scanDialog->show(); } -void Scan::slotShowImage(const QImage &img) +void Scan::slotShowImage(const TQImage &img) { KTempFile temp(locateLocal("tmp", "scandialog"), ".png"); img.save(temp.name(), "PNG"); - KoView *view = dynamic_cast(parent()); + KoView *view = dynamic_cast(tqparent()); if(!view) return; diff --git a/plugins/scan/scan.h b/plugins/scan/scan.h index ffb9792c..34cebdc3 100644 --- a/plugins/scan/scan.h +++ b/plugins/scan/scan.h @@ -21,20 +21,21 @@ #define SCAN_H #include -#include +#include class KScanDialog; class Scan : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - Scan(QObject *parent, const char *name, const QStringList &); + Scan(TQObject *tqparent, const char *name, const TQStringList &); virtual ~Scan(); private slots: void slotScan(); - void slotShowImage(const QImage &img); + void slotShowImage(const TQImage &img); private: KScanDialog *scanDialog; -- cgit v1.2.1