camerauis/cameraxui/cxengine/inc/api/cxeviewfindercontrol.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
     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 #ifndef CXEVIEWFINDERCONTROL_H_
       
    18 #define CXEVIEWFINDERCONTROL_H_
       
    19 
       
    20 #include <QObject> 
       
    21 #include <QWidget> // for WId
       
    22 #include <QMetaType>
       
    23 #include "cxeerror.h"
       
    24 
       
    25 class CxeViewfinderControl : public QObject
       
    26 {
       
    27     Q_OBJECT
       
    28 public:
       
    29 
       
    30     enum State
       
    31         {
       
    32         Uninitialized = 0x01, // VF not yet initialized
       
    33         Ready         = 0x02, // VF initialized but not running
       
    34         Running       = 0x04, // VF running
       
    35         };
       
    36 
       
    37     virtual void setWindow(WId windowId) = 0;
       
    38 
       
    39     /*!
       
    40     * Start viewfinder 
       
    41     * @return CxeEngine specific error code
       
    42     */
       
    43     virtual CxeError::Id start() = 0;
       
    44     
       
    45     /*!
       
    46     * Stop viewfinder 
       
    47     */
       
    48     virtual void stop() = 0;
       
    49     
       
    50     /*!
       
    51     * Current viewfinder state
       
    52     */
       
    53     virtual State state() const = 0;
       
    54 
       
    55     /*!
       
    56     * Returns Device's Display resolution
       
    57     */
       
    58     virtual QSize deviceDisplayResolution() const = 0;
       
    59 
       
    60 signals:
       
    61     void stateChanged(CxeViewfinderControl::State newState, CxeError::Id error);
       
    62 
       
    63 protected:
       
    64     CxeViewfinderControl() {}
       
    65 
       
    66 private:
       
    67     Q_DISABLE_COPY(CxeViewfinderControl)
       
    68 };
       
    69 
       
    70 Q_DECLARE_METATYPE(CxeViewfinderControl::State)
       
    71 
       
    72 #endif /*CXEVIEWFINDERCONTROL_H_*/