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

void CNItemGroup::slotRotateCCW (  )  [slot]

Rotates all CNItems in the group counter-clockwise

Definition at line 399 of file cnitemgroup.cpp.

References Component::angleDegrees(), Component::canRotate(), Item::isMovable(), ItemDocument::requestStateSave(), and Component::setAngleDegrees().

{
      const ItemList::iterator end = m_itemList.end();
      for ( ItemList::iterator it = m_itemList.begin(); it != end; ++it )
      {
            Component *component = dynamic_cast<Component*>((Item*)*it);
            if ( component && component->isMovable() && component->canRotate() )
            {
                  int oldAngle = component->angleDegrees();
                  component->setAngleDegrees((oldAngle+270)%360);
            }
      }
      p_icnDocument->requestStateSave();
}


Generated by  Doxygen 1.6.0   Back to index