1
/***************************************************************************
4
copyright : (C) 2000-2002 by Shie Erlich & Rafi Yanai
5
e-mail : krusader@users.sourceforge.net
6
web site : http://krusader.sourceforge.net
7
---------------------------------------------------------------------------
9
***************************************************************************
13
db dD d8888b. db db .d8888. .d8b. d8888b. d88888b d8888b.
14
88 ,8P' 88 `8D 88 88 88' YP d8' `8b 88 `8D 88' 88 `8D
15
88,8P 88oobY' 88 88 `8bo. 88ooo88 88 88 88ooooo 88oobY'
16
88`8b 88`8b 88 88 `Y8b. 88~~~88 88 88 88~~~~~ 88`8b
17
88 `88. 88 `88. 88b d88 db 8D 88 88 88 .8D 88. 88 `88.
18
YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
22
***************************************************************************
24
* This program is free software; you can redistribute it and/or modify *
25
* it under the terms of the GNU General Public License as published by *
26
* the Free Software Foundation; either version 2 of the License, or *
27
* (at your option) any later version. *
29
***************************************************************************/
31
#ifndef KRDETAILEDVIEWITEM_H
32
#define KRDETAILEDVIEWITEM_H
36
#define KDE3_SUPPORT 1
39
#include "krviewitem.h"
40
#include <sys/types.h>
41
#include "../VFS/vfile.h"
42
#include <k3listview.h>
51
class KrDetailedViewItem : public K3ListViewItem, public KrViewItem {
52
friend class KrDetailedView;
54
KrDetailedViewItem(KrDetailedView *parent, Q3ListViewItem *after, vfile *vf);
55
inline bool isSelected() const { return K3ListViewItem::isSelected(); }
56
inline void setSelected(bool s) { K3ListViewItem::setSelected(s); repaint(); }
57
int compare(Q3ListViewItem *i,int col,bool ascending ) const;
58
void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
59
void paintFocus(QPainter *p, const QColorGroup &cg, const QRect &r);
61
static void itemHeightChanged(); // force the items to resize when icon/font size change
63
virtual void setup(); // called when listview needs to know the height of the item
65
virtual QRect itemRect() const { return listView()->itemRect( this ); }
66
virtual void redraw() { repaintItem(); repaint(); }
68
// text() was made protected in order to catch every place where text(x) is used
69
// to gain unlawful information on the object
70
virtual inline QString text(int column) const { return K3ListViewItem::text(column); }
73
static const QColor & setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2);