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

akregator

  • sources
  • kde-4.14
  • 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 ArticleListJob;
46 class TreeNodeVisitor;
47 class Article;
48 class Feed;
49 class Folder;
50 class FetchQueue;
51 
52 
58 class AKREGATOR_EXPORT TreeNode : public QObject
59 {
60  friend class ::Akregator::ArticleListJob;
61  friend class ::Akregator::Folder;
62 
63 Q_OBJECT
64 
65 public:
66 
68  TreeNode();
69 
71  virtual ~TreeNode();
72 
73  virtual bool accept(TreeNodeVisitor* visitor) = 0;
74 
78  virtual int unread() const = 0;
79 
80 
84  virtual int totalCount() const = 0;
85 
86 
90  QString title() const;
91 
92 
97  void setTitle(const QString& title);
98 
99 
103  virtual const TreeNode* nextSibling() const;
104  virtual TreeNode* nextSibling();
105 
109  virtual const TreeNode* prevSibling() const;
110  virtual TreeNode* prevSibling();
111 
112 
113 
117  virtual const Folder* parent() const;
118  virtual Folder* parent();
119 
120 
124  virtual QList<const TreeNode*> children() const;
125  virtual QList<TreeNode*> children();
126 
127  virtual QVector<const Feed*> feeds() const = 0;
128  virtual QVector<Feed*> feeds() = 0;
129 
130  virtual QVector<const Folder*> folders() const = 0;
131  virtual QVector<Folder*> folders() = 0;
132 
133  virtual TreeNode* childAt( int pos );
134  virtual const TreeNode* childAt( int pos ) const;
135 
139  virtual void setParent(Folder* parent);
140 
141  virtual QIcon icon() const = 0;
142 
143  ArticleListJob* createListJob();
144 
148  virtual bool isGroup() const = 0;
149 
154  virtual bool isAggregation() const = 0;
155 
160  virtual QDomElement toOPML( QDomElement parent, QDomDocument document ) const = 0;
161 
166  virtual void setNotificationMode(bool doNotify);
167 
171  virtual const TreeNode* next() const = 0;
172  virtual TreeNode* next() = 0;
173 
177  virtual uint id() const;
178 
180  virtual void setId(uint id);
181 
182  QPoint listViewScrollBarPositions() const;
183  void setListViewScrollBarPositions( const QPoint& pos );
184 
185  virtual KJob* createMarkAsReadJob() = 0;
186 
187 public slots:
188 
192  virtual void slotAddToFetchQueue(Akregator::FetchQueue* queue, bool intervalFetchesOnly=false) = 0;
193 
194 signals:
195 
197  void signalDestroyed(Akregator::TreeNode*);
198 
200  void signalChanged(Akregator::TreeNode*);
201 
206  void signalArticlesAdded(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
207 
209  void signalArticlesUpdated(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
210 
212  void signalArticlesRemoved(Akregator::TreeNode*, const QList<Akregator::Article>& guids);
213 
214 protected:
215 
219  virtual void nodeModified();
220 
223  virtual void articlesModified();
224 
228  virtual void doArticleNotification();
229 
230  void emitSignalDestroyed();
231 
232 private:
236  virtual QList<Article> articles() = 0;
237 
238 private:
239  class TreeNodePrivate;
240  TreeNodePrivate* d;
241 };
242 
243 } // namespace Akregator
244 
245 #endif // AKREGATOR_TREENODE_H
AKREGATOR_EXPORT
#define AKREGATOR_EXPORT
Definition: akregator_export.h:35
uint
unsigned int uint
Definition: article.h:41
QPoint
Akregator::ArticleListJob
Definition: articlejobs.h:110
QObject
QString
QList
Definition: article.h:41
QStringList
QDomDocument
QVector
akregator_export.h
Akregator::TreeNodeVisitor
Definition: treenodevisitor.h:35
Akregator::Folder
Represents a folder (containing feeds and/or other folders)
Definition: folder.h:44
QDomElement
Akregator::TreeNode
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:58
KJob
Akregator::FetchQueue
Definition: fetchqueue.h:37
QIcon
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:00 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
  • pimprint

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