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>
25 /** Header view item. */
26 class KNHdrViewItem
: public K3ListViewItem
{
29 explicit KNHdrViewItem( KNHeaderView
*ref
, KNArticle::Ptr a
= KNArticle::Ptr() );
30 explicit KNHdrViewItem( KNHdrViewItem
*ref
, KNArticle::Ptr a
= KNArticle::Ptr() );
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
; }
46 Q3DragObject
* dragObject();
49 int countUnreadInThread();
51 bool showToolTip( int column
) const { return mShowToolTip
[column
]; }
54 void init( KNArticle::Ptr
);
62 bool mShowToolTip
[5]; // ### hardcoded column count :-(