camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakesettingsmodel.h
changeset 19 d9aefe59d544
child 37 64817133cd1d
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     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 CXEFAKESETTINGSMODEL_H
       
    18 #define CXEFAKESETTINGSMODEL_H
       
    19 
       
    20 #include <QMap>
       
    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() {return mDummyScene;}
       
    38     CxeScene& currentVideoScene() {return mDummyScene;}
       
    39     void cameraModeChanged(Cxe::CameraMode newMode) {mDummyCameraMode = 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 testSetCurrenImageScene();
       
    47     void testSetCurrenVideoScene();
       
    48 
       
    49     Cxe::CameraMode getDummyCameraMode() {return mDummyCameraMode;}
       
    50 
       
    51 private:
       
    52 
       
    53     QMap<QString, QList<QVariant> > mStore;
       
    54     QHash<QString, QVariant> mSettingStore;
       
    55     CxeScene mDummyScene;
       
    56     Cxe::CameraMode mDummyCameraMode;
       
    57 };
       
    58 
       
    59 #endif  // CXEFAKESETTINGSMODEL_H
       
    60 
       
    61 
       
    62 
       
    63 
       
    64