summaryrefslogtreecommitdiffstats
path: root/tdeui
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-09 11:08:39 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-10-09 11:08:39 -0500
commit216794724ca89104ad394ea9e55f5fdba1523707 (patch)
tree4a251ae0a6044deb28074b1b1d2896d76700777d /tdeui
parente1eaf5a90159b023cb4c0c9e5c68acba397c1457 (diff)
downloadtdelibs-216794724ca89104ad394ea9e55f5fdba1523707.tar.gz
tdelibs-216794724ca89104ad394ea9e55f5fdba1523707.zip
Add protected helper methods to better handle rubberband operations outside of a TDEListView in file manager mode
This relates to Bug 1961
Diffstat (limited to 'tdeui')
-rw-r--r--tdeui/tdelistview.cpp14
-rw-r--r--tdeui/tdelistview.h15
2 files changed, 29 insertions, 0 deletions
diff --git a/tdeui/tdelistview.cpp b/tdeui/tdelistview.cpp
index b2965ab3e..ace1ea075 100644
--- a/tdeui/tdelistview.cpp
+++ b/tdeui/tdelistview.cpp
@@ -1549,6 +1549,20 @@ bool TDEListView::automaticSelection() const
return d->selectedBySimpleMove;
}
+void TDEListView::resetKeyboardSelectionOperation()
+{
+ d->wasShiftEvent = false;
+ d->selectionDirection = 0;
+}
+
+void TDEListView::setActiveMultiSelectItem(TQListViewItem *item) {
+ TQListViewItem* origItem = currentItem();
+ if (!d->initialFileManagerItem) {
+ d->initialFileManagerItem = origItem;
+ }
+ setCurrentItem(item);
+}
+
void TDEListView::fileManagerKeyPressEvent (TQKeyEvent* e)
{
//don't care whether it's on the keypad or not
diff --git a/tdeui/tdelistview.h b/tdeui/tdelistview.h
index 950ce253a..f62e8f61e 100644
--- a/tdeui/tdelistview.h
+++ b/tdeui/tdelistview.h
@@ -997,6 +997,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.
*/