camerauis/cameraxui/cxengine/inc/cxesettingsimp.h
changeset 19 d9aefe59d544
child 45 24fd82631616
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 CXESETTINGSIMP_H
       
    18 #define CXESETTINGSIMP_H
       
    19 
       
    20 #include "cxesettings.h"
       
    21 #include "cxeerror.h"
       
    22 
       
    23 
       
    24 // forward declaration
       
    25 class CxeSettingsModel;
       
    26 
       
    27 
       
    28 /*
       
    29 * Class to access all kind of Settings
       
    30 */
       
    31 class CxeSettingsImp : public CxeSettings
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36 
       
    37     CxeSettingsImp(CxeSettingsModel &settingsModel);
       
    38     virtual ~CxeSettingsImp();
       
    39 
       
    40     CxeError::Id get(const QString &key, int &value) const;
       
    41     CxeError::Id get(const QString &key, QString &stringValue) const;
       
    42     CxeError::Id get(const QString &key, qreal &value) const;
       
    43     void get(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) const;
       
    44     CxeError::Id set(const QString &key, int newValue);
       
    45     CxeError::Id set(const QString &key,const QString &newValue);
       
    46     CxeError::Id set(const QString &key, qreal newValue);
       
    47     void reset();
       
    48 
       
    49 public slots:
       
    50     void loadSettings(Cxe::CameraMode mode);
       
    51 
       
    52 private: // helper methods
       
    53     CxeError::Id getSceneMode(const QString &key, QString &stringValue) const;
       
    54     CxeError::Id setSceneMode(const QString &key, const QString &stringValue);
       
    55 
       
    56 private:
       
    57     CxeSettingsModel &mSettingsModel; // not owned
       
    58 
       
    59 };
       
    60 
       
    61 #endif // CXESETTINGSIMP_H
       
    62 
       
    63 // end  of file