mmsharing/livecommsui/lcui/src/lcview.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 //USER
       
    18 #include "lcview.h"
       
    19 #include "lclogger.h"
       
    20 #include "lcuiengine.h"
       
    21 #include "lcuidefs.h"
       
    22 #include "lcuicomponentrepository.h"
       
    23 #include "lceffecthandler.h"
       
    24 #include "lcvideowidget.h"
       
    25 
       
    26 //SYSTEM
       
    27 #include <hblabel.h>
       
    28 #include <hbdialog.h>
       
    29 #include <hbtransparentwindow.h>
       
    30 #include <hbmessagebox.h>
       
    31 #include <hbaction.h>
       
    32 #include <hbmenu.h>
       
    33 #include <hbpushbutton.h>
       
    34 #include <hbtoolbar.h>
       
    35 #include <hbinstance.h>
       
    36 #include <hbeffect.h>
       
    37 #include <qgraphicssceneevent.h>
       
    38 #include <qtimer.h>
       
    39 #include <hblineedit.h>
       
    40 #include <dialpad.h>
       
    41 #include <hbtapgesture.h>
       
    42 #include <DialpadVtKeyHandler.h>
       
    43 
       
    44 
       
    45 
       
    46 #if ( defined __WINSCW__ ) || ( defined __WINS__ )
       
    47 const int inActivityTimeout = 5000; //5 secs
       
    48 #else
       
    49 const int inActivityTimeout = 2000; //2 secs
       
    50 #endif
       
    51 
       
    52 // -----------------------------------------------------------------------------
       
    53 // LcView::LcView
       
    54 // -----------------------------------------------------------------------------
       
    55 //
       
    56 LcView::LcView(LcUiEngine& engine, LcUiComponentRepository& repository)
       
    57  : HbView(0),
       
    58    mEngine(engine),
       
    59    mRepository(repository),
       
    60    mRecipient(0),
       
    61    mDuration(0),
       
    62    mContactIcon(0),   
       
    63    mSharedVideoWidget(0),
       
    64    mReceivedVideoWidget(0),
       
    65    mChangeCameraAction(0),
       
    66    mMuteAction(0),
       
    67    mSpeakerAction(0),
       
    68    mDisableCameraAction(0),
       
    69    mDisableCameraMenuAction(0),
       
    70    mNotSupportedNote(0),
       
    71    mEndCallButton(0),
       
    72    mReceivedVideoEffectOverlay(0),
       
    73    mSharedVideoEffectOverlay(0),
       
    74    mEffectHandler(0),
       
    75    mItemContextMenu(0),   
       
    76    mIsOptionMenuOpen(false),
       
    77    mDialpad(0),   
       
    78    mDialpadVtKeyHandler(0),
       
    79    timerId(0),
       
    80    isViewReady(0)
       
    81 {
       
    82     LC_QDEBUG( "livecomms [UI] -> LcView::LcView()" )
       
    83     
       
    84     createNotSupportedNote();
       
    85 
       
    86     // For LiveComms views Dock Wiget Item is explicitly hidden.
       
    87     hideItems(Hb::DockWidgetItem);
       
    88     
       
    89     //Subscribe to the gesture events.
       
    90     grabGesture(Qt::TapGesture,Qt::DontStartGestureOnChildren);        
       
    91 
       
    92     LC_QDEBUG( "livecomms [UI] <- LcView::LcView()" )
       
    93 }
       
    94 
       
    95 
       
    96 // -----------------------------------------------------------------------------
       
    97 // LcView::~LcView
       
    98 // -----------------------------------------------------------------------------
       
    99 //
       
   100 LcView::~LcView()
       
   101 {
       
   102     LC_QDEBUG( "livecomms [UI] -> LcView::~LcView()" )
       
   103 
       
   104     // Un-subscribe to the gesture events.
       
   105     ungrabGesture(Qt::TapGesture);        
       
   106 
       
   107     delete mEffectHandler;    
       
   108     delete mNotSupportedNote;
       
   109     delete mDialpadVtKeyHandler;
       
   110 
       
   111     LC_QDEBUG( "livecomms [UI] <- LcView::~LcView()" )
       
   112 }
       
   113 
       
   114 // -----------------------------------------------------------------------------
       
   115 // LcView::init
       
   116 // -----------------------------------------------------------------------------
       
   117 //
       
   118 void LcView::init()
       
   119 {
       
   120     LC_QDEBUG( "livecomms [UI] -> LcView::init()" )
       
   121     //find member widgets from repository
       
   122     //( can be also found by browsing this view itself )
       
   123     
       
   124     //due stubs in unit tests, qobject_cast cannot be used. Using static_cast instead
       
   125     mRecipient = 
       
   126         static_cast<HbLabel*>( mRepository.findWidget( lcLabelRecipientId ) );
       
   127     mDuration = 
       
   128         static_cast<HbLabel*>( mRepository.findWidget( lcLabelDurationId ) );
       
   129     mContactIcon = 
       
   130         static_cast<HbLabel*>( mRepository.findWidget( lcIconContactId ) );   
       
   131     mSharedVideoWidget = 
       
   132         static_cast<LcVideoWidget*>( 
       
   133                 mRepository.findWidget( lcWidgetSendVideoId ) );
       
   134     mReceivedVideoWidget = 
       
   135         static_cast<LcVideoWidget*>( 
       
   136                 mRepository.findWidget( lcWidgetRecvVideoId ) );
       
   137     mChangeCameraAction = 
       
   138         static_cast<HbAction*>( mRepository.findObject( lcActChangeCameraId ) );
       
   139     mMuteAction = 
       
   140         static_cast<HbAction*>( mRepository.findObject( lcActMuteId ) );
       
   141     mSpeakerAction = 
       
   142         static_cast<HbAction*>( mRepository.findObject( lcActSpeakerId ) );
       
   143     mDisableCameraAction = 
       
   144         static_cast<HbAction*>( mRepository.findObject( lcActDisableCameraId ) );
       
   145         
       
   146     mDisableCameraMenuAction =
       
   147         static_cast<HbAction*>( mRepository.findObject( lcActMenuDisableCameraId ) );
       
   148     
       
   149     mEndCallButton =
       
   150             static_cast<HbPushButton*>( mRepository.findObject( lcButtonEndCall ) );
       
   151     
       
   152     if ( mEndCallButton ) {
       
   153         connect( mEndCallButton, SIGNAL(clicked()), this, SLOT(endVideoSession()));
       
   154     }
       
   155 
       
   156     if ( mSharedVideoWidget ) {
       
   157         mSharedVideoEffectOverlay = static_cast<LcVideoWidget*>( 
       
   158                 mRepository.findWidget( lcWidgetSendVideoId2 ) );
       
   159         if ( mSharedVideoEffectOverlay ) {
       
   160             mSharedVideoEffectOverlay->show();
       
   161         }
       
   162     }
       
   163 
       
   164     mReceivedVideoEffectOverlay = 
       
   165         static_cast<LcVideoWidget*>( mRepository.findWidget( lcWidgetRecvVideoId2 ) );
       
   166         
       
   167     if ( mReceivedVideoEffectOverlay ) {
       
   168         mReceivedVideoEffectOverlay->show();
       
   169     }
       
   170 
       
   171     // swap
       
   172     mEffectHandler = new LcEffectHandler( mEngine,
       
   173             mSharedVideoWidget, mSharedVideoEffectOverlay, 
       
   174             mReceivedVideoWidget, mReceivedVideoEffectOverlay);
       
   175     connect( mEffectHandler, SIGNAL(swapCompleted()), this, SLOT(updateVideoRects()) );
       
   176     connect( mEffectHandler, SIGNAL(loadSwapLayout()), this, SLOT(updateSwapLayout()) );
       
   177     
       
   178     // menu
       
   179     if ( menu()) {
       
   180         connect( menu(), SIGNAL(aboutToShow()), this, SLOT(menuAboutToShow()) );
       
   181         connect( menu(), SIGNAL(aboutToHide()), this, SLOT(watchInactivity()) );        
       
   182     }     
       
   183 
       
   184     // Set up navigation action.
       
   185     setNavigationAction(new HbAction(Hb::BackNaviAction, this));
       
   186     connect(navigationAction(), SIGNAL(triggered()), this, 
       
   187             SLOT(back()));
       
   188     
       
   189     // dialpad
       
   190     mDialpad = static_cast<Dialpad*> ( mRepository.findWidget("lc_label_dialpad") );
       
   191     connect( mDialpad, SIGNAL(aboutToClose()), this, SLOT(dialpadClosed()) );
       
   192     connect( mDialpad, SIGNAL(aboutToOpen()), this, SLOT(dialpadOpened()) );
       
   193     connect( &mDialpad->editor(), SIGNAL( contentsChanged() ), this, SLOT( dialpadEditorTextChanged() ) );
       
   194     HbMainWindow* pWindow = HbInstance::instance()->allMainWindows().at(0);
       
   195     if( pWindow && mDialpad ){        
       
   196         mDialpadVtKeyHandler = new DialpadVtKeyHandler( mDialpad,*pWindow );
       
   197     }    
       
   198     
       
   199     // inactivity      
       
   200     connect( this, SIGNAL( contentFullScreenChanged() ), this, SLOT( watchInactivity() ) ) ;
       
   201     
       
   202     // deactivate fullscreen and it inturn starts inactivity timeout
       
   203     toFullScreen( false );
       
   204 
       
   205     if ( mSharedVideoWidget ) { 
       
   206         connect( mSharedVideoWidget, SIGNAL( xChanged() ), this, 
       
   207                 SLOT( updateVideoRects() ), Qt::QueuedConnection );
       
   208         connect( mSharedVideoWidget, SIGNAL( yChanged() ), this, 
       
   209                 SLOT( updateVideoRects() ) , Qt::QueuedConnection);
       
   210     }
       
   211     if ( mReceivedVideoWidget ) {
       
   212         connect( mReceivedVideoWidget, SIGNAL( xChanged() ), this, 
       
   213             SLOT( updateVideoRects() ), Qt::QueuedConnection );
       
   214         connect( mReceivedVideoWidget, SIGNAL( yChanged() ), this, 
       
   215             SLOT( updateVideoRects() ), Qt::QueuedConnection );
       
   216     }
       
   217     
       
   218     //Subscribe to the Volume Change Events.
       
   219     connect( &mEngine, SIGNAL(volumeChanged(int)), 
       
   220             this, SLOT(updateVolumeSlider(int)) );
       
   221     
       
   222     LC_QDEBUG( "livecomms [UI] <- LcView::init()" )
       
   223 }
       
   224 
       
   225 
       
   226 // -----------------------------------------------------------------------------
       
   227 // LcView::updateVideoRects
       
   228 // -----------------------------------------------------------------------------
       
   229 //
       
   230 void LcView::updateVideoRects()
       
   231 {
       
   232     LC_QDEBUG( "livecomms [UI] -> LcView::updateVideoRects()" )
       
   233 
       
   234     QRectF sharedContentRect;
       
   235     QRectF receivedContentRect;
       
   236 
       
   237     //Workaround: widgets positioning takes time, do not inform to the 
       
   238     //engine for rendering if co-ordinates of the videos are incorrect.
       
   239     
       
   240     if ( isPositioned() ) {
       
   241     
       
   242         if ( mSharedVideoWidget ) {
       
   243             sharedContentRect = mSharedVideoWidget->geometry();  
       
   244             sharedContentRect.moveTop(
       
   245                     sharedContentRect.y() + mapToParent(scenePos()).y());
       
   246             sharedContentRect = translateRectForOrientation(sharedContentRect);
       
   247             mEffectHandler->setVisibility(
       
   248                     mSharedVideoWidget, mEngine.isLocalPlayerPlaying());
       
   249         }
       
   250         
       
   251         if ( mReceivedVideoWidget ) {
       
   252             receivedContentRect = mReceivedVideoWidget->geometry();
       
   253             receivedContentRect.moveTop(
       
   254                     receivedContentRect.y() + mapToParent(scenePos()).y());
       
   255             receivedContentRect = translateRectForOrientation(receivedContentRect);
       
   256             mEffectHandler->setVisibility(
       
   257                     mReceivedVideoWidget, mEngine.isRemotePlayerPlaying());
       
   258         }
       
   259         
       
   260         mEngine.setContentAreas( sharedContentRect, receivedContentRect );
       
   261         mEngine.setOrientation( HbInstance::instance()->allMainWindows().at(0)->orientation() );
       
   262         mEngine.updateSession();
       
   263     }
       
   264     LC_QDEBUG( "livecomms [UI] <- LcView::updateVideoRects()" )
       
   265 }
       
   266 
       
   267 // -----------------------------------------------------------------------------
       
   268 // LcView::swap
       
   269 // -----------------------------------------------------------------------------
       
   270 //
       
   271 void LcView::swap()
       
   272 {
       
   273     LC_QDEBUG( "livecomms [UI] -> LcView::swap()" )
       
   274     if ( mEffectHandler ){
       
   275         mEffectHandler->swap();
       
   276     }
       
   277     LC_QDEBUG( "livecomms [UI] <- LcView::swap()" )
       
   278 }
       
   279 
       
   280 
       
   281 // -----------------------------------------------------------------------------
       
   282 // LcView::updateSwapLayout
       
   283 // -----------------------------------------------------------------------------
       
   284 //
       
   285 
       
   286 void LcView::updateSwapLayout()
       
   287 {
       
   288     mRepository.loadLayout( currentLayout() );
       
   289     toFullScreen( true );
       
   290 }
       
   291 
       
   292 // -----------------------------------------------------------------------------
       
   293 // LcView::activated
       
   294 // -----------------------------------------------------------------------------
       
   295 //
       
   296 void LcView::activated()
       
   297 {
       
   298     LC_QDEBUG( "livecomms [UI] -> LcView::activated()" )   
       
   299 
       
   300     updateVideoRects();
       
   301     
       
   302     if ( mEngine.mainCamera() ) {
       
   303         setCameraActionToSecondary();
       
   304     } else {
       
   305         setCameraActionToMain();
       
   306     }
       
   307     
       
   308     if ( mEngine.isMuted() ) {
       
   309         setMuteActionToUnmute();
       
   310     } else {
       
   311         setMuteActionToMute();
       
   312     }
       
   313     
       
   314     if ( mEngine.isSpeakerOn() ) {
       
   315         setSpeakerActionToHandset();
       
   316     } else {
       
   317         setSpeakerActionToSpeaker();
       
   318     }
       
   319 
       
   320     if( mEngine.isLocalPlayerPlaying() ){
       
   321         setCameraActionToDisable();        
       
   322     } else {
       
   323         setCameraActionToEnable();
       
   324     }
       
   325 
       
   326     if ( mChangeCameraAction ) {
       
   327         connect( 
       
   328             &mEngine, SIGNAL(cameraChangedToMain()),
       
   329             this, SLOT(setCameraActionToSecondary()) );
       
   330         connect(
       
   331             &mEngine, SIGNAL(cameraChangedToSecondary()),
       
   332             this, SLOT(setCameraActionToMain()));           
       
   333     }
       
   334     
       
   335     if ( mMuteAction ) {
       
   336         connect( 
       
   337             &mEngine, SIGNAL(muted()),
       
   338             this, SLOT(setMuteActionToUnmute()) );
       
   339         connect(
       
   340             &mEngine, SIGNAL(unmuted()),
       
   341             this, SLOT(setMuteActionToMute()));
       
   342     }
       
   343     
       
   344     if ( mSpeakerAction ) {
       
   345         connect( &mEngine, SIGNAL(speakerEnabled()), 
       
   346             this, SLOT(setSpeakerActionToHandset()) );
       
   347         connect( &mEngine, SIGNAL(speakerDisabled()), 
       
   348             this, SLOT(setSpeakerActionToSpeaker()) );
       
   349     }
       
   350 
       
   351     if ( mDisableCameraAction ) {
       
   352         connect( 
       
   353             &mEngine, SIGNAL(cameraDisabled()),
       
   354             this, SLOT(setCameraActionToEnable()) );
       
   355         connect(
       
   356             &mEngine, SIGNAL(cameraEnabled()),
       
   357             this, SLOT(setCameraActionToDisable()));           
       
   358     }
       
   359 
       
   360     connect( &mEngine, SIGNAL(blocked()), this, SLOT(disableControls()) );
       
   361     connect( &mEngine, SIGNAL(unblocked()), this, SLOT(enableControls()) ); 
       
   362     
       
   363     if ( mDuration ) {
       
   364         // TODO: clearing is needed for label in order to
       
   365         // get text changed. Seems like bug in orbit side.
       
   366         // This causes that duration is not changed. Workaround
       
   367         // would be to call clear always when duration changes.
       
   368         mDuration->clear();
       
   369         connect( 
       
   370         &mEngine, SIGNAL(sessionDurationChanged(const QString &)),
       
   371         mDuration, SLOT(setPlainText(const QString &)) );
       
   372     }
       
   373     
       
   374     if ( mRecipient ){
       
   375         mRecipient->clear();
       
   376         mRecipient->setPlainText( mEngine.recipient() );
       
   377         connect( 
       
   378            &mEngine, SIGNAL(recipientChanged(const QString &)),
       
   379            mRecipient, SLOT(setPlainText(const QString &)) );
       
   380     }
       
   381     
       
   382     if ( mSharedVideoWidget ) {
       
   383         connect( &mEngine, SIGNAL(localPlayerPlaying()), 
       
   384                  mEffectHandler, SLOT(showSendWindow()) );
       
   385         connect( &mEngine, SIGNAL(localPlayerPaused()), 
       
   386                  mEffectHandler, SLOT(hideSendWindow()) );
       
   387         connect( &mEngine, SIGNAL(localPlayerPlaying()), 
       
   388                  this, SLOT(setCameraActionToDisable()));
       
   389         connect( &mEngine, SIGNAL(localPlayerPaused()), 
       
   390                  this, SLOT(setCameraActionToEnable()));
       
   391         connect( &mEngine, SIGNAL(localPlayerUnavailable()), 
       
   392                  this, SLOT(setCameraActionToEnable()));
       
   393         connect( &mEngine, SIGNAL(localPlayerPlaying()), 
       
   394                          this, SLOT(updateVideoRects()));
       
   395     }
       
   396 
       
   397     if ( mReceivedVideoWidget ) {
       
   398         connect( &mEngine, SIGNAL(remotePlayerPlaying()), 
       
   399                  mEffectHandler, SLOT(showReceiveWindow()) );
       
   400         connect( &mEngine, SIGNAL(remotePlayerPaused()), 
       
   401                  mEffectHandler, SLOT(hideReceiveWindow()) );
       
   402         connect( &mEngine, SIGNAL(remotePlayerPlaying()), 
       
   403                          this, SLOT(updateVideoRects()) );
       
   404     }
       
   405     
       
   406     mEngine.setCurrentView(this);
       
   407     
       
   408     LC_QDEBUG( "livecomms [UI] <- LcView::activated()" )
       
   409 }
       
   410 
       
   411 // -----------------------------------------------------------------------------
       
   412 // LcView::deactivated
       
   413 // -----------------------------------------------------------------------------
       
   414 //
       
   415 void LcView::deactivated()
       
   416 {
       
   417     LC_QDEBUG( "livecomms [UI] -> LcView::deactivated()" )
       
   418     QRectF sharedContentRect;//null area
       
   419     QRectF receivedContentRect;//null area
       
   420 
       
   421     mEngine.setContentAreas( sharedContentRect, receivedContentRect );
       
   422     disconnect( &mEngine, 0, this, 0 );
       
   423     
       
   424     LC_QDEBUG( "livecomms [UI] <- LcView::deactivated()" )
       
   425 }
       
   426 
       
   427 // -----------------------------------------------------------------------------
       
   428 // LcView::notSupported
       
   429 // -----------------------------------------------------------------------------
       
   430 //
       
   431 void LcView::notSupported()
       
   432 {
       
   433     LC_QDEBUG( "livecomms [UI] -> LcView::notSupported()" )
       
   434     
       
   435     mNotSupportedNote->show();
       
   436     toFullScreen( false );
       
   437     
       
   438     LC_QDEBUG( "livecomms [UI] <- LcView::notSupported()" )
       
   439 }
       
   440 
       
   441 // -----------------------------------------------------------------------------
       
   442 // LcView::shareImage
       
   443 // -----------------------------------------------------------------------------
       
   444 //
       
   445 void LcView::shareImage()
       
   446 {
       
   447     LC_QDEBUG( "livecomms [UI] -> LcView::shareImage()" )
       
   448     const char localImageName[] = "c:\\data\\local.jpg";
       
   449     QString fileName = QString::fromAscii(localImageName);
       
   450     mEngine.shareImage(fileName);
       
   451     LC_QDEBUG( "livecomms [UI] <- LcView::shareImage()" )
       
   452 }
       
   453 
       
   454 // -----------------------------------------------------------------------------
       
   455 // LcView::endVideoSession
       
   456 // -----------------------------------------------------------------------------
       
   457 //
       
   458 void LcView::endVideoSession()
       
   459 {
       
   460     LC_QDEBUG( "livecomms [UI] -> LcView::endVideoSession()" )
       
   461     
       
   462     mEngine.stop();
       
   463 
       
   464     LC_QDEBUG( "livecomms [UI] <- LcView::endVideoSession()" )
       
   465     
       
   466 }
       
   467 
       
   468 // -----------------------------------------------------------------------------
       
   469 // LcView::disableCamera
       
   470 // -----------------------------------------------------------------------------
       
   471 //
       
   472 void LcView::disableCamera()
       
   473 {
       
   474     LC_QDEBUG( "livecomms [UI] -> LcView::disableCamera()" )
       
   475  
       
   476     mEffectHandler->setDissappearEffect( LcEffectHandler::NormalDissappear );
       
   477     mEngine.toggleDisableCamera();
       
   478     toFullScreen( mEngine.fullScreenMode() );
       
   479     
       
   480     LC_QDEBUG( "livecomms [UI] <- LcView::disableCamera()" ) 
       
   481 }
       
   482 
       
   483 // -----------------------------------------------------------------------------
       
   484 // LcView::mute
       
   485 // -----------------------------------------------------------------------------
       
   486 //
       
   487 void LcView::mute()
       
   488 {
       
   489     LC_QDEBUG( "livecomms [UI] -> LcView::mute()" )
       
   490     
       
   491     mEngine.toggleMute();
       
   492     toFullScreen( false );
       
   493     
       
   494     LC_QDEBUG( "livecomms [UI] <- LcView::mute()" )
       
   495 }
       
   496 
       
   497 // -----------------------------------------------------------------------------
       
   498 // LcView::changeCamera
       
   499 // -----------------------------------------------------------------------------
       
   500 //
       
   501 void LcView::changeCamera()
       
   502 {
       
   503     LC_QDEBUG( "livecomms [UI] -> LcView::changeCamera()" )
       
   504    
       
   505     mEffectHandler->setDissappearEffect( LcEffectHandler::DissappearToFlip );
       
   506     mEngine.toggleCamera();
       
   507     toFullScreen( false );
       
   508         
       
   509     LC_QDEBUG( "livecomms [UI] <- LcView::changeCamera()" )
       
   510 }
       
   511 
       
   512 // -----------------------------------------------------------------------------
       
   513 // LcView::switchToVoiceCall
       
   514 // -----------------------------------------------------------------------------
       
   515 //
       
   516 void LcView::switchToVoiceCall()
       
   517 {
       
   518     LC_QDEBUG( "livecomms [UI] -> LcView::switchToVoiceCall()" )
       
   519     
       
   520     mEngine.stop();
       
   521     
       
   522     LC_QDEBUG( "livecomms [UI] <- LcView::switchToVoiceCall()" )
       
   523 }
       
   524 
       
   525 // -----------------------------------------------------------------------------
       
   526 // LcView::speaker
       
   527 // -----------------------------------------------------------------------------
       
   528 //
       
   529 void LcView::speaker()
       
   530 {
       
   531     LC_QDEBUG( "livecomms [UI] -> LcView::speaker()" )
       
   532 
       
   533     mEngine.toggleSpeaker();
       
   534     toFullScreen( false );
       
   535     
       
   536     LC_QDEBUG( "livecomms [UI] <- LcView::speaker()" )    
       
   537 }
       
   538 
       
   539 // -----------------------------------------------------------------------------
       
   540 // LcView::setCameraActionToMain
       
   541 // -----------------------------------------------------------------------------
       
   542 //
       
   543 void LcView::setCameraActionToMain()
       
   544 {
       
   545     LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToMain()" )
       
   546     
       
   547     if ( mChangeCameraAction ){ 
       
   548         mChangeCameraAction->setIcon (HbIcon( lcIconNameMainCamera ));
       
   549     }
       
   550     LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToMain()" )   
       
   551 }
       
   552 
       
   553 // -----------------------------------------------------------------------------
       
   554 // LcView::setCameraActionToSecondary
       
   555 // -----------------------------------------------------------------------------
       
   556 //
       
   557 void LcView::setCameraActionToSecondary()
       
   558 {
       
   559     LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToSecondary()" )
       
   560     
       
   561     if ( mChangeCameraAction ){ 
       
   562         mChangeCameraAction->setIcon (HbIcon( lcIconNameSecondaryCamera ));
       
   563     }
       
   564     LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToSecondary()" )   
       
   565 }
       
   566 
       
   567 // -----------------------------------------------------------------------------
       
   568 // LcView::setMuteActionToUnmute
       
   569 // -----------------------------------------------------------------------------
       
   570 //
       
   571 void LcView::setMuteActionToUnmute()
       
   572 {
       
   573     LC_QDEBUG( "livecomms [UI] -> LcView::setMuteActionToUnmute()" )
       
   574     
       
   575     if ( mMuteAction ){ 
       
   576         mMuteAction->setIcon (HbIcon( lcIconNameUnmuteMic ));
       
   577     }
       
   578     LC_QDEBUG( "livecomms [UI] <- LcView::setMuteActionToUnmute()" )   
       
   579 }
       
   580 
       
   581 // -----------------------------------------------------------------------------
       
   582 // LcView::setMuteActionToMute
       
   583 // -----------------------------------------------------------------------------
       
   584 //
       
   585 void LcView::setMuteActionToMute()
       
   586 {
       
   587     LC_QDEBUG( "livecomms [UI] -> LcView::setMuteActionToMute()" )
       
   588     if ( mMuteAction ){ 
       
   589         mMuteAction->setIcon (HbIcon( lcIconNameMuteMic ));
       
   590     }
       
   591     LC_QDEBUG( "livecomms [UI] <- LcView::setMuteActionToMute()" )   
       
   592 }
       
   593 
       
   594 // -----------------------------------------------------------------------------
       
   595 // LcView::setSpeakerActionToHandset
       
   596 // -----------------------------------------------------------------------------
       
   597 //
       
   598 void LcView::setSpeakerActionToHandset()
       
   599 {
       
   600     LC_QDEBUG( "livecomms [UI] -> LcView::setSpeakerActionToHandset()" )
       
   601     if ( mSpeakerAction ){
       
   602         mSpeakerAction->setIcon (HbIcon( lcIconNameHandset ));
       
   603     }
       
   604     LC_QDEBUG( "livecomms [UI] <- LcView::setSpeakerActionToHandset()" )
       
   605 }
       
   606 
       
   607 // -----------------------------------------------------------------------------
       
   608 // LcView::setSpeakerActionToSpeaker
       
   609 // -----------------------------------------------------------------------------
       
   610 //
       
   611 void LcView::setSpeakerActionToSpeaker()
       
   612 {
       
   613     LC_QDEBUG( "livecomms [UI] -> LcView::setSpeakerActionToSpeaker()" )
       
   614     if ( mSpeakerAction ){
       
   615         mSpeakerAction->setIcon( HbIcon( lcIconNameLoudspeaker ));
       
   616     }
       
   617     LC_QDEBUG( "livecomms [UI] <- LcView::setSpeakerActionToSpeaker()" )
       
   618 }
       
   619 
       
   620 // -----------------------------------------------------------------------------
       
   621 // LcView::setCameraActionToEnable
       
   622 // -----------------------------------------------------------------------------
       
   623 //
       
   624 void LcView::setCameraActionToEnable()
       
   625 {
       
   626     LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToEnable()" )
       
   627     
       
   628     if ( mDisableCameraAction ){ 
       
   629         mDisableCameraAction->setIcon( HbIcon( lcIconNameEnableCamera ));
       
   630     }
       
   631     if ( mDisableCameraMenuAction ){ 
       
   632         // TODO: get text from repository as loc id is not the same for mus
       
   633         mDisableCameraMenuAction->setText( hbTrId( "txt_vt_menu_enable_camera" ));
       
   634     }
       
   635 
       
   636     LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToEnable()" )   
       
   637 }
       
   638 
       
   639 // -----------------------------------------------------------------------------
       
   640 // LcView::setCameraActionToDisable
       
   641 // -----------------------------------------------------------------------------
       
   642 //
       
   643 void LcView::setCameraActionToDisable()
       
   644 {
       
   645     LC_QDEBUG( "livecomms [UI] -> LcView::setCameraActionToDisable()" )
       
   646     
       
   647     if ( mDisableCameraAction ){ 
       
   648         mDisableCameraAction->setIcon (HbIcon( lcIconNameDisableCamera ));
       
   649     }
       
   650     if ( mDisableCameraMenuAction ){ 
       
   651         // TODO: get text from repository as loc id is not the same for mus
       
   652         mDisableCameraMenuAction->setText( hbTrId( "txt_vt_menu_disable_camera" ));
       
   653     }
       
   654     
       
   655     LC_QDEBUG( "livecomms [UI] <- LcView::setCameraActionToDisable()" )   
       
   656 }
       
   657 
       
   658 // -----------------------------------------------------------------------------
       
   659 // LcView::disableControls
       
   660 // -----------------------------------------------------------------------------
       
   661 //
       
   662 void LcView::disableControls()
       
   663 {
       
   664     LC_QDEBUG( "livecomms [UI] -> LcView::disableControls()" )
       
   665     menu()->setEnabled( false );
       
   666     toolBar()->setEnabled( false );
       
   667     LC_QDEBUG( "livecomms [UI] <- LcView::disableControls()" )
       
   668 }
       
   669 
       
   670 // -----------------------------------------------------------------------------
       
   671 // LcView::enableControls
       
   672 // -----------------------------------------------------------------------------
       
   673 //
       
   674 void LcView::enableControls()
       
   675 {
       
   676     LC_QDEBUG( "livecomms [UI] -> LcView::enableControls()" )
       
   677     menu()->setEnabled( true );
       
   678     toolBar()->setEnabled( true );
       
   679     LC_QDEBUG( "livecomms [UI] <- LcView::enableControls()" )
       
   680 }
       
   681 
       
   682 // -----------------------------------------------------------------------------
       
   683 // LcView::gestureEvent
       
   684 // -----------------------------------------------------------------------------
       
   685 //
       
   686 void LcView::gestureEvent(QGestureEvent *event)
       
   687 {
       
   688     LC_QDEBUG( "livecomms [UI] -> LcView::gestureEvent()" )
       
   689     if( event ){
       
   690         // unsafe typecast but no other way to access tapstylehint from orbit
       
   691         HbTapGesture *tap = static_cast<HbTapGesture *>(event->gesture(Qt::TapGesture));
       
   692         Qt::GestureState tapState = tap->state();
       
   693         HbTapGesture::TapStyleHint hint = tap->tapStyleHint();
       
   694         if ( tapState == Qt::GestureUpdated && hint == HbTapGesture::TapAndHold ) {            
       
   695             gestureLongPress(translatePointForOrientation(tap->position()));
       
   696         } else if ( tapState == Qt::GestureFinished  && hint == HbTapGesture::Tap ) {
       
   697             gestureShortPress();
       
   698         }        
       
   699     }
       
   700     LC_QDEBUG( "livecomms [UI] <- LcView::gestureEvent()" )
       
   701 }
       
   702 
       
   703 
       
   704 // -----------------------------------------------------------------------------
       
   705 // LcView::gestureLongPress
       
   706 // -----------------------------------------------------------------------------
       
   707 //
       
   708 void LcView::gestureLongPress(QPointF coords)
       
   709 {
       
   710     LC_QDEBUG_2( "livecomms [UI] -> LcView::gestureLongPress(), coords:", coords )
       
   711 
       
   712     bool sharedHit = false;
       
   713     
       
   714     if ( mSharedVideoWidget && mSharedVideoWidget->windowFrameGeometry().contains(coords) ) {
       
   715         LC_QDEBUG( "livecomms [UI] LcView mapped to mSharedVideoWidget" )
       
   716         sharedHit = true;
       
   717     }
       
   718     
       
   719     if ( sharedHit ) {
       
   720         LC_QDEBUG( "livecomms [UI] LcView mapped to mSharedVideoWidget" )
       
   721 
       
   722         createContextMenu();
       
   723         mRepository.sharedVideoContextMenuActions( mItemContextMenu, *this );
       
   724 
       
   725         if ( mItemContextMenu->actions().count() > 0 ) {
       
   726             mItemContextMenu->open(this);
       
   727         }
       
   728     }
       
   729 
       
   730     LC_QDEBUG( "livecomms [UI] <- LcView::gestureLongPress()" )
       
   731 }
       
   732 
       
   733 
       
   734 
       
   735 // -----------------------------------------------------------------------------
       
   736 // LcView::gestureShortPress
       
   737 // -----------------------------------------------------------------------------
       
   738 //
       
   739 void LcView::gestureShortPress()
       
   740 {
       
   741     LC_QDEBUG( "livecomms [UI] -> LcView::gestureShortPress()" )
       
   742     toFullScreen( !mEngine.fullScreenMode() );
       
   743     LC_QDEBUG( "livecomms [UI] <- LcView::gestureShortPress()" )
       
   744 }
       
   745 
       
   746 // -----------------------------------------------------------------------------
       
   747 // LcView::createNotSupportedNote
       
   748 // -----------------------------------------------------------------------------
       
   749 //
       
   750 void LcView::createNotSupportedNote()
       
   751 {
       
   752     LC_QDEBUG( "livecomms [UI] -> LcView::createNotSupportedNote()" )
       
   753 
       
   754     if ( !mNotSupportedNote ){
       
   755         mNotSupportedNote = new HbMessageBox(QString("Not supported"));
       
   756         mNotSupportedNote->setTimeout(HbDialog::StandardTimeout);
       
   757         mNotSupportedNote->setZValue(LC_NOTE_ON_TOP);
       
   758         mNotSupportedNote->hide();
       
   759     }
       
   760 
       
   761     LC_QDEBUG( "livecomms [UI] <- LcView::createNotSupportedNote()" )
       
   762 }
       
   763 
       
   764 
       
   765 
       
   766 // -----------------------------------------------------------------------------
       
   767 // LcView::createContextMenu
       
   768 // -----------------------------------------------------------------------------
       
   769 //
       
   770 void LcView::createContextMenu()
       
   771 {
       
   772     LC_QDEBUG( "livecomms [UI] -> LcView::createContextMenu()" )
       
   773 
       
   774     // mItemContextMenu is destroyed upon close 
       
   775     mItemContextMenu = new HbMenu();
       
   776     mItemContextMenu->setDismissPolicy(HbMenu::TapAnywhere);
       
   777     mItemContextMenu->setTimeout(HbMenu::ContextMenuTimeout);
       
   778     mItemContextMenu->setAttribute(Qt::WA_DeleteOnClose);
       
   779     
       
   780     LC_QDEBUG( "livecomms [UI] <- LcView::createContextMenu()" )
       
   781 }
       
   782     
       
   783 // -----------------------------------------------------------------------------
       
   784 // LcView::currentLayout
       
   785 // -----------------------------------------------------------------------------
       
   786 //
       
   787 QString LcView::currentLayout()
       
   788 {
       
   789     QString layout( lcLayoutLandscapeDefaultId );
       
   790 
       
   791     if ( mEffectHandler->isSwapInProgress() &&
       
   792         mSharedVideoWidget &&
       
   793         mReceivedVideoWidget &&
       
   794         mSharedVideoWidget->geometry().left() > mReceivedVideoWidget->geometry().left() ) {
       
   795         
       
   796         layout = lcLayoutLandscapeSwappedId;
       
   797     }
       
   798 
       
   799     LC_QDEBUG_2( "livecomms [UI] -> LcView::currentLayout()", layout )
       
   800     return layout;
       
   801 }
       
   802 
       
   803 
       
   804 // -----------------------------------------------------------------------------
       
   805 // LcView::menuAboutToShow
       
   806 // -----------------------------------------------------------------------------
       
   807 //
       
   808 void LcView::menuAboutToShow()
       
   809 {
       
   810     LC_QDEBUG( "livecomms [UI] -> LcView::menuAboutToShow()" )
       
   811     toFullScreen( false );
       
   812     LC_QDEBUG( "livecomms [UI] <- LcView::menuAboutToShow()" )
       
   813 }
       
   814 
       
   815 // -----------------------------------------------------------------------------
       
   816 // LcView::translateRectForOrientation
       
   817 // Video windows at engine side do not change their coordinate system
       
   818 // when orientation at orbit UI changes. Therefore we need to convert video
       
   819 // rects from landscape coordinate system to portait coordinate system.
       
   820 // NOTE: Landscape orientation has different rotation in emulator than in HW.
       
   821 // -----------------------------------------------------------------------------
       
   822 //
       
   823 QRectF LcView::translateRectForOrientation(const QRectF& origRect)
       
   824 {
       
   825     QRectF newRect = origRect;
       
   826     QMatrix m;
       
   827 #if ( defined __WINSCW__ ) || ( defined __WINS__ ) 
       
   828     m.rotate(270);
       
   829     newRect = m.mapRect(newRect);
       
   830     newRect.translate(0,HbInstance::instance()->allMainWindows().at(0)->rect().height());
       
   831 #else
       
   832     m.rotate(90);
       
   833     newRect = m.mapRect(newRect);
       
   834     newRect.translate(HbInstance::instance()->allMainWindows().at(0)->rect().width(),0);
       
   835 #endif
       
   836     return newRect; 
       
   837 }
       
   838 
       
   839 // -----------------------------------------------------------------------------
       
   840 //
       
   841 // -----------------------------------------------------------------------------
       
   842 //
       
   843 QPointF LcView::translatePointForOrientation(const QPointF& origPoint)
       
   844 {
       
   845     QPointF newPoint = origPoint;
       
   846     QMatrix m;
       
   847 #if ( defined __WINSCW__ ) || ( defined __WINS__ ) 
       
   848     m.translate(HbInstance::instance()->allMainWindows().at(0)->rect().height(),0);
       
   849     m.rotate(90);
       
   850     newPoint = m.map(newPoint);
       
   851 #else
       
   852     m.translate(0,HbInstance::instance()->allMainWindows().at(0)->rect().width());
       
   853     m.rotate(270);
       
   854     newPoint = m.map(newPoint);
       
   855 #endif
       
   856     return newPoint; 
       
   857 }
       
   858 
       
   859 // -----------------------------------------------------------------------------
       
   860 //
       
   861 // -----------------------------------------------------------------------------
       
   862 //
       
   863 void LcView::setVisibility( QGraphicsItem* item, bool visible )
       
   864 {
       
   865     if ( item ) {
       
   866         item->setVisible(visible);
       
   867     }
       
   868 }
       
   869 
       
   870 // -----------------------------------------------------------------------------
       
   871 //
       
   872 // -----------------------------------------------------------------------------
       
   873 //
       
   874 void LcView::addOptionsMenuActions()
       
   875 {
       
   876     HbAction* swapAction = static_cast<HbAction*>(
       
   877         mRepository.findObject(lcActSwapViewsId));
       
   878     menu()->addAction(swapAction);
       
   879 
       
   880     HbAction* openKeypadAction = static_cast<HbAction*>(
       
   881         mRepository.findObject(lcActOpenKeypadId));
       
   882     menu()->addAction(openKeypadAction);
       
   883 }
       
   884 
       
   885 // -----------------------------------------------------------------------------
       
   886 // LcView::openDialpad()
       
   887 // -----------------------------------------------------------------------------
       
   888 //
       
   889 void LcView::openDialpad()
       
   890 {    
       
   891     LC_QDEBUG("livecomms [UI] -> LcView::openDialpad()")
       
   892     mRepository.loadLayout( lcLayoutLandscapeDialpadId ); 
       
   893     if ( mEffectHandler )mEffectHandler->startEffects();    
       
   894     mDialpad->openDialpad();
       
   895     mDialpad->setCallButtonEnabled(false);
       
   896     menu()->clearActions();    
       
   897     LC_QDEBUG("livecomms [UI] <- LcView::openDialpad()")
       
   898 }
       
   899 
       
   900 // -----------------------------------------------------------------------------
       
   901 // LcView::dialpadOpened()
       
   902 // -----------------------------------------------------------------------------
       
   903 //
       
   904 void LcView::dialpadOpened()
       
   905 {
       
   906     LC_QDEBUG("livecomms [UI] <-> LcView::dialpadOpened()")   
       
   907     toolBar()->setVisible( false );
       
   908     setTitleBarVisible( true );
       
   909 }
       
   910 
       
   911 // -----------------------------------------------------------------------------
       
   912 // LcView::dialpadClosed()
       
   913 // -----------------------------------------------------------------------------
       
   914 //
       
   915 void LcView::dialpadClosed()
       
   916 {
       
   917     LC_QDEBUG("livecomms [UI] -> LcView::dialpadClosed()")
       
   918     mDialpad->editor().setText(QString());
       
   919     addOptionsMenuActions();    
       
   920     // switch back to the previous layout
       
   921     QString pLayout = mRepository.previousLayout();
       
   922     QString layout;
       
   923     bool isSwapped = (pLayout == lcLayoutLandscapeDefaultId)
       
   924                      ? false : true;
       
   925     layout = (isSwapped) ? 
       
   926         lcLayoutLandscapeSwappedId : lcLayoutLandscapeDefaultId;
       
   927 
       
   928     mRepository.loadLayout( layout );    
       
   929     if ( mEffectHandler ){
       
   930         mEffectHandler->startEffects();
       
   931     }
       
   932     toFullScreen(false);
       
   933     LC_QDEBUG("livecomms [UI] <- LcView::dialpadClosed()")
       
   934 }
       
   935 
       
   936 // -----------------------------------------------------------------------------
       
   937 // LcView::dialpadEditorTextChanged()
       
   938 // -----------------------------------------------------------------------------
       
   939 //
       
   940 void LcView::dialpadEditorTextChanged()
       
   941 {   
       
   942     LC_QDEBUG_2("livecomms [UI] -> Dial Pad Field ", mDialpad->editor().text());
       
   943     
       
   944     if ( mDialpad->editor().text().length() > 0 ) {
       
   945         LC_QDEBUG_2("livecomms [UI] -> Last Dialled Charcter ", mDialpad->editor().text().right(1));
       
   946         bool dialPadStatus = mEngine.SendDialTone(mDialpad->editor().text().right(1).at(0));
       
   947         LC_QDEBUG_2("livecomms [UI] -> Dialpad Send Tone Status ",dialPadStatus)
       
   948     }
       
   949 }
       
   950 
       
   951 // -----------------------------------------------------------------------------
       
   952 // LcView::back
       
   953 // -----------------------------------------------------------------------------
       
   954 //
       
   955 void LcView::back()
       
   956 {
       
   957     LC_QDEBUG("livecomms [UI] -> LcView::back()")
       
   958     if ( mDialpad && mDialpad->isOpen()) {
       
   959         LC_QDEBUG("livecomms [UI] - Closing dialpad")
       
   960         mDialpad->closeDialpad();    
       
   961     } else {
       
   962         mEngine.minimize();
       
   963     }
       
   964     
       
   965     LC_QDEBUG("livecomms [UI] <- LcView::back()")
       
   966 }
       
   967 
       
   968 // -----------------------------------------------------------------------------
       
   969 // LcView::timerEvent
       
   970 // -----------------------------------------------------------------------------
       
   971 //
       
   972 void LcView::timerEvent( QTimerEvent * event )
       
   973 {    
       
   974     if ( event->timerId() == timerId ){
       
   975         LC_QDEBUG("livecomms [UI] -> LcView::timerEvent() inActivity Timeout")
       
   976         killTimer( timerId );
       
   977         toFullScreen(true);
       
   978     }    
       
   979 }
       
   980 
       
   981 // -----------------------------------------------------------------------------
       
   982 // LcView::watchInactivity
       
   983 // -----------------------------------------------------------------------------
       
   984 //
       
   985 void LcView::watchInactivity()
       
   986 {    
       
   987     if( !mEngine.fullScreenMode() &&  !( mDialpad && mDialpad->isOpen() ) ){
       
   988         LC_QDEBUG("livecomms [UI] - LcView::watchInactivity() start watching inactivity") 
       
   989         killTimer( timerId );
       
   990         timerId = startTimer( inActivityTimeout );
       
   991     }    
       
   992 }
       
   993 
       
   994 // -----------------------------------------------------------------------------
       
   995 // LcView::toFullScreen utility function
       
   996 // -----------------------------------------------------------------------------
       
   997 //
       
   998 void LcView::toFullScreen( bool fullscreen )
       
   999 {
       
  1000     LC_QDEBUG_2("livecomms [UI] - LcView::toFullScreen(),",fullscreen)
       
  1001     if( menu()->isVisible() || ( mDialpad && mDialpad->isOpen() ) ) return;
       
  1002     mEngine.setFullScreenMode( fullscreen );    
       
  1003     setTitleBarVisible( !fullscreen );
       
  1004     setStatusBarVisible( !fullscreen );
       
  1005     toolBar()->setVisible( !fullscreen );
       
  1006     setVisibility( mEndCallButton, !fullscreen );    
       
  1007     setVisibility( mDuration, !fullscreen );
       
  1008     setVisibility( mRecipient, !fullscreen );
       
  1009     emit contentFullScreenChanged();
       
  1010 }
       
  1011 
       
  1012 
       
  1013 // -----------------------------------------------------------------------------
       
  1014 // LcView::isVideoPositionedCorrectly utility function
       
  1015 // -----------------------------------------------------------------------------
       
  1016 //
       
  1017 bool LcView::isVideoPositionedCorrectly( LcVideoWidget* mVideoWidget )
       
  1018 {
       
  1019     LC_QDEBUG("livecomms [UI] -> LcView::isVideoPositionedCorrectly()")
       
  1020     LC_QDEBUG("livecomms [UI] <- LcView::isVideoPositionedCorrectly()")
       
  1021     QPointF initialPosition(0,0);
       
  1022     return ( !mVideoWidget || 
       
  1023             (( mVideoWidget ) && ( mVideoWidget->pos()!= initialPosition )));
       
  1024 }
       
  1025 
       
  1026 // -----------------------------------------------------------------------------
       
  1027 // LcView::isPositioned utility function
       
  1028 // hack style since orbit give viewready much earlier and widgets do not have
       
  1029 // proper co-ordinates.
       
  1030 // -----------------------------------------------------------------------------
       
  1031 //
       
  1032 bool LcView::isPositioned()
       
  1033 {
       
  1034     LC_QDEBUG("livecomms [UI] -> LcView::isPositioned()")   
       
  1035     // at first time check for video positions if they are not ready
       
  1036     // wait for x or y changed event and recheck position. 
       
  1037     // After firsttime it will work.
       
  1038     if( !isViewReady ){
       
  1039         isViewReady =  isVideoPositionedCorrectly( mSharedVideoWidget ) && 
       
  1040                        isVideoPositionedCorrectly( mReceivedVideoWidget );
       
  1041         if( isViewReady ){
       
  1042             if ( mSharedVideoWidget ) { 
       
  1043             disconnect( mSharedVideoWidget, SIGNAL( xChanged() ), this, 
       
  1044                    SLOT( updateVideoRects() ) );
       
  1045             disconnect( mSharedVideoWidget, SIGNAL( yChanged() ), this, 
       
  1046                    SLOT( updateVideoRects() ) );
       
  1047             }
       
  1048             if ( mReceivedVideoWidget ) {
       
  1049             disconnect( mReceivedVideoWidget, SIGNAL( xChanged() ), this, 
       
  1050                    SLOT( updateVideoRects() ) );
       
  1051             disconnect( mReceivedVideoWidget, SIGNAL( yChanged() ), this, 
       
  1052                    SLOT( updateVideoRects() ) );
       
  1053             }
       
  1054        }
       
  1055     }    
       
  1056     LC_QDEBUG_2("livecomms [UI] - LcView::isPositioned(),",isViewReady)
       
  1057     return isViewReady;    
       
  1058 }
       
  1059 
       
  1060 
       
  1061 // -----------------------------------------------------------------------------
       
  1062 // LcView::updateVolumeSlider 
       
  1063 // -----------------------------------------------------------------------------
       
  1064 //
       
  1065 void LcView::updateVolumeSlider( int aVolumeLevel )
       
  1066 {
       
  1067     LC_QDEBUG("livecomms [UI] -> LcView::updateVolumeSlider()")
       
  1068     //TBD: Show volume slider, with update volume level
       
  1069     LC_QDEBUG_2("Volume Level Is,",aVolumeLevel)
       
  1070     LC_QDEBUG("livecomms [UI] <- LcView::updateVolumeSlider()")   
       
  1071 }
       
  1072 
       
  1073 
       
  1074 // End of file