camerauis/cameraxui/cxengine/tsrc/fakeclasses/cxefakesettings.h
changeset 48 42ba2d16bf40
parent 37 64817133cd1d
child 52 7e18d488ac5f
equal deleted inserted replaced
37:64817133cd1d 48:42ba2d16bf40
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    29         CxeFakeSettings();
    29         CxeFakeSettings();
    30         ~CxeFakeSettings();
    30         ~CxeFakeSettings();
    31 
    31 
    32     public: // from CxeSettings
    32     public: // from CxeSettings
    33 
    33 
    34         CxeError::Id get(const QString &key, int &value) const;
    34         void get(long int uid,
    35         CxeError::Id get(const QString &key, QString &stringValue) const;
    35                  unsigned long int key,
    36         void get(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) const;
    36                  Cxe::SettingKeyType type,
    37         CxeError::Id set(const QString &key, int newValue);
    37                  QVariant &value) const;
    38         CxeError::Id set(const QString &key,const QString &newValue);
       
    39         CxeError::Id get(const QString &key, qreal &value) const;
       
    40         CxeError::Id set(const QString &key, qreal newValue);
       
    41         void reset();
    38         void reset();
       
    39         CxeError::Id getVariationValue(const QString &key, QVariant &value);
       
    40         bool listenForSetting(const QString &settingKey, QObject *target, const char *slot);
       
    41 
       
    42     protected:
       
    43         void getValue(const QString &key, QVariant &value) const;
       
    44         void setValue(const QString &key, const QVariant &newValue);
    42 
    45 
    43     public: // methods for unit testing
    46     public: // methods for unit testing
    44         
       
    45         void emulate(long int uid, unsigned long int key, QVariant value);
    47         void emulate(long int uid, unsigned long int key, QVariant value);
    46 
    48 
    47     private: // data
    49     private: // data
    48         QHash<QString, QVariant> mSettingKeyHash;
    50         QHash<QString, QVariant> mSettingKeyHash;
    49         QHash<QString, unsigned long int> mRuntimeKeyHash;
    51         QHash<QString, unsigned long int> mVariationKeyHash;
    50 
    52 
    51     private:
    53     private:
    52         Q_DISABLE_COPY(CxeFakeSettings)
    54         Q_DISABLE_COPY(CxeFakeSettings)
    53 };
    55 };
    54 
    56