X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/95220eebae1be024b84b069ce9ae4be35c9e6a5f..d48b733:/src/kitemviews/kfileitemmodel.h diff --git a/src/kitemviews/kfileitemmodel.h b/src/kitemviews/kfileitemmodel.h index df7a5e3f0..8a0df72b9 100644 --- a/src/kitemviews/kfileitemmodel.h +++ b/src/kitemviews/kfileitemmodel.h @@ -20,8 +20,8 @@ #ifndef KFILEITEMMODEL_H #define KFILEITEMMODEL_H -#include "libdolphin_export.h" -#include +#include "dolphin_export.h" +#include #include #include #include @@ -43,7 +43,7 @@ class QTimer; * Recursive expansion of sub-directories is supported by * KFileItemModel::setExpanded(). */ -class LIBDOLPHINPRIVATE_EXPORT KFileItemModel : public KItemModelBase +class DOLPHIN_EXPORT KFileItemModel : public KItemModelBase { Q_OBJECT @@ -273,7 +273,7 @@ private slots: void slotItemsDeleted(const KFileItemList& items); void slotRefreshItems(const QList >& items); void slotClear(); - void slotNaturalSortingChanged(); + void slotSortingChoiceChanged(); void dispatchPendingItemsToInsert(); @@ -285,7 +285,7 @@ private: // User visible roles available with Baloo: CommentRole, TagsRole, RatingRole, ImageSizeRole, OrientationRole, WordCountRole, LineCountRole, ArtistRole, AlbumRole, DurationRole, TrackRole, - CopiedFromRole, + OriginUrlRole, // Non-visible roles: IsDirRole, IsLinkRole, IsExpandedRole, IsExpandableRole, ExpandedParentsCountRole, // Mandatory last entry: @@ -362,7 +362,7 @@ private: * @return True if the item-data \a a should be ordered before the item-data * \b. The item-data may have different parent-items. */ - bool lessThan(const ItemData* a, const ItemData* b) const; + bool lessThan(const ItemData* a, const ItemData* b, const QCollator& collator) const; /** * Sorts the items between \a begin and \a end using the comparison @@ -375,9 +375,9 @@ private: * the passed item-data using m_sortRole as criteria. Both items must * have the same parent item, otherwise the comparison will be wrong. */ - int sortRoleCompare(const ItemData* a, const ItemData* b) const; + int sortRoleCompare(const ItemData* a, const ItemData* b, const QCollator& collator) const; - int stringCompare(const QString& a, const QString& b) const; + int stringCompare(const QString& a, const QString& b, const QCollator& collator) const; bool useMaximumUpdateInterval() const; @@ -415,6 +415,11 @@ private: */ void removeFilteredChildren(const KItemRangeList& parents); + /** + * Loads the selected choice of sorting method from Dolphin General Settings + */ + void loadSortingSettings(); + /** * Maps the QByteArray-roles to RoleTypes and provides translation- and * group-contexts.