48 #if defined(Q_CC_MSVC)
49 # pragma warning(disable: 4786)
164 while (itParent.hasNext())
172 QListIterator<QtProperty*> itChild(d_ptr->
m_subItems);
174 while (itChild.hasNext())
182 while (itParent.hasNext())
378 if (d_ptr->
m_name == text)
460 if (property ==
this)
466 QList<QtProperty*> pendingList =
property->subProperties();
467 QMap<QtProperty*, bool> visited;
469 while (!pendingList.isEmpty())
478 pendingList.removeFirst();
480 if (visited.contains(i))
494 while (pos < pendingList.count())
503 if (i == afterProperty)
506 properAfterProperty = afterProperty;
513 property->d_ptr->m_parentItems.insert(
this);
536 while (pos < pendingList.count())
538 if (pendingList.at(pos) == property)
541 property->d_ptr->m_parentItems.remove(
this);
730 QSetIterator<QtProperty*> itProperty(
properties());
815 return QLineEdit::Normal;
832 property->setPropertyName(name);
1270 d_ptr->
q_ptr =
this;
1273 QtBrowserItem::~QtBrowserItem()
1284 QList<QtAbstractPropertyBrowser*> > >
Map2;
1285 Q_GLOBAL_STATIC(
Map1, m_viewToManagerToFactory)
1286 Q_GLOBAL_STATIC(
Map2, m_managerToFactoryToViews)
1305 void slotPropertyInserted(
QtProperty* property,
1308 void slotPropertyDestroyed(
QtProperty* property);
1309 void slotPropertyDataChanged(
QtProperty* property);
1346 q_ptr->connect(manager, SIGNAL(propertyInserted(
QtProperty*,
1350 q_ptr->connect(manager, SIGNAL(propertyRemoved(
QtProperty*,
1353 q_ptr->connect(manager, SIGNAL(propertyDestroyed(
QtProperty*)),
1355 q_ptr->connect(manager, SIGNAL(propertyChanged(
QtProperty*)),
1362 QList<QtProperty*> subList =
property->subProperties();
1363 QListIterator<QtProperty*> itSub(subList);
1365 while (itSub.hasNext())
1395 q_ptr->disconnect(manager, SIGNAL(propertyInserted(
QtProperty*,
1399 q_ptr->disconnect(manager, SIGNAL(propertyRemoved(
QtProperty*,
1402 q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(
QtProperty*)),
1404 q_ptr->disconnect(manager, SIGNAL(propertyChanged(
QtProperty*)),
1410 QList<QtProperty*> subList =
property->subProperties();
1411 QListIterator<QtProperty*> itSub(subList);
1413 while (itSub.hasNext())
1422 QMap<QtBrowserItem*, QtBrowserItem*> parentToAfter;
1426 QMap<QtProperty*, QList<QtBrowserItem*> >::ConstIterator it =
1434 QList<QtBrowserItem*> indexes = it.value();
1435 QListIterator<QtBrowserItem*> itIndex(indexes);
1437 while (itIndex.hasNext())
1442 if ((parentProperty && parentIdx && parentIdx->
property() == parentProperty) || (!parentProperty && !parentIdx))
1444 parentToAfter[idx->
parent()] = idx;
1448 else if (parentProperty)
1450 QMap<QtProperty*, QList<QtBrowserItem*> >::ConstIterator it =
1458 QList<QtBrowserItem*> indexes = it.value();
1459 QListIterator<QtBrowserItem*> itIndex(indexes);
1461 while (itIndex.hasNext())
1464 parentToAfter[idx] = 0;
1469 parentToAfter[0] = 0;
1472 const QMap<QtBrowserItem*, QtBrowserItem*>::ConstIterator pcend = parentToAfter.constEnd();
1474 for (QMap<QtBrowserItem*, QtBrowserItem*>::ConstIterator it = parentToAfter.constBegin(); it != pcend; ++it)
1487 parentIndex->d_ptr->
addChild(newIndex, afterIndex);
1499 QList<QtProperty*> subItems =
property->subProperties();
1500 QListIterator<QtProperty*> itChild(subItems);
1503 while (itChild.hasNext())
1514 QList<QtBrowserItem*> toRemove;
1515 QMap<QtProperty*, QList<QtBrowserItem*> >::ConstIterator it =
1523 QList<QtBrowserItem*> indexes = it.value();
1524 QListIterator<QtBrowserItem*> itIndex(indexes);
1526 while (itIndex.hasNext())
1531 if ((parentProperty && parentIdx && parentIdx->
property() == parentProperty) || (!parentProperty && !parentIdx))
1533 toRemove.append(idx);
1537 QListIterator<QtBrowserItem*> itRemove(toRemove);
1539 while (itRemove.hasNext())
1548 QList<QtBrowserItem*> children =
index->children();
1550 for (
int i = children.count(); i > 0; i--)
1557 if (
index->parent())
1581 QList<QtBrowserItem*> children =
index->children();
1582 QListIterator<QtBrowserItem*> itChild(children);
1584 while (itChild.hasNext())
1635 QMap<QtProperty*, QList<QtBrowserItem*> >::ConstIterator it =
1643 QList<QtBrowserItem*> indexes = it.value();
1644 QListIterator<QtBrowserItem*> itIndex(indexes);
1646 while (itIndex.hasNext())
1857 d_ptr->q_ptr =
this;
1876 QListIterator<QtBrowserItem*> itItem(indexes);
1878 while (itItem.hasNext())
1947 QListIterator<QtProperty*> itSub(subList);
1950 while (itSub.hasPrevious())
2006 QList<QtProperty*> pendingList =
properties();
2010 while (pos < pendingList.count())
2014 if (prop == property)
2019 if (prop == afterProperty)
2055 QList<QtProperty*> pendingList =
properties();
2058 while (pos < pendingList.count())
2060 if (pendingList.at(pos) == property)
2102 if (m_viewToManagerToFactory()->
contains(
this) &&
2103 (*m_viewToManagerToFactory())[
this].
contains(manager))
2105 factory = (*m_viewToManagerToFactory())[
this][manager];
2119 bool connectNeeded =
false;
2121 if (!m_managerToFactoryToViews()->
contains(abstractManager) ||
2122 !(*m_managerToFactoryToViews())[abstractManager].
contains(abstractFactory))
2124 connectNeeded =
true;
2126 else if ((*m_managerToFactoryToViews())[abstractManager][abstractFactory]
2129 return connectNeeded;
2132 if (m_viewToManagerToFactory()->
contains(
this) &&
2133 (*m_viewToManagerToFactory())[
this].
contains(abstractManager))
2138 (*m_managerToFactoryToViews())[abstractManager][abstractFactory].append(
this);
2139 (*m_viewToManagerToFactory())[
this][abstractManager] = abstractFactory;
2141 return connectNeeded;
2153 if (!m_viewToManagerToFactory()->
contains(
this) ||
2154 !(*m_viewToManagerToFactory())[
this].
contains(manager))
2160 (*m_viewToManagerToFactory())[
this][manager];
2161 (*m_viewToManagerToFactory())[
this].remove(manager);
2163 if ((*m_viewToManagerToFactory())[
this].isEmpty())
2165 (*m_viewToManagerToFactory()).remove(
this);
2168 (*m_managerToFactoryToViews())[manager][abstractFactory].removeAll(
this);
2170 if ((*m_managerToFactoryToViews())[manager][abstractFactory].isEmpty())
2172 (*m_managerToFactoryToViews())[manager].remove(abstractFactory);
2175 if ((*m_managerToFactoryToViews())[manager].isEmpty())
2177 (*m_managerToFactoryToViews()).remove(manager);
2202 if (oldItem != item)
2210 #include "moc_qtpropertybrowser.cpp"