24 #ifndef SHOW_FOTO_ITEM_SORT_SETTINGS_H
25 #define SHOW_FOTO_ITEM_SORT_SETTINGS_H
89 bool lessThan(
const QVariant& left,
const QVariant& right)
const;
122 template <
typename T>
138 template <
typename T>
164 return compareResult;
168 return (- compareResult);
172 template <
typename T>
182 Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive)
185 collator.setNumericMode(
true);
186 collator.setIgnorePunctuation(
false);
187 collator.setCaseSensitivity(caseSensitive);
Definition: showfotoiteminfo.h:48
Definition: showfotoitemsortsettings.h:39
Qt::CaseSensitivity sortCaseSensitivity
Definition: showfotoitemsortsettings.h:205
void setCategorizationSortOrder(SortOrder order)
Definition: showfotoitemsortsettings.cpp:71
CategorizationMode categorizationMode
Definition: showfotoitemsortsettings.h:194
SortOrder categorizationSortOrder
Definition: showfotoitemsortsettings.h:195
static int compareValue(const T &a, const T &b)
Definition: showfotoitemsortsettings.h:139
static bool lessThanByOrder(const T &a, const T &b, Qt::SortOrder sortOrder)
Definition: showfotoitemsortsettings.h:123
SortRole sortRole
Definition: showfotoitemsortsettings.h:202
void setSortOrder(SortOrder order)
Definition: showfotoitemsortsettings.cpp:95
static int compareByOrder(const T &a, const T &b, Qt::SortOrder sortOrder)
Definition: showfotoitemsortsettings.h:173
Qt::SortOrder currentCategorizationSortOrder
Only Ascending or Descending, never be DefaultOrder.
Definition: showfotoitemsortsettings.h:198
bool isCategorized() const
Definition: showfotoitemsortsettings.h:104
int compareCategories(const ShowfotoItemInfo &left, const ShowfotoItemInfo &right) const
Definition: showfotoitemsortsettings.cpp:145
SortOrder
Definition: showfotoitemsortsettings.h:43
@ DefaultOrder
sort order depends on the chosen sort role
Definition: showfotoitemsortsettings.h:46
@ AscendingOrder
Definition: showfotoitemsortsettings.h:44
@ DescendingOrder
Definition: showfotoitemsortsettings.h:45
void setSortRole(SortRole role)
— Showfoto Items Sorting ------------—
Definition: showfotoitemsortsettings.cpp:85
SortRole
Definition: showfotoitemsortsettings.h:57
@ SortByFileName
Definition: showfotoitemsortsettings.h:59
@ SortByFileSize
Definition: showfotoitemsortsettings.h:60
@ SortByCreationDate
Definition: showfotoitemsortsettings.h:58
Qt::SortOrder currentSortOrder
Definition: showfotoitemsortsettings.h:204
bool lessThan(const ShowfotoItemInfo &left, const ShowfotoItemInfo &right) const
Definition: showfotoitemsortsettings.cpp:167
ShowfotoItemSortSettings()
Definition: showfotoitemsortsettings.cpp:33
Qt::CaseSensitivity categorizationCaseSensitivity
Definition: showfotoitemsortsettings.h:199
CategorizationMode
Definition: showfotoitemsortsettings.h:50
@ CategoryByFolder
Definition: showfotoitemsortsettings.h:52
@ CategoryByFormat
Definition: showfotoitemsortsettings.h:53
@ NoCategories
Definition: showfotoitemsortsettings.h:51
static int naturalCompare(const QString &a, const QString &b, Qt::SortOrder sortOrder, Qt::CaseSensitivity caseSensitive=Qt::CaseSensitive)
Definition: showfotoitemsortsettings.h:181
SortOrder sortOrder
Definition: showfotoitemsortsettings.h:201
bool operator==(const ShowfotoItemSortSettings &other) const
Definition: showfotoitemsortsettings.cpp:49
int compare(const ShowfotoItemInfo &left, const ShowfotoItemInfo &right) const
Definition: showfotoitemsortsettings.cpp:194
static Qt::SortOrder defaultSortOrderForSortRole(SortRole role)
Definition: showfotoitemsortsettings.cpp:123
~ShowfotoItemSortSettings()
Definition: showfotoitemsortsettings.cpp:45
void setCategorizationMode(CategorizationMode mode)
— Categories ------------—
Definition: showfotoitemsortsettings.cpp:61
static Qt::SortOrder defaultSortOrderForCategorizationMode(CategorizationMode mode)
Definition: showfotoitemsortsettings.cpp:109
static int compareByOrder(int compareResult, Qt::SortOrder sortOrder)
Definition: showfotoitemsortsettings.h:160
Definition: showfotofolderviewbar.cpp:52