|
| | ListItem (const QString &text, QListWidget *view, QCollator *collator) |
| |
| bool | operator< (const QListWidgetItem &other) const override |
| |
◆ ListItem()
| KisDlgImportImageSequence::ListItem::ListItem |
( |
const QString & | text, |
|
|
QListWidget * | view, |
|
|
QCollator * | collator ) |
|
inline |
◆ operator<()
| bool KisDlgImportImageSequence::ListItem::operator< |
( |
const QListWidgetItem & | other | ) |
const |
|
inlineoverride |
Definition at line 27 of file kis_dlg_import_image_sequence.cpp.
28 {
30 const QRegExp rx(QLatin1String("[^0-9]+"));
31#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
32 QStringList ours = text().split(rx, Qt::SkipEmptyParts);
33 QStringList theirs = other.text().split(rx, Qt::SkipEmptyParts);
34#else
35 QStringList ours = rx.splitString(this->text(), Qt::SkipEmptyParts);
36 QStringList theirs = rx.splitString(other.text(), Qt::SkipEmptyParts);
37#endif
38
39
40 if (ours.size() > 0 && theirs.size() > 0) {
41 return (ours.last().toInt() < theirs.last().toInt());
42 }
43
44 }
45 return collator->compare(this->text(), other.text()) < 0;
46 }
References collator.
◆ collator
| QCollator* KisDlgImportImageSequence::ListItem::collator |
|
private |
The documentation for this class was generated from the following file: