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

akregator

  • Akregator
  • TreeNode
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
Akregator::TreeNode Class Referenceabstract

#include <treenode.h>

Inheritance diagram for Akregator::TreeNode:
Inheritance graph
[legend]

Public Slots

virtual void slotAddToFetchQueue (Akregator::FetchQueue *queue, bool intervalFetchesOnly=false)=0
 

Signals

void signalArticlesAdded (Akregator::TreeNode *, const QList< Akregator::Article > &guids)
 
void signalArticlesRemoved (Akregator::TreeNode *, const QList< Akregator::Article > &guids)
 
void signalArticlesUpdated (Akregator::TreeNode *, const QList< Akregator::Article > &guids)
 
void signalChanged (Akregator::TreeNode *)
 
void signalDestroyed (Akregator::TreeNode *)
 

Public Member Functions

 TreeNode ()
 
virtual ~TreeNode ()
 
virtual bool accept (TreeNodeVisitor *visitor)=0
 
virtual TreeNode * childAt (int pos)
 
virtual const TreeNode * childAt (int pos) const
 
virtual QList< const TreeNode * > children () const
 
virtual QList< TreeNode * > children ()
 
ArticleListJob * createListJob ()
 
virtual KJob * createMarkAsReadJob ()=0
 
virtual QVector< const Feed * > feeds () const =0
 
virtual QVector< Feed * > feeds ()=0
 
virtual QVector< const Folder * > folders () const =0
 
virtual QVector< Folder * > folders ()=0
 
virtual QIcon icon () const =0
 
virtual uint id () const
 
virtual bool isAggregation () const =0
 
virtual bool isGroup () const =0
 
QPoint listViewScrollBarPositions () const
 
virtual const TreeNode * next () const =0
 
virtual TreeNode * next ()=0
 
virtual const TreeNode * nextSibling () const
 
virtual TreeNode * nextSibling ()
 
virtual const Folder * parent () const
 
virtual Folder * parent ()
 
virtual const TreeNode * prevSibling () const
 
virtual TreeNode * prevSibling ()
 
virtual void setId (uint id)
 
void setListViewScrollBarPositions (const QPoint &pos)
 
virtual void setNotificationMode (bool doNotify)
 
virtual void setParent (Folder *parent)
 
void setTitle (const QString &title)
 
QString title () const
 
virtual QDomElement toOPML (QDomElement parent, QDomDocument document) const =0
 
virtual int totalCount () const =0
 
virtual int unread () const =0
 

Protected Member Functions

virtual void articlesModified ()
 
virtual void doArticleNotification ()
 
void emitSignalDestroyed ()
 
virtual void nodeModified ()
 

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 59 of file treenode.h.

Constructor & Destructor Documentation

Akregator::TreeNode::TreeNode ( )

Standard constructor.

Definition at line 64 of file treenode.cpp.

Akregator::TreeNode::~TreeNode ( )
virtual

Standard destructor.

Definition at line 80 of file treenode.cpp.

Member Function Documentation

virtual bool Akregator::TreeNode::accept ( TreeNodeVisitor *  visitor)
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

void Akregator::TreeNode::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 216 of file treenode.cpp.

TreeNode * Akregator::TreeNode::childAt ( int  pos)
virtual

Reimplemented in Akregator::Folder.

Definition at line 167 of file treenode.cpp.

const TreeNode * Akregator::TreeNode::childAt ( int  pos) const
virtual

Reimplemented in Akregator::Folder.

Definition at line 161 of file treenode.cpp.

QList< const TreeNode * > Akregator::TreeNode::children ( ) const
virtual

returns the (direct) children of this node.

Returns
a list of pointers to the child nodes

Reimplemented in Akregator::Folder.

Definition at line 151 of file treenode.cpp.

QList< TreeNode * > Akregator::TreeNode::children ( )
virtual

Reimplemented in Akregator::Folder.

Definition at line 156 of file treenode.cpp.

ArticleListJob * Akregator::TreeNode::createListJob ( )

Definition at line 238 of file treenode.cpp.

virtual KJob* Akregator::TreeNode::createMarkAsReadJob ( )
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

void Akregator::TreeNode::doArticleNotification ( )
protectedvirtual

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

Reimplemented in Akregator::Folder.

Definition at line 224 of file treenode.cpp.

void Akregator::TreeNode::emitSignalDestroyed ( )
protected

Definition at line 69 of file treenode.cpp.

virtual QVector<const Feed*> Akregator::TreeNode::feeds ( ) const
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

virtual QVector<Feed*> Akregator::TreeNode::feeds ( )
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

virtual QVector<const Folder*> Akregator::TreeNode::folders ( ) const
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

virtual QVector<Folder*> Akregator::TreeNode::folders ( )
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

virtual QIcon Akregator::TreeNode::icon ( ) const
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

uint Akregator::TreeNode::id ( ) const
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 198 of file treenode.cpp.

virtual bool Akregator::TreeNode::isAggregation ( ) const
pure 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.

Implemented in Akregator::Feed, and Akregator::Folder.

virtual bool Akregator::TreeNode::isGroup ( ) const
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::Feed, and Akregator::Folder.

QPoint Akregator::TreeNode::listViewScrollBarPositions ( ) const

Definition at line 228 of file treenode.cpp.

virtual const TreeNode* Akregator::TreeNode::next ( ) const
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, and Akregator::Folder.

virtual TreeNode* Akregator::TreeNode::next ( )
pure virtual

Implemented in Akregator::Feed, and Akregator::Folder.

const TreeNode * Akregator::TreeNode::nextSibling ( ) const
virtual

Get the next sibling.

Returns
the next sibling, 0 if there is none

Definition at line 112 of file treenode.cpp.

TreeNode * Akregator::TreeNode::nextSibling ( )
virtual

Definition at line 102 of file treenode.cpp.

void Akregator::TreeNode::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 208 of file treenode.cpp.

const Folder * Akregator::TreeNode::parent ( ) const
virtual

Returns the parent node.

Returns
the parent feed group, 0 if there is none

Definition at line 141 of file treenode.cpp.

Folder * Akregator::TreeNode::parent ( )
virtual

Definition at line 146 of file treenode.cpp.

const TreeNode * Akregator::TreeNode::prevSibling ( ) const
virtual

Get the previous sibling.

Returns
the previous sibling, 0 if there is none

Definition at line 132 of file treenode.cpp.

TreeNode * Akregator::TreeNode::prevSibling ( )
virtual

Definition at line 122 of file treenode.cpp.

void Akregator::TreeNode::setId ( uint  id)
virtual

sets the ID

Definition at line 203 of file treenode.cpp.

void Akregator::TreeNode::setListViewScrollBarPositions ( const QPoint &  pos)

Definition at line 233 of file treenode.cpp.

void Akregator::TreeNode::setNotificationMode ( bool  doNotify)
virtual
Parameters
doNotifynotification on changes on/off flag
notifyOccurredChangesnotify changes occurred while turn off when set to true again

Definition at line 178 of file treenode.cpp.

void Akregator::TreeNode::setParent ( Folder *  parent)
virtual

Sets parent node; Don't call this directly, is done automatically by insertChild-methods in Folder.

Definition at line 173 of file treenode.cpp.

void Akregator::TreeNode::setTitle ( const QString &  title)

Sets the title of the node.

title should not contain entities.

Parameters
titlethe title string

Definition at line 92 of file treenode.cpp.

void Akregator::TreeNode::signalArticlesAdded ( Akregator::TreeNode *  ,
const QList< Akregator::Article > &  guids 
)
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.

Parameters
TreeNode*the node articles were added to
QStringListthe guids of the articles added
void Akregator::TreeNode::signalArticlesRemoved ( Akregator::TreeNode *  ,
const QList< Akregator::Article > &  guids 
)
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

void Akregator::TreeNode::signalArticlesUpdated ( Akregator::TreeNode *  ,
const QList< Akregator::Article > &  guids 
)
signal

emitted when articles were updated

void Akregator::TreeNode::signalChanged ( Akregator::TreeNode *  )
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

void Akregator::TreeNode::signalDestroyed ( Akregator::TreeNode *  )
signal

Emitted when this object is deleted.

virtual void Akregator::TreeNode::slotAddToFetchQueue ( Akregator::FetchQueue *  queue,
bool  intervalFetchesOnly = false 
)
pure virtualslot

adds node to a fetch queue

Parameters
intervalFetchesOnly
QString Akregator::TreeNode::title ( ) const

Get title of node.

Returns
the title of the node

Definition at line 87 of file treenode.cpp.

virtual QDomElement Akregator::TreeNode::toOPML ( QDomElement  parent,
QDomDocument  document 
) const
pure virtual

exports node and child nodes to OPML (with akregator settings)

Parameters
parentthe dom element the child node will be attached to
documentthe opml document

Implemented in Akregator::Feed, and Akregator::Folder.

virtual int Akregator::TreeNode::totalCount ( ) const
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::Feed, and Akregator::Folder.

virtual int Akregator::TreeNode::unread ( ) const
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::Feed, and Akregator::Folder.


The documentation for this class was generated from the following files:
  • treenode.h
  • treenode.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:15 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