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. The center of sizeRect is taken as the point of rotation.

Parameters:
forceItemPoints if true, will set the item points to a rectangle the given size. Pass true if you have already set the size, and want to update the appearance and bounding of the item.

Definition at line 128 of file item.cpp.

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

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

{
      if ( !canvas() )
            return;
      
      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