blob: 1a0f27e2bcfcbb5f3e1c290a1207f47b9d5d7d77 (
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
|
/****************************************************************************
KHotKeys
Copyright (C) 1999-2002 Lubos Lunak <l.lunak@kde.org>
Distributed under the terms of the GNU General Public License version 2.
****************************************************************************/
#ifndef _KHLISTVIEW_H_
#define _KHLISTVIEW_H_
#include <tqtimer.h>
#include <tdelistview.h>
#include <kdemacros.h>
namespace KHotKeys
{
class KDE_EXPORT KHListView
: public TDEListView
{
TQ_OBJECT
TQ_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect )
public:
KHListView( TQWidget* parent_P, const char* name_P = NULL );
virtual void clear();
virtual void insertItem( TQListViewItem* item_P );
virtual void clearSelection();
bool forceSelect() const;
void setForceSelect( bool force_P );
signals:
void current_changed( TQListViewItem* item_P );
protected:
virtual void contentsDropEvent (TQDropEvent*);
private slots:
void slot_selection_changed( TQListViewItem* item_P );
void slot_selection_changed();
void slot_current_changed( TQListViewItem* item_P );
void slot_insert_select();
private:
TQListViewItem* saved_current_item;
bool in_clear;
bool ignore;
bool force_select;
TQTimer insert_select_timer;
};
//***************************************************************************
// Inline
//***************************************************************************
inline
void KHListView::setForceSelect( bool force_P )
{
force_select = force_P;
}
inline
bool KHListView::forceSelect() const
{
return force_select;
}
} // namespace KHotKeys
#endif
|