summaryrefslogtreecommitdiffstats
path: root/akregator/src/viewer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /akregator/src/viewer.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'akregator/src/viewer.cpp')
-rw-r--r--akregator/src/viewer.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/akregator/src/viewer.cpp b/akregator/src/viewer.cpp
index 6490fb82a..55e9b758e 100644
--- a/akregator/src/viewer.cpp
+++ b/akregator/src/viewer.cpp
@@ -37,9 +37,9 @@
#include <kurl.h>
#include <kparts/browserextension.h>
-#include <qaccel.h>
-#include <qclipboard.h>
-#include <qpaintdevicemetrics.h>
+#include <tqaccel.h>
+#include <tqclipboard.h>
+#include <tqpaintdevicemetrics.h>
#include "viewer.h"
#include "akregator_run.h"
@@ -47,7 +47,7 @@
namespace Akregator {
-Viewer::Viewer(QWidget *parent, const char *name)
+Viewer::Viewer(TQWidget *parent, const char *name)
: KHTMLPart(parent, name), m_url(0)
{
setZoomFactor(100);
@@ -57,28 +57,28 @@ Viewer::Viewer(QWidget *parent, const char *name)
setStatusMessagesEnabled(true);
// change the cursor when loading stuff...
- connect( this, SIGNAL(started(KIO::Job *)),
- this, SLOT(slotStarted(KIO::Job *)));
- connect( this, SIGNAL(completed()),
- this, SLOT(slotCompleted()));
+ connect( this, TQT_SIGNAL(started(KIO::Job *)),
+ this, TQT_SLOT(slotStarted(KIO::Job *)));
+ connect( this, TQT_SIGNAL(completed()),
+ this, TQT_SLOT(slotCompleted()));
- connect( browserExtension(), SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
+ connect( browserExtension(), TQT_SIGNAL(popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, TQT_SLOT(slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
- KStdAction::print(this, SLOT(slotPrint()), actionCollection(), "viewer_print");
- KStdAction::copy(this, SLOT(slotCopy()), actionCollection(), "viewer_copy");
+ KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection(), "viewer_print");
+ KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection(), "viewer_copy");
- new KAction( i18n("&Increase Font Sizes"), "viewmag+", "Ctrl+Plus", this, SLOT(slotZoomIn()), actionCollection(), "incFontSizes" );
- new KAction( i18n("&Decrease Font Sizes"), "viewmag-", "Ctrl+Minus", this, SLOT(slotZoomOut()), actionCollection(), "decFontSizes" );
+ new KAction( i18n("&Increase Font Sizes"), "viewmag+", "Ctrl+Plus", this, TQT_SLOT(slotZoomIn()), actionCollection(), "incFontSizes" );
+ new KAction( i18n("&Decrease Font Sizes"), "viewmag-", "Ctrl+Minus", this, TQT_SLOT(slotZoomOut()), actionCollection(), "decFontSizes" );
- connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
- connect( browserExtension(), SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)), this, SLOT(slotOpenURLRequest(const KURL&, const KParts::URLArgs& )) );
+ connect( browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL&, const KParts::URLArgs&)), this, TQT_SLOT(slotOpenURLRequest(const KURL&, const KParts::URLArgs& )) );
new KAction(i18n("Copy &Link Address"), "", 0,
- this, SLOT(slotCopyLinkAddress()),
+ this, TQT_SLOT(slotCopyLinkAddress()),
actionCollection(), "copylinkaddress");
new KAction(i18n("&Save Link As..."), "", 0,
- this, SLOT(slotSaveLinkAs()),
+ this, TQT_SLOT(slotSaveLinkAs()),
actionCollection(), "savelinkas");
}
@@ -88,17 +88,17 @@ Viewer::~Viewer()
bool Viewer::closeURL()
{
emit browserExtension()->loadingProgress(-1);
- emit canceled(QString::null);
+ emit canceled(TQString::null);
return KHTMLPart::closeURL();
}
int Viewer::pointsToPixel(int pointSize) const
{
- const QPaintDeviceMetrics metrics(view());
+ const TQPaintDeviceMetrics metrics(view());
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
}
-void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
+void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype)
{
if (!url.isValid()) return;
if (Settings::externalBrowserUseKdeDefault())
@@ -110,11 +110,11 @@ void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
}
else
{
- QString cmd = Settings::externalBrowserCustomCommand();
- QString urlStr = url.url();
- cmd.replace(QRegExp("%u"), urlStr);
+ TQString cmd = Settings::externalBrowserCustomCommand();
+ TQString urlStr = url.url();
+ cmd.replace(TQRegExp("%u"), urlStr);
KProcess *proc = new KProcess;
- QStringList cmdAndArgs = KShell::splitArgs(cmd);
+ TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs;
proc->start(KProcess::DontCare);
delete proc;
@@ -126,7 +126,7 @@ void Viewer::slotOpenURLRequest(const KURL& /*url*/, const KParts::URLArgs& /*ar
}
-void Viewer::urlSelected(const QString &url, int button, int state, const QString &_target, KParts::URLArgs args)
+void Viewer::urlSelected(const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args)
{
m_url = completeURL(url);
browserExtension()->setURLArgs(args);
@@ -165,20 +165,20 @@ void Viewer::urlSelected(const QString &url, int button, int state, const QStrin
KHTMLPart::urlSelected(url,button,state,_target,args);
}
-void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
+void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags kpf, mode_t)
{
const bool isLink = (kpf & (KParts::BrowserExtension::ShowNavigationItems | KParts::BrowserExtension::ShowTextSelectionItems)) == 0;
const bool isSelection = (kpf & KParts::BrowserExtension::ShowTextSelectionItems) != 0;
- QString url = kurl.url();
+ TQString url = kurl.url();
m_url = url;
KPopupMenu popup;
if (isLink && !isSelection)
{
- popup.insertItem(SmallIcon("tab_new"), i18n("Open Link in New &Tab"), this, SLOT(slotOpenLinkInForegroundTab()));
- popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, SLOT(slotOpenLinkInBrowser()));
+ popup.insertItem(SmallIcon("tab_new"), i18n("Open Link in New &Tab"), this, TQT_SLOT(slotOpenLinkInForegroundTab()));
+ popup.insertItem(SmallIcon("window_new"), i18n("Open Link in External &Browser"), this, TQT_SLOT(slotOpenLinkInBrowser()));
popup.insertSeparator();
action("savelinkas")->plug(&popup);
action("copylinkaddress")->plug(&popup);
@@ -201,18 +201,18 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, co
// taken from KDevelop
void Viewer::slotCopy()
{
- QString text = selectedText();
- text.replace( QChar( 0xa0 ), ' ' );
- QClipboard *cb = QApplication::clipboard();
- disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
+ TQString text = selectedText();
+ text.replace( TQChar( 0xa0 ), ' ' );
+ QClipboard *cb = TQApplication::clipboard();
+ disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
cb->setText(text);
- connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
+ connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
}
void Viewer::slotCopyLinkAddress()
{
if(m_url.isEmpty()) return;
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(m_url.prettyURL(), QClipboard::Clipboard);
cb->setText(m_url.prettyURL(), QClipboard::Selection);
}
@@ -244,7 +244,7 @@ void Viewer::slotOpenLinkInThisTab()
void Viewer::slotOpenLinkInBrowser()
{
- displayInExternalBrowser(m_url, QString::null);
+ displayInExternalBrowser(m_url, TQString::null);
}
void Viewer::slotSaveLinkAs()