camerauis/cameraxui/cxengine/inc/cxeautofocuscontroldesktop.h
changeset 46 c826656d6714
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
       
     1 /*
       
     2 * Copyright (c) 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 CXEAUTOFOCUSCONTROLDESKTOP_H
       
    19 #define CXEAUTOFOCUSCONTROLDESKTOP_H
       
    20 
       
    21 #include <QVariant>
       
    22 #include "cxenamespace.h"
       
    23 #include "cxeautofocuscontrol.h"
       
    24 
       
    25 /**
       
    26  * CxeAutoFocusControl is responsible for handling Autofocus events from the camera adaptation.
       
    27  * It also routes the Autofocus successful and failed events to the clients interested in Žknowing the
       
    28  * status of Autofocus.
       
    29  */
       
    30 class CxeAutoFocusControlDesktop: public CxeAutoFocusControl
       
    31 {
       
    32     Q_OBJECT
       
    33 public:
       
    34 
       
    35     CxeAutoFocusControlDesktop();
       
    36     virtual ~CxeAutoFocusControlDesktop();
       
    37 
       
    38     CxeError::Id  start(bool soundEnabled = true);
       
    39     void cancel();
       
    40     void setMode(CxeAutoFocusControl::Mode newMode);
       
    41     CxeAutoFocusControl::Mode mode() const;
       
    42     virtual bool isFixedFocusMode(Mode mode) const;
       
    43 
       
    44 
       
    45     CxeAutoFocusControl::State state() const;
       
    46     bool supported() const;
       
    47     bool isSoundEnabled() const;
       
    48 
       
    49 protected:
       
    50     void initializeStates();
       
    51     // intializes all the resources we need for AF functionality
       
    52     void initializeResources();
       
    53 
       
    54 protected:
       
    55     CxeAutoFocusControl::Mode mAfMode;
       
    56     CxeAutoFocusControl::State mState;
       
    57     bool mCancelled;
       
    58 };
       
    59 
       
    60 #endif // CXEAUTOFOCUSCONTROLDESKTOP_H