~ubuntu-branches/ubuntu/vivid/krusader/vivid-proposed

« back to all changes in this revision

Viewing changes to krusader/Panel/krdetailedviewitem.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-05-05 22:26:37 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505222637-ydv3cwjwy365on2r
Tags: 1:2.1.0~beta1-1ubuntu1
* Merge from Debian Unstable.  Remaining changes:
  - Retain Kubuntu doc path

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
                            krdetailedviewitem.h
3
 
                             -------------------
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
 
 ---------------------------------------------------------------------------
8
 
  Description
9
 
 ***************************************************************************
10
 
 
11
 
  A
12
 
 
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
19
 
 
20
 
                                                     H e a d e r    F i l e
21
 
 
22
 
 ***************************************************************************
23
 
 *                                                                         *
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.                                   *
28
 
 *                                                                         *
29
 
 ***************************************************************************/
30
 
 
31
 
#ifndef KRDETAILEDVIEWITEM_H
32
 
#define KRDETAILEDVIEWITEM_H
33
 
 
34
 
#ifndef QT3_SUPPORT
35
 
#define QT3_SUPPORT 1
36
 
#define KDE3_SUPPORT 1
37
 
#endif
38
 
 
39
 
#include "krviewitem.h"
40
 
#include <sys/types.h>
41
 
#include "../VFS/vfile.h"
42
 
#include <k3listview.h>
43
 
#include <qpointer.h>
44
 
#include <QPixmap>
45
 
 
46
 
#define FASTER
47
 
 
48
 
class QPixmap;
49
 
class KrDetailedView;
50
 
 
51
 
class KrDetailedViewItem : public K3ListViewItem, public KrViewItem {
52
 
friend class KrDetailedView;
53
 
public:
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);
60
 
        void repaintItem();
61
 
        static void itemHeightChanged(); // force the items to resize when icon/font size change
62
 
#ifdef FASTER           
63
 
        virtual void setup(); // called when listview needs to know the height of the item
64
 
#endif
65
 
        virtual QRect itemRect() const { return listView()->itemRect( this ); }
66
 
        virtual void redraw() { repaintItem(); repaint(); }
67
 
protected:
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); }
71
 
 
72
 
private:
73
 
        static const QColor & setColorIfContrastIsSufficient(const QColor & background, const QColor & color1, const QColor & color2);
74
 
#ifdef FASTER   
75
 
        bool initiated;
76
 
        static int expHeight;
77
 
#endif
78
 
};
79
 
 
80
 
#endif