camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakesettingsmodel.h
changeset 46 c826656d6714
parent 42 feebad15db8c
child 52 7e18d488ac5f
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
     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 #ifndef CXEFAKESETTINGSMODEL_H
       
    18 #define CXEFAKESETTINGSMODEL_H
       
    19 
       
    20 #include <QHash>
       
    21 #include "cxesettingsmodel.h"
       
    22 
       
    23 class CxeFakeSettingsModel  : public CxeSettingsModel
       
    24 {
       
    25 
       
    26 public:
       
    27 
       
    28     CxeFakeSettingsModel();
       
    29     ~CxeFakeSettingsModel();
       
    30 
       
    31     void reset() {};
       
    32     CxeError::Id getSettingValue(const QString &key, QVariant &value);
       
    33     void getSettingValue(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value);
       
    34     CxeError::Id getRuntimeValue(const QString &key, QVariant &value);
       
    35 
       
    36     CxeError::Id set(const QString &key,const QVariant newValue);
       
    37     CxeScene& currentImageScene();
       
    38     CxeScene& currentVideoScene();
       
    39     void cameraModeChanged(Cxe::CameraMode newMode);
       
    40     CxeError::Id setImageScene(const QString &newScene);
       
    41     CxeError::Id setVideoScene(const QString &newScene);
       
    42 
       
    43 public: // own helper methods
       
    44     void setRuntimeValues(QString &key, QList<QVariant> value);
       
    45     void initDefaultCameraSettings();
       
    46     void initRuntimeSettings();
       
    47     void testSetCurrenImageScene();
       
    48     void testSetCurrenVideoScene();
       
    49 
       
    50     Cxe::CameraMode getDummyCameraMode() {return mDummyCameraMode;}
       
    51 
       
    52 private:
       
    53 
       
    54     QHash<QString, QVariant> mSettingStore;
       
    55     QHash<QString, QVariantList> mRuntimeSettings;
       
    56     CxeScene mDummyImageScene;
       
    57     CxeScene mDummyVideoScene;
       
    58     Cxe::CameraMode mDummyCameraMode;
       
    59 };
       
    60 
       
    61 #endif  // CXEFAKESETTINGSMODEL_H
       
    62 
       
    63 
       
    64 
       
    65 
       
    66