split message into several paras and fix file extension markup
[kdepim.git] / knode / kncollectionviewitem.h
blob715dbde27327f2726cbdb844ef882c7f8d3417b7
1 /*
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>
22 using namespace KPIM;
24 /** Folder tree item. */
25 class KNCollectionViewItem : public FolderTreeWidgetItem {
27 public:
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();
33 /**
34 Sort newsgroups before local folders.
35 Reimplemented from FolderTreeWidgetItem.
37 bool operator<( const QTreeWidgetItem &other ) const;
39 /**
40 Sets the collection this item represents.
42 void setCollection( KNCollection::Ptr c );
43 /**
44 Returns the collection this item represents.
46 KNCollection::Ptr collection() const
47 { return coll; };
49 protected:
50 /**
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;
56 private:
57 /** Inialize this item. */
58 void setUp();
60 KNCollection::Ptr coll;
63 #endif