akregator/src

treenodeitem.h
1 /*
2  This file is part of Akregator.
3 
4  Copyright (C) 2004 Frank Osterfeld <frank.osterfeld at kdemail.net>
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 TQt, and distribute the resulting executable,
22  without including the source code for TQt in the source distribution.
23 */
24 
25 #ifndef AKREGATORTREENODEITEM_H
26 #define AKREGATORTREENODEITEM_H
27 
28 #include <tdelistview.h>
29 
30 class TQPoint;
31 class TQString;
32 
33 namespace Akregator {
34 
35 class FolderItem;
36 class TreeNode;
37 
41 class TreeNodeItem : public TDEListViewItem
42 {
43 
44 public:
45 
46  TreeNodeItem(FolderItem* parent, TreeNode* node);
47  TreeNodeItem(FolderItem* parent, TreeNodeItem* after, TreeNode* node);
48  TreeNodeItem(TDEListView* parent, TreeNode* node);
49  TreeNodeItem(TDEListView* parent, TreeNodeItem* after, TreeNode* node);
50  virtual ~TreeNodeItem();
51  virtual TreeNode* node();
52 
53  virtual void nodeChanged();
54 
55  virtual TQString toolTip() const;
56  virtual TreeNodeItem* firstChild() const;
57  virtual TreeNodeItem* nextSibling() const;
58  virtual FolderItem* parent() const;
59 
60  virtual void showContextMenu(const TQPoint& p) = 0;
61 
62  protected:
63 
64  TreeNode* m_node;
65 
66  virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
67 
68  private:
69 
70  void initialize(TreeNode* node);
71 };
72 
73 }
74 
75 #endif
abstract base class for all items in the feeds tree
Definition: treenodeitem.h:42
Abstract base class for all kind of elements in the feed tree, like feeds and feed groups (and search...
Definition: treenode.h:52