|
| | 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 QRegularExpression rx(QLatin1String("[^0-9]+"));
31 QStringList ours = text().split(rx, Qt::SkipEmptyParts);
32 QStringList theirs = other.text().split(rx, Qt::SkipEmptyParts);
33
34
35 if (ours.size() > 0 && theirs.size() > 0) {
36 return (ours.last().toInt() < theirs.last().toInt());
37 }
38
39 }
40 return collator->compare(this->text(), other.text()) < 0;
41 }
References collator.
◆ collator
| QCollator* KisDlgImportImageSequence::ListItem::collator |
|
private |
The documentation for this class was generated from the following file: