Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

void Item::updateZ ( int  baseZ  )  [virtual, inherited]

Sets this item to the given baseZ level, and calls this function for the children with baseZ incremented by one. Reinherit this function to set the Z of attached stuff (such as nodes).

Reimplemented in CNItem, and PicItem.

Definition at line 493 of file item.cpp.

References Item::isRaised().

Referenced by CNItem::updateZ().

{
      m_baseZ = baseZ;
      double z = ItemDocument::Z::Item + (ItemDocument::Z::DeltaItem)*baseZ;
      
      if ( isRaised() )
            z += ItemDocument::Z::RaisedItem - ItemDocument::Z::Item;
      
      setZ(z);
      
      const ItemList::const_iterator end = m_children.end();
      for ( ItemList::const_iterator it = m_children.begin(); it != end; ++it )
      {
            if (*it)
                  (*it)->updateZ(baseZ+1);
      }
}


Generated by  Doxygen 1.6.0   Back to index