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

akregator

  • sources
  • kde-4.12
  • kdepim
  • akregator
  • src
treenode.h
Go to the documentation of this file.
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Frank Osterfeld <osterfeld@kde.org>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 
20  As a special exception, permission is given to link this program
21  with any edition of Qt, and distribute the resulting executable,
22  without including the source code for Qt in the source distribution.
23 */
24 
25 #ifndef AKREGATOR_TREENODE_H
26 #define AKREGATOR_TREENODE_H
27 
28 #include "akregator_export.h"
29 #include <QObject>
30 #include <QVector>
31 
32 class KJob;
33 
34 class QDomDocument;
35 class QDomElement;
36 class QIcon;
37 class QPoint;
38 class QString;
39 class QStringList;
40 template <class T> class QList;
41 
42 namespace Akregator
43 {
44 
45 class ArticleDeleteJob;
46 class ArticleListJob;
47 class TreeNodeVisitor;
48 class Article;
49 class Feed;
50 class Folder;
51 class FetchQueue;
52 
53 
59 class AKREGATOR_EXPORT TreeNode : public QObject
60 {
61  friend class ::Akregator::ArticleListJob;
62  friend class ::Akregator::Folder;
63 
64 Q_OBJECT
65 
66 public:
67 
69  TreeNode();
70 
72  virtual ~TreeNode();
73 
74  virtual bool accept(TreeNodeVisitor* visitor) = 0;
75 
79  virtual int unread() const = 0;
80 
81 
85  virtual int totalCount() const = 0;
86 
87 
91  QString title() const;
92 
93 
98  void setTitle(const QString& title);
99 
100 
104  virtual const TreeNode* nextSibling() const;
105  virtual TreeNode* nextSibling();
106 
110  virtual const TreeNode* prevSibling() const;
111  virtual TreeNode* prevSibling();
112 
113 
114 
118  virtual const Folder* parent() const;
119  virtual Folder* parent();
120 
121 
125  virtual QList<const TreeNode*> children() const;
126  virtual QList<TreeNode*> children();
127 
128  virtual QVector<const Feed*> feeds() const = 0;
129  virtual QVector<Feed*> feeds() = 0;
130 
131  virtual QVector<const Folder*> folders() const = 0;
132  virtual QVector<Folder*> folders() = 0;
133 
134  virtual TreeNode* childAt( int pos );
135  virtual const TreeNode* childAt( int pos ) const;
136 
140  virtual void setParent(Folder* parent);
141 
142  virtual QIcon icon() const = 0;
143 
144  ArticleListJob* createListJob();
145 
149  virtual bool isGroup() const = 0;
150 
155  virtual bool isAggregation() const = 0;
156 
161  virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const = 0;
162 
167  virtual void setNotificationMode(bool doNotify);
168 
172  virtual const TreeNode* next() const = 0;
173  virtual TreeNode* next() = 0;
174 
178  virtual uint id() const;
179 
181  virtual void setId(uint id);
182 
183  QPoint listViewScrollBarPositions() const;
184  void setListViewScrollBarPositions( const QPoint& pos );
185 
186  virtual KJob* createMarkAsReadJob() = 0;
187 
188 public slots:
189 
193  virtual void slotAddToFetchQueue(Akregator::FetchQueue* queue, bool intervalFetchesOnly=false) = 0;
194 
195 signals:
196 
198  void signalDestroyed(Akregator::TreeNode*);
199 
201  void signalChanged(Akregator::TreeNode*);
202 
207  void signalArticlesAdded(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
208 
210  void signalArticlesUpdated(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
211 
213  void signalArticlesRemoved(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
214 
215 protected:
216 
220  virtual void nodeModified();
221 
224  virtual void articlesModified();
225 
229  virtual void doArticleNotification();
230 
231  void emitSignalDestroyed();
232 
233 private:
237  virtual QList<Article> articles() = 0;
238 
239 private:
240  class TreeNodePrivate;
241  TreeNodePrivate* d;
242 };
243 
244 } // namespace Akregator
245 
246 #endif // AKREGATOR_TREENODE_H
AKREGATOR_EXPORT
#define AKREGATOR_EXPORT
Definition: akregator_export.h:35
uint
unsigned int uint
Definition: article.h:39
QObject
Akregator::ArticleListJob
Definition: articlejobs.h:108
akregator_export.h
Akregator::TreeNodeVisitor
Definition: treenodevisitor.h:35
Akregator::Folder
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
Akregator::TreeNode
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:59
KJob
Akregator::FetchQueue
Definition: fetchqueue.h:37
QList
Definition: article.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:14 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