camerauis/cameraxui/cxui/inc/cxuicapturekeyhandler.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     1 /*
       
     2 * Copyright (c) 2009-2010 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 
       
    18 #ifndef CXUICAPTUREKEYHANDLER_H
       
    19 #define CXUICAPTUREKEYHANDLER_H
       
    20 
       
    21 #include <QObject>
       
    22 
       
    23 class QEvent;
       
    24 class CxeEngine;
       
    25 class CxuiCaptureKeyHandlerPrivate;
       
    26 
       
    27 class CxuiCaptureKeyHandler : public QObject
       
    28 {
       
    29     Q_OBJECT
       
    30 public:
       
    31     CxuiCaptureKeyHandler(CxeEngine &aEngine);
       
    32     virtual ~CxuiCaptureKeyHandler();
       
    33 
       
    34 public:
       
    35 
       
    36     void startListeningKeys();
       
    37     void stopListeningKeys();
       
    38     bool isAutofocusKeyPressed();
       
    39     bool isCaptureKeyPressed();
       
    40 
       
    41     bool handleKeyEvent(QEvent *event);
       
    42 
       
    43 signals:
       
    44     // Note that these signals should be connected to view classes only, because
       
    45     // CxuiViewManager will handle all signal connections and disconnections
       
    46     void autofocusKeyPressed();
       
    47     void autofocusKeyReleased();
       
    48     void captureKeyPressed();
       
    49     void captureKeyReleased();
       
    50 
       
    51 private:
       
    52     CxuiCaptureKeyHandlerPrivate *d_ptr;
       
    53     Q_DECLARE_PRIVATE(CxuiCaptureKeyHandler)
       
    54 };
       
    55 
       
    56 #endif // CXUICAPTUREKEYHANDLER_H