┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kfileitemlistview.cpp
AgeCommit message (Collapse)Author
2026-02-07Remove preview ignore maximum local size handling from DolphinKai Uwe Broulik
This all seems to be done by the PreviewJob in KIO already.
2026-01-22clang-tidy: use default for trivial constructorMéven Car
2023-11-21views: Use scene devicePixelRatio rather than qAppKai Uwe Broulik
When possible, use the devicePixelRatio from the scene which on Wayland unlike the QApplication will properly support fractional scaling. A KItemViewsUtils class is introduced that can be reused elsewhere.
2023-09-02Add focusOut and focusIn event support for KFileItemListView and update ↵Méven Car
selected widget on focus change
2023-07-05Add explicit moc includes to sources for moc-covered headersFriedrich W. H. Kossebau
* speeds up incremental builds as changes to a header will not always need the full mocs_compilation.cpp for all the target's headers rebuild, while having a moc file sourced into a source file only adds minor extra costs, due to small own code and the used headers usually already covered by the source file, being for the same class/struct * seems to not slow down clean builds, due to empty mocs_compilation.cpp resulting in those quickly processed, while the minor extra cost of the sourced moc files does not outweigh that in summary. Measured times actually improved by some percent points. (ideally CMake would just skip empty mocs_compilation.cpp & its object file one day) * enables compiler to see all methods of a class in same compilation unit to do some sanity checks * potentially more inlining in general, due to more in the compilation unit * allows to keep using more forward declarations in the header, as with the moc code being sourced into the cpp file there definitions can be ensured and often are already for the needs of the normal class methods
2023-05-26KDirectoryContentsCounter: show intermediate dir size counting results, ↵Méven Car
improve stopping, improve data caching Two user visible changes: * we can see the dir size changing as it is updated. * This makes the file counting a lot more reactive, when changing directories for instance. `KDirectoryContentsCounterWorker::walkDir` is not recursive anymore. The cache is now shared and only a single thread is used to count size recursively.
2023-02-05Add clang-format and format code as in FrameworksSerg Podtynnyi
2022-10-11Use QStringLiteralLaurent Montel
2021-07-04Add support for hover sequence thumbnails (via ThumbSequenceCreator)David Lerch
This shows a slideshow of thumbs when the user hovers a file item.
2020-11-03FolderPanel: prevents scanning directory tree recursivelyMéven Car
KFileItemListView contents are periodically scanned by KFileItemModelRolesUpdater. It uses then KDirectoryContentsCounter to scan directories to determine their size possibly recursively. Introduce a scanDirectories setting to disable directory scanning by KFileItemModelRolesUpdater. BUG: 426617 FIXED-IN: 20.08.3
2020-11-01make sure we use valid iconsMartin T. H. Sandsmark
2020-11-01Fix warnings about scaling pixmapsMartin T. H. Sandsmark
2020-10-15Port away from QList::toSet()Elvis Angelaccio
The QSet range constructor requires Qt 5.14. In `DolphinView::slotHeaderContextMenuRequested()` the conversion from QList to QSet was pointless, so we just use a QList now.
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.
2020-06-09Provide ability to configure size cut-off for local file previewsGastón Haro
Summary: FileWidgets read from kdeglobals the property "MaximumSize" under "PreviewSettings" to decide if a preview will be generated for that file. There is no current GUI to change that file size limit. On the other hand Dolphin ignores it. This patch aims to fix that by adding new configuration options to Dolphin. That is a new spinbox in Dolphin settings under General -> Previews tab. Test Plan: 1 - Set up a local folder with 2 jpg images of less and more than 1 MB respectively. 2 - Go to Dolphin Preferences. General -> Previews and check "JPEG Images" from the list. And set "Skip previews for files above:" to 1MB. 3 - Navigate to the afore mentioned folder. Only the image of size less than 1 MB should show a preview. BUG: 331240 Reviewers: ngraham, #dolphin, meven, elvisangelaccio Reviewed By: ngraham, #dolphin, meven, elvisangelaccio Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D28402
2019-11-09Remove unnecessary semicolons after Q_UNUSEDElvis Angelaccio
GIT_SILENT
2018-10-25Fix minor typosYuri Chornoivan
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
2018-03-03Remove unused #includeRoman Inflianskas
Summary: I used CLion inspection to hunt all unused #include Reviewers: #dolphin, elvisangelaccio, markg Reviewed By: #dolphin, elvisangelaccio, markg Subscribers: markg, elvisangelaccio, #dolphin Differential Revision: https://phabricator.kde.org/D10985
2017-11-21Modernize: Use nullptr everywhereKevin Funk
2017-03-08Honor KFileItem isHidden() in viewKai Uwe Broulik
Instead of just assuming hidden files always start with a "." The items were already filtered out but when showing hidden files they weren't painted at reduced opacity. Differential Revision: https://phabricator.kde.org/D4978
2016-03-16[CLAZY] Fixed all level 1 and level 2 warnings with small exceptionsArtur Puzio
REVIEW: 126771
2015-03-30Merge branch 'davidedmundson/highdpi'David Edmundson
REVIEW: 123137
2015-03-27review commentsDavid Edmundson
2015-03-25Create drag pixmaps which match the device pixel ratioDavid Edmundson
2015-03-19Fix some EBN issuesYuri Chornoivan
2015-02-06Fix includesMontel Laurent
2014-11-10make use of initializer listsEmmanuel Pescosta
2014-10-27Port to QDebug*. KVBox--Montel Laurent
2014-10-18Fix includesMontel Laurent
2014-10-18Fix includesMontel Laurent
2014-09-12Ported KIcon to QIconEmmanuel Pescosta
REVIEW: 120159
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-05-05dolphin: convert kitemviews/ to qt5 signal slot syntaxAlex Richardson
This conversion was performed automatically using convert2qt5signalslot. The only manual changes required were changing the overloaded signal KDirLister::redirection and KDirLister::completed from KUrl to QUrl. All other cases were no problem since these signals are not overloaded and a static_cast for disambiguation is not necessary. Code inside HAVE_BALOO is not converted yet, will do that once I can build a version with Baloo.
2014-05-05Allow compiling Dolphin with KF5Alex Richardson
This does not work properly yet, there are probably quite a few bad signal/ slot connections due to KUrl -> QUrl. However dolphin starts without crashing. Accessibility is not ported since that changed quite a lot from Qt4 -> Qt5 and I have no idea how it is supposed to be used. This is the first commit for review 117395
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-09-14Merge remote-tracking branch 'origin/KDE/4.11'Frank Reininghaus
2013-09-14Make preview loading faster when scrollingFrank Reininghaus
KFileItemListView notifies KFileItemModelRolesUpdater of changes of the visible index range and the icon size with a delay, to prevent that expensive operations are triggered repeatedly, and that scrolling feels sluggish because the GUI thread is blocked by icon loading. This patch ensures that the "long" delay of 300 ms is only used when the zoom level is changed, and the "short" delay if only the visible index range has changed. Thanks to Christoph Feck for helping to analyze this problem! BUG: 322093 FIXED-IN: 4.11.2 REVIEW: 112580
2013-07-24Make sure that widgets are initialized when changing the view modeFrank Reininghaus
The problem was that DolphinItemListView overrides the virtual function onItemLayoutChanged() without calling the base class implementation. Therefore, KStandardItemListView::updateLayoutOfVisibleItems(), which calls initializeItemListWidget(), is never called. This patch refactors the "change item layout"/"supports item expanding" code a bit to make it more robust and fix the problem that the view looks "messed up" when switching from Details View without expandable folders to Icons View. I'm only pushing this patch to master (going to be KDE 4.12). The patch is a bit too intrusive for the KDE/4.11 branch for my taste at this point of the release cycle, and the bug is not a real showstopper. If it works well in master, one could consider backporting it to a 4.11.x bug fix release. Thanks to Emmanuel Pescosta for helping to analyze this issue. BUG: 302703 REVIEW: 111632 FIXED-IN: 4.12.0
2013-07-12Load unknown icons for items just before showing items in the viewFrank Reininghaus
Rather than loading many icons (without full mime type determination) in advance, we make sure that an item has an icon just before it is shown in the view. This makes sure that no "unknown" icons are shown unnecessarily, and saves some resources. REVIEW: 111396
2013-04-22Always determine icons for the visible items firstFrank Reininghaus
When entering a folder, KFileItemModelRolesUpdater has not yet been informed about the visible index range by the view when it tries to determine icons synchronously. This resulted in the problem that it tried to determine icons for all items in random order, and some visible icons were somtimes still unknown after the "synchronous icon loading" timeout of 200 ms. This commit tries to improve the situation by loading icons starting with the first item in increasing order. This should make it less likely that some visible items still have unknown icons after 200 ms. BUG: 316129 FIXED-IN: 4.10.3 REVIEW: 109843
2012-05-26Use an italic font for symbolic linksFrank Reininghaus
BUG: 298218 FIXED-IN: 4.9.0
2012-05-18Enable basic drag and drop support for the Places PanelPeter Penz
The dropping has not been implemented yet, however in the context of this step the creating of the drag-pixmap is now forwarded to the item-widgets. This allows creating some optimized dragging-pixmaps e.g. for the details-view, where only the name and icon should be provided as drag-pixmap.
2012-04-30Fix crash when closing Dolphin during generating previewsPeter Penz
BUG: 299108 FIXED-IN: 4.9.0
2012-04-24Provide additional default groups for the Places PanelPeter Penz
If Nepomuk is enabled, it is now possible to easily search for some most common queries by having additional groups.
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-04-17Implement inline-renaming for the new view-enginePeter Penz
BUG: 286893 FIXED-IN: 4.9.0
2012-04-11KItemViews: Internal directory restructurationPeter Penz
- Move all private headers from the kitemviews-directory into the 'private' subdirectory. - Get rid of DolphinDirLister and just use a directory-lister internally in KFileItemModel. - Minor interface-cleanups for signals
2012-04-06Allow to specify whether an upscaling of images should be donePeter Penz
The option is currently hidden as up to now only Nuno requested it, but it seems to be urgent: "my icon making productivity has drop subtantialy" ((c) 2012 Nuno) As I don't want to get blamed for an outdated Oxygen-icon-set I have no other choice ;-) CCMAIL: [email protected]
2012-03-27KItemListView interface and implementation simplificationPeter Penz
- Remove KItemListView::preferredRoleColumnWidth() and allow implementing this as part of derived classes from KItemListWidget. Those derived classes are aware about the layout and hence also can provide the preferred role width. - Make KItemListView::itemSizeHint() non-virtual and also allow implementing the size hint as part of derived classes from KItemListWidget.