akregator/src/librss
RSS::Article Class Reference
#include <article.h>
Detailed Description
Represents an article as stored in a RSS file.You don't have to instantiate one of these yourself, the common way to access instances is via Document::articles().
- See also:
- Document::articles()
Definition at line 37 of file article.h.
Public Types | |
typedef QValueList< Article > | List |
typedef QMap< QString, QString > | MetaInfoMap |
Public Member Functions | |
Article () | |
Article (const Article &other) | |
Article (const QDomNode &node, Format format, Version version) | |
Article & | operator= (const Article &other) |
bool | operator== (const Article &other) const |
bool | operator!= (const Article &other) const |
virtual | ~Article () |
QString | title () const |
const KURL & | link () const |
QString | description () const |
QString | author () const |
QString | guid () const |
bool | guidIsPermaLink () const |
const QDateTime & | pubDate () const |
const KURL & | commentsLink () const |
int | comments () const |
Enclosure | enclosure () const |
QValueList< Category > | categories () const |
QString | meta (const QString &key) const |
KURLLabel * | widget (QWidget *parent=0, const char *name=0) const |
Member Typedef Documentation
typedef QValueList<Article> RSS::Article::List |
Constructor & Destructor Documentation
RSS::Article::Article | ( | ) |
Default constructor.
RSS::Article::Article | ( | const Article & | other | ) |
virtual RSS::Article::~Article | ( | ) | [virtual] |
Destructor.
Member Function Documentation
QString RSS::Article::author | ( | ) | const |
a string desribing the author of the item.
QValueList<Category> RSS::Article::categories | ( | ) | const |
returns a list of categories this article is assigned to.
(RSS2 only, Atom is not supported yet)
QString RSS::Article::description | ( | ) | const |
QString RSS::Article::guid | ( | ) | const |
bool RSS::Article::guidIsPermaLink | ( | ) | const |
const KURL& RSS::Article::link | ( | ) | const |
bool RSS::Article::operator!= | ( | const Article & | other | ) | const [inline] |
bool RSS::Article::operator== | ( | const Article & | other | ) | const |
Compares two articles.
Two articles are treated to be identical if all their properties (title, link, description etc.) are equal.
- Parameters:
-
other The article this article should be compared with.
- Returns:
- Whether the two articles are equal.
const QDateTime& RSS::Article::pubDate | ( | ) | const |
QString RSS::Article::title | ( | ) | const |
RSS 0.90 and upwards.
- Returns:
- The headline of this article, or QString::null if no headline was available.
KURLLabel* RSS::Article::widget | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) | const |
- Parameters:
-
parent The parent widget for the KURLLabel. name A name for the widget which will be used internally.
- Returns:
- a widget (a KURLLabel in this case) for the Article. This makes building a user-interface which contains the information in this Article object more convenient. The returned KURLLabel's caption will be the title(), clicking on it will emit the URL link(), and it has a QToolTip attached to it which displays the description() (in case it has one, if there is no description, the URL which the label links to will be used). Note that you have to delete the KURLLabel object returned by this method yourself.
The documentation for this class was generated from the following file: