From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- akregator/src/articleviewer.cpp | 222 ++++++++++++++++++++-------------------- 1 file changed, 111 insertions(+), 111 deletions(-) (limited to 'akregator/src/articleviewer.cpp') diff --git a/akregator/src/articleviewer.cpp b/akregator/src/articleviewer.cpp index 942ce623..147f4ab4 100644 --- a/akregator/src/articleviewer.cpp +++ b/akregator/src/articleviewer.cpp @@ -22,10 +22,10 @@ without including the source code for Qt in the source distribution. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -56,7 +56,7 @@ namespace Akregator { // from kmail::headerstyle.cpp -static inline QString directionOf(const QString &str) +static inline TQString directionOf(const TQString &str) { return str.isRightToLeft() ? "rtl" : "ltr" ; } @@ -69,12 +69,12 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor virtual bool visitFeed(Feed* node) { - m_view->m_link = QString(); + m_view->m_link = TQString(); - QString text; - text = QString("
\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr"); + TQString text; + text = TQString("
\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); - text += QString("
").arg(directionOf(Utils::stripTags(node->title()))); + text += TQString("
").arg(directionOf(Utils::stripTags(node->title()))); text += node->title(); if(node->unread() == 0) text += i18n(" (no unread articles)"); @@ -85,26 +85,26 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor if (!node->image().isNull()) // image { - text += QString("
"); - QString url=node->xmlUrl(); - QString file = url.replace("/", "_").replace(":", "_"); + text += TQString("
"); + TQString url=node->xmlUrl(); + TQString file = url.replace("/", "_").replace(":", "_"); KURL u(m_view->m_imageDir); u.setFileName(file); - text += QString("\n").arg(node->htmlUrl()).arg(u.url()); + text += TQString("\n").arg(node->htmlUrl()).arg(u.url()); } else text += "
"; if( !node->description().isEmpty() ) { - text += QString("
").arg(Utils::stripTags(directionOf(node->description()))); + text += TQString("
").arg(Utils::stripTags(directionOf(node->description()))); text += i18n("Description: %1

").arg(node->description()); text += "
\n"; // /description } if ( !node->htmlUrl().isEmpty() ) { - text += QString("
").arg(directionOf(node->htmlUrl())); + text += TQString("
").arg(directionOf(node->htmlUrl())); text += i18n("Homepage: %2").arg(node->htmlUrl()).arg(node->htmlUrl()); text += "
\n"; // / link } @@ -118,16 +118,16 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor virtual bool visitFolder(Folder* node) { - m_view->m_link = QString(); + m_view->m_link = TQString(); - QString text; - text = QString("
\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr"); - text += QString("
%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); + TQString text; + text = TQString("
\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text += TQString("
%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); if(node->unread() == 0) text += i18n(" (no unread articles)"); else text += i18n(" (1 unread article)", " (%n unread articles)", node->unread()); - text += QString("
\n"); + text += TQString("
\n"); text += "
\n"; // /headerbox m_view->renderContent(text); @@ -136,16 +136,16 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor virtual bool visitTagNode(TagNode* node) { - m_view->m_link = QString(); + m_view->m_link = TQString(); - QString text; - text = QString("
\n").arg(QApplication::reverseLayout() ? "rtl" : "ltr"); - text += QString("
%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); + TQString text; + text = TQString("
\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr"); + text += TQString("
%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title()); if(node->unread() == 0) text += i18n(" (no unread articles)"); else text += i18n(" (1 unread article)", " (%n unread articles)", node->unread()); - text += QString("
\n"); + text += TQString("
\n"); text += "
\n"; // /headerbox m_view->renderContent(text); @@ -157,7 +157,7 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor ArticleViewer* m_view; }; -ArticleViewer::ArticleViewer(QWidget *parent, const char *name) +ArticleViewer::ArticleViewer(TQWidget *parent, const char *name) : Viewer(parent, name), m_htmlFooter(), m_currentText(), m_node(0), m_viewMode(NormalView) { setJScriptEnabled(false); @@ -169,13 +169,13 @@ ArticleViewer::ArticleViewer(QWidget *parent, const char *name) generateNormalModeCSS(); generateCombinedModeCSS(); - new KAction( i18n("&Scroll Up"), QString::null, "Up", this, SLOT(slotScrollUp()), actionCollection(), "articleviewer_scroll_up" ); - new KAction( i18n("&Scroll Down"), QString::null, "Down", this, SLOT(slotScrollDown()), actionCollection(), "articleviewer_scroll_down" ); + new KAction( i18n("&Scroll Up"), TQString::null, "Up", this, TQT_SLOT(slotScrollUp()), actionCollection(), "articleviewer_scroll_up" ); + new KAction( i18n("&Scroll Down"), TQString::null, "Down", this, TQT_SLOT(slotScrollDown()), actionCollection(), "articleviewer_scroll_down" ); - connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); + connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); - connect(kapp, SIGNAL(kdisplayPaletteChanged()), this, SLOT(slotPaletteOrFontChanged()) ); - connect(kapp, SIGNAL(kdisplayFontChanged()), this, SLOT(slotPaletteOrFontChanged()) ); + connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) ); + connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), this, TQT_SLOT(slotPaletteOrFontChanged()) ); m_imageDir.setPath(KGlobal::dirs()->saveLocation("cache", "akregator/Media/")); m_htmlFooter = ""; @@ -188,10 +188,10 @@ ArticleViewer::~ArticleViewer() void ArticleViewer::generateNormalModeCSS() { - const QColorGroup & cg = QApplication::palette().active(); + const TQColorGroup & cg = TQApplication::palette().active(); // from kmail::headerstyle.cpp - m_normalModeCSS = QString( + m_normalModeCSS = TQString( "@media screen, print {" "body {\n" " font-family: \"%1\" ! important;\n" @@ -199,13 +199,13 @@ void ArticleViewer::generateNormalModeCSS() " color: %3 ! important;\n" " background: %4 ! important;\n" "}\n\n").arg(Settings::standardFont()) - .arg(QString::number(pointsToPixel(Settings::mediumFontSize()))+"px") + .arg(TQString::number(pointsToPixel(Settings::mediumFontSize()))+"px") .arg(cg.text().name()) .arg(cg.base().name()); - m_normalModeCSS += QString( + m_normalModeCSS += TQString( "a {\n" - + QString(" color: %1 ! important;\n") - + QString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "") + + TQString(" color: %1 ! important;\n") + + TQString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "") + "}\n\n" +".headerbox {\n" +" background: %2 ! important;\n" @@ -218,7 +218,7 @@ void ArticleViewer::generateNormalModeCSS() .arg(cg.background().name()) .arg(cg.text().name()); - m_normalModeCSS += QString(".headertitle a:link { color: %1 ! important; }\n" + m_normalModeCSS += TQString(".headertitle a:link { color: %1 ! important; }\n" ".headertitle a:visited { color: %2 ! important; }\n" ".headertitle a:hover{ color: %3 ! important; }\n" ".headertitle a:active { color: %4 ! important; }\n") @@ -227,7 +227,7 @@ void ArticleViewer::generateNormalModeCSS() .arg(cg.highlightedText().name()) .arg(cg.highlightedText().name()); - m_normalModeCSS += QString( + m_normalModeCSS += TQString( ".headertitle {\n" " background: %1 ! important;\n" " padding:2px;\n" @@ -247,7 +247,7 @@ void ArticleViewer::generateNormalModeCSS() "}\n\n").arg(cg.highlight().name()) .arg(cg.highlightedText().name()); - m_normalModeCSS += QString( + m_normalModeCSS += TQString( "body { clear: none; }\n\n" ".content {\n" " display: block;\n" @@ -267,10 +267,10 @@ void ArticleViewer::generateNormalModeCSS() void ArticleViewer::generateCombinedModeCSS() { - const QColorGroup & cg = QApplication::palette().active(); + const TQColorGroup & cg = TQApplication::palette().active(); // from kmail::headerstyle.cpp - m_combinedModeCSS = QString ( + m_combinedModeCSS = TQString ( // "