[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/akregator/src
From: Frank Osterfeld <frank.osterfeld () kdemail ! net>
Date: 2005-06-07 21:57:07
Message-ID: 1118181427.801715.32586.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 423236 by osterfeld:
add TreeNode::tags() to obtain a list of all tags occuring in a feed tree
M +5 -0 feed.cpp
M +2 -0 feed.h
M +11 -0 folder.cpp
M +4 -0 folder.h
M +6 -1 treenode.h
--- trunk/KDE/kdepim/akregator/src/feed.cpp #423235:423236
@@ -160,6 +160,11 @@
return feed;
}
+QStringList Feed::tags() const
+{
+ return d->archive->tags();
+}
+
QValueList<Article> Feed::articles(const QString& tag)
{
if (!d->articlesLoaded)
--- trunk/KDE/kdepim/akregator/src/feed.h #423235:423236
@@ -178,6 +178,8 @@
virtual QValueList<Article> articles(const QString& tag=QString::null);
+ virtual QStringList tags() const;
+
/** returns whether a fetch error has occured */
bool fetchErrorOccurred();
--- trunk/KDE/kdepim/akregator/src/folder.cpp #423235:423236
@@ -28,6 +28,7 @@
#include <qlistview.h>
#include <qdom.h>
+#include <qstringlist.h>
#include <qvaluelist.h>
#include <kdebug.h>
@@ -75,6 +76,16 @@
d = 0;
}
+QStringList Folder::tags() const
+{
+ QStringList t;
+ QValueList<TreeNode*>::ConstIterator en = d->children.end();
+ for (QValueList<TreeNode*>::ConstIterator it = d->children.begin(); it != en; \
++it) + t += (*it)->tags();
+
+ return t;
+}
+
QValueList<Article> Folder::articles(const QString& tag)
{
QValueList<Article> seq;
--- trunk/KDE/kdepim/akregator/src/folder.h #423235:423236
@@ -30,6 +30,7 @@
class QDomDocument;
class QDomElement;
+class QStringList;
template <class T> class QValueList;
namespace Akregator
@@ -59,6 +60,9 @@
/** returns recursively concatenated articles of children
@return an article sequence containing articles of children */
virtual QValueList<Article> articles(const QString& tag=QString::null);
+
+ /** returns a list of all tags occuring in the subtree of this folder */
+ virtual QStringList tags() const;
/** returns the number of unread articles in all children
@return number of unread articles */
--- trunk/KDE/kdepim/akregator/src/treenode.h #423235:423236
@@ -31,6 +31,7 @@
class QDomDocument;
class QDomElement;
class QString;
+class QStringList;
template <class T> class QValueList;
namespace Akregator
@@ -113,8 +114,12 @@
@return sequence of articles */
virtual QValueList<Article> articles(const QString& tag=QString::null) = 0;
+
+ /** returns a list of all tags occuring in this node (sub tree for folders)
+ */
+
+ virtual QStringList tags() const = 0;
-
/** 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. @return whether the \
node is a feed group or not */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic