summaryrefslogtreecommitdiffstats
path: root/quanta/parts/preview
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/parts/preview
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/preview')
-rw-r--r--quanta/parts/preview/whtmlpart.cpp28
-rw-r--r--quanta/parts/preview/whtmlpart.h11
2 files changed, 20 insertions, 19 deletions
diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp
index 47c1ca70..068bc9d3 100644
--- a/quanta/parts/preview/whtmlpart.cpp
+++ b/quanta/parts/preview/whtmlpart.cpp
@@ -33,11 +33,11 @@
#include "whtmlpart.h"
#include "resource.h"
-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)
+WHTMLPart::WHTMLPart(TQWidget *tqparentWidget, const char *widgetName, bool enableViewSource,
+ TQObject *tqparent, const char *name, GUIProfile prof)
+ : KHTMLPart(tqparentWidget, widgetName, tqparent, name, prof), m_contextMenu(0)
{
- //kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl;
+ //kdDebug(24000) << "WHTMLPart: " << tqparentWidget << " " << widgetName << " " << tqparent << " " << name << this << endl;
hpos = 0;
// get settings from konq.
KConfig konqConfig("konquerorrc");
@@ -52,7 +52,7 @@ WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enable
m_enableViewSource = enableViewSource;
if (m_enableViewSource)
{
- m_contextMenu = new KPopupMenu(parentWidget);
+ m_contextMenu = new KPopupMenu(tqparentWidget);
m_contextMenu->insertItem(i18n("View &Document Source"), this, TQT_SLOT(slotViewSource()));
connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)), TQT_SLOT(popupMenu(const TQString&, const TQPoint&)));
@@ -103,7 +103,7 @@ void WHTMLPart::forward()
hpos++;
openURL( KURL( history.at(hpos) ) );
- emit updateStatus( backEnable() , forwardEnable() );
+ emit updatetqStatus( backEnable() , forwardEnable() );
}
}
@@ -115,7 +115,7 @@ void WHTMLPart::back()
hpos--;
openURL(KURL(history.at(hpos)));
- emit updateStatus(backEnable(), forwardEnable());
+ emit updatetqStatus(backEnable(), forwardEnable());
}
}
@@ -133,7 +133,7 @@ void WHTMLPart::addToHistory(const TQString &url)
hpos = history.count()-1;
- emit updateStatus( backEnable() , forwardEnable() );
+ emit updatetqStatus( backEnable() , forwardEnable() );
}
@@ -149,21 +149,21 @@ bool WHTMLPart::forwardEnable()
return hpos < history.count()-1;
}
-KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * parentWidget, const char *widgetName,
- TQObject *parent, const char *name,
+KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * tqparentWidget, const char *widgetName,
+ TQObject *tqparent, 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);
+ //kdDebug(24000) << "Create WHTMLPart: " << tqparentWidget << " " << widgetName << " " << tqparent << " " << name << endl;
+ return new WHTMLPart(tqparentWidget, widgetName, m_enableViewSource, tqparent, name);
}
bool WHTMLPart::eventFilter(TQObject *watched, TQEvent *e)
{
- if (watched == view() && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
+ if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(view()) && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
emit previewHasFocus(false);
else
- if (watched == view() && e->type() == TQEvent::FocusIn)
+ if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(view()) && e->type() == TQEvent::FocusIn)
emit previewHasFocus(true);
return false;
}
diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h
index 63be955b..4133b045 100644
--- a/quanta/parts/preview/whtmlpart.h
+++ b/quanta/parts/preview/whtmlpart.h
@@ -29,9 +29,10 @@ class KPopupMenu;
class WHTMLPart : public KHTMLPart {
Q_OBJECT
+ TQ_OBJECT
public:
- WHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
- TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ WHTMLPart(TQWidget *tqparentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
+ TQObject *tqparent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
virtual ~WHTMLPart();
/** Specify the URL where the preview was started */
@@ -53,15 +54,15 @@ public slots:
virtual bool eventFilter(TQObject *watched, TQEvent *e);
signals:
- void updateStatus( bool back, bool forward );
+ void updatetqStatus( bool back, bool forward );
void previewHasFocus(bool focus);
void showPreview(bool show);
void openFile(const KURL&, const TQString&, bool);
protected:
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,
+ virtual KParts::ReadOnlyPart *createPart( TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name,
const TQString &mimetype, TQString &serviceName,
TQStringList &serviceTypes, const TQStringList &params);