akregator/src

#include <feed.h>

Inheritance diagram for Akregator::Feed:
Akregator::TreeNode

Public Types

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

Public Slots

void fetch (bool followDiscovery=false)
 
void slotAbortFetch ()
 
virtual void slotDeleteExpiredArticles ()
 
virtual void slotMarkAllArticlesAsRead ()
 
virtual void slotAddToFetchQueue (FetchQueue *queue, bool intervalFetchOnly=false)
 
- Public Slots inherited from Akregator::TreeNode
virtual void slotDeleteExpiredArticles ()=0
 
virtual void slotMarkAllArticlesAsRead ()=0
 
virtual void slotAddToFetchQueue (FetchQueue *queue, bool intervalFetchesOnly=false)=0
 

Signals

void fetchStarted (Feed *)
 
void fetched (Feed *)
 
void fetchError (Feed *)
 
void fetchDiscovery (Feed *)
 
void fetchAborted (Feed *)
 
- Signals inherited from Akregator::TreeNode
void signalDestroyed (TreeNode *)
 
void signalChanged (TreeNode *)
 
void signalArticlesAdded (TreeNode *node, const TQValueList< Article > &guids)
 
void signalArticlesUpdated (TreeNode *, const TQValueList< Article > &guids)
 
void signalArticlesRemoved (TreeNode *, const TQValueList< Article > &guids)
 

Public Member Functions

 Feed ()
 
virtual bool accept (TreeNodeVisitor *visitor)
 
virtual TQDomElement toOPML (TQDomElement parent, TQDomDocument document) const
 
bool useCustomFetchInterval () const
 
void setCustomFetchIntervalEnabled (bool enabled)
 
int fetchInterval () const
 
void setFetchInterval (int interval)
 
ArchiveMode archiveMode () const
 
void setArchiveMode (ArchiveMode archiveMode)
 
int maxArticleAge () const
 
void setMaxArticleAge (int maxArticleAge)
 
int maxArticleNumber () const
 
void setMaxArticleNumber (int maxArticleNumber)
 
bool markImmediatelyAsRead () const
 
void setMarkImmediatelyAsRead (bool enabled)
 
void setUseNotification (bool enabled)
 
bool useNotification () const
 
void setLoadLinkedWebsite (bool enabled)
 
bool loadLinkedWebsite () const
 
const TQPixmap & favicon () const
 
void setFavicon (const TQPixmap &p)
 
const TQPixmap & image () const
 
const TQString & xmlUrl () const
 
void setXmlUrl (const TQString &s)
 
const TQString & htmlUrl () const
 
void setHtmlUrl (const TQString &s)
 
const TQString & description () const
 
void setDescription (const TQString &s)
 
virtual TQValueList< Articlearticles (const TQString &tag=TQString())
 
virtual Article findArticle (const TQString &guid) const
 
virtual TQStringList tags () const
 
bool fetchErrorOccurred ()
 
virtual int unread () const
 
virtual int totalCount () const
 
bool isArticlesLoaded () const
 
virtual bool isGroup () const
 
virtual TreeNodenext ()
 
void loadFavicon ()
 
void loadImage ()
 
- Public Member Functions inherited from Akregator::TreeNode
 TreeNode ()
 
virtual ~TreeNode ()
 
virtual const TQString & title () const
 
virtual void setTitle (const TQString &title)
 
virtual TreeNodenextSibling () const
 
virtual TreeNodeprevSibling () const
 
virtual Folderparent () const
 
virtual void setParent (Folder *parent)
 
virtual void setNotificationMode (bool doNotify, bool notifyOccurredChanges=true)
 
virtual uint id () const
 
virtual void setId (uint id)
 

Static Public Member Functions

static ArchiveMode stringToArchiveMode (const TQString &str)
 
static TQString archiveModeToString (ArchiveMode mode)
 
static FeedfromOPML (TQDomElement e)
 

Protected Member Functions

void loadArticles ()
 
void recalcUnreadCount ()
 
virtual void doArticleNotification ()
 
void setUnread (int unread)
 
- Protected Member Functions inherited from Akregator::TreeNode
virtual void nodeModified ()
 
virtual void articlesModified ()
 
void emitSignalDestroyed ()
 

Friends

class Article
 

Detailed Description

represents a feed

Definition at line 62 of file feed.h.

Member Enumeration Documentation

◆ ArchiveMode

the archiving modes:

  • 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 76 of file feed.h.

Constructor & Destructor Documentation

◆ Feed()

Akregator::Feed::Feed ( )

default constructor

Definition at line 276 of file feed.cpp.

Member Function Documentation

◆ archiveMode()

Feed::ArchiveMode Akregator::Feed::archiveMode ( ) const

returns the archiving mode which is used for this feed

Definition at line 702 of file feed.cpp.

◆ archiveModeToString()

TQString Akregator::Feed::archiveModeToString ( ArchiveMode  mode)
static

converts ArchiveMode values to corresponding strings

Definition at line 104 of file feed.cpp.

◆ articles()

TQValueList< Article > Akregator::Feed::articles ( const TQString &  tag = TQString())
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 192 of file feed.cpp.

◆ description()

const TQString & Akregator::Feed::description ( ) const

returns the description of this feed

Definition at line 359 of file feed.cpp.

◆ doArticleNotification()

void Akregator::Feed::doArticleNotification ( )
protectedvirtual

reimplement this in subclasses to do the actual notification called by articlesModified

Reimplemented from Akregator::TreeNode.

Definition at line 773 of file feed.cpp.

◆ favicon()

const TQPixmap & Akregator::Feed::favicon ( ) const

returns the favicon

Definition at line 347 of file feed.cpp.

◆ fetch

void Akregator::Feed::fetch ( bool  followDiscovery = false)
slot

starts fetching

Definition at line 548 of file feed.cpp.

◆ fetchAborted

void Akregator::Feed::fetchAborted ( Feed )
signal

emitted when a fetch is aborted

◆ fetchDiscovery

void Akregator::Feed::fetchDiscovery ( Feed )
signal

emitted when a feed URL was found by auto discovery

◆ fetched

void Akregator::Feed::fetched ( Feed )
signal

emitted when feed finished fetching

◆ fetchError

void Akregator::Feed::fetchError ( Feed )
signal

emitted when a fetch error occurred

◆ fetchErrorOccurred()

bool Akregator::Feed::fetchErrorOccurred ( )

returns whether a fetch error has occurred

Definition at line 363 of file feed.cpp.

◆ fetchInterval()

int Akregator::Feed::fetchInterval ( ) const

Returns custom auto fetch interval of this feed.

Returns
custom fetch interval in minutes, 0 if disabled

Definition at line 306 of file feed.cpp.

◆ fetchStarted

void Akregator::Feed::fetchStarted ( Feed )
signal

emitted when fetching started

◆ findArticle()

Article Akregator::Feed::findArticle ( const TQString &  guid) const
virtual

returns the article with the given guid, or a null article if it not exists

Definition at line 187 of file feed.cpp.

◆ fromOPML()

Feed * Akregator::Feed::fromOPML ( TQDomElement  e)
static

creates a Feed object from a description in OPML format

Definition at line 125 of file feed.cpp.

◆ htmlUrl()

const TQString & Akregator::Feed::htmlUrl ( ) const

returns the URL of the HTML page of this feed

Definition at line 355 of file feed.cpp.

◆ image()

const TQPixmap & Akregator::Feed::image ( ) const

returns the feed image

Definition at line 349 of file feed.cpp.

◆ isArticlesLoaded()

bool Akregator::Feed::isArticlesLoaded ( ) const

returns if the article archive of this feed is loaded

Definition at line 365 of file feed.cpp.

◆ isGroup()

virtual bool Akregator::Feed::isGroup ( ) const
inlinevirtual

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

Implements Akregator::TreeNode.

Definition at line 203 of file feed.h.

◆ loadArticles()

void Akregator::Feed::loadArticles ( )
protected

loads articles from archive

Definition at line 217 of file feed.cpp.

◆ loadFavicon()

void Akregator::Feed::loadFavicon ( )

downloads the favicon

Definition at line 654 of file feed.cpp.

◆ loadImage()

void Akregator::Feed::loadImage ( )

load the image from the cache if it is in there

Definition at line 209 of file feed.cpp.

◆ markImmediatelyAsRead()

bool Akregator::Feed::markImmediatelyAsRead ( ) const

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

Useful for high-traffic feeds.

Definition at line 318 of file feed.cpp.

◆ maxArticleAge()

int Akregator::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 310 of file feed.cpp.

◆ maxArticleNumber()

int Akregator::Feed::maxArticleNumber ( ) const

returns the article count limit used in limitArticleNumber archive mode

Definition at line 314 of file feed.cpp.

◆ next()

TreeNode * Akregator::Feed::next ( )
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 757 of file feed.cpp.

◆ setArchiveMode()

void Akregator::Feed::setArchiveMode ( ArchiveMode  archiveMode)

sets the archiving mode for this feed

Definition at line 707 of file feed.cpp.

◆ setCustomFetchIntervalEnabled()

void Akregator::Feed::setCustomFetchIntervalEnabled ( bool  enabled)

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

Parameters
enabledtrue: use custom interval, false: use global default

Definition at line 304 of file feed.cpp.

◆ setDescription()

void Akregator::Feed::setDescription ( const TQString &  s)

sets the description of this feed

Definition at line 361 of file feed.cpp.

◆ setFavicon()

void Akregator::Feed::setFavicon ( const TQPixmap &  p)

sets the favicon (used in the tree view)

Definition at line 696 of file feed.cpp.

◆ setFetchInterval()

void Akregator::Feed::setFetchInterval ( int  interval)

Sets custom auto fetch interval.

Parameters
intervalinterval in minutes, -1 for disabling auto fetching

Definition at line 308 of file feed.cpp.

◆ setHtmlUrl()

void Akregator::Feed::setHtmlUrl ( const TQString &  s)

sets the URL of the HTML page of this feed

Definition at line 357 of file feed.cpp.

◆ setLoadLinkedWebsite()

void Akregator::Feed::setLoadLinkedWebsite ( bool  enabled)

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

Definition at line 337 of file feed.cpp.

◆ setMaxArticleAge()

void Akregator::Feed::setMaxArticleAge ( int  maxArticleAge)

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

Parameters
maxArticleAgeexpiry age in days

Definition at line 312 of file feed.cpp.

◆ setMaxArticleNumber()

void Akregator::Feed::setMaxArticleNumber ( int  maxArticleNumber)

sets the article count limit used in limitArticleNumber archive mode

Definition at line 316 of file feed.cpp.

◆ setUnread()

void Akregator::Feed::setUnread ( int  unread)
protected

sets the unread count for this feed

Definition at line 717 of file feed.cpp.

◆ setXmlUrl()

void Akregator::Feed::setXmlUrl ( const TQString &  s)

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

Definition at line 353 of file feed.cpp.

◆ slotAddToFetchQueue

void Akregator::Feed::slotAddToFetchQueue ( FetchQueue *  queue,
bool  intervalFetchOnly = false 
)
virtualslot

add this feed to the fetch queue queue

Definition at line 409 of file feed.cpp.

◆ slotDeleteExpiredArticles

void Akregator::Feed::slotDeleteExpiredArticles ( )
virtualslot

deletes expired articles

Definition at line 659 of file feed.cpp.

◆ slotMarkAllArticlesAsRead

void Akregator::Feed::slotMarkAllArticlesAsRead ( )
virtualslot

mark all articles in this feed as read

Definition at line 395 of file feed.cpp.

◆ stringToArchiveMode()

Feed::ArchiveMode Akregator::Feed::stringToArchiveMode ( const TQString &  str)
static

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

Definition at line 260 of file feed.cpp.

◆ tags()

TQStringList Akregator::Feed::tags ( ) const
virtual

returns a list of all tags occurring in this node (sub tree for folders)

Implements Akregator::TreeNode.

Definition at line 182 of file feed.cpp.

◆ toOPML()

TQDomElement Akregator::Feed::toOPML ( TQDomElement  parent,
TQDomDocument  document 
) const
virtual

exports the feed settings to OPML

Implements Akregator::TreeNode.

Definition at line 368 of file feed.cpp.

◆ totalCount()

int Akregator::Feed::totalCount ( ) const
virtual

returns the number of total articles in this feed

Returns
number of articles

Implements Akregator::TreeNode.

Definition at line 752 of file feed.cpp.

◆ unread()

int Akregator::Feed::unread ( ) const
virtual

returns the unread count for this feed

Implements Akregator::TreeNode.

Definition at line 712 of file feed.cpp.

◆ useCustomFetchInterval()

bool Akregator::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 302 of file feed.cpp.

◆ xmlUrl()

const TQString & Akregator::Feed::xmlUrl ( ) const

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

Definition at line 351 of file feed.cpp.


The documentation for this class was generated from the following files: