• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

akregator

  • sources
  • kde-4.12
  • kdepim
  • akregator
  • src
articleformatter.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 
25 #include "articleformatter.h"
26 #include "akregatorconfig.h"
27 #include "article.h"
28 #include "feed.h"
29 #include "folder.h"
30 #include "treenode.h"
31 #include "treenodevisitor.h"
32 #include "utils.h"
33 
34 #include <kglobal.h>
35 #include <klocale.h>
36 
37 #include <QApplication>
38 #include <QPaintDevice>
39 #include <QPalette>
40 #include <QString>
41 
42 using namespace boost;
43 using namespace Syndication;
44 using namespace Akregator;
45 
46 namespace {
47  QString formatEnclosure( const Enclosure& enclosure )
48  {
49  if ( enclosure.isNull() )
50  return QString();
51 
52  const QString title = !enclosure.title().isEmpty() ? enclosure.url() : enclosure.url();
53  const uint length = enclosure.length();
54  const QString type = enclosure.type();
55  QString inf;
56  if ( !type.isEmpty() && length > 0 )
57  inf = i18n( "(%1, %2)", type, KGlobal::locale()->formatByteSize( length ) );
58  else if ( !type.isNull() )
59  inf = type;
60  else if ( length > 0 )
61  inf = KGlobal::locale()->formatByteSize( length );
62  QString str = i18n( "<a href=\"%1\">%2</a> %3", enclosure.url(), title, inf );
63  return str;
64  }
65 }
66 class ArticleFormatter::Private
67 {
68  public:
69  explicit Private( QPaintDevice* device_ );
70  QPaintDevice* device;
71  class SummaryVisitor;
72 };
73 
74 ArticleFormatter::Private::Private( QPaintDevice* device_ ) : device( device_ )
75 {
76 }
77 
78 ArticleFormatter::ArticleFormatter( QPaintDevice* device ) : d( new Private( device ) )
79 {
80 }
81 
82 ArticleFormatter::~ArticleFormatter()
83 {
84  delete d;
85 }
86 
87 void ArticleFormatter::setPaintDevice(QPaintDevice* device)
88 {
89  d->device = device;
90 }
91 
92 int ArticleFormatter::pointsToPixel(int pointSize) const
93 {
94  return ( pointSize * d->device->logicalDpiY() + 36 ) / 72 ;
95 }
96 
97 class DefaultNormalViewFormatter::SummaryVisitor : public TreeNodeVisitor
98 {
99  public:
100  SummaryVisitor(DefaultNormalViewFormatter* p) : parent(p) {}
101  virtual bool visitFeed(Feed* node)
102  {
103  text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr");
104  const QString strippedTitle = Utils::stripTags(node->title());
105  text += QString("<div class=\"headertitle\" dir=\"%1\">").arg(Utils::directionOf(strippedTitle));
106  text += strippedTitle;
107  if(node->unread() == 0)
108  text += i18n(" (no unread articles)");
109  else
110  text += i18np(" (1 unread article)", " (%1 unread articles)", node->unread());
111  text += "</div>\n"; // headertitle
112  text += "</div>\n"; // /headerbox
113 
114  if (!node->image().isNull()) // image
115  {
116  text += QString("<div class=\"body\">");
117  QString file = Utils::fileNameForUrl(node->xmlUrl());
118  KUrl u(parent->m_imageDir);
119  u.setFileName(file);
120  text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(node->htmlUrl(), u.url());
121  }
122  else text += "<div class=\"body\">";
123 
124 
125  if( !node->description().isEmpty() )
126  {
127  text += QString("<div dir=\"%1\">").arg(Utils::stripTags(Utils::directionOf(node->description())));
128  text += i18n("<b>Description:</b> %1<br /><br />", node->description());
129  text += "</div>\n"; // /description
130  }
131 
132  if ( !node->htmlUrl().isEmpty() )
133  {
134  text += QString("<div dir=\"%1\">").arg(Utils::directionOf(node->htmlUrl()));
135  text += i18n("<b>Homepage:</b> <a href=\"%1\">%2</a>", node->htmlUrl(), node->htmlUrl());
136  text += "</div>\n"; // / link
137  }
138 
139  //text += i18n("<b>Unread articles:</b> %1").arg(node->unread());
140  text += "</div>"; // /body
141 
142  return true;
143  }
144 
145  virtual bool visitFolder(Folder* node)
146  {
147  text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr");
148  text += QString("<div class=\"headertitle\" dir=\"%1\">%2").arg(Utils::directionOf(Utils::stripTags(node->title())), node->title());
149  if(node->unread() == 0)
150  text += i18n(" (no unread articles)");
151  else
152  text += i18np(" (1 unread article)", " (%1 unread articles)", node->unread());
153  text += QString("</div>\n");
154  text += "</div>\n"; // /headerbox
155 
156  return true;
157  }
158 
159  QString formatSummary(TreeNode* node)
160  {
161  text.clear();
162  visit(node);
163  return text;
164  }
165 
166  QString text;
167  DefaultNormalViewFormatter* parent;
168 };
169 
170 QString DefaultNormalViewFormatter::formatArticle(const Article& article, IconOption icon) const
171 {
172  QString text;
173  text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr");
174  const QString enc = formatEnclosure( *article.enclosure() );
175 
176  const QString strippedTitle = Utils::stripTags( article.title() );
177  if (!strippedTitle.isEmpty())
178  {
179  text += QString("<div class=\"headertitle\" dir=\"%1\">\n").arg(Utils::directionOf(strippedTitle));
180  if (article.link().isValid())
181  text += "<a href=\""+article.link().url()+"\">";
182  text += strippedTitle;
183  if (article.link().isValid())
184  text += "</a>";
185  text += "</div>\n";
186  }
187  if (article.pubDate().isValid())
188  {
189  text += QString("<span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Date")));
190  text += QString ("%1:").arg(i18n("Date"));
191  text += "</span><span class=\"headertext\">";
192  text += KGlobal::locale()->formatDateTime(article.pubDate(), KLocale::FancyLongDate) +"</span>\n"; // TODO: might need RTL?
193  }
194  const QString author = article.authorAsHtml();
195  if (!author.isEmpty())
196  {
197  text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Author")));
198  text += QString ("%1:").arg(i18n("Author"));
199  text += "</span><span class=\"headertext\">";
200  text += author+"</span>\n"; // TODO: might need RTL?
201  }
202 
203  if (!enc.isEmpty())
204  {
205  text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Enclosure")));
206  text += QString ("%1:").arg(i18n("Enclosure"));
207  text += "</span><span class=\"headertext\">";
208  text += enc+"</span>\n"; // TODO: might need RTL?
209  }
210 
211  text += "</div>\n"; // end headerbox
212 
213 
214  if (icon == ShowIcon && article.feed() && !article.feed()->image().isNull())
215  {
216  const Feed* feed = article.feed();
217  QString file = Utils::fileNameForUrl(feed->xmlUrl());
218  KUrl u(m_imageDir);
219  u.setFileName(file);
220  text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl(), u.url());
221  }
222 
223  const QString content = article.content( Article::DescriptionAsFallback );
224  if (!content.isEmpty())
225  {
226  text += QString("<div dir=\"%1\">").arg(Utils::directionOf(Utils::stripTags(content)) );
227  text += "<span class=\"content\">"+content+"</span>";
228  text += "</div>";
229  }
230 
231  text += "<div class=\"body\">";
232 
233  if (article.commentsLink().isValid())
234  {
235  text += "<a class=\"contentlink\" href=\"";
236  text += article.commentsLink().url();
237  text += "\">" + i18n( "Comments");
238  if (article.comments())
239  {
240  text += " ("+ QString::number(article.comments()) +')';
241  }
242  text += "</a>";
243  }
244 
245  if (!enc.isEmpty())
246  text += QString("<p><em>%1</em> %2</p>").arg(i18n("Enclosure:")).arg(enc);
247 
248  if (article.link().isValid() || (article.guidIsPermaLink() && KUrl(article.guid()).isValid()))
249  {
250  text += "<p><a class=\"contentlink\" href=\"";
251  // in case link isn't valid, fall back to the guid permaLink.
252  if (article.link().isValid())
253  {
254  text += article.link().url();
255  }
256  else
257  {
258  text += article.guid();
259  }
260  text += "\">" + i18n( "Complete Story" ) + "</a></p>";
261  }
262 
263  text += "</div>";
264 
265  return text;
266 }
267 
268 QString DefaultNormalViewFormatter::getCss() const
269 {
270  const QPalette & pal = QApplication::palette();
271 
272  // from kmail::headerstyle.cpp
273  QString css = QString (
274  "<style type=\"text/css\">\n"
275  "@media screen, print {"
276  "body {\n"
277  " font-family: \"%1\" ! important;\n"
278  " font-size: %2 ! important;\n"
279  " color: %3 ! important;\n"
280  " background: %4 ! important;\n"
281  "}\n\n")
282  .arg( Settings::standardFont(),
283  QString::number(pointsToPixel(Settings::mediumFontSize()))+"px",
284  pal.color( QPalette::Text ).name(),
285  pal.color( QPalette::Base ).name() );
286  css += QString(
287  "a {\n"
288  + QString(" color: %1 ! important;\n")
289  + QString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
290  + "}\n\n"
291  +".headerbox {\n"
292  +" background: %2 ! important;\n"
293  +" color: %3 ! important;\n"
294  +" border:1px solid #000;\n"
295  +" margin-bottom: 10pt;\n"
296  + "}\n\n")
297  .arg( pal.color( QPalette::Link ).name(),
298  pal.color( QPalette::Background ).name(),
299  pal.color( QPalette::Text ).name() );
300  css += QString(".headertitle a:link { color: %1 ! important;\n text-decoration: none ! important;\n }\n"
301  ".headertitle a:visited { color: %1 ! important;\n text-decoration: none ! important;\n }\n"
302  ".headertitle a:hover{ color: %1 ! important;\n text-decoration: none ! important;\n }\n"
303  ".headertitle a:active { color: %1 ! important;\n text-decoration: none ! important;\n }\n" )
304  .arg( pal.color( QPalette::HighlightedText ).name() );
305  css += QString(
306  ".headertitle {\n"
307  " background: %1 ! important;\n"
308  " padding:2px;\n"
309  " color: %2 ! important;\n"
310  " font-weight: bold;\n"
311  " text-decoration: none ! important;\n"
312  "}\n\n"
313  ".header {\n"
314  " font-weight: bold;\n"
315  " padding:2px;\n"
316  " margin-right: 5px;\n"
317  " text-decoration: none ! important;\n"
318  "}\n\n"
319  ".headertext a {\n"
320  " text-decoration: none ! important;\n"
321  "}\n\n"
322  ".headimage {\n"
323  " float: right;\n"
324  " margin-left: 5px;\n"
325  "}\n\n").arg(
326  pal.color( QPalette::Highlight ).name(),
327  pal.color( QPalette::HighlightedText ).name() );
328 
329  css += QString(
330  "body { clear: none; }\n\n"
331  ".content {\n"
332  " display: block;\n"
333  " margin-bottom: 6px;\n"
334  "}\n\n"
335  // these rules make sure that there is no leading space between the header and the first of the text
336  ".content > P:first-child {\n margin-top: 1px; }\n"
337  ".content > DIV:first-child {\n margin-top: 1px; }\n"
338  // Do we really need that? See bug #144420
339 // ".content > BR:first-child {\n display: none; }\n"
340  //".contentlink {\n display: block; }\n"
341  "}\n\n" // @media screen, print
342  // Why did we need that, bug #108187?
343  //"@media screen { body { overflow: auto; } }\n"
344  "\n\n");
345 
346  return css;
347 }
348 
349 DefaultCombinedViewFormatter::DefaultCombinedViewFormatter(const KUrl& imageDir, QPaintDevice* device ) : ArticleFormatter( device ), m_imageDir(imageDir)
350 {
351 }
352 
353 DefaultNormalViewFormatter::DefaultNormalViewFormatter(const KUrl& imageDir, QPaintDevice* device )
354  : ArticleFormatter( device ),
355  m_imageDir( imageDir ),
356  m_summaryVisitor( new SummaryVisitor( this ) )
357 {
358 }
359 
360 DefaultNormalViewFormatter::~DefaultNormalViewFormatter()
361 {
362  delete m_summaryVisitor;
363 }
364 
365 QString DefaultCombinedViewFormatter::formatArticle(const Article& article, IconOption icon) const
366 {
367  QString text;
368  const QString enc = formatEnclosure( *article.enclosure() );
369  text = QString("<div class=\"headerbox\" dir=\"%1\">\n").arg(QApplication::isRightToLeft() ? "rtl" : "ltr");
370 
371  const QString strippedTitle = Utils::stripTags( article.title() );
372 
373  if (!strippedTitle.isEmpty())
374  {
375  text += QString("<div class=\"headertitle\" dir=\"%1\">\n").arg(Utils::directionOf(strippedTitle));
376  if (article.link().isValid())
377  text += "<a href=\""+article.link().url()+"\">";
378  text += strippedTitle;
379  if (article.link().isValid())
380  text += "</a>";
381  text += "</div>\n";
382  }
383  if (article.pubDate().isValid())
384  {
385  text += QString("<span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Date")));
386  text += QString ("%1:").arg(i18n("Date"));
387  text += "</span><span class=\"headertext\">";
388  text += KGlobal::locale()->formatDateTime(article.pubDate(), KLocale::FancyLongDate) + "</span>\n"; // TODO: might need RTL?
389  }
390 
391  const QString author = article.authorAsHtml();
392  if (!author.isEmpty())
393  {
394  text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Author")));
395  text += QString ("%1:").arg(i18n("Author"));
396  text += "</span><span class=\"headertext\">";
397  text += author+"</span>\n"; // TODO: might need RTL?
398  }
399 
400  if (!enc.isEmpty())
401  {
402  text += QString("<br/><span class=\"header\" dir=\"%1\">").arg(Utils::directionOf(i18n("Enclosure")));
403  text += QString ("%1:").arg(i18n("Enclosure"));
404  text += "</span><span class=\"headertext\">";
405  text += enc+"</span>\n"; // TODO: might need RTL?
406  }
407 
408  text += "</div>\n"; // end headerbox
409 
410  if (icon == ShowIcon && article.feed() && !article.feed()->image().isNull())
411  {
412  const Feed* feed = article.feed();
413  QString file = Utils::fileNameForUrl(feed->xmlUrl());
414  KUrl u(m_imageDir);
415  u.setFileName(file);
416  text += QString("<a href=\"%1\"><img class=\"headimage\" src=\"%2.png\"></a>\n").arg(feed->htmlUrl(), u.url());
417  }
418 
419 
420  const QString content = article.content( Article::DescriptionAsFallback );
421  if (!content.isEmpty())
422  {
423  text += QString("<div dir=\"%1\">").arg(Utils::directionOf(Utils::stripTags(content)) );
424  text += "<span class=\"content\">"+content+"</span>";
425  text += "</div>";
426  }
427 
428  text += "<div class=\"body\">";
429 
430  if (article.commentsLink().isValid())
431  {
432  text += "<a class=\"contentlink\" href=\"";
433  text += article.commentsLink().url();
434  text += "\">" + i18n( "Comments");
435  if (article.comments())
436  {
437  text += " ("+ QString::number(article.comments()) +')';
438  }
439  text += "</a>";
440  }
441 
442 
443  if (!enc.isEmpty())
444  text += QString("<p><em>%1</em> %2</p>").arg(i18n("Enclosure:")).arg(enc);
445 
446  if (article.link().isValid() || (article.guidIsPermaLink() && KUrl(article.guid()).isValid()))
447  {
448  text += "<p><a class=\"contentlink\" href=\"";
449  // in case link isn't valid, fall back to the guid permaLink.
450  if (article.link().isValid())
451  {
452  text += article.link().url();
453  }
454  else
455  {
456  text += article.guid();
457  }
458  text += "\">" + i18n( "Complete Story" ) + "</a></p>";
459  }
460 
461  text += "</div>";
462  //kDebug() << text;
463  return text;
464 }
465 
466 QString DefaultCombinedViewFormatter::getCss() const
467 {
468  const QPalette &pal = QApplication::palette();
469 
470  // from kmail::headerstyle.cpp
471  QString css = QString (
472  "<style type=\"text/css\">\n"
473  "@media screen, print {"
474  "body {\n"
475  " font-family: \"%1\" ! important;\n"
476  " font-size: %2 ! important;\n"
477  " color: %3 ! important;\n"
478  " background: %4 ! important;\n"
479  "}\n\n").arg(Settings::standardFont(),
480  QString::number(pointsToPixel(Settings::mediumFontSize()))+"px",
481  pal.color( QPalette::Text ).name(),
482  pal.color( QPalette::Base ).name() );
483  css += QString(
484  "a {\n"
485  + QString(" color: %1 ! important;\n")
486  + QString(!Settings::underlineLinks() ? " text-decoration: none ! important;\n" : "")
487  + "}\n\n"
488  +".headerbox {\n"
489  +" background: %2 ! important;\n"
490  +" color: %3 ! important;\n"
491  +" border:1px solid #000;\n"
492  +" margin-bottom: 10pt;\n"
493 // +" width: 99%;\n"
494  + "}\n\n")
495  .arg( pal.color( QPalette::Link ).name(),
496  pal.color( QPalette::Background ).name(),
497  pal.color( QPalette::Text ).name() );
498 
499  css += QString(".headertitle a:link { color: %1 ! important; text-decoration: none ! important;\n }\n"
500  ".headertitle a:visited { color: %1 ! important; text-decoration: none ! important;\n }\n"
501  ".headertitle a:hover{ color: %1 ! important; text-decoration: none ! important;\n }\n"
502  ".headertitle a:active { color: %1 ! important; text-decoration: none ! important;\n }\n")
503  .arg( pal.color( QPalette::HighlightedText ).name() );
504  css += QString(
505  ".headertitle {\n"
506  " background: %1 ! important;\n"
507  " padding:2px;\n"
508  " color: %2 ! important;\n"
509  " font-weight: bold;\n"
510  " text-decoration: none ! important;\n"
511  "}\n\n"
512  ".header {\n"
513  " font-weight: bold;\n"
514  " padding:2px;\n"
515  " margin-right: 5px;\n"
516  " text-decoration: none ! important;\n"
517  "}\n\n"
518  ".headertext {\n"
519  " text-decoration: none ! important;\n"
520  "}\n\n"
521  ".headimage {\n"
522  " float: right;\n"
523  " margin-left: 5px;\n"
524  "}\n\n").arg( pal.color( QPalette::Highlight ).name(),
525  pal.color( QPalette::HighlightedText ).name() );
526 
527  css += QString(
528  "body { clear: none; }\n\n"
529  ".content {\n"
530  " display: block;\n"
531  " margin-bottom: 6px;\n"
532  "}\n\n"
533  // these rules make sure that there is no leading space between the header and the first of the text
534  ".content > P:first-child {\n margin-top: 1px; }\n"
535  ".content > DIV:first-child {\n margin-top: 1px; }\n"
536  ".content > BR:first-child {\n display: none; }\n"
537  //".contentlink {\n display: block; }\n"
538  "}\n\n" // @media screen, print
539  // Why did we need that, bug #108187?
540  //"@media screen { body { overflow: auto; } }\n"
541  "\n\n");
542 
543  return css;
544 }
545 
546 QString DefaultNormalViewFormatter::formatSummary(TreeNode* node) const
547 {
548  return m_summaryVisitor->formatSummary(node);
549 }
550 
551 QString DefaultCombinedViewFormatter::formatSummary(TreeNode*) const
552 {
553  return QString();
554 }
treenode.h
Akregator::Utils::stripTags
static QString stripTags(const QString &str)
removes HTML/XML tags (everything between < and >) from a string.
Definition: utils.cpp:31
Akregator::ArticleFormatter::ShowIcon
Definition: articleformatter.h:44
Akregator::Article::DescriptionAsFallback
Definition: article.h:70
Akregator::Utils::fileNameForUrl
static QString fileNameForUrl(const QString &url)
returns a file name for a URL, with chars like "/" ":" replaced by "_".
Definition: utils.cpp:42
Akregator::Article::link
KUrl link() const
Definition: article.cpp:447
Akregator::Settings::standardFont
static QString standardFont()
Get Standard Font.
Definition: akregatorconfig.h:163
Akregator::TreeNode::title
QString title() const
Get title of node.
Definition: treenode.cpp:87
Akregator::Feed::unread
int unread() const
returns the unread count for this feed
Definition: feed.cpp:748
uint
unsigned int uint
Definition: article.h:39
Akregator::Article::commentsLink
KUrl commentsLink() const
Definition: article.cpp:468
Akregator::Settings::mediumFontSize
static int mediumFontSize()
Get MediumFontSize.
Definition: akregatorconfig.h:315
Akregator::DefaultNormalViewFormatter::~DefaultNormalViewFormatter
~DefaultNormalViewFormatter()
Definition: articleformatter.cpp:360
Akregator::DefaultCombinedViewFormatter::getCss
QString getCss() const
Definition: articleformatter.cpp:466
feed.h
Akregator::ArticleFormatter::IconOption
IconOption
Definition: articleformatter.h:42
treenodevisitor.h
utils.h
Akregator::Article::feed
Feed * feed() const
Definition: article.cpp:508
Akregator::DefaultCombinedViewFormatter::formatArticle
QString formatArticle(const Article &article, IconOption option) const
Definition: articleformatter.cpp:365
Akregator::Article::content
QString content(ContentOption opt=ContentAndOnlyContent) const
Definition: article.cpp:457
Akregator::Article::title
QString title() const
Definition: article.cpp:374
akregatorconfig.h
Akregator::Feed::xmlUrl
QString xmlUrl() const
returns the url of the actual feed source (rss/rdf/atom file)
Definition: feed.cpp:374
Akregator::DefaultCombinedViewFormatter::formatSummary
QString formatSummary(TreeNode *node) const
Definition: articleformatter.cpp:551
Akregator::Article::authorAsHtml
QString authorAsHtml() const
Definition: article.cpp:423
article.h
Akregator::Feed::htmlUrl
QString htmlUrl() const
returns the URL of the HTML page of this feed
Definition: feed.cpp:383
Akregator::Article::guid
QString guid() const
Definition: article.cpp:463
Akregator::DefaultNormalViewFormatter::formatSummary
QString formatSummary(TreeNode *node) const
Definition: articleformatter.cpp:546
Akregator::Feed::image
QPixmap image() const
returns the feed image
Definition: feed.cpp:372
folder.h
Akregator::Settings::underlineLinks
static bool underlineLinks()
Get UnderlineLinks.
Definition: akregatorconfig.h:353
Akregator::Article::pubDate
QDateTime pubDate() const
Definition: article.cpp:511
Akregator::Feed::description
QString description() const
returns the description of this feed
Definition: feed.cpp:387
Akregator::DefaultNormalViewFormatter::getCss
QString getCss() const
Definition: articleformatter.cpp:268
Akregator::ArticleFormatter::setPaintDevice
void setPaintDevice(QPaintDevice *device)
Definition: articleformatter.cpp:87
Akregator::TreeNodeVisitor
Definition: treenodevisitor.h:35
Akregator::Feed
represents a feed
Definition: feed.h:52
Akregator::Folder
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
Akregator::ArticleFormatter::~ArticleFormatter
virtual ~ArticleFormatter()
Definition: articleformatter.cpp:82
Akregator::Utils::directionOf
static QString directionOf(const QString &str)
Definition: utils.cpp:55
articleformatter.h
Akregator::Article::enclosure
boost::shared_ptr< const Syndication::Enclosure > enclosure() const
Definition: article.cpp:516
Akregator::ArticleFormatter::pointsToPixel
int pointsToPixel(int pointSize) const
Definition: articleformatter.cpp:92
Akregator::Article
A proxy class for Syndication::ItemPtr with some additional methods to assist sorting.
Definition: article.h:61
Akregator::Article::guidIsPermaLink
bool guidIsPermaLink() const
Definition: article.cpp:480
Akregator::ArticleFormatter
Definition: articleformatter.h:38
Akregator::DefaultNormalViewFormatter
Definition: articleformatter.h:69
Akregator::Article::comments
int comments() const
Definition: article.cpp:474
Akregator::TreeNode
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:59
Akregator::DefaultNormalViewFormatter::formatArticle
QString formatArticle(const Article &article, IconOption option) const
Definition: articleformatter.cpp:170
Akregator::Folder::unread
int unread() const
returns the number of unread articles in all children
Definition: folder.cpp:296
Akregator::ArticleFormatter::ArticleFormatter
ArticleFormatter(QPaintDevice *device=0)
Definition: articleformatter.cpp:78
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal