24 #ifndef DIGIKAM_CAMITEM_SORT_SETTINGS_H
25 #define DIGIKAM_CAMITEM_SORT_SETTINGS_H
95 bool lessThan(
const QVariant& left,
const QVariant& right)
const;
122 template <
typename T>
136 template <
typename T>
160 return compareResult;
163 return (- compareResult);
166 template <
typename T>
176 Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive,
Definition: camiteminfo.h:48
Definition: camitemsortsettings.h:42
static int compareByOrder(const T &a, const T &b, Qt::SortOrder sortOrder)
Definition: camitemsortsettings.h:167
Qt::SortOrder currentSortOrder
Definition: camitemsortsettings.h:198
void setSortRole(SortRole role)
Definition: camitemsortsettings.cpp:90
bool lessThan(const CamItemInfo &left, const CamItemInfo &right) const
Definition: camitemsortsettings.cpp:204
int compareCategories(const CamItemInfo &left, const CamItemInfo &right) const
Definition: camitemsortsettings.cpp:172
static Qt::SortOrder defaultSortOrderForSortRole(SortRole role)
Definition: camitemsortsettings.cpp:135
CamItemSortSettings()
Definition: camitemsortsettings.cpp:37
static int compareByOrder(int compareResult, Qt::SortOrder sortOrder)
Definition: camitemsortsettings.h:156
void setStringTypeNatural(bool natural)
Definition: camitemsortsettings.cpp:115
static Qt::SortOrder defaultSortOrderForCategorizationMode(CategorizationMode mode)
Definition: camitemsortsettings.cpp:120
void setCategorizationMode(CategorizationMode mode)
Definition: camitemsortsettings.cpp:66
SortOrder sortOrder
Camera Items Sorting.
Definition: camitemsortsettings.h:194
bool isCategorized() const
Definition: camitemsortsettings.h:108
void setSortOrder(SortOrder order)
Definition: camitemsortsettings.cpp:100
CategorizationMode
Definition: camitemsortsettings.h:53
@ NoCategories
Definition: camitemsortsettings.h:54
@ CategoryByFormat
Definition: camitemsortsettings.h:56
@ CategoryByDate
Definition: camitemsortsettings.h:57
@ CategoryByFolder
Definition: camitemsortsettings.h:55
static int naturalCompare(const QString &a, const QString &b, Qt::SortOrder sortOrder, Qt::CaseSensitivity caseSensitive=Qt::CaseSensitive, bool natural=true)
Definition: camitemsortsettings.h:175
CategorizationMode categorizationMode
Definition: camitemsortsettings.h:186
SortRole sortRole
Definition: camitemsortsettings.h:195
Qt::CaseSensitivity categorizationCaseSensitivity
Definition: camitemsortsettings.h:191
bool operator==(const CamItemSortSettings &other) const
Definition: camitemsortsettings.cpp:54
~CamItemSortSettings()
Definition: camitemsortsettings.cpp:50
int compare(const CamItemInfo &left, const CamItemInfo &right) const
Definition: camitemsortsettings.cpp:251
void setCategorizationSortOrder(SortOrder order)
Definition: camitemsortsettings.cpp:76
SortOrder
Definition: camitemsortsettings.h:46
@ DescendingOrder
Definition: camitemsortsettings.h:48
@ AscendingOrder
Definition: camitemsortsettings.h:47
@ DefaultOrder
sort order depends on the chosen sort role
Definition: camitemsortsettings.h:49
Qt::CaseSensitivity sortCaseSensitivity
Definition: camitemsortsettings.h:199
static int compareValue(const T &a, const T &b)
Definition: camitemsortsettings.h:137
SortRole
Definition: camitemsortsettings.h:61
@ SortByDownloadState
Definition: camitemsortsettings.h:66
@ SortByRating
Definition: camitemsortsettings.h:67
@ SortByFileSize
Definition: camitemsortsettings.h:65
@ SortByFilePath
Definition: camitemsortsettings.h:63
@ SortByFileName
Definition: camitemsortsettings.h:62
@ SortByCreationDate
Definition: camitemsortsettings.h:64
Qt::SortOrder currentCategorizationSortOrder
Only Ascending or Descending, never be DefaultOrder.
Definition: camitemsortsettings.h:190
SortOrder categorizationSortOrder
Definition: camitemsortsettings.h:187
static bool lessThanByOrder(const T &a, const T &b, Qt::SortOrder sortOrder)
Definition: camitemsortsettings.h:123
bool strTypeNatural
Definition: camitemsortsettings.h:196
Definition: itemsortcollator.h:40
static ItemSortCollator * instance()
Definition: itemsortcollator.cpp:72
int itemCompare(const QString &a, const QString &b, Qt::CaseSensitivity caseSensitive, bool natural) const
Definition: itemsortcollator.cpp:77
Definition: datefolderview.cpp:43