|
Packit |
1c1d7e |
/****************************************************************************
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** QSortedList documentation
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** This file is part of the Qt GUI Toolkit.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** This file may be distributed under the terms of the Q Public License
|
|
Packit |
1c1d7e |
** as defined by Trolltech AS of Norway and appearing in the file
|
|
Packit |
1c1d7e |
** LICENSE.QPL included in the packaging of this file.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** This file may be distributed and/or modified under the terms of the
|
|
Packit |
1c1d7e |
** GNU General Public License version 2 as published by the Free Software
|
|
Packit |
1c1d7e |
** Foundation and appearing in the file LICENSE.GPL included in the
|
|
Packit |
1c1d7e |
** packaging of this file.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
|
Packit |
1c1d7e |
** licenses may use this file in accordance with the Qt Commercial License
|
|
Packit |
1c1d7e |
** Agreement provided with the Software.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|
Packit |
1c1d7e |
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
|
Packit |
1c1d7e |
** information about Qt Commercial License Agreements.
|
|
Packit |
1c1d7e |
** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
|
Packit |
1c1d7e |
** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
** Contact info@trolltech.com if any conditions of this licensing are
|
|
Packit |
1c1d7e |
** not clear to you.
|
|
Packit |
1c1d7e |
**
|
|
Packit |
1c1d7e |
**********************************************************************/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*****************************************************************************
|
|
Packit |
1c1d7e |
QSortedList documentation
|
|
Packit |
1c1d7e |
*****************************************************************************/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\class QSortedList qsortedlist.h
|
|
Packit |
1c1d7e |
\brief The QSortedList class provides a list sorted by operator< and operator==
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
\ingroup collection
|
|
Packit |
1c1d7e |
\ingroup tools
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
If you want to sort a QList you have to reimplement the
|
|
Packit |
1c1d7e |
QGList::compareItems() method. If the elements of your list support
|
|
Packit |
1c1d7e |
operator<() and operator==() then you can use QSortedList instead.
|
|
Packit |
1c1d7e |
Its compareItems() calls operator<() and operator==() and returns an
|
|
Packit |
1c1d7e |
appropriate result.
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Otherwise, this is as QList.
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
\sa QList, \link collection.html Collection Classes\endlink
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\fn QSortedList::QSortedList()
|
|
Packit |
1c1d7e |
Constructs an empty list.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\fn QSortedList::QSortedList( const QSortedList<type> &list )
|
|
Packit |
1c1d7e |
Constructs a copy of \e list.
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Each item in \e list is copied to this new list.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\fn QSortedList::~QSortedList()
|
|
Packit |
1c1d7e |
Removes all items from the list and destroys the list.
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
All list iterators that access this list will be reset.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\fn QSortedList<type>& QSortedList::operator=(const QSortedList<type>& list)
|
|
Packit |
1c1d7e |
Assigns \e list to this list and returns a reference to this list.
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
This list is first cleared, then each item in \e list is
|
|
Packit |
1c1d7e |
appended to this list. Only the pointers are copied
|
|
Packit |
1c1d7e |
(shallow copy), unless newItem() has been reimplemented().
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*!
|
|
Packit |
1c1d7e |
\fn int QSortedList::compareItems( QCollection::Item s1, QCollection::Item s2 )
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
\reimp
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
This reimplementation uses operator< and operator== to compare.
|
|
Packit |
1c1d7e |
*/
|