Changeset 651 for trunk/src/gui/graphicsview/qgraphicsitem_p.h
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/gui/graphicsview/qgraphicsitem_p.h (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/graphicsview/qgraphicsitem_p.h
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 20 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation ([email protected]) … … 154 154 localCollisionHack(0), 155 155 inSetPosHelper(0), 156 needSortChildren( 1), // ### can be 0 by default?156 needSortChildren( 157 157 allChildrenDirty(0), 158 158 fullUpdatePending(0), … … 179 179 updateDueToGraphicsEffect(0), 180 180 scenePosDescendants(0), 181 182 181 183 globalStackingOrder(-1), 182 184 q_ptr(0) … … 196 198 } 197 199 200 198 201 void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, 199 202 AncestorFlag flag = NoFlag, bool enabled = false, bool root = true); 203 200 204 void setIsMemberOfGroup(bool enabled); 201 205 void remapItemPos(QEvent *event, QGraphicsItem *item); … … 224 228 int depth() const; 225 229 #ifndef QT_NO_GRAPHICSEFFECT 226 void invalidateGraphicsEffectsRecursively(); 230 enum InvalidateReason { 231 OpacityChanged 232 }; 233 void invalidateParentGraphicsEffectsRecursively(); 234 void invalidateChildGraphicsEffectsRecursively(InvalidateReason reason); 227 235 #endif //QT_NO_GRAPHICSEFFECT 228 236 void invalidateDepthRecursively(); … … 230 238 void addChild(QGraphicsItem *child); 231 239 void removeChild(QGraphicsItem *child); 232 void setParentItemHelper(QGraphicsItem *parent); 240 void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant, 241 const QVariant *thisPointerVariant); 233 242 void childrenBoundingRectHelper(QTransform *x, QRectF *rect); 234 243 void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform, … … 350 359 } 351 360 361 362 363 364 365 366 352 367 inline bool isFullyTransparent() const 353 368 { 354 if ( opacity < 0.001)369 if () 355 370 return true; 356 371 if (!parent) 357 372 return false; 358 373 359 return calcEffectiveOpacity() < 0.001;374 return ; 360 375 } 361 376 … … 397 412 return !visible || (childrenCombineOpacity() && isFullyTransparent()); 398 413 } 414 415 399 416 400 417 void setFocusHelper(Qt::FocusReason focusReason, bool climb); … … 485 502 quint32 updateDueToGraphicsEffect : 1; 486 503 quint32 scenePosDescendants : 1; 504 505 487 506 488 507 // Optional stacking order … … 610 629 QPoint *offset, 611 630 QGraphicsEffect::PixmapPadMode mode) const; 631 612 632 613 633 QGraphicsItem *item; … … 721 741 { 722 742 if (needSortChildren) { 723 qSort(children.begin(), children.end(), qt_notclosestLeaf);724 743 needSortChildren = 0; 725 744 sequentialOrdering = 1; 745 746 747 726 748 for (int i = 0; i < children.size(); ++i) { 727 if (children [i]->d_ptr->siblingIndex != i) {749 if (children->d_ptr->siblingIndex != i) { 728 750 sequentialOrdering = 0; 729 751 break; … … 741 763 } 742 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 743 796 QT_END_NAMESPACE 744 797
Note:
See TracChangeset
for help on using the changeset viewer.
