49 #if defined(Q_CC_MSVC)
50 #pragma warning(disable : 4786)
166 while (itParent.hasNext())
174 QListIterator<QtProperty*> itChild(d_ptr->
m_subItems);
176 while (itChild.hasNext())
184 while (itParent.hasNext())
396 if (d_ptr->
m_name == text)
481 if (property ==
this)
487 QList<QtProperty*> pendingList =
property->subProperties();
488 QMap<QtProperty*, bool> visited;
490 while (!pendingList.isEmpty())
499 pendingList.removeFirst();
501 if (visited.contains(i))
515 while (pos < pendingList.count())
524 if (i == afterProperty)
527 properAfterProperty = afterProperty;
534 property->d_ptr->m_parentItems.insert(
this);
558 while (pos < pendingList.count())
560 if (pendingList.at(pos) == property)
563 property->d_ptr->m_parentItems.remove(
this);
757 QSetIterator<QtProperty*> itProperty(
properties());
848 return QLineEdit::Normal;
866 property->setPropertyName(name);
1296 QList<QtBrowserItem*>
1317 d_ptr->
q_ptr =
this;
1320 QtBrowserItem::~QtBrowserItem()
1328 QMap<QtAbstractPropertyManager*, QtAbstractEditorFactoryBase*>>
1331 QMap<QtAbstractEditorFactoryBase*, QList<QtAbstractPropertyBrowser*>>>
1333 Q_GLOBAL_STATIC(
Map1, m_viewToManagerToFactory)
1334 Q_GLOBAL_STATIC(
Map2, m_managerToFactoryToViews)
1345 void createBrowserIndexes(
QtProperty* property,
1354 void slotPropertyInserted(
QtProperty* property,
1358 void slotPropertyDestroyed(
QtProperty* property);
1359 void slotPropertyDataChanged(
QtProperty* property);
1395 q_ptr->connect(manager,
1399 q_ptr->connect(manager,
1403 q_ptr->connect(manager,
1407 q_ptr->connect(manager,
1416 QList<QtProperty*> subList =
property->subProperties();
1417 QListIterator<QtProperty*> itSub(subList);
1419 while (itSub.hasNext())
1449 q_ptr->disconnect(manager,
1453 q_ptr->disconnect(manager,
1457 q_ptr->disconnect(manager,
1461 q_ptr->disconnect(manager,
1469 QList<QtProperty*> subList =
property->subProperties();
1470 QListIterator<QtProperty*> itSub(subList);
1472 while (itSub.hasNext())
1484 QMap<QtBrowserItem*, QtBrowserItem*> parentToAfter;
1488 QMap<QtProperty*, QList<QtBrowserItem*>>::ConstIterator it =
1496 QList<QtBrowserItem*> indexes = it.value();
1497 QListIterator<QtBrowserItem*> itIndex(indexes);
1499 while (itIndex.hasNext())
1504 if ((parentProperty && parentIdx && parentIdx->
property() == parentProperty) ||
1505 (!parentProperty && !parentIdx))
1507 parentToAfter[idx->
parent()] = idx;
1511 else if (parentProperty)
1513 QMap<QtProperty*, QList<QtBrowserItem*>>::ConstIterator it =
1521 QList<QtBrowserItem*> indexes = it.value();
1522 QListIterator<QtBrowserItem*> itIndex(indexes);
1524 while (itIndex.hasNext())
1527 parentToAfter[idx] = 0;
1532 parentToAfter[0] = 0;
1535 const QMap<QtBrowserItem*, QtBrowserItem*>::ConstIterator pcend = parentToAfter.constEnd();
1537 for (QMap<QtBrowserItem*, QtBrowserItem*>::ConstIterator it = parentToAfter.constBegin();
1554 parentIndex->d_ptr->
addChild(newIndex, afterIndex);
1566 QList<QtProperty*> subItems =
property->subProperties();
1567 QListIterator<QtProperty*> itChild(subItems);
1570 while (itChild.hasNext())
1583 QList<QtBrowserItem*> toRemove;
1584 QMap<QtProperty*, QList<QtBrowserItem*>>::ConstIterator it =
m_propertyToIndexes.find(property);
1591 QList<QtBrowserItem*> indexes = it.value();
1592 QListIterator<QtBrowserItem*> itIndex(indexes);
1594 while (itIndex.hasNext())
1599 if ((parentProperty && parentIdx && parentIdx->
property() == parentProperty) ||
1600 (!parentProperty && !parentIdx))
1602 toRemove.append(idx);
1606 QListIterator<QtBrowserItem*> itRemove(toRemove);
1608 while (itRemove.hasNext())
1618 QList<QtBrowserItem*> children =
index->children();
1620 for (
int i = children.count(); i > 0; i--)
1627 if (
index->parent())
1652 QList<QtBrowserItem*> children =
index->children();
1653 QListIterator<QtBrowserItem*> itChild(children);
1655 while (itChild.hasNext())
1713 QMap<QtProperty*, QList<QtBrowserItem*>>::ConstIterator it =
m_propertyToIndexes.find(property);
1720 QList<QtBrowserItem*> indexes = it.value();
1721 QListIterator<QtBrowserItem*> itIndex(indexes);
1723 while (itIndex.hasNext())
1933 d_ptr->q_ptr =
this;
1951 QListIterator<QtBrowserItem*> itItem(indexes);
1953 while (itItem.hasNext())
1984 QList<QtBrowserItem*>
2011 QList<QtBrowserItem*>
2027 QListIterator<QtProperty*> itSub(subList);
2030 while (itSub.hasPrevious())
2087 QList<QtProperty*> pendingList =
properties();
2091 while (pos < pendingList.count())
2095 if (prop == property)
2100 if (prop == afterProperty)
2137 QList<QtProperty*> pendingList =
properties();
2140 while (pos < pendingList.count())
2142 if (pendingList.at(pos) == property)
2184 if (m_viewToManagerToFactory()->
contains(
this) &&
2185 (*m_viewToManagerToFactory())[
this].
contains(manager))
2187 factory = (*m_viewToManagerToFactory())[
this][manager];
2202 bool connectNeeded =
false;
2204 if (!m_managerToFactoryToViews()->
contains(abstractManager) ||
2205 !(*m_managerToFactoryToViews())[abstractManager].
contains(abstractFactory))
2207 connectNeeded =
true;
2209 else if ((*m_managerToFactoryToViews())[abstractManager][abstractFactory].
contains(
this))
2211 return connectNeeded;
2214 if (m_viewToManagerToFactory()->
contains(
this) &&
2215 (*m_viewToManagerToFactory())[
this].
contains(abstractManager))
2220 (*m_managerToFactoryToViews())[abstractManager][abstractFactory].append(
this);
2221 (*m_viewToManagerToFactory())[
this][abstractManager] = abstractFactory;
2223 return connectNeeded;
2236 if (!m_viewToManagerToFactory()->
contains(
this) ||
2237 !(*m_viewToManagerToFactory())[
this].
contains(manager))
2243 (*m_viewToManagerToFactory())[
this].remove(manager);
2245 if ((*m_viewToManagerToFactory())[
this].isEmpty())
2247 (*m_viewToManagerToFactory()).remove(
this);
2250 (*m_managerToFactoryToViews())[manager][abstractFactory].removeAll(
this);
2252 if ((*m_managerToFactoryToViews())[manager][abstractFactory].isEmpty())
2254 (*m_managerToFactoryToViews())[manager].remove(abstractFactory);
2257 if ((*m_managerToFactoryToViews())[manager].isEmpty())
2259 (*m_managerToFactoryToViews()).remove(manager);
2286 if (oldItem != item)
2294 #include "moc_qtpropertybrowser.cpp"