summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-09 11:08:39 -0500
committerSlávek Banko <slavek.banko@axis.cz>2015-12-23 02:22:55 +0100
commit24d1217f49309d104c9ae3877318e4c3b6a37cff (patch)
treef12ae48880bc56220a85d83887d0a2129d9b7bb6 /kdeui
parent13fddea637d2dd60d6bd094f64346bff8bbfd7d5 (diff)
downloadtdelibs-24d1217f49309d104c9ae3877318e4c3b6a37cff.tar.gz
tdelibs-24d1217f49309d104c9ae3877318e4c3b6a37cff.zip
Add protected helper methods to better handle rubberband operations outside of a TDEListView in file manager mode
This relates to Bug 1961 (cherry picked from commit 216794724ca89104ad394ea9e55f5fdba1523707)
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/klistview.cpp14
-rw-r--r--kdeui/klistview.h15
2 files changed, 29 insertions, 0 deletions
diff --git a/kdeui/klistview.cpp b/kdeui/klistview.cpp
index 2466f7652..6fbcb00c3 100644
--- a/kdeui/klistview.cpp
+++ b/kdeui/klistview.cpp
@@ -1515,6 +1515,20 @@ bool KListView::automaticSelection() const
return d->selectedBySimpleMove;
}
+void KListView::resetKeyboardSelectionOperation()
+{
+ d->wasShiftEvent = false;
+ d->selectionDirection = 0;
+}
+
+void KListView::setActiveMultiSelectItem(TQListViewItem *item) {
+ TQListViewItem* origItem = currentItem();
+ if (!d->initialFileManagerItem) {
+ d->initialFileManagerItem = origItem;
+ }
+ setCurrentItem(item);
+}
+
void KListView::fileManagerKeyPressEvent (TQKeyEvent* e)
{
//don't care whether it's on the keypad or not
diff --git a/kdeui/klistview.h b/kdeui/klistview.h
index 1c3702e46..6ed463ab6 100644
--- a/kdeui/klistview.h
+++ b/kdeui/klistview.h
@@ -913,6 +913,21 @@ protected:
void resetAutoSelection();
/**
+ * In FileManager selection mode: reset the keyboard selection operation;
+ * e.g. after completion of a mouse rubberband operation
+ * @since 14.0
+ */
+ void resetKeyboardSelectionOperation();
+
+ /**
+ * In FileManager selection mode: set the current keyboard cursor selection
+ * item; e.g. during a mouse rubberband operation
+ * @param direction down is 1, up is -1
+ * @since 14.0
+ */
+ void setActiveMultiSelectItem(TQListViewItem *item);
+
+ /**
* @deprecated This is just here for binary compatibility. Use the signal
* in TQListView instead.
*/