treenodeitem.h
00001 /* 00002 This file is part of Akregator. 00003 00004 Copyright (C) 2004 Frank Osterfeld <frank.osterfeld at kdemail.net> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 00025 #ifndef AKREGATORTREENODEITEM_H 00026 #define AKREGATORTREENODEITEM_H 00027 00028 #include <klistview.h> 00029 00030 class TQPoint; 00031 class TQString; 00032 00033 namespace Akregator { 00034 00035 class FolderItem; 00036 class TreeNode; 00037 00041 class TreeNodeItem : public KListViewItem 00042 { 00043 00044 public: 00045 00046 TreeNodeItem(FolderItem* parent, TreeNode* node); 00047 TreeNodeItem(FolderItem* parent, TreeNodeItem* after, TreeNode* node); 00048 TreeNodeItem(KListView* parent, TreeNode* node); 00049 TreeNodeItem(KListView* parent, TreeNodeItem* after, TreeNode* node); 00050 virtual ~TreeNodeItem(); 00051 virtual TreeNode* node(); 00052 00053 virtual void nodeChanged(); 00054 00055 virtual TQString toolTip() const; 00056 virtual TreeNodeItem* firstChild() const; 00057 virtual TreeNodeItem* nextSibling() const; 00058 virtual FolderItem* parent() const; 00059 00060 virtual void showContextMenu(const TQPoint& p) = 0; 00061 00062 protected: 00063 00064 TreeNode* m_node; 00065 00066 virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); 00067 00068 private: 00069 00070 void initialize(TreeNode* node); 00071 }; 00072 00073 } 00074 00075 #endif