From 33eea8c9293b061d4483f17b7070c823ae8e001c Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 5 Jan 2012 20:41:59 +0100 Subject: Folders Panel: Activate folders on single-click Even if double-click is used as default setting, the folders panel should open folders with a single-click. BUG: 289971 FIXED-IN: 4.8.0 --- src/kitemviews/kitemlistcontroller.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/kitemviews/kitemlistcontroller.h') diff --git a/src/kitemviews/kitemlistcontroller.h b/src/kitemviews/kitemlistcontroller.h index b8de195eb..b7efbde74 100644 --- a/src/kitemviews/kitemlistcontroller.h +++ b/src/kitemviews/kitemlistcontroller.h @@ -104,6 +104,15 @@ public: void setAutoActivationDelay(int delay); int autoActivationDelay() const; + /** + * If set to true, the signals itemActivated() and itemsActivated() are emitted + * after a single-click of the left mouse button. If set to false, a double-click + * is required. Per default the setting from KGlobalSettings::singleClick() is + * used. + */ + void setSingleClickActivation(bool singleClick); + bool singleClickActivation() const; + virtual bool showEvent(QShowEvent* event); virtual bool hideEvent(QHideEvent* event); virtual bool keyPressEvent(QKeyEvent* event); @@ -249,6 +258,7 @@ private: qreal keyboardAnchorPos(int index) const; private: + bool m_singleClickActivation; bool m_selectionTogglePressed; SelectionBehavior m_selectionBehavior; KItemModelBase* m_model; -- cgit v1.3.1