#include <treenode.h>
Public Slots | |
virtual void | slotDeleteExpiredArticles ()=0 |
virtual void | slotMarkAllArticlesAsRead ()=0 |
virtual void | slotAddToFetchQueue (FetchQueue *queue, bool intervalFetchesOnly=false)=0 |
Signals | |
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 | |
TreeNode () | |
virtual | ~TreeNode () |
virtual bool | accept (TreeNodeVisitor *visitor)=0 |
virtual int | unread () const =0 |
virtual int | totalCount () const =0 |
virtual const TQString & | title () const |
virtual void | setTitle (const TQString &title) |
virtual TreeNode * | nextSibling () const |
virtual TreeNode * | prevSibling () const |
virtual Folder * | parent () const |
virtual void | setParent (Folder *parent) |
virtual TQValueList< Article > | articles (const TQString &tag=TQString())=0 |
virtual TQStringList | tags () const =0 |
virtual bool | isGroup () const =0 |
virtual TQDomElement | toOPML (TQDomElement parent, TQDomDocument document) const =0 |
virtual void | setNotificationMode (bool doNotify, bool notifyOccurredChanges=true) |
virtual TreeNode * | next ()=0 |
virtual uint | id () const |
virtual void | setId (uint id) |
Protected Member Functions | |
virtual void | nodeModified () |
virtual void | articlesModified () |
virtual void | doArticleNotification () |
void | emitSignalDestroyed () |
Detailed Description
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search folders later).
TODO: detailed description goes here
Definition at line 51 of file treenode.h.
Constructor & Destructor Documentation
◆ TreeNode()
Akregator::TreeNode::TreeNode | ( | ) |
Standard constructor.
Definition at line 48 of file treenode.cpp.
◆ ~TreeNode()
|
virtual |
Standard destructor.
Definition at line 70 of file treenode.cpp.
Member Function Documentation
◆ articles()
|
pure 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
Implemented in Akregator::Folder, and Akregator::Feed.
◆ articlesModified()
|
protectedvirtual |
call this if the articles in the node were changed.
Sends signalArticlesAdded/Updated/Removed signals Will do notification immediately or cache it, depending on m_doNotify
.
Definition at line 163 of file treenode.cpp.
◆ doArticleNotification()
|
protectedvirtual |
reimplement this in subclasses to do the actual notification called by articlesModified
Reimplemented in Akregator::Folder, and Akregator::Feed.
Definition at line 171 of file treenode.cpp.
◆ id()
|
virtual |
returns the ID of this node.
IDs are managed by FeedList objects and must be unique within the list. Some IDs have a special meaning: 0
is the default value and indicates that no ID was set 1
is reserved for the "All Feeds" root node
Definition at line 145 of file treenode.cpp.
◆ isGroup()
|
pure virtual |
Helps the rest of the app to decide if node should be handled as group or not.
Only use where necessary, use polymorphism where possible.
- Returns
- whether the node is a feed group or not
Implemented in Akregator::Folder, and Akregator::Feed.
◆ next()
|
pure virtual |
returns the next node in the tree.
Calling next() unless it returns 0 iterates through the tree in pre-order
Implemented in Akregator::Feed.
◆ nextSibling()
|
virtual |
Get the next sibling.
- Returns
- the next sibling, 0 if there is none
Definition at line 92 of file treenode.cpp.
◆ nodeModified()
|
protectedvirtual |
call this if you modified the actual node (title, unread count).
Call this only when the actual node has changed, i.e. title, unread count. Don't use for article changes! Will do notification immediately or cache it, depending on m_doNotify
.
Definition at line 155 of file treenode.cpp.
◆ parent()
|
virtual |
Returns the parent node.
- Returns
- the parent feed group, 0 if there is none
Definition at line 115 of file treenode.cpp.
◆ prevSibling()
|
virtual |
Get the previous sibling.
- Returns
- the previous sibling, 0 if there is none
Definition at line 104 of file treenode.cpp.
◆ setId()
|
virtual |
sets the ID
Definition at line 150 of file treenode.cpp.
◆ setNotificationMode()
|
virtual |
- Parameters
-
doNotify notification on changes on/off flag notifyOccurredChanges notify changes occurred while turn off when set to true again
Definition at line 125 of file treenode.cpp.
◆ setParent()
|
virtual |
Sets parent node; Don't call this directly, is done automatically by insertChild-methods in Folder.
Definition at line 120 of file treenode.cpp.
◆ setTitle()
|
virtual |
Sets the title of the node.
title
should not contain entities.
- Parameters
-
title the title string
Definition at line 82 of file treenode.cpp.
◆ signalArticlesAdded
|
signal |
emitted when new articles were added to this node or any node in the subtree (for folders).
Note that this has nothing to do with fetching, the article might have been moved from somewhere else in the tree into this subtree, e.g. by moving the feed the article is in. For listening to newly fetched articles, you have to register yourself at ArticleInterceptorManager
- Parameters
-
node the node articles were added to guids the guids of the articles added
◆ signalArticlesRemoved
|
signal |
emitted when articles were removed from this subtree.
Note that this has nothing to do with actual article deletion! The article might have moved somewhere else in the tree, e.g. if the user moved the feed
◆ signalArticlesUpdated
|
signal |
emitted when articles were updated
◆ signalChanged
|
signal |
Notification mechanism: emitted, when the node was modified and notification is enabled.
A node change is renamed title, icon, unread count. Added, updated or removed articles are not notified via this signal
◆ signalDestroyed
|
signal |
Emitted when this object is deleted.
◆ slotAddToFetchQueue
|
pure virtualslot |
adds node to a fetch queue
- Parameters
-
a fetch queue intervalFetchesOnly
◆ slotDeleteExpiredArticles
|
pure virtualslot |
Deletes all expired articles in the node (depending on the expiry settings).
Works recursively for feed groups.
◆ slotMarkAllArticlesAsRead
|
pure virtualslot |
Marks all articles in this node as read.
Works recursively for feed groups.
◆ tags()
|
pure virtual |
returns a list of all tags occurring in this node (sub tree for folders)
Implemented in Akregator::Folder, and Akregator::Feed.
◆ title()
|
virtual |
◆ toOPML()
|
pure virtual |
exports node and child nodes to OPML (with akregator settings)
- Parameters
-
parent the dom element the child node will be attached to document the opml document
Implemented in Akregator::Folder, and Akregator::Feed.
◆ totalCount()
|
pure virtual |
returns the number of total articles in the node (for groups: the accumulated count of the subtree)
- Returns
- number of articles
Implemented in Akregator::Folder, and Akregator::Feed.
◆ unread()
|
pure virtual |
The unread count, returns the number of new/unread articles in the node (for groups: the accumulated count of the subtree)
- Returns
- number of new/unread articles
Implemented in Akregator::Folder, and Akregator::Feed.
The documentation for this class was generated from the following files: