Класс QCollatorSortKey
Класс QCollatorSortKey может использоваться для ускорения сортировки строк. Подробнее...
| Заголовок: | #include <QCollatorSortKey> |
| qmake: | QT += core |
| С момента: | Qt 5.2 |
Этот класс был представлен в Qt 5.2.
Примечание: Все функции в этом классе являются перевходовыми.
Открытые функции
| QCollatorSortKey(const QCollatorSortKey& other) | |
| QCollatorSortKey& | operator=(QCollatorSortKey&&other) |
| QCollatorSortKey& | operator=(const QCollatorSortKey& other) |
| ~QCollatorSortKey() | |
| int | compare(const QCollatorSortKey& otherKey) const |
| void | swap(QCollatorSortKey& other) |
Связанные нечлены
| bool | operator<(const QCollatorSortKey& lhs, const QCollatorSortKey& rhs) |
Подробное описание
Класс QCollatorSortKey всегда создается методом QCollator::sortKey() и используется для быстрой сортировки строк, например, при сортировке многих строк.
См. также QCollator и QCollator::sortKey().
Документация по функциям-членам
QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey& other)
Создает копию ключа сортировки other.
QCollatorSortKey& QCollatorSortKey::operator=(QCollatorSortKey&&other)
Перемещает присвоение other текущему ключу сортировки.
QCollatorSortKey& QCollatorSortKey::operator=(const QCollatorSortKey& other)
Присваивает other текущему ключу сортировки.
QCollatorSortKey::~QCollatorSortKey()
Уничтожает ключ сортировки.
int QCollatorSortKey::compare(const QCollatorSortKey& otherKey) const
Сравнивает текущий ключ с otherKey.
Возвращает отрицательное значение, если ключ меньше otherKey, 0, если ключи равны, или положительное значение, если ключ больше otherKey.
См. также operator<().
void QCollatorSortKey::swap(QCollatorSortKey& other)
Меняет местами текущий ключ сортировки с other.
Связанные нечлены
bool operator<(const QCollatorSortKey& lhs, const QCollatorSortKey& rhs)
В соответствии с QCollator, который создал ключи, возвращает true если lhs должен быть отсортирован перед rhs; в противном случае возвращает false.
См. также QCollatorSortKey::compare().
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-5.15/qcollatorsortkey.html