┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.h
AgeCommit message (Collapse)Author
2025-11-10dolphin: improve keyboard search behavior for repeated charactersweinan li
The original keyboard search implementation had a limitation when dealing with files containing repeated characters like 44.txt. When typing 44, it would trigger rapid navigation to the next item starting with 4 instead of matching the full string 44. This patch introduces a smarter search strategy: 1. First attempt full string matching for exact file names 2. If full match fails and user is typing repeating characters, fall back to rapid navigation using either: - Last successful search string (for extended searches like 444 -> 4444) - First character only (original rapid navigation behavior) The changes include: - Modified changeCurrentItem signal to include a found parameter for search result feedback - Added m_lastSuccessfulSearch to track successful searches for better fallback behavior - Used Qt::DirectConnection to ensure synchronous execution for immediate result feedback This provides better user experience when searching for files with repeated characters while maintaining the rapid navigation feature for quick browsing. BUG: 501851
2025-05-09DolphinView: Remove -1 interval, add setAutoActivationEnabledAkseli Lahtinen
In future Qt versions, Qt Timers do not allow negative intervals. Instead, they will be changed to 1. Related Qt commit: https://github.com/qt/qtbase/commit/f1f610bc67bfd5c2ef31270a6945e7bae93b5e4a Instead of relying on the interval, use a boolean variable to check if the autoactivation is enabled or not.
2024-05-08view: Add setting to trigger user set action with double clickGeorge Florea Bănuș
Default action is select-all.
2024-03-09KItemListController::onPress: remove unused screenPos argumentMéven Car
NO_CHANGELOG
2023-11-18Make main view react to context menu eventsFelix Ernst
Before this commit, Dolphin's main view would not react to any context menu events. It only showed context menus based on hard-coded mouse or keyboard events i.e. mouse right-click and presses of the "Menu" key. This commit removes those hard-coded reactions and instead makes it so the view shows a context menu whenever a QContextMenuEvent is received. Therefore, a context menu will now be opened when any platform- or system-specific context menu triggers are invoked e.g. the Shift+F10 keyboard shortcut. Aside from this, the only side-effect is a partial removal of an unrelated bug: Previously, the hover highlight on items was never cleared when the header column in details view mode was hovered. With this commit, the hover is now correctly cleared most of the time.
2023-08-29Fix a bunch of clazy warningsMéven Car
2023-07-27Avoid unwanted drag and drop actionSteffen Hartleib
Use the screen position for a touch event to calculate the start drag distance. BUG: 464594
2023-04-25Fix activating the Selection Mode with a keyboard shortcutEugene Popov
If a spacebar is used as a keyboard shortcut to activate the Selection Mode, then allow this shortcut to be triggered only if the view has a keyboard focus. BUG: 465489
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-08-14Simplify implementation of mouse long-press detectionFelix Ernst
Now uses the same method as for touch long-press detection.
2022-08-14Improve naming consistency and leave mode on EscapeFelix Ernst
2022-08-14Add Selection ModeFelix Ernst
The selection mode action is a checkable toggle action named "Select Files and Folders" which has "Space" as the default shortcut. In selection mode a bottom bar with contextual actions is shown. These should mostly mirror the actions which are available through the right-click context menu aka DolphinContextMenu. Resizing of the window might make a overflow button appear in the bottom selection mode bar. This commit makes press and hold in the view activate selection mode. This behaviour is not triggered if the press and hold is used to either start a rubberband selection or a drag operation within a short time. The length of the short timeframe is defined by a QStyleHint. This is currently not implemented in touch because I can't test it. Mix the selection mode bars' background colors using a nice combination of colors from the current color scheme BUG: 427202
2022-06-16Don't consider drops on a row as drops on the row's itemFelix Ernst
Since d3839617193e92463806580699caa595c892b8a6 in details view mode clicking anywhere within the row is considered a click on the item. That commit also changed it so that dropping files anywhere inside a row would make it so the files are received by the folder of that row. This commit reverts the drop behaviour to be identical to the old one. I am having trouble explaining why this is better because one can look at it in different ways. Bottom line is that one doesn't really feel like one is dropping files inside a folder unless the mouse cursor is actually directly above a folder's icon or name. Another argument is that it is normal behaviour to just throw files onto an application and the files then being opened by it. Having potentially large parts of the view area covered by the rows of folders means that there has to be more of a conscious effort to not drop the files inside one of the folders by accident while with this commit one has to aim precisely onto a folder to do it intentionally. CCBUG: 453700
2021-12-28kitemlistview: Port KItemListView::itemAt to std::optionalFushan Wen
Use `value_or(-1)` for those functions that don't use `std::optional`.
2021-12-17Enable Ctrl/Shift-Click to open folder in a new tab/windowAlessio Bonfiglio
and more
2021-02-09Build with QT_NO_KEYWORDSNicolas Fella
2020-09-26Fix build failure after last commitElvis Angelaccio
2020-09-26Allow interaction with folder/files with the stylus againSteffen Hartleib
This Patch works for Wayland and X. BUG: 426582
2020-09-13Improve Touch supportSteffen Hartleib
With this patch dolphin now supports the following touch gestures: * Tap gesture to interact/open with directories, files and so on * TapAndHold and release gesture for access to the context menu (main window, panel folder, places and information) * TapAndHold and moving gesture for drag and drop action (main windows, panel folder and places) * pinch gesture for zoom in main window * kinetic scrolling (QScroller) for main window, panel folder, panel places, panel information, setting preview and service * two fingers swipe gesture to left, right and up as shortcut to navigate back, forward and up * two finger tap gesture to toggle item selection, similar to Ctrl and left mouse click FEATURE: 385066 FIXED-IN: 20.11.80 You are currently rebasing branch 'touch' on '85241a924'.
2020-08-25Output of licensedigger + manual cleanup afterwards.Elvis Angelaccio
Unfortunately licensedigger does not strip the trailing * characters. While at it, use a common style for all source files.
2019-11-16Use URLs with transport encryptionYuri Chornoivan
2018-12-02[KItemListController] Make event-handling functions privateElvis Angelaccio
There is no reason why these event-handling custom functions should be public, so make them private instead.
2018-12-02[KItemListController] Drop virtual keywordsElvis Angelaccio
We are never overriding these functions, so there is no reason to declare them virtual.
2018-12-02[KItemListController] Drop unused functionsElvis Angelaccio
2018-03-04Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: bcooksley, markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-12-14Implemented support for hide/show groupsRenato Araujo Oliveira Filho
Summary: Added an option on PlacesPanel context menu to show or hide the entire group of places. Depends on D8855 Test Plan: Open Donlphin and use PlacesPanel context menu to hide and show groups Reviewers: franckarrecot, mlaurent, mwolff, elvisangelaccio Reviewed By: franckarrecot, mlaurent, mwolff, elvisangelaccio Subscribers: rkflx, mwolff, elvisangelaccio, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9242
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-11-20Modernize: Use override where possibleKevin Funk
Also use override instead of Q_DECL_OVERRIDE
2017-10-27Two clicks on file/folder to renameAndreas Krutzler
Summary: Make renaming of files/folders faster by clicking a second time on the items text to start renaming. BUG: 205157 Test Plan: This feature works as follows: 1. select an item by single-click, or one is already selected 2. wait the "double-click-interval" 3. click on the items text 4. none of the cancellations (see below) happens within the double-click-interval 5. inline-renaming starts Cancellations: * open any file/folder * select different item(s) * start dragging items * Dolphin loses focus This feature is just enabled while "Double-click to open files and folders" in system-settings and "Rename inline" in Dolphin are enabled. Reviewers: #dolphin, #kde_applications, elvisangelaccio, emmanuelp, ngraham, markg, rkflx Reviewed By: #dolphin, #kde_applications, elvisangelaccio, ngraham, rkflx Subscribers: rkflx, markg, funkybomber, sars, elvisangelaccio, ngraham Differential Revision: https://phabricator.kde.org/D7647
2016-12-03Fix 5 clazy warningsSpencer Brown
This bumps the minimum Qt version to 5.5 (because of Q_ENUM usage). REVIEW: 129604
2015-02-25Move the KVersionControlPlugin2 interface from konqlib to Dolphin and remove ↵Emmanuel Pescosta
the deprecated KVersionControlPlugin interface from konqlib REVIEW: 122687
2015-02-01Port away from KGlobalSettings::singleClick() and use the mouse kcm module ↵Emmanuel Pescosta
instead of implementing the single/double click settings on our one. REVIEW: 122311
2014-11-20Fix Exports.Andrius da Costa Ribas
REVIEW: 121078
2014-10-18Fix includesMontel Laurent
2014-10-10Clean includes + port to QMenuMontel Laurent
2013-10-30Store the selected items in a more efficient wayFrank Reininghaus
Since Dolphin 2.0, we have stored the selected items in a QSet<int>, which is neither space-efficient nor particularly fast when inserting many items which are in a consecutive range. This commit replaces the QSet<int> by a new class "KItemSet", which stores the items in a sorted list of ranges. For each range, we only store the first index and the length of the range, so we need a lot less memory for most common selection patterns, and we also save quite a few CPU cycles in many situations, because adding an item to the KItemSet will in many cases not need a memory allocation at all, and it's particularly easy when inserting sorted items into the KItemSet in a row. KItemSet contains a minimal subset of QSet's API which makes it suitable as a drop-in replacement for our needs. It also has iterators, such that the items can be iterated through easily, also with foreach. One advantage of KItemSet compared to QSet<int> is that the items are always iterated through in ascending order. REVIEW: 113488
2013-10-16Abort loading the current URL if the user presses EscapeFrank Reininghaus
BUG: 323181 FIXED-IN: 4.12.0 REVIEW: 113234
2013-02-05Apply changes of the KGlobalSettings::singleClick() setting immediatelyAniket Anvit
Fixes a regression introduced by commit 7a364cbf489af25e123d18713523151a3a53f814. Patch reviewed and pushed by Frank Reininghaus. BUG: 313342 FIXED-IN: 4.10.1
2012-09-20Restore old behavior: Navigating by double-clicking in folder panel ↵Emmanuel Pescosta
(Double-Click - show folder content and expand folder) BUG: 295573 REVIEW: 106497 FIXED-IN: 4.9.2
2012-09-19Fixes Bug 293200 - Drag&drop files in dolphin doesnt preserve originEmmanuel Pescosta
Patch 106381 Comment #3: When "Open folders during drag operations" is enabled, two things happen, both in the DolphinView and in the Folders Panel: 1) When hovering a folder that can be expanded (this is the case for folders with sub-folders in the Folders Panel and in the DolphinView if in Details View mode), toggle its "expanded" state. 2) When hovering a folder that can not be expanded (i.e., a folder without sub-folders or any folder in Icons or Compact View), open this folder in the DolphinView via the KItemListController's itemActivated(int) signal. The bug described in bug 293200 comment 3 is that 1) is always wanted, but 2) is not wanted for the Folders Panel. BUG: 293200 FIXED-IN: 4.9.2
2012-07-12Re-implement dropping of files on folders in the Places Panel.Frank Reininghaus
This resolves a regression caused by the Places Panel rewrite. There is a small glitch left when reordering items (dragging below the last or above the first item only shows the drop indicator when first dragging out of the item and then back), but I prefer not to fix this glitch right now because this would require a more intrusive change, and I do not want to risk regressions because is not much time left to fix them before 4.9.0 is released. Thanks to Peter Penz for providing some advice about this issue. BUG: 302557 FIXED-IN: 4.9.0 (cherry picked from commit f4c960025167b7c7e04e1290ac9d9fee03a9b62d)
2012-04-21Prepare view-engine for non-KFileItem usecasePeter Penz
Up to now the view-engine only provided a model-implementation that supports file-items. The view-engine always had been designed to be able to work with any kind of model, so now a KStandardItemModel is available. The plan is to convert the places panel to the new view-engine. It should be no problem to fix this until the feature freeze - in the worst case the places-panel code could be reverted while still keeping the KStandardItemModel changes.
2012-03-19Let additional mouse buttons trigger history navigationPeter Penz
Thanks to Sebastian Dörner for the patch! REVIEW: 101335 BUG: 181823 FIXED-IN: 4.9
2012-01-18Make PageUp/PageDown work in Dolphin's new view engineFrank Reininghaus
BUG: 288748 FIXED-IN: 4.8.0 REVIEW: 103721 (cherry picked from commit e56a363aa6106477fa1577cb0b1bc2a6389910c8)
2012-01-16If an item is clicked to trigger it, clear the rest of the selectionFrank Reininghaus
Note that the clearing is not done on mouse press, but on mouse release. The reason is that there are situations when multiple items are selected and pressing the mouse on one of them should not clear the selection (e.g., drag and drop of multiple items). BUG: 290854 REVIEW: 103703 FIXED-IN: 4.8.0 (cherry picked from commit 9f711b5f2e1d1fd856cd6b033e6adb96f9b46d8a)
2012-01-05Folders Panel: Activate folders on single-clickPeter Penz
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
2011-12-26Minor cleanup: Rename m_keyboardAnchorXPos to m_keyboardAnchorPosPeter Penz
2011-12-26Fix keyboard issues when groups are enabledPeter Penz
When groups are enabled in Dolphin the key-up and key-down keys did not behave consistent in comparison to traditional views or like done in editors. CCBUG: 261995 CCBUG: 262038
2011-12-18Hide tooltips when dragging itemsPeter Penz
2011-11-29Reactivate the "Open folders during drag operations" featurePeter Penz
The feature got temporary lost due to the port to the new view engine.