akregator/src

#include <folder.h>

Inheritance diagram for Akregator::Folder:
Akregator::TreeNode

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 ()
 
- 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 signalChildAdded (TreeNode *)
 
void signalChildRemoved (Folder *, TreeNode *)
 
- 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

 Folder (const TQString &title=TQString())
 
virtual bool accept (TreeNodeVisitor *visitor)
 
virtual TQValueList< Articlearticles (const TQString &tag=TQString())
 
virtual TQStringList tags () const
 
virtual int unread () const
 
virtual int totalCount () const
 
virtual bool isGroup () const
 
virtual TQDomElement toOPML (TQDomElement parent, TQDomDocument document) const
 
virtual TQValueList< 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)
 
- 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 TreeNodenext ()=0
 
virtual uint id () const
 
virtual void setId (uint id)
 

Static Public Member Functions

static FolderfromOPML (TQDomElement e)
 

Protected Member Functions

virtual void insertChild (uint index, TreeNode *node)
 
virtual void doArticleNotification ()
 
- Protected Member Functions inherited from Akregator::TreeNode
virtual void nodeModified ()
 
virtual void articlesModified ()
 
void emitSignalDestroyed ()
 

Detailed Description

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

Definition at line 44 of file folder.h.

Constructor & Destructor Documentation

◆ Folder()

Akregator::Folder::Folder ( const TQString &  title = TQString())

Creates a new folder with a given title.

Parameters
titleThe title of the feed group

Definition at line 71 of file folder.cpp.

Member Function Documentation

◆ appendChild()

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

inserts node as last child

Parameters
nodethe tree node to insert

Definition at line 168 of file folder.cpp.

◆ articles()

TQValueList< Article > Akregator::Folder::articles ( const TQString &  tag = TQString())
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.

◆ children()

TQValueList< 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.

◆ doArticleNotification()

void Akregator::Folder::doArticleNotification ( )
protectedvirtual

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

Reimplemented from Akregator::TreeNode.

Definition at line 305 of file folder.cpp.

◆ firstChild()

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

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

Definition at line 220 of file folder.cpp.

◆ fromOPML()

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

creates a feed group parsed from a XML dom element.

Child nodes are not inserted or parsed.

Parameters
ethe element representing the feed group
Returns
a freshly created feed group

Definition at line 63 of file folder.cpp.

◆ insertChild() [1/2]

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
nodethe tree node to insert
afterthe node after which node will be inserted

Definition at line 138 of file folder.cpp.

◆ insertChild() [2/2]

void Akregator::Folder::insertChild ( uint  index,
TreeNode node 
)
protectedvirtual

inserts node as child on position index

Parameters
indexthe position where to insert
nodethe tree node to insert

Definition at line 148 of file folder.cpp.

◆ isGroup()

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

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 80 of file folder.h.

◆ isOpen()

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.

◆ lastChild()

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

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

Definition at line 225 of file folder.cpp.

◆ next

TreeNode * Akregator::Folder::next ( )
virtualslot

returns the next node in the tree.

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

Definition at line 327 of file folder.cpp.

◆ prependChild()

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

inserts node as first child

Parameters
nodethe tree node to insert

Definition at line 185 of file folder.cpp.

◆ removeChild()

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

remove node from children.

Note that node will not be deleted

Parameters
nodethe child node to remove

Definition at line 202 of file folder.cpp.

◆ setOpen()

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.

◆ signalChildAdded

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

emitted when a child was added

◆ signalChildRemoved

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

emitted when a child was removed

◆ slotAddToFetchQueue

void Akregator::Folder::slotAddToFetchQueue ( FetchQueue *  queue,
bool  intervalFetchesOnly = false 
)
virtualslot

enqueues children recursively for fetching

Parameters
queuea fetch queue
internvalFetchesOnly

Definition at line 298 of file folder.cpp.

◆ slotChildChanged

void Akregator::Folder::slotChildChanged ( TreeNode node)
virtualslot

Called when a child was modified.

Parameters
nodethe child that was changed

Definition at line 276 of file folder.cpp.

◆ slotChildDestroyed

void Akregator::Folder::slotChildDestroyed ( TreeNode node)
virtualslot

Called when a child was destroyed.

Parameters
nodethe child that was destroyed

Definition at line 282 of file folder.cpp.

◆ slotDeleteExpiredArticles

void Akregator::Folder::slotDeleteExpiredArticles ( )
virtualslot

Delete expired articles recursively.

Definition at line 289 of file folder.cpp.

◆ slotMarkAllArticlesAsRead

void Akregator::Folder::slotMarkAllArticlesAsRead ( )
virtualslot

Mark articles of children recursively as read.

Definition at line 267 of file folder.cpp.

◆ tags()

TQStringList 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.

◆ toOPML()

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

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

Children are processed and appended recursively.

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

Implements Akregator::TreeNode.

Definition at line 118 of file folder.cpp.

◆ totalCount()

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.

◆ unread()

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.


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