camerauis/cameraxui/cxui/src/cxuicapturekeyhandler.cpp
changeset 52 7e18d488ac5f
parent 46 c826656d6714
equal deleted inserted replaced
46:c826656d6714 52:7e18d488ac5f
    35 CxuiCaptureKeyHandler::CxuiCaptureKeyHandler(CxeEngine &aEngine) :
    35 CxuiCaptureKeyHandler::CxuiCaptureKeyHandler(CxeEngine &aEngine) :
    36         d_ptr(NULL)
    36         d_ptr(NULL)
    37 {
    37 {
    38     d_ptr = new CxuiCaptureKeyHandlerPrivate(aEngine, this);
    38     d_ptr = new CxuiCaptureKeyHandlerPrivate(aEngine, this);
    39     
    39     
    40     d_ptr->listenKeys(true);
    40     d_ptr->startListeningKeys();
    41 }
    41 }
    42 
    42 
    43 CxuiCaptureKeyHandler::~CxuiCaptureKeyHandler()
    43 CxuiCaptureKeyHandler::~CxuiCaptureKeyHandler()
    44 {    
    44 {    
    45     CX_DEBUG_ENTER_FUNCTION();
    45     CX_DEBUG_ENTER_FUNCTION();
    46 
    46 
    47     Q_D(CxuiCaptureKeyHandler);
    47     Q_D(CxuiCaptureKeyHandler);
    48     d->listenKeys(false);
    48     d->stopListeningKeys();
    49 
    49 
    50     delete d;
    50     delete d;
    51 
    51 
    52     CX_DEBUG_EXIT_FUNCTION();
    52     CX_DEBUG_EXIT_FUNCTION();
    53 }
    53 }
    54 
    54 
    55 void CxuiCaptureKeyHandler::listenKeys(bool listen)
    55 void CxuiCaptureKeyHandler::startListeningKeys()
    56 {
    56 {
    57     Q_D(CxuiCaptureKeyHandler);
    57     Q_D(CxuiCaptureKeyHandler);
    58     d->listenKeys(listen);
    58     d->startListeningKeys();
       
    59 }
       
    60 
       
    61 void CxuiCaptureKeyHandler::stopListeningKeys()
       
    62 {
       
    63     Q_D(CxuiCaptureKeyHandler);
       
    64     d->stopListeningKeys();
    59 }
    65 }
    60 
    66 
    61 bool CxuiCaptureKeyHandler::isAutofocusKeyPressed()
    67 bool CxuiCaptureKeyHandler::isAutofocusKeyPressed()
    62 {
    68 {
    63     Q_D(CxuiCaptureKeyHandler);
    69     Q_D(CxuiCaptureKeyHandler);