summaryrefslogtreecommitdiffstats
path: root/akregator/src/pageviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'akregator/src/pageviewer.cpp')
-rw-r--r--akregator/src/pageviewer.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/akregator/src/pageviewer.cpp b/akregator/src/pageviewer.cpp
index 1a10b495..9f1e5591 100644
--- a/akregator/src/pageviewer.cpp
+++ b/akregator/src/pageviewer.cpp
@@ -44,15 +44,15 @@
#include <kstdaccel.h>
#include <kparts/browserinterface.h>
-#include <qclipboard.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qmetaobject.h>
-#include <qscrollview.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqclipboard.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqmetaobject.h>
+#include <tqscrollview.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <private/qucomextra_p.h>
#include <cstdlib>
@@ -67,14 +67,14 @@ class PageViewer::HistoryEntry
public:
KURL url;
- QString title;
- QByteArray state;
+ TQString title;
+ TQByteArray state;
int id;
HistoryEntry() {}
- HistoryEntry(const KURL& u, const QString& t=QString::null): url(u), title(t)
+ HistoryEntry(const KURL& u, const TQString& t=TQString::null): url(u), title(t)
{
- id = abs( QTime::currentTime().msecsTo( QTime() ) ); // nasty, but should provide a reasonably unique number
+ id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number
}
};
@@ -83,19 +83,19 @@ class PageViewer::PageViewerPrivate
{
public:
- QValueList<HistoryEntry> history;
- QValueList<HistoryEntry>::Iterator current;
+ TQValueList<HistoryEntry> history;
+ TQValueList<HistoryEntry>::Iterator current;
KToolBarPopupAction* backAction;
KToolBarPopupAction* forwardAction;
KAction* reloadAction;
KAction* stopAction;
- QString caption;
+ TQString caption;
};
-PageViewer::PageViewer(QWidget *parent, const char *name)
+PageViewer::PageViewer(TQWidget *parent, const char *name)
: Viewer(parent, name), d(new PageViewerPrivate)
{
// this hack is necessary since the part looks for []HTML Settings] in
@@ -109,44 +109,44 @@ PageViewer::PageViewer(QWidget *parent, const char *name)
d->backAction = new KToolBarPopupAction(backForward.first,
KStdAccel::shortcut(KStdAccel::Back), this,
- SLOT(slotBack()), actionCollection(),
+ TQT_SLOT(slotBack()), actionCollection(),
"pageviewer_back");
- connect(d->backAction->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(slotBackAboutToShow()));
- connect(d->backAction->popupMenu(), SIGNAL(activated(int)),
- this, SLOT(slotPopupActivated(int)));
+ connect(d->backAction->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(slotBackAboutToShow()));
+ connect(d->backAction->popupMenu(), TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPopupActivated(int)));
d->forwardAction = new KToolBarPopupAction(backForward.second,
KStdAccel::shortcut(KStdAccel::Forward),this,
- SLOT(slotForward()), actionCollection(),
+ TQT_SLOT(slotForward()), actionCollection(),
"pageviewer_forward");
- connect(d->forwardAction->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(slotForwardAboutToShow()));
- connect(d->forwardAction->popupMenu(), SIGNAL(activated(int)),
- this, SLOT(slotPopupActivated(int)));
+ connect(d->forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(slotForwardAboutToShow()));
+ connect(d->forwardAction->popupMenu(), TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPopupActivated(int)));
d->reloadAction = new KAction(i18n("Reload"), "reload", 0,
- this, SLOT(slotReload()),
+ this, TQT_SLOT(slotReload()),
actionCollection(), "pageviewer_reload");
d->stopAction = new KAction(KStdGuiItem::guiItem(KStdGuiItem::Stop), 0,
- this, SLOT(slotStop()),
+ this, TQT_SLOT(slotStop()),
actionCollection(), "pageviewer_stop");
- //connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotPopupMenu(const QString &, const QPoint &)));
+ //connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotPopupMenu(const TQString &, const TQPoint &)));
d->backAction->setEnabled(false);
d->forwardAction->setEnabled(false);
d->stopAction->setEnabled(false);
- connect( this, SIGNAL(setWindowCaption (const QString &)),
- this, SLOT(slotSetCaption (const QString &)) );
+ connect( this, TQT_SIGNAL(setWindowCaption (const TQString &)),
+ this, TQT_SLOT(slotSetCaption (const TQString &)) );
- connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* )));
- connect(this, SIGNAL(completed()), this, SLOT(slotCompleted()));
- connect(this, SIGNAL(canceled(const QString &)), this, SLOT(slotCancelled(const QString &)));
+ connect(this, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(slotStarted(KIO::Job* )));
+ connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted()));
+ connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &)));
d->current = d->history.end();
@@ -166,7 +166,7 @@ void PageViewer::slotBack()
{
if ( d->current != d->history.begin() )
{
- QValueList<HistoryEntry>::Iterator tmp = d->current;
+ TQValueList<HistoryEntry>::Iterator tmp = d->current;
--tmp;
restoreHistoryEntry(tmp);
}
@@ -177,7 +177,7 @@ void PageViewer::slotForward()
{
if ( d->current != d->history.fromLast() && d->current != d->history.end() )
{
- QValueList<HistoryEntry>::Iterator tmp = d->current;
+ TQValueList<HistoryEntry>::Iterator tmp = d->current;
++tmp;
restoreHistoryEntry(tmp);
}
@@ -191,7 +191,7 @@ void PageViewer::slotBackAboutToShow()
if ( d->current == d->history.begin() )
return;
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
--it;
int i = 0;
@@ -217,7 +217,7 @@ void PageViewer::slotForwardAboutToShow()
if ( d->current == d->history.fromLast() )
return;
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
++it;
int i = 0;
@@ -258,9 +258,9 @@ bool PageViewer::openURL(const KURL& url)
d->backAction->setEnabled( d->current != d->history.begin() );
d->forwardAction->setEnabled( d->current != d->history.fromLast() );
- QString favicon = FeedIconManager::self()->iconLocation(url);
+ TQString favicon = FeedIconManager::self()->iconLocation(url);
if (!favicon.isEmpty())
- emit setTabIcon(QPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
+ emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
else
emit setTabIcon(SmallIcon("html"));
@@ -281,7 +281,7 @@ void PageViewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args
void PageViewer::slotPopupActivated( int id )
{
- QValueList<HistoryEntry>::Iterator it = d->history.begin();
+ TQValueList<HistoryEntry>::Iterator it = d->history.begin();
while( it != d->history.end() )
{
if ( (*it).id == id )
@@ -296,16 +296,16 @@ void PageViewer::slotPopupActivated( int id )
void PageViewer::updateHistoryEntry()
{
(*d->current).title = d->caption;
- (*d->current).state = QByteArray(); // Start with empty buffer.
- QDataStream stream( (*d->current).state, IO_WriteOnly);
+ (*d->current).state = TQByteArray(); // Start with empty buffer.
+ TQDataStream stream( (*d->current).state, IO_WriteOnly);
browserExtension()->saveState(stream);
}
-void PageViewer::restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& entry)
+void PageViewer::restoreHistoryEntry(const TQValueList<HistoryEntry>::Iterator& entry)
{
updateHistoryEntry();
- QDataStream stream( (*entry).state, IO_ReadOnly );
+ TQDataStream stream( (*entry).state, IO_ReadOnly );
browserExtension()->restoreState( stream );
d->current = entry;
d->backAction->setEnabled( d->current != d->history.begin() );
@@ -318,7 +318,7 @@ void PageViewer::restoreHistoryEntry(const QValueList<HistoryEntry>::Iterator& e
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
void PageViewer::addHistoryEntry(const KURL& url)
{
- QValueList<HistoryEntry>::Iterator it = d->current;
+ TQValueList<HistoryEntry>::Iterator it = d->current;
// if We're not already the last entry, we truncate the list here before adding an entry
if ( it != d->history.end() && it != d->history.fromLast() )
@@ -349,14 +349,14 @@ void PageViewer::slotCompleted( )
}
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
-void PageViewer::slotCancelled( const QString & /*errMsg*/ )
+void PageViewer::slotCancelled( const TQString & /*errMsg*/ )
{
d->stopAction->setEnabled(false);
}
-void PageViewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args)
+void PageViewer::urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args)
{
- if (url.startsWith(QString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) )
+ if (url.startsWith(TQString::fromLatin1( "javascript:" ), /*case-sensitive=*/false) )
{
KHTMLPart::urlSelected(url,button,state,_target,args);
}
@@ -375,7 +375,7 @@ void PageViewer::urlSelected(const QString &url, int button, int state, const QS
}
}
-void PageViewer::slotSetCaption(const QString& cap)
+void PageViewer::slotSetCaption(const TQString& cap)
{
d->caption = cap;
(*d->current).title = cap;
@@ -386,7 +386,7 @@ void PageViewer::slotPaletteOrFontChanged()
kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl;
// taken from KonqView (kdebase/konqueror/konq_view.cc)
- QObject *obj = KParts::BrowserExtension::childObject(this);
+ TQObject *obj = KParts::BrowserExtension::childObject(this);
if ( !obj ) // not all views have a browser extension !
return;
@@ -414,10 +414,10 @@ void PageViewer::slotGlobalBookmarkArticle()
}
-void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
+void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
{
m_url = kurl;
- QString url = kurl.url(); // maximal url confusion
+ TQString url = kurl.url(); // maximal url confusion
const bool showReload = (kpf & KParts::BrowserExtension::ShowReload) != 0;
const bool showNavigationItems = (kpf & KParts::BrowserExtension::ShowNavigationItems) != 0;
@@ -429,9 +429,9 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
int idNewWindow = -2;
if (isLink)
{
- idNewWindow = popup.insertItem(SmallIcon("tab_new"),i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab()));
+ idNewWindow = popup.insertItem(SmallIcon("tab_new"),i18n("Open Link in New &Tab"), this, TQT_SLOT(slotOpenLinkInForegroundTab()));
popup.setWhatsThis(idNewWindow, i18n("<b>Open Link in New Tab</b><p>Opens current link in a new tab."));
- popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
popup.insertSeparator();
action("savelinkas")->plug(&popup);
@@ -472,7 +472,7 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
popup.insertSeparator();
}
- popup.insertItem(SmallIcon("window_new"), i18n("Open Page in External Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Page in External Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
action("viewer_print")->plug(&popup);
popup.insertSeparator();
@@ -480,7 +480,7 @@ void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl
KAction *ac = action("setEncoding");
if (ac)
ac->plug(&popup);
- popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, SLOT(slotGlobalBookmarkArticle()));
+ popup.insertItem(SmallIcon("bookmark_add"),i18n("Add to Konqueror Bookmarks"), this, TQT_SLOT(slotGlobalBookmarkArticle()));
}
int r = popup.exec(p);