camerauis/cameraxui/cxengine/inc/cxesettingsmodel.h
changeset 46 c826656d6714
parent 42 feebad15db8c
child 52 7e18d488ac5f
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
     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  CXESETTINGSMODEL_H_
       
    18 #define  CXESETTINGSMODEL_H_
       
    19 
       
    20 //  Include Files
       
    21 #include <QVariant>
       
    22 #include "cxeerror.h"
       
    23 #include "cxenamespace.h"
       
    24 
       
    25 /*
       
    26 * Settings model class  handles all settings data i.e. loading, saving, getting settings data based on the settings key.
       
    27 */
       
    28 class CxeSettingsModel
       
    29 {
       
    30 
       
    31 public:
       
    32     
       
    33     virtual ~CxeSettingsModel() {};
       
    34     
       
    35     /*
       
    36     * resets and reload settings that qualify reseting
       
    37     * return CxeEngine specific error code
       
    38     */
       
    39     virtual void reset() = 0;
       
    40 
       
    41     /*
       
    42     * Get setting value associated with the key.
       
    43     * @Param key - Setting key Id ( refer to CxeSettingIds in cxenums.h )
       
    44     * @Param value - contains the value associated with the key.
       
    45     * @returns CxeError::None if successful or any CxeError specific error code.
       
    46     */
       
    47     virtual CxeError::Id getSettingValue(const QString &key, QVariant &value) = 0;
       
    48 
       
    49     /*
       
    50     * Get setting value associated with the key.
       
    51     * @param uid - UID of component that owns the setting key
       
    52     * @Param key - key id of the setting
       
    53     * @param type - the type of key
       
    54     * @Param value - contains the value associated with the key.
       
    55     */
       
    56     virtual void getSettingValue(long int uid, unsigned long int key, Cxe::SettingKeyType type, QVariant &value) = 0;
       
    57 
       
    58     /*
       
    59     * Get the configured run-time value associated with the key.
       
    60     * @Param key - Setting key Id ( refer to CxeSettingIds in cxenums.h )
       
    61     * @Param value - contains the value associated with the key.
       
    62     * @returns CxeError::None if successful or any CxeError specific error code.
       
    63     */
       
    64     virtual CxeError::Id getRuntimeValue(const QString &key, QVariant &value) = 0;
       
    65 
       
    66     /*
       
    67     * Set a value to the key.
       
    68     * @Param key - Setting key Id ( refer to CxeSettingIds in cxenums.h )
       
    69     * @Param value - contains the value associated with the key.
       
    70     * @returns CxeError::None if successful or any CxeError specific error code.
       
    71     */
       
    72     virtual CxeError::Id set(const QString &key,const QVariant newValue) = 0;
       
    73 
       
    74 
       
    75     /*
       
    76     * Returns the current image scene mode.
       
    77     */
       
    78     virtual CxeScene& currentImageScene() = 0;
       
    79 
       
    80     /*
       
    81     * Returns the current video scene mode.
       
    82     */
       
    83     virtual CxeScene& currentVideoScene() = 0;
       
    84 
       
    85     /*
       
    86     * Updating settings model whenever mode is changed from image to video and vice-versa.
       
    87     */
       
    88     virtual void cameraModeChanged(Cxe::CameraMode newMode) = 0;
       
    89 
       
    90     /*
       
    91     * Set a new image scene mode
       
    92     * @returns CxeError::None if successful or any CxeError specific error code.
       
    93     */
       
    94     virtual CxeError::Id setImageScene(const QString &newScene) = 0;
       
    95 
       
    96     /*
       
    97     * Set a new video scene mode
       
    98     * @returns CxeError::None if successful or any CxeError specific error code.
       
    99     */
       
   100     virtual CxeError::Id setVideoScene(const QString &newScene) = 0;
       
   101 
       
   102 };
       
   103 
       
   104 #endif  // CXESETTINGSMODEL_H_
       
   105