articleviewer.cpp
76 text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
78 text += TQString("<div class=\"headertitle\" dir=\"%1\">").arg(directionOf(Utils::stripTags(node->title())));
94 text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(node->htmlUrl()).arg(u.url());
109 text += i18n("<b>Homepage:</b> <a href=\"%1\">%2</a>").arg(node->htmlUrl()).arg(node->htmlUrl());
125 text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
126 text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
143 text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
144 text += TQString("<div class=\"headertitle\" dir=\"%1\">%2").arg(directionOf(Utils::stripTags(node->title()))).arg(node->title());
173 new TDEAction( i18n("&Scroll Up"), TQString(), "Up", this, TQ_SLOT(slotScrollUp()), actionCollection(), "articleviewer_scroll_up" );
174 new TDEAction( i18n("&Scroll Down"), TQString(), "Down", this, TQ_SLOT(slotScrollDown()), actionCollection(), "articleviewer_scroll_down" );
178 connect(kapp, TQ_SIGNAL(tdedisplayPaletteChanged()), this, TQ_SLOT(slotPaletteOrFontChanged()) );
257 // these rules make sure that there is no leading space between the header and the first of the text
336 // these rules make sure that there is no leading space between the header and the first of the text
374 content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) );
389 "<a href=\"%3\">Trinity website</a>. If you do not want to see this page anymore, <a href=\"config:/disable_introduction\">click here</a>.</p>"
398 TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
407 text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
411 text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
414 text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser
424 text += TDEGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
441 text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
448 text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
490 //text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>").arg(url).arg(url).arg(lengthStr).arg(type);
500 text = TQString("<div class=\"headerbox\" dir=\"%1\">\n").arg(TQApplication::reverseLayout() ? "rtl" : "ltr");
506 text += TQString("<div class=\"headertitle\" dir=\"%1\">\n").arg(directionOf(Utils::stripTags(article.title())));
509 text += article.title().replace("<", "<").replace(">", ">"); // TODO: better leave things escaped in the parser
519 text += TDEGlobal::locale()->formatDateTime(article.pubDate(), false, false)+"</span>\n"; // TODO: might need RTL?
538 text += TQString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl()).arg(u.url());
545 text += TQString("<div dir=\"%1\">").arg(directionOf(Utils::stripTags(article.description())) );
596 TQString head = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n <html><head><title>.</title></head>");
643 void ArticleViewer::slotSetFilter(const Akregator::Filters::ArticleMatcher& textFilter, const Akregator::Filters::ArticleMatcher& statusFilter)
681 //kdDebug() << "Combined view rendering: (" << num << " articles):\n" << "generating HTML: " << spent.elapsed() << "ms " << endl;
688 void ArticleViewer::slotArticlesUpdated(TreeNode* /*node*/, const TQValueList<Article>& /*list*/)
698 void ArticleViewer::slotArticlesRemoved(TreeNode* /*node*/, const TQValueList<Article>& /*list*/)
703 void ArticleViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
744 void ArticleViewer::urlSelected(const TQString &url, int button, int state, const TQString& _target, KParts::URLArgs args)
747 if(KMessageBox::questionYesNo( widget(), i18n("Are you sure you want to disable this introduction page?"), i18n("Disable Introduction Page"), i18n("Disable"), i18n("Keep Enabled") ) == KMessageBox::Yes) {
770 // connect( node, TQ_SIGNAL(signalChanged(TreeNode*)), this, TQ_SLOT(slotUpdateCombinedView() ) );
771 connect( node, TQ_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQ_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)));
772 connect( node, TQ_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQ_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
773 connect( node, TQ_SIGNAL(signalArticlesUpdated(TreeNode*, const TQValueList<Article>&)), this, TQ_SLOT(slotArticlesUpdated(TreeNode*, const TQValueList<Article>&)));
776 connect( node, TQ_SIGNAL(signalChanged(TreeNode*)), this, TQ_SLOT(slotShowSummary(TreeNode*) ) );
786 // disconnect( node, TQ_SIGNAL(signalChanged(TreeNode*)), this, TQ_SLOT(slotUpdateCombinedView() ) );
788 disconnect( node, TQ_SIGNAL(signalChanged(TreeNode*)), this, TQ_SLOT(slotShowSummary(TreeNode*) ) );
789 disconnect( node, TQ_SIGNAL(signalArticlesAdded(TreeNode*, const TQValueList<Article>&)), this, TQ_SLOT(slotArticlesAdded(TreeNode*, const TQValueList<Article>&)));
790 disconnect( node, TQ_SIGNAL(signalArticlesRemoved(TreeNode*, const TQValueList<Article>&)), this, TQ_SLOT(slotArticlesRemoved(TreeNode*, const TQValueList<Article>&)));
TQString formatArticleNormalMode(Feed *feed, const Article &article)
Takes an article and renders it as HTML with settings for normal view and widescreen view.
Definition: articleviewer.cpp:404
A proxy class for RSS::Article with some additional methods to assist sorting.
Definition: article.h:57
const TQString & htmlUrl() const
returns the URL of the HTML page of this feed
Definition: feed.cpp:355
a powerful matcher supporting multiple criterions, which can be combined via logical OR or AND
Definition: articlefilter.h:216
void slotShowArticle(const Article &article)
Show single article (normal view)
Definition: articleviewer.cpp:630
void slotShowNode(TreeNode *node)
Shows the articles of the tree node node (combined view).
Definition: articleviewer.cpp:719
virtual TQValueList< Article > articles(const TQString &tag=TQString())=0
Returns a sequence of the articles this node contains.
TQString formatArticleCombinedMode(Feed *feed, const Article &article)
Takes an article and renders it as HTML with settings for combined view.
Definition: articleviewer.cpp:497
void slotSetFilter(const Akregator::Filters::ArticleMatcher &textFilter, const Akregator::Filters::ArticleMatcher &statusFilter)
Set filters textFilter and statusFilter which will be used if the viewer is in combined view mode.
Definition: articleviewer.cpp:643
void endWriting()
Finishes writing to the canvas and completes the HTML (by adding closing tags)
Definition: articleviewer.cpp:603
const TQString & xmlUrl() const
returns the url of the actual feed source (rss/rdf/atom file)
Definition: feed.cpp:351
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:51
void slotClear()
Clears the canvas and disconnects from the currently observed node (if in combined view mode).
Definition: articleviewer.cpp:710
void slotUpdateCombinedView()
Update view if combined view mode is set.
Definition: articleviewer.cpp:654
void beginWriting()
Resets the canvas and adds writes the HTML header to it.
Definition: articleviewer.cpp:594
void generateNormalModeCSS()
generates the CSS used for rendering in single article mode (normal and wide screen view)
Definition: articleviewer.cpp:190
void generateCombinedModeCSS()
generates the CSS for combined view mode
Definition: articleviewer.cpp:269