Exemplo n.º 1
0
void SRFlipFlop::updatePorts( ) {
  inputs( ).at( 0 )->setPos( topPosition( ), 13 ); /* S */
  inputs( ).at( 1 )->setPos( topPosition( ), 29 ); /* Clk */
  inputs( ).at( 2 )->setPos( topPosition( ), 45 ); /* R */

  output( 0 )->setPos( bottomPosition( ), 15 ); /* Q */
  output( 1 )->setPos( bottomPosition( ), 45 ); /* ~Q */
}
Exemplo n.º 2
0
void TFlipFlop::updatePorts( ) {
  inputs( ).at( 0 )->setPos( topPosition( ), 13 ); /* T */
  inputs( ).at( 1 )->setPos( topPosition( ), 45 ); /* Clock */
  inputs( ).at( 2 )->setPos( 32, topPosition( ) ); /* Preset */
  inputs( ).at( 3 )->setPos( 32, bottomPosition( ) ); /* Clear */

  output( 0 )->setPos( bottomPosition( ), 15 ); /* Q */
  output( 1 )->setPos( bottomPosition( ), 45 ); /* ~Q */
}
// -----------------------------------------------------------------------------
// CAknPhysicsRestrictor::ViewBottomPosition()
// -----------------------------------------------------------------------------
//
TInt CAknPhysicsRestrictor::ViewBottomPosition() const
    {
    TInt bottomPosition( 0 );

    // If world size smaller than view size, bottom position is same as top
    // position
    if ( iLandscape && iViewSize.iWidth >= iWorldSize.iWidth
        || !iLandscape && iViewSize.iHeight >= iWorldSize.iHeight )
        {
        bottomPosition = ViewTopPosition();        
        }
        
    // Otherwise calculate bottom position according to world size
    else
        {
        if ( iLandscape )
            {
            bottomPosition = iWorldSize.iWidth - iViewSize.iWidth / 2;
            }
        else
            {
            bottomPosition = iWorldSize.iHeight - iViewSize.iHeight / 2;
            }   
        }
    return bottomPosition;
    }