#ifndef KFILEITEMMODEL_H
#define KFILEITEMMODEL_H
-#include "libdolphin_export.h"
-#include <KFileItemList>
+#include "dolphin_export.h"
+#include <KFileItem>
#include <QUrl>
#include <kitemviews/kitemmodelbase.h>
#include <kitemviews/private/kfileitemmodelfilter.h>
* Recursive expansion of sub-directories is supported by
* KFileItemModel::setExpanded().
*/
-class LIBDOLPHINPRIVATE_EXPORT KFileItemModel : public KItemModelBase
+class DOLPHIN_EXPORT KFileItemModel : public KItemModelBase
{
Q_OBJECT
void slotItemsDeleted(const KFileItemList& items);
void slotRefreshItems(const QList<QPair<KFileItem, KFileItem> >& items);
void slotClear();
- void slotNaturalSortingChanged();
+ void slotSortingChoiceChanged();
void dispatchPendingItemsToInsert();
// 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:
* @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
* 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;
*/
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.