From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khotkeys/shared/khlistview.h | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 khotkeys/shared/khlistview.h (limited to 'khotkeys/shared/khlistview.h') diff --git a/khotkeys/shared/khlistview.h b/khotkeys/shared/khlistview.h new file mode 100644 index 000000000..69986299d --- /dev/null +++ b/khotkeys/shared/khlistview.h @@ -0,0 +1,69 @@ +/**************************************************************************** + + KHotKeys + + Copyright (C) 1999-2002 Lubos Lunak + + Distributed under the terms of the GNU General Public License version 2. + +****************************************************************************/ + +#ifndef _KHLISTVIEW_H_ +#define _KHLISTVIEW_H_ + +#include + +#include +#include + +namespace KHotKeys +{ + +class KDE_EXPORT KHListView + : public KListView + { + Q_OBJECT + Q_PROPERTY( bool forceSelect READ forceSelect WRITE setForceSelect ) + public: + KHListView( QWidget* parent_P, const char* name_P = NULL ); + virtual void clear(); + virtual void insertItem( QListViewItem* item_P ); + virtual void clearSelection(); + bool forceSelect() const; + void setForceSelect( bool force_P ); + signals: + void current_changed( QListViewItem* item_P ); + protected: + virtual void contentsDropEvent (QDropEvent*); + private slots: + void slot_selection_changed( QListViewItem* item_P ); + void slot_selection_changed(); + void slot_current_changed( QListViewItem* item_P ); + void slot_insert_select(); + private: + QListViewItem* saved_current_item; + bool in_clear; + bool ignore; + bool force_select; + QTimer 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 -- cgit v1.2.1