blob: d8dbc5da327d7632c2a74d349c813e39dc5e59e6 (
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/***************************************************************************
sq_fileiconviewbase.h - description
-------------------
begin : ??? Feb 22 2005
copyright : (C) 2005 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_FILEICONVIEWBASE_H
#define SQ_FILEICONVIEWBASE_H
#include <kfileiconview.h>
class KonqFileTip;
/*
* SQ_FileIconViewBase is a base class for icon view, list view and
* thumbnail view with drag-and-drop support.
*/
class SQ_FileIconViewBase : public KFileIconView
{
Q_OBJECT
public:
SQ_FileIconViewBase(QWidget *parent = 0, const char *name = 0);
virtual ~SQ_FileIconViewBase();
virtual void insertCdUpItem(const KURL &base) = 0;
virtual void updateView(const KFileItem *i);
protected:
/*
* Get KFileIconViewItem by KFileItem. All KFileItems store
* a pointer to appropriate KFileIconViewItem as extra data.
* See also KFileItem::setExtraData() and insertItem().
*/
KFileIconViewItem* viewItem(const KFileItem *item);
/*
* Accept dragging.
*/
virtual void dragEnterEvent(QDragEnterEvent *);
/*
* Handle double clicks.
*/
virtual void contentsMouseDoubleClickEvent(QMouseEvent *e);
virtual bool eventFilter(QObject *o, QEvent *e);
void initItemMy(KFileIconViewItem *item, const KFileItem *i, bool upd = false);
signals:
void invokeBrowser();
public slots:
void slotResetToolTip();
protected slots:
/*
* Show extended tooltip for 'item'.
*/
void slotShowToolTip(QIconViewItem *item);
/*
* Remove tootip and stop timer.
*/
void slotRemoveToolTip();
private:
/*
* Tooltip for file item.
*/
KonqFileTip *toolTip;
};
#endif
|