KSortableItem
#include <KSortableItem>

Public Member Functions | |
KSortableItem (Key i, const T &t) | |
KSortableItem (const KSortableItem< T, Key > &rhs) | |
KSortableItem () | |
Key | index () const |
Key | key () const |
bool | operator!= (const KSortableItem< T, Key > &i2) const |
bool | operator< (const KSortableItem< T, Key > &i2) const |
bool | operator<= (const KSortableItem< T, Key > &i2) const |
KSortableItem< T, Key > & | operator= (const KSortableItem< T, Key > &i) |
bool | operator== (const KSortableItem< T, Key > &i2) const |
bool | operator> (const KSortableItem< T, Key > &i2) const |
bool | operator>= (const KSortableItem< T, Key > &i2) const |
T & | value () |
const T & | value () const |
![]() | |
QPair (const T1 &value1, const T2 &value2) | |
QPair (QPair< TT1, TT2 > &&p) | |
QPair (const QPair< TT1, TT2 > &p) | |
bool | operator!= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
bool | operator< (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
QDataStream & | operator<< (QDataStream &out, const QPair< T1, T2 > &pair) |
bool | operator<= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
QPair< T1, T2 > & | operator= (const QPair< TT1, TT2 > &p) |
QPair< T1, T2 > & | operator= (QPair< TT1, TT2 > &&p) |
bool | operator== (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
bool | operator> (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
bool | operator>= (const QPair< T1, T2 > &p1, const QPair< T1, T2 > &p2) |
QDataStream & | operator>> (QDataStream &in, QPair< T1, T2 > &pair) |
QPair< T1, T2 > | qMakePair (const T1 &value1, const T2 &value2) |
void | swap (QPair< T1, T2 > &lhs, QPair< T1, T2 > &rhs) |
void | swap (QPair< T1, T2 > &other) |
Additional Inherited Members | |
![]() | |
typedef | first_type |
typedef | second_type |
Detailed Description
template<typename T, typename Key = int>
class KSortableItem< T, Key >
KSortableItem is a QPair that provides several operators for sorting.
- See also
- KSortableList
Definition at line 25 of file ksortablelist.h.
Constructor & Destructor Documentation
|
inline |
Creates a new KSortableItem with the given values.
- Parameters
-
i the first value (the key) t the second value (the item)
Definition at line 33 of file ksortablelist.h.
|
inline |
Creates a new KSortableItem that copies another one.
- Parameters
-
rhs the other item to copy
Definition at line 41 of file ksortablelist.h.
|
inline |
Creates a new KSortableItem with uninitialized values.
Definition at line 49 of file ksortablelist.h.
Member Function Documentation
|
inline |
- Returns
- the first value (the key)
- Deprecated:
- Since 4.0. Use key()
Definition at line 135 of file ksortablelist.h.
|
inline |
- Returns
- the first value.
Definition at line 143 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 108 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 76 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 92 of file ksortablelist.h.
|
inline |
Assignment operator, just copies the item.
Definition at line 56 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 100 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 68 of file ksortablelist.h.
|
inline |
Compares the two items.
This implementation only compares the first value.
Definition at line 84 of file ksortablelist.h.
|
inline |
- Returns
- the second value (the item)
Definition at line 116 of file ksortablelist.h.
|
inline |
- Returns
- the second value (the item)
Definition at line 124 of file ksortablelist.h.
The documentation for this class was generated from the following file:
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Apr 20 2021 22:51:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.