summaryrefslogtreecommitdiffstats
path: root/ksquirrel/sq_filethumbviewitem.h
blob: 3a8edad4718ed9a65ececaf1dc644a9f1029730d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/***************************************************************************
                          sq_filethumbviewitem.h  -  description
                             -------------------
    begin                : ??? ??? 12 2004
    copyright            : (C) 2004 by Baryshev Dmitry
    email                : ksquirrel.iv@gmail.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef SQ_FILETHUMBVIEWITEM_H
#define SQ_FILETHUMBVIEWITEM_H

#include <tqpixmap.h>

#include <kfileiconview.h>

/*
 *  SQ_FileThumbViewItem represents a thumbnail item in SQ_FileThumbView.
 *  Additianally it stores some useful info.
 */

class SQ_FileThumbViewItem : public KFileIconViewItem
{
    public: 
        SQ_FileThumbViewItem(TQIconView *parent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi);
        ~SQ_FileThumbViewItem();

        bool listed() const;

        void setListed(bool l);

    protected:
        /*
         *  Painting routines.
         */
        virtual void paintItem(TQPainter *p, const TQColorGroup &cg);
        virtual void paintFocus(TQPainter *p, const TQColorGroup &cg);
        void paintText(TQPainter *p, const TQColorGroup &c);

    private:
        bool m_listed;
};

inline
bool SQ_FileThumbViewItem::listed() const
{
    return m_listed;
}

inline
void SQ_FileThumbViewItem::setListed(bool l)
{
    m_listed = l;
}

#endif