QCollatorSortKey Class

The QCollatorSortKey class can be used to speed up string collation. 更多...

頭: #include <QCollatorSortKey>
qmake: QT += core
Since: 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 )

詳細描述

The QCollatorSortKey class is always created by QCollator::sortKey () and is used for fast strings collation, for example when collating many strings.

另請參閱 QCollator and QCollator::sortKey ().

成員函數文檔編製

QCollatorSortKey:: QCollatorSortKey (const QCollatorSortKey & other )

構造副本為 other collator key.

QCollatorSortKey &QCollatorSortKey:: operator= ( QCollatorSortKey && other )

移動賦值 other to this collator key.

QCollatorSortKey &QCollatorSortKey:: operator= (const QCollatorSortKey & other )

賦值 other to this collator key.

QCollatorSortKey:: ~QCollatorSortKey ()

Destroys the collator key.

int QCollatorSortKey:: compare (const QCollatorSortKey & otherKey ) const

Compares this key to otherKey .

Returns a negative value if the key is less than otherKey , 0 if the key is equal to otherKey or a positive value if the key is greater than otherKey .

另請參閱 operator< ().

void QCollatorSortKey:: swap ( QCollatorSortKey & other )

Swaps this collator key with other .

相關非成員

bool operator< (const QCollatorSortKey & lhs , const QCollatorSortKey & rhs )

According to the QCollator that created the keys, returns true if lhs should be sorted before rhs ;否則返迴 false .

另請參閱 QCollatorSortKey::compare ().