diff options
Diffstat (limited to 'quanta/parts/preview')
-rw-r--r-- | quanta/parts/preview/whtmlpart.cpp | 38 | ||||
-rw-r--r-- | quanta/parts/preview/whtmlpart.h | 26 |
2 files changed, 32 insertions, 32 deletions
diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp index b84ffe5c..1b34e123 100644 --- a/quanta/parts/preview/whtmlpart.cpp +++ b/quanta/parts/preview/whtmlpart.cpp @@ -16,8 +16,8 @@ ***************************************************************************/ //qt includes -#include <qfileinfo.h> -#include <qtextcodec.h> +#include <tqfileinfo.h> +#include <tqtextcodec.h> //kde includes #include <kconfig.h> @@ -33,8 +33,8 @@ #include "whtmlpart.h" #include "resource.h" -WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableViewSource, - QObject *parent, const char *name, GUIProfile prof) +WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource, + TQObject *parent, const char *name, GUIProfile prof) : KHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0) { //kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl; @@ -53,11 +53,11 @@ WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableV if (m_enableViewSource) { m_contextMenu = new KPopupMenu(parentWidget); - m_contextMenu->insertItem(i18n("View &Document Source"), this, SLOT(slotViewSource())); + m_contextMenu->insertItem(i18n("View &Document Source"), this, TQT_SLOT(slotViewSource())); - connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)), SLOT(popupMenu(const QString&, const QPoint&))); + connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)), TQT_SLOT(popupMenu(const TQString&, const TQPoint&))); } - connect(browserExtension(), SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, SLOT(openURL(const KURL&))); + connect(browserExtension(), TQT_SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, TQT_SLOT(openURL(const KURL&))); // setCharset( konqConfig.readEntry("DefaultEncoding") ); // setEncoding( konqConfig.readEntry("DefaultEncoding") ); @@ -86,7 +86,7 @@ bool WHTMLPart::openURL(const KURL& url) return KHTMLPart::openURL(url); } -void WHTMLPart::urlSelected ( const QString &url, int button, int state, const QString &target, KParts::URLArgs args) +void WHTMLPart::urlSelected ( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs args) { KHTMLPart::urlSelected (url, button, state, target, args); KURL cURL = completeURL( url ); @@ -120,7 +120,7 @@ void WHTMLPart::back() } -void WHTMLPart::addToHistory(const QString &url) +void WHTMLPart::addToHistory(const TQString &url) { if ( history.count() > 0 ) @@ -149,26 +149,26 @@ bool WHTMLPart::forwardEnable() return hpos < history.count()-1; } -KParts::ReadOnlyPart *WHTMLPart::createPart( QWidget * parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QString &, QString &, - QStringList &, const QStringList &) +KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQString &, TQString &, + TQStringList &, const TQStringList &) { //kdDebug(24000) << "Create WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << endl; return new WHTMLPart(parentWidget, widgetName, m_enableViewSource, parent, name); } -bool WHTMLPart::eventFilter(QObject *watched, QEvent *e) +bool WHTMLPart::eventFilter(TQObject *watched, TQEvent *e) { - if (watched == view() && e->type() == QEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus())) + if (watched == view() && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus())) emit previewHasFocus(false); else - if (watched == view() && e->type() == QEvent::FocusIn) + if (watched == view() && e->type() == TQEvent::FocusIn) emit previewHasFocus(true); return false; } -void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point) +void WHTMLPart::popupMenu(const TQString &/*url*/, const TQPoint &point) { m_contextMenu->popup(point); } @@ -176,9 +176,9 @@ void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point) void WHTMLPart::slotViewSource() { KTempFile *tmpFile = new KTempFile(tmpDir + "-preview-", ".html"); - QString tempFileName = QFileInfo(*(tmpFile->file())).filePath(); + TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath(); tmpFile->setAutoDelete(true); - tmpFile->textStream()->setCodec(QTextCodec::codecForName("utf8")); + tmpFile->textStream()->setCodec(TQTextCodec::codecForName("utf8")); *(tmpFile->textStream()) << documentSource(); tmpFile->close(); tempFileList.append(tmpFile); diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h index 1c0c83c0..63be955b 100644 --- a/quanta/parts/preview/whtmlpart.h +++ b/quanta/parts/preview/whtmlpart.h @@ -18,7 +18,7 @@ #ifndef WHTMLPART_H #define WHTMLPART_H -#include <qstrlist.h> +#include <tqstrlist.h> #include <khtml_part.h> @@ -30,8 +30,8 @@ class KPopupMenu; class WHTMLPart : public KHTMLPart { Q_OBJECT public: - WHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false, - QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); + WHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false, + TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI ); virtual ~WHTMLPart(); /** Specify the URL where the preview was started */ @@ -46,29 +46,29 @@ public slots: */ void forward(); void back(); - void popupMenu(const QString &url, const QPoint &point); + void popupMenu(const TQString &url, const TQPoint &point); void slotViewSource(); - void addToHistory(const QString &url); - virtual bool eventFilter(QObject *watched, QEvent *e); + void addToHistory(const TQString &url); + virtual bool eventFilter(TQObject *watched, TQEvent *e); signals: void updateStatus( bool back, bool forward ); void previewHasFocus(bool focus); void showPreview(bool show); - void openFile(const KURL&, const QString&, bool); + void openFile(const KURL&, const TQString&, bool); protected: - virtual void urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args = KParts::URLArgs()); - virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QString &mimetype, QString &serviceName, - QStringList &serviceTypes, const QStringList ¶ms); + virtual void urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args = KParts::URLArgs()); + virtual KParts::ReadOnlyPart *createPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQString &mimetype, TQString &serviceName, + TQStringList &serviceTypes, const TQStringList ¶ms); private: KURL m_previewedURL; KPopupMenu *m_contextMenu; - QStrList history; + TQStrList history; unsigned int hpos; bool m_enableViewSource; }; |