akregator/src

Akregator::Folder Class Reference

#include <folder.h>

Inheritance diagram for Akregator::Folder:

Akregator::TreeNode Akregator::TagFolder List of all members.

Detailed Description

Represents a folder (containing feeds and/or other folders).

Definition at line 44 of file folder.h.


Public Slots

virtual void slotDeleteExpiredArticles ()
virtual void slotMarkAllArticlesAsRead ()
virtual void slotChildChanged (TreeNode *node)
virtual void slotChildDestroyed (TreeNode *node)
virtual void slotAddToFetchQueue (FetchQueue *queue, bool intervalFetchesOnly=false)
virtual TreeNodenext ()

Signals

void signalChildAdded (TreeNode *)
void signalChildRemoved (Folder *, TreeNode *)

Public Member Functions

 Folder (const QString &title=QString::null)
virtual ~Folder ()
virtual bool accept (TreeNodeVisitor *visitor)
virtual QValueList< Articlearticles (const QString &tag=QString::null)
virtual QStringList tags () const
virtual int unread () const
virtual int totalCount () const
virtual bool isGroup () const
virtual QDomElement toOPML (QDomElement parent, QDomDocument document) const
virtual QValueList< TreeNode * > children () const
virtual void insertChild (TreeNode *node, TreeNode *after)
virtual void prependChild (TreeNode *node)
virtual void appendChild (TreeNode *node)
virtual void removeChild (TreeNode *node)
virtual TreeNodefirstChild ()
virtual TreeNodelastChild ()
virtual bool isOpen () const
virtual void setOpen (bool open)

Static Public Member Functions

static FolderfromOPML (QDomElement e)

Protected Member Functions

virtual void insertChild (uint index, TreeNode *node)
virtual void doArticleNotification ()

Constructor & Destructor Documentation

Akregator::Folder::Folder ( const QString &  title = QString::null  ) 

Creates a new folder with a given title.

Parameters:
title The title of the feed group

Definition at line 71 of file folder.cpp.


Member Function Documentation

Folder * Akregator::Folder::fromOPML ( QDomElement  e  )  [static]

creates a feed group parsed from a XML dom element.

Child nodes are not inserted or parsed.

Parameters:
e the element representing the feed group
Returns:
a freshly created feed group

Definition at line 63 of file folder.cpp.

QValueList< Article > Akregator::Folder::articles ( const QString &  tag = QString::null  )  [virtual]

returns recursively concatenated articles of children

Returns:
an article sequence containing articles of children

Implements Akregator::TreeNode.

Definition at line 108 of file folder.cpp.

QStringList Akregator::Folder::tags (  )  const [virtual]

returns a list of all tags occurring in the subtree of this folder

Implements Akregator::TreeNode.

Definition at line 93 of file folder.cpp.

int Akregator::Folder::unread (  )  const [virtual]

returns the number of unread articles in all children

Returns:
number of unread articles

Implements Akregator::TreeNode.

Definition at line 240 of file folder.cpp.

int Akregator::Folder::totalCount (  )  const [virtual]

returns the number of articles in all children

Returns:
number of articles

Implements Akregator::TreeNode.

Definition at line 245 of file folder.cpp.

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

Helps the rest of the app to decide if node should be handled as group or not.

Use only where necessary, use polymorphism where possible.

Implements Akregator::TreeNode.

Definition at line 79 of file folder.h.

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

converts the feed group into OPML format for save and export and appends it to node parent in document .

Children are processed and appended recursively.

Parameters:
parent The parent element
document The DOM document
Returns:
The newly created element representing this feed group

Implements Akregator::TreeNode.

Reimplemented in Akregator::TagFolder.

Definition at line 118 of file folder.cpp.

QValueList< TreeNode * > Akregator::Folder::children (  )  const [virtual]

returns the (direct) children of this node.

Returns:
a list of pointers to the child nodes

Definition at line 133 of file folder.cpp.

void Akregator::Folder::insertChild ( TreeNode node,
TreeNode after 
) [virtual]

inserts node as child after child node after.

if after is not a child of this group, node will be inserted as first child

Parameters:
node the tree node to insert
after the node after which node will be inserted

Definition at line 138 of file folder.cpp.

void Akregator::Folder::prependChild ( TreeNode node  )  [virtual]

inserts node as first child

Parameters:
node the tree node to insert

Definition at line 185 of file folder.cpp.

void Akregator::Folder::appendChild ( TreeNode node  )  [virtual]

inserts node as last child

Parameters:
node the tree node to insert

Definition at line 168 of file folder.cpp.

void Akregator::Folder::removeChild ( TreeNode node  )  [virtual]

remove node from children.

Note that node will not be deleted

Parameters:
node the child node to remove

Definition at line 202 of file folder.cpp.

TreeNode * Akregator::Folder::firstChild (  )  [virtual]

returns the first child of the group, 0 if none exist

Definition at line 220 of file folder.cpp.

TreeNode * Akregator::Folder::lastChild (  )  [virtual]

returns the last child of the group, 0 if none exist

Definition at line 225 of file folder.cpp.

bool Akregator::Folder::isOpen (  )  const [virtual]

returns whether the feed group is opened or not.

Use only in FolderItem.

Definition at line 230 of file folder.cpp.

void Akregator::Folder::setOpen ( bool  open  )  [virtual]

open/close the feed group (display it as expanded/collapsed in the tree view).

Use only in FolderItem.

Definition at line 235 of file folder.cpp.

void Akregator::Folder::signalChildAdded ( TreeNode  )  [signal]

emitted when a child was added

void Akregator::Folder::signalChildRemoved ( Folder ,
TreeNode  
) [signal]

emitted when a child was removed

void Akregator::Folder::slotDeleteExpiredArticles (  )  [virtual, slot]

Delete expired articles recursively.

Implements Akregator::TreeNode.

Definition at line 289 of file folder.cpp.

void Akregator::Folder::slotMarkAllArticlesAsRead (  )  [virtual, slot]

Mark articles of children recursively as read.

Implements Akregator::TreeNode.

Definition at line 267 of file folder.cpp.

void Akregator::Folder::slotChildChanged ( TreeNode node  )  [virtual, slot]

Called when a child was modified.

Parameters:
node the child that was changed

Definition at line 276 of file folder.cpp.

void Akregator::Folder::slotChildDestroyed ( TreeNode node  )  [virtual, slot]

Called when a child was destroyed.

Parameters:
node the child that was destroyed

Definition at line 282 of file folder.cpp.

void Akregator::Folder::slotAddToFetchQueue ( FetchQueue queue,
bool  intervalFetchesOnly = false 
) [virtual, slot]

enqueues children recursively for fetching

Parameters:
queue a fetch queue
internvalFetchesOnly 

Implements Akregator::TreeNode.

Definition at line 298 of file folder.cpp.

TreeNode * Akregator::Folder::next (  )  [virtual, slot]

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 327 of file folder.cpp.

void Akregator::Folder::insertChild ( uint  index,
TreeNode node 
) [protected, virtual]

inserts node as child on position index

Parameters:
index the position where to insert
node the tree node to insert

Definition at line 148 of file folder.cpp.

void Akregator::Folder::doArticleNotification (  )  [protected, virtual]

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

Reimplemented from Akregator::TreeNode.

Definition at line 305 of file folder.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys