camerauis/cameraxui/cxui/src/cxuidisplaypropertyhandler.cpp
changeset 63 415ff50d2eca
parent 19 d9aefe59d544
equal deleted inserted replaced
60:a289dde0a1d6 63:415ff50d2eca
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    65 
    65 
    66 void CxuiDisplayPropertyHandler::simulateActivity()
    66 void CxuiDisplayPropertyHandler::simulateActivity()
    67 {
    67 {
    68     mUtility.resetInactivityTime();
    68     mUtility.resetInactivityTime();
    69 }
    69 }
       
    70 
       
    71 /*!
       
    72  * Handles viewfinder state changes.
       
    73  * @param newState new viewfinder state
       
    74  * @param error error code in case of error
       
    75  */
       
    76 void CxuiDisplayPropertyHandler::handleVfStateChanged(
       
    77     CxeViewfinderControl::State newState, CxeError::Id error)
       
    78 {
       
    79     CX_DEBUG_ENTER_FUNCTION();
       
    80     Q_UNUSED(error);
       
    81 
       
    82     if (newState == CxeViewfinderControl::Running) {
       
    83         // switch off screen saver and turn on backlight
       
    84          setDisplayAlwaysVisible(true);
       
    85     } else {
       
    86         // switch on screen saver and turn off backlight
       
    87         setDisplayAlwaysVisible(false);
       
    88     }
       
    89 
       
    90     CX_DEBUG_EXIT_FUNCTION();
       
    91 }