4#include <private/qtreewidgetitemiterator_p.h>
39 : d_ptr(new QTreeWidgetItemIteratorPrivate(*(
it.d_ptr))),
44 d->m_model->iterators.append(
this);
62 d_ptr.
reset(
new QTreeWidgetItemIteratorPrivate(
this,
model));
63 model->iterators.append(
this);
65 if (current && !matchesFlags(current))
79 : d_ptr(new QTreeWidgetItemIteratorPrivate(
87 model->iterators.append(
this);
100 d->m_parentIndex.prepend(
index);
103 if (current && !matchesFlags(current))
113 d_func()->m_model->iterators.removeAll(
this);
124 if (d_func()->m_model !=
it.d_func()->m_model) {
125 d_func()->m_model->iterators.removeAll(
this);
126 it.d_func()->m_model->iterators.append(
this);
128 current =
it.current;
130 d->operator=(*
it.d_func());
144 current = d_func()->next(current);
145 }
while (current && !matchesFlags(current));
159 current = d_func()->previous(current);
160 }
while (current && !matchesFlags(current));
236 next = par->child(
i + 1);
247 if (!current)
return nullptr;
252 m_parentIndex.push(m_currentIndex);
259 : m_model->rootItem->child(m_currentIndex + 1);
263 m_currentIndex = m_parentIndex.pop();
265 : m_model->rootItem->child(m_currentIndex + 1);
267 if (
next) ++(m_currentIndex);
274 if (!current)
return nullptr;
280 : m_model->rootItem->child(m_currentIndex - 1);
285 m_parentIndex.push(m_currentIndex);
287 prev = prev->
child(m_currentIndex);
290 m_currentIndex = m_parentIndex.pop();
296void QTreeWidgetItemIteratorPrivate::ensureValidIterator(
const QTreeWidgetItem *itemToBeRemoved)
301 if (!
q->current)
return;
306 while (nextItem->
parent() && nextItem != itemToBeRemoved) {
307 nextItem = nextItem->
parent();
312 if (nextItem == itemToBeRemoved) {
315 while (
parent && !nextItem) {
316 nextItem = nextSibling(
parent);
322 if (!(
q->matchesFlags(nextItem))) ++(*q);
325 q->current =
nullptr;
326 m_parentIndex.clear();
340 if (indexOfItemToBeRemoved <= indexOfNextItem) {
bool isSelected() const
Returns true if this item is selected; otherwise, false is returned.
GraphicsItemFlags flags() const
Returns this item's flags.
bool isEmpty() const noexcept
const QObjectList & children() const
Returns a list of child objects.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
QSet< QString >::iterator it
Combined button and popup list for selecting options.
T qobject_cast(QObject *object)
\variable QObject::staticMetaObject
GLdouble GLdouble GLdouble GLdouble q
QSqlQueryModel * model
[16]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent