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

akregator

Akregator::Feed

Akregator::Feed Class Reference

#include <feed.h>

Inheritance diagram for Akregator::Feed:

Inheritance graph
[legend]

List of all members.


Detailed Description

represents a feed

Definition at line 52 of file feed.h.


Public Types

enum  ArchiveMode {
  globalDefault, keepAllArticles, disableArchiving, limitArticleNumber,
  limitArticleAge
}

Public Slots

void fetch (bool followDiscovery=false)
void slotAbortFetch ()
void slotAddFeedIconListener ()
void slotAddToFetchQueue (Akregator::FetchQueue *queue, bool intervalFetchOnly=false)
void slotMarkAllArticlesAsRead ()

Signals

void fetchAborted (Akregator::Feed *)
void fetchDiscovery (Akregator::Feed *)
void fetched (Akregator::Feed *)
void fetchError (Akregator::Feed *)
void fetchStarted (Akregator::Feed *)

Public Member Functions

bool accept (TreeNodeVisitor *visitor)
ArchiveMode archiveMode () const
QList< Article > articles ()
void deleteExpiredArticles (Akregator::ArticleDeleteJob *job)
QString description () const
 Feed (Akregator::Backend::Storage *storage)
QVector< Feed * > feeds ()
QVector< const Feed * > feeds () const
Syndication::ErrorCode fetchErrorCode () const
bool fetchErrorOccurred () const
int fetchInterval () const
Article findArticle (const QString &guid) const
QVector< Folder * > folders ()
QVector< const Folder * > folders () const
QString htmlUrl () const
QIcon icon () const
QPixmap image () const
bool isAggregation () const
bool isArticlesLoaded () const
bool isFetching () const
bool isGroup () const
bool loadLinkedWebsite () const
bool markImmediatelyAsRead () const
int maxArticleAge () const
int maxArticleNumber () const
TreeNode * next ()
const TreeNode * next () const
void setArchiveMode (ArchiveMode archiveMode)
void setCustomFetchIntervalEnabled (bool enabled)
void setDescription (const QString &s)
void setFavicon (const QIcon &icon)
void setFetchInterval (int interval)
void setHtmlUrl (const QString &s)
void setImage (const QPixmap &p)
void setLoadLinkedWebsite (bool enabled)
void setMarkImmediatelyAsRead (bool enabled)
void setMaxArticleAge (int maxArticleAge)
void setMaxArticleNumber (int maxArticleNumber)
void setUseNotification (bool enabled)
void setXmlUrl (const QString &s)
QDomElement toOPML (QDomElement parent, QDomDocument document) const
int totalCount () const
int unread () const
bool useCustomFetchInterval () const
bool useNotification () const
QString xmlUrl () const
 ~Feed ()

Static Public Member Functions

static QString archiveModeToString (ArchiveMode mode)
static Feed * fromOPML (QDomElement e, Akregator::Backend::Storage *storage)
static ArchiveMode stringToArchiveMode (const QString &str)

Member Enumeration Documentation

enum Akregator::Feed::ArchiveMode

the archiving modes

Enumerator:
globalDefault  use default from Settings (default)
keepAllArticles  Don't delete any articles.
disableArchiving  Don't save any articles except articles with keep flag set (equal to maxArticleNumber() == 0).
limitArticleNumber  Save maxArticleNumber() articles, plus the ones with keep flag set.
limitArticleAge  Save articles not older than maxArticleAge() (or keep flag set).

Definition at line 60 of file feed.h.


Constructor & Destructor Documentation

Feed::Feed ( Akregator::Backend::Storage *  storage  )  [explicit]

default constructor

Definition at line 308 of file feed.cpp.

Feed::~Feed (  ) 

Definition at line 312 of file feed.cpp.


Member Function Documentation

bool Feed::accept ( TreeNodeVisitor *  visitor  )  [virtual]

Implements Akregator::TreeNode.

Definition at line 176 of file feed.cpp.

Feed::ArchiveMode Feed::archiveMode (  )  const

returns the archiving mode which is used for this feed

Definition at line 726 of file feed.cpp.

QString Feed::archiveModeToString ( ArchiveMode  mode  )  [static]

converts ArchiveMode values to corresponding strings

Definition at line 111 of file feed.cpp.

QList< Article > Feed::articles (  )  [virtual]

Returns a sequence of the articles this node contains.

For feed groups, this returns a concatenated list of all articles in the sub tree. If tag is not null, only articles tagged with tag are returned

Returns:
sequence of articles

Implements Akregator::TreeNode.

Definition at line 213 of file feed.cpp.

void Feed::deleteExpiredArticles ( Akregator::ArticleDeleteJob *  job  ) 

deletes expired articles

Definition at line 686 of file feed.cpp.

QString Feed::description (  )  const

returns the description of this feed

Definition at line 383 of file feed.cpp.

QVector< Feed * > Feed::feeds (  )  [virtual]

Implements Akregator::TreeNode.

Definition at line 201 of file feed.cpp.

QVector< const Feed * > Feed::feeds (  )  const [virtual]

Implements Akregator::TreeNode.

Definition at line 194 of file feed.cpp.

void Feed::fetch ( bool  followDiscovery = false  )  [slot]

starts fetching

Definition at line 569 of file feed.cpp.

void Akregator::Feed::fetchAborted ( Akregator::Feed *   )  [signal]

emitted when a fetch is aborted

void Akregator::Feed::fetchDiscovery ( Akregator::Feed *   )  [signal]

emitted when a feed URL was found by auto discovery

void Akregator::Feed::fetched ( Akregator::Feed *   )  [signal]

emitted when feed finished fetching

void Akregator::Feed::fetchError ( Akregator::Feed *   )  [signal]

emitted when a fetch error occurred

Syndication::ErrorCode Feed::fetchErrorCode (  )  const

Definition at line 389 of file feed.cpp.

bool Feed::fetchErrorOccurred (  )  const

returns whether a fetch error has occurred

Definition at line 387 of file feed.cpp.

int Feed::fetchInterval (  )  const

Returns custom auto fetch interval of this feed.

Returns:
custom fetch interval in minutes, 0 if disabled

Definition at line 325 of file feed.cpp.

void Akregator::Feed::fetchStarted ( Akregator::Feed *   )  [signal]

emitted when fetching started

Article Feed::findArticle ( const QString &  guid  )  const

returns article by guid

Parameters:
guid the guid of the article to be returned
Returns:
the article object with the given guid, or a null article if non-existent

Definition at line 208 of file feed.cpp.

QVector< Folder * > Feed::folders (  )  [virtual]

Implements Akregator::TreeNode.

Definition at line 189 of file feed.cpp.

QVector< const Folder * > Feed::folders (  )  const [virtual]

Implements Akregator::TreeNode.

Definition at line 184 of file feed.cpp.

Feed * Feed::fromOPML ( QDomElement  e,
Akregator::Backend::Storage *  storage 
) [static]

creates a Feed object from a description in OPML format

Definition at line 132 of file feed.cpp.

QString Feed::htmlUrl (  )  const

returns the URL of the HTML page of this feed

Definition at line 379 of file feed.cpp.

QIcon Feed::icon (  )  const [virtual]

Implements Akregator::TreeNode.

Definition at line 678 of file feed.cpp.

QPixmap Feed::image (  )  const

returns the feed image

Definition at line 368 of file feed.cpp.

bool Akregator::Feed::isAggregation (  )  const [inline, virtual]

returns if the node represents an aggregation, i.e.

containing items from more than once source feed. Folders and virtual folders are aggregations, feeds are not.

Implements Akregator::TreeNode.

Definition at line 199 of file feed.h.

bool Feed::isArticlesLoaded (  )  const

returns if the article archive of this feed is loaded

Definition at line 391 of file feed.cpp.

bool Feed::isFetching (  )  const

Definition at line 339 of file feed.cpp.

bool Akregator::Feed::isGroup (  )  const [inline, virtual]

returns if this node is a feed group (false here)

Implements Akregator::TreeNode.

Definition at line 196 of file feed.h.

bool Feed::loadLinkedWebsite (  )  const

Definition at line 363 of file feed.cpp.

bool Feed::markImmediatelyAsRead (  )  const

if true, new articles are marked immediately as read instead of new/unread.

Useful for high-traffic feeds.

Definition at line 337 of file feed.cpp.

int Feed::maxArticleAge (  )  const

returns the maximum age of articles used for expiration by age (used in limitArticleAge archive mode)

Returns:
expiry age in days

Definition at line 329 of file feed.cpp.

int Feed::maxArticleNumber (  )  const

returns the article count limit used in limitArticleNumber archive mode

Definition at line 333 of file feed.cpp.

TreeNode * Feed::next (  )  [virtual]

Implements Akregator::TreeNode.

Definition at line 782 of file feed.cpp.

const TreeNode * Feed::next (  )  const [virtual]

returns the next node in the tree.

Calling next() unless it returns 0 iterates through the tree in pre-order

Implements Akregator::TreeNode.

Definition at line 799 of file feed.cpp.

void Feed::setArchiveMode ( ArchiveMode  archiveMode  ) 

sets the archiving mode for this feed

Definition at line 731 of file feed.cpp.

void Feed::setCustomFetchIntervalEnabled ( bool  enabled  ) 

set if the feed has its custom fetch interval or uses the global setting

Parameters:
enabled true: use custom interval, false: use global default

Definition at line 323 of file feed.cpp.

void Feed::setDescription ( const QString &  s  ) 

sets the description of this feed

Definition at line 385 of file feed.cpp.

void Feed::setFavicon ( const QIcon &  icon  )  [virtual]

sets the favicon (used in the tree view)

Implements Akregator::FaviconListener.

Definition at line 711 of file feed.cpp.

void Feed::setFetchInterval ( int  interval  ) 

Sets custom auto fetch interval.

Parameters:
interval interval in minutes, -1 for disabling auto fetching

Definition at line 327 of file feed.cpp.

void Feed::setHtmlUrl ( const QString &  s  ) 

sets the URL of the HTML page of this feed

Definition at line 381 of file feed.cpp.

void Feed::setImage ( const QPixmap &  p  ) 

sets the feed image

Definition at line 717 of file feed.cpp.

void Feed::setLoadLinkedWebsite ( bool  enabled  ) 

if true, the linked URL is loaded directly in the article viewer instead of showing the description

Definition at line 358 of file feed.cpp.

void Feed::setMarkImmediatelyAsRead ( bool  enabled  ) 

Definition at line 341 of file feed.cpp.

void Feed::setMaxArticleAge ( int  maxArticleAge  ) 

sets the maximum age of articles used for expiration by age (used in limitArticleAge archive mode)

Parameters:
maxArticleAge expiry age in days

Definition at line 331 of file feed.cpp.

void Feed::setMaxArticleNumber ( int  maxArticleNumber  ) 

sets the article count limit used in limitArticleNumber archive mode

Definition at line 335 of file feed.cpp.

void Feed::setUseNotification ( bool  enabled  ) 

Definition at line 348 of file feed.cpp.

void Feed::setXmlUrl ( const QString &  s  ) 

sets the url of the actual feed source (rss/rdf/atom file)

Definition at line 372 of file feed.cpp.

void Feed::slotAbortFetch (  )  [slot]

Definition at line 591 of file feed.cpp.

void Feed::slotAddFeedIconListener (  )  [slot]

Definition at line 456 of file feed.cpp.

void Feed::slotAddToFetchQueue ( Akregator::FetchQueue *  queue,
bool  intervalFetchOnly = false 
) [virtual, slot]

add this feed to the fetch queue queue

Implements Akregator::TreeNode.

Definition at line 433 of file feed.cpp.

void Feed::slotMarkAllArticlesAsRead (  )  [virtual, slot]

mark all articles in this feed as read

Implements Akregator::TreeNode.

Definition at line 420 of file feed.cpp.

Feed::ArchiveMode Feed::stringToArchiveMode ( const QString &  str  )  [static]

converts strings to ArchiveMode value if parsing fails, it returns ArchiveMode::globalDefault

Definition at line 268 of file feed.cpp.

QDomElement Feed::toOPML ( QDomElement  parent,
QDomDocument  document 
) const [virtual]

exports the feed settings to OPML

Implements Akregator::TreeNode.

Definition at line 393 of file feed.cpp.

int Feed::totalCount (  )  const [virtual]

returns the number of total articles in this feed

Returns:
number of articles

Implements Akregator::TreeNode.

Definition at line 775 of file feed.cpp.

int Feed::unread (  )  const [virtual]

returns the unread count for this feed

Implements Akregator::TreeNode.

Definition at line 736 of file feed.cpp.

bool Feed::useCustomFetchInterval (  )  const

returns whether this feed uses its own fetch interval or the global setting

Returns:
true iff this feed has a custom fetch interval

Definition at line 321 of file feed.cpp.

bool Feed::useNotification (  )  const

Definition at line 353 of file feed.cpp.

QString Feed::xmlUrl (  )  const

returns the url of the actual feed source (rss/rdf/atom file)

Definition at line 370 of file feed.cpp.


The documentation for this class was generated from the following files:
  • feed.h
  • feed.cpp

akregator

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal