Pages
API Documentation
On this page

KSortableItem Class

KSortableItem is a QPair that provides several operators for sorting. More...

  • Header: #include <KSortableList>
  • CMake: find_package(KF6 REQUIRED COMPONENTS Completion)
    target_link_libraries(mytarget PRIVATE KF6::Completion)

List of all members, including inherited members

Public Functions

Detailed Description

See also KSortableList

Member Function Documentation

KSortableItem::KSortableItem()

Creates a new KSortableItem with uninitialized values.

KSortableItem::KSortableItem(Key i, const T &t)

Creates a new KSortableItem with the given values.

i the first value (the key)

t the second value (the item)

KSortableItem::KSortableItem(const KSortableItem<T, Key> &rhs)

Creates a new KSortableItem that copies another one.

rhs the other item to copy

Key KSortableItem::key() const

Returns the first value.

T &KSortableItem::value()

Returns the second value (the item)

const T &KSortableItem::value() const

Returns the second value (the item)

bool KSortableItem::operator!=(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

bool KSortableItem::operator<(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

bool KSortableItem::operator<=(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

KSortableItem<T, Key> &KSortableItem::operator=(const KSortableItem<T, Key> &i)

Assignment operator, just copies the item.

bool KSortableItem::operator==(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

bool KSortableItem::operator>(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

bool KSortableItem::operator>=(const KSortableItem<T, Key> &i2) const

Compares the two items. This implementation only compares the first value.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.