qsortedlist.3qt

来自「Qt/Embedded是一个多平台的C++图形用户界面应用程序框架」· 3QT 代码 · 共 69 行

3QT
69
字号
.TH QSortedList 3qt "10 November 2000" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2000 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQSortedList \- List sorted by operator< and operator==.SH SYNOPSIS.br.PP\fC#include <qsortedlist.h>\fR.PPInherits QList..PP.SS "Public Members".in +1c.ti -1c.BI "\fBQSortedList\fR () ".br.ti -1c.BI "\fBQSortedList\fR ( const QSortedList<type> & list ) ".br.ti -1c.BI "\fB~QSortedList\fR () ".br.ti -1c.BI "QSortedList<type>& \fBoperator=\fR ( const QSortedList<type> & list ) ".br.in -1c.SH DESCRIPTIONThe QSortedList class provides a list sorted by operator< and operator==.PPIf you want to sort a QList you have to reimplement the QGList::compareItems() method. If the elements of your list support operator<() and operator==() then you can use QSortedList instead. Its compareItems() calls operator<() and operator==() and returns an appropriate result..PPOtherwise, this is as QList..PPSee also QList and Collection Classes.SH MEMBER FUNCTION DOCUMENTATION.SH "QSortedList::QSortedList ()"Constructs an empty list..SH "QSortedList::QSortedList ( const QSortedList<type> & list )"Constructs a copy of \fIlist.\fR.PPEach item in \fIlist\fR is copied to this new list..SH "QSortedList::~QSortedList ()"Removes all items from the list and destroys the list..PPAll list iterators that access this list will be reset..SH "int QSortedList::compareItems ( QCollection::Item s1, QCollection::Item s2 ) \fC[virtual]\fR"Reimplemented for internal reasons; the API is not affected..PPThis reimplementation uses operator< and operator== to compare..SH "QSortedList<type>& QSortedList::operator= ( const QSortedList<type> & list )"Assigns \fIlist\fR to this list and returns a reference to this list..PPThis list is first cleared, then each item in \fIlist\fR isappended to this list.  Only the pointers are copied(shallow copy), unless newItem() has been reimplemented()..SH "SEE ALSO".BR http://doc.trolltech.com/qsortedlist.html.SH COPYRIGHTCopyright 1992-2000 Trolltech AS, http://www.trolltech.com/.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?