doc fixes found while translating
[kdepim.git] / knode / knhdrviewitem.h
blobab215de2539575fc60656b395d47291cbc4f565c
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 KNHDRVIEWITEM_H
16 #define KNHDRVIEWITEM_H
18 #include "knarticle.h"
20 #include <k3listview.h>
22 class KNHeaderView;
25 /** Header view item. */
26 class KNHdrViewItem : public K3ListViewItem {
28 public:
29 explicit KNHdrViewItem( KNHeaderView *ref, KNArticle::Ptr a = KNArticle::Ptr() );
30 explicit KNHdrViewItem( KNHdrViewItem *ref, KNArticle::Ptr a = KNArticle::Ptr() );
31 ~KNHdrViewItem();
33 virtual int compare(Q3ListViewItem *i, int col, bool ascending) const;
35 void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
36 int width(const QFontMetrics &fm, const Q3ListView *lv, int column) const;
38 virtual QString text( int col ) const;
40 void expandChildren();
42 void setActive( bool b ) { mActive = b; }
43 bool isActive() const { return mActive; }
45 // DND
46 Q3DragObject* dragObject();
48 KNArticle::Ptr art;
49 int countUnreadInThread();
51 bool showToolTip( int column ) const { return mShowToolTip[column]; }
53 private:
54 void init( KNArticle::Ptr );
56 bool greyOut();
57 bool firstColBold();
58 QColor normalColor();
59 QColor greyColor();
61 bool mActive;
62 bool mShowToolTip[5]; // ### hardcoded column count :-(
66 #endif