Tipos públicos |
enum | IteratorFlag {
Visible = 0x00000001,
Invisible = 0x00000002,
Selected = 0x00000004,
Unselected = 0x00000008,
Selectable = 0x00000010,
NotSelectable = 0x00000020,
DragEnabled = 0x00000040,
DragDisabled = 0x00000080,
DropEnabled = 0x00000100,
DropDisabled = 0x00000200,
Expandable = 0x00000400,
NotExpandable = 0x00000800,
Checked = 0x00001000,
NotChecked = 0x00002000,
Visible = 0x00000001,
Invisible = 0x00000002,
Selected = 0x00000004,
Unselected = 0x00000008,
Selectable = 0x00000010,
NotSelectable = 0x00000020,
DragEnabled = 0x00000040,
DragDisabled = 0x00000080,
DropEnabled = 0x00000100,
DropDisabled = 0x00000200,
Expandable = 0x00000400,
NotExpandable = 0x00000800,
Checked = 0x00001000,
NotChecked = 0x00002000
} |
enum | IteratorFlag {
Visible = 0x00000001,
Invisible = 0x00000002,
Selected = 0x00000004,
Unselected = 0x00000008,
Selectable = 0x00000010,
NotSelectable = 0x00000020,
DragEnabled = 0x00000040,
DragDisabled = 0x00000080,
DropEnabled = 0x00000100,
DropDisabled = 0x00000200,
Expandable = 0x00000400,
NotExpandable = 0x00000800,
Checked = 0x00001000,
NotChecked = 0x00002000,
Visible = 0x00000001,
Invisible = 0x00000002,
Selected = 0x00000004,
Unselected = 0x00000008,
Selectable = 0x00000010,
NotSelectable = 0x00000020,
DragEnabled = 0x00000040,
DragDisabled = 0x00000080,
DropEnabled = 0x00000100,
DropDisabled = 0x00000200,
Expandable = 0x00000400,
NotExpandable = 0x00000800,
Checked = 0x00001000,
NotChecked = 0x00002000
} |
Métodos públicos |
| QListViewItemIterator () |
| QListViewItemIterator (QListViewItem *item) |
| QListViewItemIterator (QListViewItem *item, int iteratorFlags) |
| QListViewItemIterator (const QListViewItemIterator &it) |
| QListViewItemIterator (QListView *lv) |
| QListViewItemIterator (QListView *lv, int iteratorFlags) |
QListViewItemIterator & | operator= (const QListViewItemIterator &it) |
| ~QListViewItemIterator () |
QListViewItemIterator & | operator++ () |
const QListViewItemIterator | operator++ (int) |
QListViewItemIterator & | operator+= (int j) |
QListViewItemIterator & | operator-- () |
const QListViewItemIterator | operator-- (int) |
QListViewItemIterator & | operator-= (int j) |
QListViewItem * | operator* () |
QListViewItem * | current () const |
| QListViewItemIterator () |
| QListViewItemIterator (QListViewItem *item) |
| QListViewItemIterator (QListViewItem *item, int iteratorFlags) |
| QListViewItemIterator (const QListViewItemIterator &it) |
| QListViewItemIterator (QListView *lv) |
| QListViewItemIterator (QListView *lv, int iteratorFlags) |
QListViewItemIterator & | operator= (const QListViewItemIterator &it) |
| ~QListViewItemIterator () |
QListViewItemIterator & | operator++ () |
const QListViewItemIterator | operator++ (int) |
QListViewItemIterator & | operator+= (int j) |
QListViewItemIterator & | operator-- () |
const QListViewItemIterator | operator-- (int) |
QListViewItemIterator & | operator-= (int j) |
QListViewItem * | operator* () |
QListViewItem * | current () const |
Atributos protegidos |
QListViewItem * | curr |
QListView * | listView |
Amigas |
struct | QListViewPrivate |
class | QListView |
class | QListViewItem |
The QListViewItemIterator class provides an iterator for collections of QListViewItems.
Construct an instance of a QListViewItemIterator, with either a QListView* or a QListViewItem* as argument, to operate on the tree of QListViewItems, starting from the argument.
A QListViewItemIterator iterates over all the items from its starting point. 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.
The following example creates a list of all the items that have been selected by the user, storing pointers to the items in a QPtrList:
An alternative approach is to use an IteratorFlag:
A QListViewItemIterator provides a convenient and easy way to traverse a hierarchical QListView.
Multiple 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. Note however that deleting the parent item of an item that an iterator points to is not safe.
- Ver también:
- QListView, QListViewItem
La documentación para esta clase fue generada a partir de los siguientes ficheros: