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

KDECore

Public Member Functions | List of all members
KSortableItem< T, Key > Class Template Reference

#include <KSortableItem>

Inheritance diagram for KSortableItem< T, Key >:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from QPair< Key, T >
 QPair ()
 
 QPair (const T1 &value1, const T2 &value2)
 
QPair< T1, T2 > & operator= (const QPair< T1, T2 > &other)
 

Additional Inherited Members

- Public Attributes inherited from QPair< Key, T >
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 35 of file ksortablelist.h.

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
ithe first value (the key)
tthe 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
rhsthe 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 124 of file ksortablelist.h.

template<typename T, typename Key = int>
Key KSortableItem< T, Key >::key ( ) const
inline
Returns
the first value.

Definition at line 129 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>
T& KSortableItem< T, Key >::value ( )
inline
Returns
the second value (the item)

Definition at line 112 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.


The documentation for this class was generated from the following file:
  • ksortablelist.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal