┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/private/kitemlistviewlayouter.cpp
AgeCommit message (Collapse)Author
2015-02-24Replace kDebug/kWarning by categorized logging (org.kde.dolphin)Emmanuel Pescosta
2014-06-29Remove the automoc noiseChristophe Giboudeaux
2014-06-05Separate width and height info in the layouting codeFrank Reininghaus
By separating the width and height info, we can save some unnecessary overhead in terms of memory and CPU cycles, and make the calculation of the height of a row (or the width of a column in Compact View) a bit simpler. To achieve this, this patch extends the concept of "logical rows" (which are actually columns in Compact View) to "logical width" and "logical height" (which is the actual height and width, respectively, in Compact View). The distinction between rows/columns and "logical" rows/columns may be a bit confusing, but the confusion is already in the current code, and I hope that it will be mitigated a bit by prefixing the corresponding variables with "logical". REVIEW: 118454
2014-02-11Ensure that KItemListViewLayouter always has a size hint resolverFrank Reininghaus
KItemListViewLayouter uses a KItemListSizeHintResolver to find out how much space the items will need in the view. Before this commit, the size hint resolver object could be changed at runtime, and it could also be null. However, we never made use of these possibilities, so all the code that checks if m_sizeHintResolver is null is actually not needed at all.
2014-01-12Calculate all item size hints at once.Emmanuel Pescosta
The speed up is really small, but theses changes are mostly straightforward and make the code a bit nicer - break the KStandardItemListWidgetInformant::itemSizeHint beast into three smaller functions. FIXED-IN: 4.13 REVIEW: 112979
2013-12-29Remove redundant data from KItemListViewLayouter's ItemInfo structFrank Reininghaus
It is not necessary to save the position of each item as a QPointF because all items in a row will have the same y-coordinate, and all items in a column will have the same x-coordinate. Therefore, we can reduce the number of doubles that we store from (number of items) * 2 to (number of rows) + (number of colums) which is at least 50% less. REVIEW: 114460
2013-10-30Prevent storing some redundant data in KItemListViewLayouterFrank Reininghaus
In KItemListViewLayouter, we have always stored a QRectF for each item, which is "the area that the item occupies". However, the size of the QRectF is already stored in the size hint resolver. Therefore, it is sufficient to store the position of the top left corner of the QRectF in a QPointF and construct the QRectF on demand. This patch reduces the memory usage by 16 bytes for each item in the view: * a QRectF is 4 doubles -> 32 byes * a QPointF contains only 2 doubles -> 16 bytes REVIEW: 113487
2013-10-16Two small simplifications in KItemListViewLayouterFrank Reininghaus
1. Remove the unneeded variable rowCount. 2. Simplify the calculation of the member m_maximumScrollOffset. We can just use the current value of "y" because this is the offset that the next row would have. REVIEW: 113233
2013-09-05Nothing special, just a little bit of code cleanup in ↵Emmanuel Pescosta
KItemListViewLayouter::doLayout(). Make use of QSizeF::transpose() and simplify the m_itemInfos usage. REVIEW: 112535
2013-07-02Prevent some unnecessary layoutings when the view size is changedFrank Reininghaus
In Icons/Details (Compact) View, no layouting is necessary if the view height (width) changes. REVIEW: 111322
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