mmsharing/livecommsui/lcuiengine/src/lcuiengine_p.cpp
changeset 26 5554410e16f5
parent 25 53c1c4459a94
child 29 36d7ded3ca23
equal deleted inserted replaced
25:53c1c4459a94 26:5554410e16f5
   267     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setContentAreas()" )
   267     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::setContentAreas()" )
   268 }
   268 }
   269 
   269 
   270 // -----------------------------------------------------------------------------
   270 // -----------------------------------------------------------------------------
   271 // LcUiEnginePrivate::setOrientation
   271 // LcUiEnginePrivate::setOrientation
       
   272 // Currently the only supported orientation is landscape.
   272 // -----------------------------------------------------------------------------
   273 // -----------------------------------------------------------------------------
   273 //
   274 //
   274 bool LcUiEnginePrivate::setOrientation( Qt::Orientation orientation )
   275 bool LcUiEnginePrivate::setOrientation( Qt::Orientation orientation )
   275 {
   276 {
   276     bool ok( false );
   277     bool ok( false );
   277     TInt error1( KErrNone );
   278     TInt error1( KErrNone );
   278     TInt error2( KErrNone );
   279     TInt error2( KErrNone );
   279     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
   280     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
   280     MLcVideoPlayer* remotePlayer = session().RemoteVideoPlayer();
   281     MLcVideoPlayer* remotePlayer = session().RemoteVideoPlayer();
   281   
   282   
   282     MLcWindow::TLcWindowOrientation newOrientation( MLcWindow::EPortrait );
   283     Q_UNUSED(orientation);
   283     if ( orientation == Qt::Horizontal ) {
       
   284         newOrientation = MLcWindow::ELandscape;
       
   285     }
       
   286     
   284     
   287     if ( localPlayer && localPlayer->LcWindow() ) {
   285     if ( localPlayer && localPlayer->LcWindow() ) {
   288         TRAP(error1, localPlayer->LcWindow()->SetLcWindowOrientationL( newOrientation ) );
   286         TRAP(error1, localPlayer->LcWindow()->SetLcWindowOrientationL( MLcWindow::ELandscape ) );
   289     }
   287     }
   290     if ( remotePlayer && remotePlayer->LcWindow() ) {
   288     if ( remotePlayer && remotePlayer->LcWindow() ) {
   291         TRAP(error2, remotePlayer->LcWindow()->SetLcWindowOrientationL( newOrientation ));
   289         TRAP(error2, remotePlayer->LcWindow()->SetLcWindowOrientationL( MLcWindow::ELandscape ));
   292     }
   290     }
   293   
   291   
   294     if ( (error1 == KErrNone) && (error2 == KErrNone) ) {
   292     if ( (error1 == KErrNone) && (error2 == KErrNone) ) {
   295         ok = true;
   293         ok = true;
   296     }
   294     }
  1434 //
  1432 //
  1435 void LcUiEnginePrivate::stopLocalVideo()
  1433 void LcUiEnginePrivate::stopLocalVideo()
  1436 {
  1434 {
  1437     LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stopLocalVideo()" )
  1435     LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::stopLocalVideo()" )
  1438     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
  1436     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
  1439     if( localPlayer ){
  1437     if( localPlayer ) {
  1440         pause( localPlayer );
  1438         pause( localPlayer );
  1441         enableWindow( localPlayer, false );        
  1439         enableWindow( localPlayer, false );
       
  1440         completeAction( lcEngSignalNameCameraDisabled );
  1442     }
  1441     }
  1443     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stopLocalVideo()" )
  1442     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::stopLocalVideo()" )
  1444 }
  1443 }
  1445 
  1444 
  1446 // -----------------------------------------------------------------------------
  1445 // -----------------------------------------------------------------------------
  1451 {
  1450 {
  1452     LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startLocalVideo()" )
  1451     LC_QDEBUG( "livecomms [UI] -> LcUiEnginePrivate::startLocalVideo()" )
  1453     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
  1452     MLcVideoPlayer* localPlayer = session().LocalVideoPlayer();
  1454     if( localPlayer ){
  1453     if( localPlayer ){
  1455         play( localPlayer );
  1454         play( localPlayer );
  1456         enableWindow( localPlayer, true );        
  1455         enableWindow( localPlayer, true );
  1457     }
  1456     }
  1458     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startLocalVideo()" )
  1457     LC_QDEBUG( "livecomms [UI] <- LcUiEnginePrivate::startLocalVideo()" )
  1459 }
  1458 }
  1460 // End of File
  1459 // End of File