src/gui/graphicsview/qgraphicssceneindex.cpp
branchRCL_3
changeset 7 3f74d0d4af4c
parent 5 d3bac044e0f0
equal deleted inserted replaced
6:dee5afe5301f 7:3f74d0d4af4c
   277     Q_ASSERT(item);
   277     Q_ASSERT(item);
   278     if (!item->d_ptr->visible)
   278     if (!item->d_ptr->visible)
   279         return;
   279         return;
   280 
   280 
   281     const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
   281     const qreal opacity = item->d_ptr->combineOpacityFromParent(parentOpacity);
   282     const bool itemIsFullyTransparent = (opacity < 0.0001);
   282     const bool itemIsFullyTransparent = QGraphicsItemPrivate::isOpacityNull(opacity);
   283     const bool itemHasChildren = !item->d_ptr->children.isEmpty();
   283     const bool itemHasChildren = !item->d_ptr->children.isEmpty();
   284     if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity()))
   284     if (itemIsFullyTransparent && (!itemHasChildren || item->d_ptr->childrenCombineOpacity()))
   285         return;
   285         return;
   286 
   286 
   287     // Update the item's scene transform if dirty.
   287     // Update the item's scene transform if dirty.
   552     return scened->topLevelItems;
   552     return scened->topLevelItems;
   553 }
   553 }
   554 
   554 
   555 /*!
   555 /*!
   556     \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const
   556     \fn QList<QGraphicsItem *> QGraphicsSceneIndex::items(Qt::SortOrder order = Qt::DescendingOrder) const
   557     
   557 
   558     This pure virtual function all items in the index and sort them using
   558     This pure virtual function all items in the index and sort them using
   559     \a order.
   559     \a order.
   560 */
   560 */
   561 
   561 
   562 
   562