src/gui/graphicsview/qgraphicssceneindex.cpp
changeset 18 2f34d5167611
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 18:2f34d5167611
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   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 
   622 
   622 
   623     The default implementation does nothing.
   623     The default implementation does nothing.
   624 
   624 
   625     \sa QGraphicsItem::GraphicsItemChange
   625     \sa QGraphicsItem::GraphicsItemChange
   626 */
   626 */
   627 void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const QVariant &value)
   627 void QGraphicsSceneIndex::itemChange(const QGraphicsItem *item, QGraphicsItem::GraphicsItemChange change, const void *const value)
   628 {
   628 {
   629     Q_UNUSED(item);
   629     Q_UNUSED(item);
   630     Q_UNUSED(change);
   630     Q_UNUSED(change);
   631     Q_UNUSED(value);
   631     Q_UNUSED(value);
   632 }
   632 }