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

void Item::setSize ( QRect  sizeRect,
bool  forceItemPoints = false 
) [inherited]

Calls prePresize with the bounds, and if that returns true, sets m_sizeRect to the given rect, and then calls postResize.

Parameters:
forceItemPoints if true, will set the item points to a rectangle of the given size

Definition at line 113 of file item.cpp.

References Item::resized(), and Item::setItemPoints().

Referenced by Component::initDIPSymbol(), PICComponent::initPackage(), ResistorDIP::initPins(), CMDraw::mouseReleased(), Item::setItemPoints(), and Item::setSize().

{
      if ( m_sizeRect == sizeRect && !forceItemPoints )
            return;
      
      if ( !preResize(sizeRect) )
            return;
      
      canvas()->setChanged(areaPoints().boundingRect());
      m_sizeRect = sizeRect;
      if ( m_itemPoints.isEmpty() || forceItemPoints )
      {
            setItemPoints( QPointArray( m_sizeRect ), false );
      }
      canvas()->setChanged(areaPoints().boundingRect());
      postResize();
      emit resized();
}


Generated by  Doxygen 1.6.0   Back to index