┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews
AgeCommit message (Collapse)Author
2011-12-04Fix crash #2 when filtering itemsPeter Penz
When KFileItems get removed from the model it is temporary possible that the pending items are still part of the KFileItemModelRolesUpdater while they have already been removed from the model (this happens in the context during the signal itemsRemoved() gets emitted). BUG: 287642
2011-12-04Fix crash #1 when filtering itemsPeter Penz
When filtering items it was possible that the current index got an invalid value which resulted in accessing the URL of a null-KFileItem. There is still one (general) open issue in KFileItemModelRolesUpdater (crash #2) where a KFileItem that is already null gets read. It is not really related to filtering but can be triggered quite easy when filtering huge directories with enabled previews. CCBUG: 287642
2011-12-04Make sure that enabling previews triggers the generation of previewsFrank Reininghaus
Before this commit, no previews were generated if the icon size was the same with and without previews.
2011-12-04Clear the selection in MousePressEvent() rather than MouseReleaseEvent()Frank Reininghaus
This fixes the problem that clicking an unselected item in order to drag it would result in dragging all previously selected items as well. With this commit, previously selected items are unselected when a new item is clicked. The reason why clearing the selection was moved to MouseReleaseEvent() in commit b583dd6d4d3a03e3af2ec8d370132b84935ff871 was that clicking one of several selected items should not result in unselecting the other items (to make sure that dragging multiple items is possible). However, this can also be assured by just checking in MousePressEvent() if the clicked item has been selected already and not clearing the previous selection in that case. This applies equally to the case that a context menu is requested when several items are selected.
2011-12-03Update the current item during rubber band selectionsFrank Reininghaus
2011-11-30Reimplement name-filteringPeter Penz
The filtering of items has not been implemented yet in the KFileItemModel of the new view-engine. The patch brings back this functionality again, but some minor issues are open: - When filtering trees expanded directories should only get hidden if no child is visible - Regular expressions are not supported yet (they have not been supported in Dolphin 1.x but it is now quite simple to implement). - When filtering previews and removing the filter it might be possible that the preview is not shown (is most probably an an already existing bug in KFileItemModelRolesUpdater). BUG: 287642 FIXED-IN: 4.8.0
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.
2011-11-27Apply icon effect for cut itemsPeter Penz
Fix issue that no icon effect got applied to icons that have been cut.
2011-11-26Folders Panel fixesPeter Penz
The following functionality from Dolphin 1.x has been ported to the new view-engine: - Allow expanding/collapsing of items - Automatically select the current item - Context menu for items Related improvements to the view-engine: - Make the expanding/collapsing interface already accessible in the base classes KItemModelBase and KItemListView. If no expanding/collapsing is supported at all by derived models (which is usually the default case) simply not reimplementing those 3 methods is sufficient and it does not introduce an additional complexity like in QAbstractItemModel/QModelIndex. - Automatically handle the expanding/collapsing in KItemListController. This also includes the key-handling, which is quite special for expandable items. - Don't let KItemListView automatically scroll to the current item if the current item got changed. The automatic scrolling should only be done if the current item has been changed by the user. Hence this functionality has been moved to the KItemListController which currently only triggers the automatic scrolling if the current item has been changed by the keyboard (we might extend the usecases later if required).
2011-11-25Use correct selection color for inactive windowsPeter Penz
2011-11-25Use KFileItem::text() instead of KFileItem::name().Sebastian Trueg
This way Nepomuk search results get their proper user readable names. BUG: 287472 REVIEW: 103237
2011-11-24Fix restoring expanded URLsFrank Reininghaus
When navigating back or forward in history, DolphinView tells the KFileItemModel about the expanded URLs which should be restored before the folder is entered. In this case, the algorithm in the new function KFileItemModel::setExpanded(const QSet<KUrl>&) does not work. To fix this, the old function KFileItemModel::restoreExpandedUrls(const QSet<KUrl>&) is restored. Unit test included.
2011-11-22Don't try to divide by zero.Frank Reininghaus
Fixes a crash in Dolphin when pressing a key so quickly after a url change that there are no items in the file item model yet. BUG:287147
2011-11-20Initial draft for bringing back the "Folders" panelPeter Penz
The folders panel has been adjusted to use the new view-engine. A lot of things don't work yet, but are mostly minor issues that should be fixable during the next 10 days.
2011-11-19Simplify creation of drag-pixmapPeter Penz
2011-11-19Improve dragging pixmapPeter Penz
When dragging multiple files, those files should be shown as part of the dragging pixmap like in Dolphin 1.7. BUG: 285031 FIXED-IN: 4.8.0
2011-11-18Apply the selected-state to the current itemPeter Penz
This assures that (with the default colors) the indication of the current item is done in white instead of black.
2011-11-18Fix wrong position of selection-togglePeter Penz
When switching between view-modes the selection-toggle sometimes had a wrong position.
2011-11-18Fix colors for the selection/hover-areaPeter Penz
Thanks to Hugo Pereira Da Costa for pointing this out and the initial patch! CCMAIL: [email protected]
2011-11-13Fix selection style issuesPeter Penz
Don't use a custom drawing code for showing the hover-indication or selection of the text. - The default style for items is used. - Merge icon-rectangle and text-rectangle if possible. - Fix background and minor focus-issues
2011-11-13Bring back the selection-markersPeter Penz
Still some finetuning is necessary, but lets first bring back the missing features from Dolphin 1.x to 2.0 before starting with this.
2011-11-06Fix expansion-level issuePeter Penz
When the details-view has been used on / a wrong expansion-level has been calculated and hence no expansion-toggles have been visible.
2011-11-04Fix layout-issues when sorting by roles that are changedPeter Penz
When sorting is enabled for a role that gets changed e.g. because a value like the MIME-type is determined asynchronously, then the layout might get messed up. slotItemsMoved() has been adjusted to invalidate the sizehint-cache and to update the group-headers. BUG: 285542 FIXED-IN: 4.8.0
2011-11-04Don't use mixed units in size-column of details-viewPeter Penz
This makes it tricky to compare the filesizes without adjusting the sort-order, so now all sizes in the size-column are shown in KiB or KB (dependent on the KLocale setting). BUG: 219932 FIXED-IN: 4.8.0 Related fixes: - Stay consistent with the rounding when using the KiB/KB unit in the statusbar. - Fix sorting-by-size issue for folders - Show "Unknown" in the size-column when the number of items cannot be determined.
2011-10-31Internal KFileItemModel optimizations and cleanupsPeter Penz
- Use merge-sort instead of quick-sort. This assures a sane worst-case scenario where quick-sort has a runtime complexity of O(n*n) (e.g. when changing the sort-order from ascending to descending). - lessThan()-improvements: Change internal data-structures to allow a comparison of any role, not only roles available in KFileItem - Don't synchronously move an item if the value has been changed of a role defined as sort-role: This is too expensive in case if e.g. the sorting is done by "type" and the type is determined step by step.
2011-10-30Fix sorting-issues when value of a sort-role has been changedPeter Penz
If the value of a sort-role has been changed, emitting the signal itemsChanged() is not sufficient as from the KItemModelBase point of view an item has been moved or deleted/reinserted. Corresponding to the unit-test KFileItemModel::setData() respects this case correctly now, however there are some minor visual animation issues left that (hopefully) should not be tricky to solve.
2011-10-30Fix layout issue for groupsPeter Penz
When enabling a group where the sort-role is retrieved asynchronously (e.g. group by "type") the group-headers have stayed invisible.
2011-10-29Fix grouping-issue with not visible sorting rolesPeter Penz
It must be assured that the data for a sorting role always is determined even it is not shown as "additional info" in the view.
2011-10-29Implement grouping for all rolesPeter Penz
2011-10-27Fix minor visual issues in the view-enginePeter Penz
- Increasing the window-size should not result in increasing the size from previously invisible items - Rename group 'Numerics' to '0 - 9' - Fix "damaged" icons when changing the view-sizes or changing the view-mode
2011-10-26Group header fixesPeter Penz
- Simplify header for the horizontal scroll direction - Fix issue that orientation change was not forwarded to the header
2011-10-26Fix visibility issues of group-headersPeter Penz
When expanding/collapsing folders in the tree-view the visibility of group-headers got unpredictable.
2011-10-25Fix minor graphical issue in group header and itemsPeter Penz
2011-10-24Make group-headers less uglyPeter Penz
2011-10-23Improve group-header layoutPeter Penz
- Apply a dynamic width - Use a height that depends on the style - Cleanup some interfaces and replace xxxBoundingRect() by xxxRect()
2011-10-22Mousewheel-support: Use smaller scroll-stepsPeter Penz
Use only 1/4 of the scrollbar-page-size when the mousewheel is used. BUG: 284646 FIXED-IN: 4.8.0
2011-10-22Fix crash when grouping itemsPeter Penz
Because of a wrong usage of parent() vs. parentItem() a crash could occur because the parent might be assigned to an already deleted instance.
2011-10-22Implement grouping for namesPeter Penz
- Use a custom header for KFileItems - Cache the groups - Allow enabling/disabling grouping dynamically Currently there is a random crash in combination with the groupheader-recycler, this will be fixed during the next days.
2011-10-18Implement group-header layoutingPeter Penz
The most tricky part for groups - the layouting - basically works now for all views (grouping was available only in the icons views for Dolphin 1.x) and is nearly equally fast as without groups. Still open: - Group headers are ugly screen rectangles - Return valid groups in KFileItemModel instead of the currently hardcoded testing values - Dynamically turning on/off groups does not work currently, the directory must be reentered
2011-10-15Interface cleanups to prepare the return of "grouped sorting"Peter Penz
- Rename setCategorizedSorting() to setGroupedSorting() - Change the model interface to allow enabling/disabling grouping without the need to declare a role (the sort role will be taken). - Add dummy group role implementation in KFileItemModel The grouping code itself requires some cleanups and might crash at the moment or lead to weird layouts.
2011-10-10Remove workaround to draw the focus indicator manuallyPeter Penz
In Oxygen the focus-indicator has only been drawn for widget instances derived from QAbstractItemView and Q3ListView, so it was not possible in Dolphin to use the style for drawing. This has been fixed now in Oxygen, so using the style works now. The custom code for drawing the text background will be removed and replaced by a style-code later. CCMAIL: [email protected]
2011-10-08Don't let KItemListView decide itself whether to show the headerPeter Penz
The header should be turned on or off by the user of the KItemListView classes.
2011-10-08Details-view: Fix column-width issuePeter Penz
The column-width must respect the minimum width of the header-roles.
2011-10-08Context menu cleanupsPeter Penz
- Open the context menu on the mouse-press event, not on the mouse-release event. - Provide an explicit position-information and don't use QCursor::pos(). This fixes the issue that opening a context-menu by the keyboard opens below the cursor. - Provide different signals in the KItemListController for the different context-menu types (item vs. view vs. header). - Implement turning on/off roles by the header-context-menu.
2011-10-06Assure that the rubberband is drawn above the items and not belowPeter Penz
2011-10-06Provide alternating background colors for the details-viewPeter Penz
2011-10-06Use QFontMetrics::height() instead of averageCharWidth()Peter Penz
QFontMetrics::averageCharWidth() is quite slow and does not work well on fonts with broken characters. In the usecases required by Dolphin QFontMetrics::height() is a better and faster alternative to get a font-dependent minimum width. Thanks go to Christoph Feck for this hint!
2011-10-05Don't apply an empty item-size to the layoutPeter Penz
This fixes strange layout-issues when turning on/off previews in the details-view. CCBUG: 278899
2011-10-03Add function KItemListSelectionManager::isSelected(int index)Frank Reininghaus
This function is used in KItemListView::updateWidgetProperties() to find out if an item is selected in a more efficient way. The new function is tested in KItemListSelectionManagerTest. I've factored out some code from KItemListSelectionManagerTest::testChangeSelection() to a new member to simplify the test.
2011-10-03Remove TODO-comment which isn't needed anymoreFrank Reininghaus