⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qlistviewitemiterator.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
字号:
'\" t.TH QListViewItemIterator 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQListViewItemIterator \- Iterator for collections of QListViewItems.SH SYNOPSIS\fC#include <qlistview.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQListViewItemIterator\fR ()".br.ti -1c.BI "\fBQListViewItemIterator\fR ( QListViewItem * item )".br.ti -1c.BI "\fBQListViewItemIterator\fR ( const QListViewItemIterator & it )".br.ti -1c.BI "\fBQListViewItemIterator\fR ( QListView * lv )".br.ti -1c.BI "QListViewItemIterator & \fBoperator=\fR ( const QListViewItemIterator & it )".br.ti -1c.BI "\fB~QListViewItemIterator\fR ()".br.ti -1c.BI "QListViewItemIterator & \fBoperator++\fR ()".br.ti -1c.BI "const QListViewItemIterator \fBoperator++\fR ( int )".br.ti -1c.BI "QListViewItemIterator & \fBoperator+=\fR ( int j )".br.ti -1c.BI "QListViewItemIterator & \fBoperator--\fR ()".br.ti -1c.BI "const QListViewItemIterator \fBoperator--\fR ( int )".br.ti -1c.BI "QListViewItemIterator & \fBoperator-=\fR ( int j )".br.ti -1c.BI "QListViewItem * \fBoperator*\fR ()".br.ti -1c.BI "QListViewItem * \fBcurrent\fR () const".br.in -1c.SH DESCRIPTIONThe QListViewItemIterator class provides an iterator for collections of QListViewItems..PPConstruct an instance of a QListViewItemIterator, with either a QListView* or a QListViewItem* as argument, to operate on the tree of QListViewItems..PPA QListViewItemIterator iterates over all the items in a list view. This means that it always makes the first child of the current item the new current item. If there is no child, the next sibling becomes the new current item; and if there is no next sibling, the next sibling of the parent becomes current..PPThe following example creates a list of all the items that have been selected by the user, storing pointers to the items in a QPtrList:.PP.nf.br    QPtrList<QListViewItem> lst;.br    QListViewItemIterator it( myListView );.br    while ( it.current() ) {.br        if ( it.current()->isSelected() ).br            lst.append( it.current() );.br        ++it;.br    }.br.fi.PPA QListViewItemIterator provides a convenient and easy way to traverse a hierarchical QListView..PPMultiple QListViewItemIterators can operate on the tree of QListViewItems. A QListView knows about all iterators operating on its QListViewItems. So when a QListViewItem gets removed all iterators that point to this item are updated and point to the following item if possible, otherwise to a valid item before the current one or to 0..PPSee also QListView, QListViewItem, and Advanced Widgets..SH MEMBER FUNCTION DOCUMENTATION.SH "QListViewItemIterator::QListViewItemIterator ()"Constructs an empty iterator..SH "QListViewItemIterator::QListViewItemIterator ( QListViewItem * item )"Constructs an iterator for the QListView that contains the \fIitem\fR. The current iterator item is set to point to the \fIitem\fR..SH "QListViewItemIterator::QListViewItemIterator ( const QListViewItemIterator & it )"Constructs an iterator for the same QListView as \fIit\fR. The current iterator item is set to point on the current item of \fIit\fR..SH "QListViewItemIterator::QListViewItemIterator ( QListView * lv )"Constructs an iterator for the QListView \fIlv\fR. The current iterator item is set to point on the first child (QListViewItem) of \fIlv\fR..SH "QListViewItemIterator::~QListViewItemIterator ()"Destroys the iterator..SH "QListViewItem * QListViewItemIterator::current () const"Returns iterator's current item..PPExamples:.)l addressbook/centralwidget.cpp, checklists/checklists.cpp, and dirview/dirview.cpp..SH "QListViewItem * QListViewItemIterator::operator* ()"Dereference operator. Returns a reference to the current item. The same as current()..SH "QListViewItemIterator & QListViewItemIterator::operator++ ()"Prefix ++. Makes the next item the new current item and returns it. Returns 0 if the current item is the last item or the QListView is 0..SH "const QListViewItemIterator QListViewItemIterator::operator++ ( int )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPPostfix ++. Makes the next item the new current item and returns the item that \fIwas\fR the current item..SH "QListViewItemIterator & QListViewItemIterator::operator+= ( int j )"Sets the current item to the item \fIj\fR positions after the current item. If that item is beyond the last item, the current item is set to 0. Returns the current item..SH "QListViewItemIterator & QListViewItemIterator::operator-- ()"Prefix --. Makes the previous item the new current item and returns it. Returns 0 if the current item is the first item or the QListView is 0..SH "const QListViewItemIterator QListViewItemIterator::operator-- ( int )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPPostfix --. Makes the previous item the new current item and returns the item that \fIwas\fR the current item..SH "QListViewItemIterator & QListViewItemIterator::operator-= ( int j )"Sets the current item to the item \fIj\fR positions before the current item. If that item is before the first item, the current item is set to 0. Returns the current item..SH "QListViewItemIterator & QListViewItemIterator::operator= ( const QListViewItemIterator & it )"Assignment. Makes a copy of \fIit\fR and returns a reference to itsiterator..SH "SEE ALSO".BR http://doc.trolltech.com/qlistviewitemiterator.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qlistviewitemiterator.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

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