• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

KSortableItem< T, Key > Class Template Reference

#include <KSortableItem>

Inheritance diagram for KSortableItem< T, Key >:

Inheritance graph
[legend]

List of all members.


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 35 of file ksortablelist.h.


Public Member Functions

Key index () const
Key key () const
 KSortableItem ()
 KSortableItem (const KSortableItem< T, Key > &rhs)
 KSortableItem (Key i, const T &t)
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
const T & value () const
T & value ()

Constructor & Destructor Documentation

template<typename T, typename Key = int>
KSortableItem< T, Key >::KSortableItem ( Key  i,
const T &  t 
) [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 43 of file ksortablelist.h.

template<typename T, typename Key = int>
KSortableItem< T, Key >::KSortableItem ( const KSortableItem< T, Key > &  rhs  )  [inline]

Creates a new KSortableItem that copies another one.

Parameters:
rhs the other item to copy

Definition at line 48 of file ksortablelist.h.

template<typename T, typename Key = int>
KSortableItem< T, Key >::KSortableItem (  )  [inline]

Creates a new KSortableItem with uninitialized values.

Definition at line 54 of file ksortablelist.h.


Member Function Documentation

template<typename T, typename Key = int>
Key KSortableItem< T, Key >::index (  )  const [inline]

Returns:
the first value (the key)

Deprecated:
use key()

Definition at line 123 of file ksortablelist.h.

template<typename T, typename Key = int>
Key KSortableItem< T, Key >::key (  )  const [inline]

Returns:
the first value.

Definition at line 127 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator!= ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 105 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator< ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 77 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator<= ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 91 of file ksortablelist.h.

template<typename T, typename Key = int>
KSortableItem<T, Key>& KSortableItem< T, Key >::operator= ( const KSortableItem< T, Key > &  i  )  [inline]

Assignment operator, just copies the item.

Definition at line 59 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator== ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 98 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator> ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 70 of file ksortablelist.h.

template<typename T, typename Key = int>
bool KSortableItem< T, Key >::operator>= ( const KSortableItem< T, Key > &  i2  )  const [inline]

Compares the two items.

This implementation only compares the first value.

Definition at line 84 of file ksortablelist.h.

template<typename T, typename Key = int>
const T& KSortableItem< T, Key >::value (  )  const [inline]

Returns:
the second value (the item)

Definition at line 117 of file ksortablelist.h.

template<typename T, typename Key = int>
T& KSortableItem< T, Key >::value (  )  [inline]

Returns:
the second value (the item)

Definition at line 112 of file ksortablelist.h.


The documentation for this class was generated from the following file:
  • ksortablelist.h

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal