2 KNode, the KDE newsreader
3 Copyright (c) 1999-2005 the KNode authors.
4 See file AUTHORS for details
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 You should have received a copy of the GNU General Public License
11 along with this program; if not, write to the Free Software Foundation,
12 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
15 #ifndef KNCOLLECTIONVIEWITEM_H
16 #define KNCOLLECTIONVIEWITEM_H
18 #include "kncollection.h"
20 #include <foldertreewidget.h>
24 /** Folder tree item. */
25 class KNCollectionViewItem
: public FolderTreeWidgetItem
{
28 explicit KNCollectionViewItem( FolderTreeWidget
*parent
, Protocol protocol
= NONE
, FolderType type
= Root
);
29 explicit KNCollectionViewItem( FolderTreeWidgetItem
*parent
, Protocol protocol
= NONE
,
30 FolderType type
= Other
, int unread
= 0, int total
= 0 );
31 ~KNCollectionViewItem();
34 Sort newsgroups before local folders.
35 Reimplemented from FolderTreeWidgetItem.
37 bool operator<( const QTreeWidgetItem
&other
) const;
40 Sets the collection this item represents.
42 void setCollection( KNCollection::Ptr c
);
44 Returns the collection this item represents.
46 KNCollection::Ptr
collection() const
51 Elid names of group according to usenet habit.
52 (e.g. fr.comp.lang.perl is elided to f.c.lang.perl)
54 virtual QString
elidedLabelText( const QFontMetrics
&fm
, unsigned int width
) const;
57 /** Inialize this item. */
60 KNCollection::Ptr coll
;