ui/viewutilities/settingutility/inc/glxsetting.h
changeset 43 72396548277c
child 45 863223ea6961
equal deleted inserted replaced
42:5e1df1b52eb3 43:72396548277c
       
     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:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GLXSETTING_H
       
    19 #define GLXSETTING_H
       
    20 
       
    21 
       
    22 #include <glxsettinginterface.h>
       
    23 
       
    24 class XQSettingsKey;
       
    25 class XQSettingsManager;
       
    26 class QStringList;
       
    27 
       
    28 #define NBR_SLIDESHOW_EFFECT 3
       
    29 
       
    30 /*
       
    31  * This class is used for read and write the photos application related setting from the centrep.
       
    32  */
       
    33 class GlxSetting : public GlxSettingInterface
       
    34 {
       
    35 
       
    36 public :
       
    37     /*
       
    38      * It will return the singlton object of this class
       
    39      */
       
    40 	static GlxSettingInterface * instance(); 
       
    41 	    
       
    42     /* 
       
    43      * Returns the index to the selected transition effect
       
    44      * This value is fetched from Central repository 
       
    45      */
       
    46     int slideShowEffectIndex() ;
       
    47     
       
    48     /*
       
    49      * SlideShowSettingsView will call this API to set the index of the transition effect chosen. 
       
    50      * This data will be written to the Central Repository
       
    51      */
       
    52      void setslideShowEffectIndex( int index );
       
    53     
       
    54     /* 
       
    55      * Returns the index to the selected transition delay /
       
    56      * This value is fetched from Central repository 
       
    57      */
       
    58     int slideShowDelayIndex();
       
    59     
       
    60     /*
       
    61      * SlideShowSettingsView will call this API to set the index of the transition delay chosen. 
       
    62      * This data will be written to the Central Repository
       
    63      */
       
    64     void setSlideShowDelayIndex( int index );
       
    65     
       
    66     /*
       
    67      * It will return the slide show delay time for playing the slide show.
       
    68      * This value is fetched for central repository
       
    69      */
       
    70     int slideShowDelayTime() ;
       
    71     
       
    72     /*
       
    73      * This will return the list of effects as available in the central repository 
       
    74      */
       
    75     QStringList slideShowEffectList();
       
    76     
       
    77     /*
       
    78      * This will return the effect ID based on the effect index 
       
    79      * Effect index will be 0,1,2... and effect ID is GLX_EFFECT
       
    80      * Effect id is store in the centrep with respect to index.
       
    81      */
       
    82     int slideShowEffectId( int index ) ;
       
    83     
       
    84 protected :
       
    85     /*
       
    86      * Constructor
       
    87      */
       
    88     GlxSetting( );
       
    89     
       
    90     /*
       
    91      * Copy Constructor
       
    92      */
       
    93     GlxSetting( GlxSetting & );
       
    94     
       
    95     /*
       
    96      * Destructor
       
    97      */
       
    98     ~GlxSetting();
       
    99 	
       
   100 private :    
       
   101     XQSettingsManager *mSettingsManager;
       
   102     XQSettingsKey *mTransitionEffectCenrepKey;
       
   103     XQSettingsKey *mTransitionDelayCenrepKey;
       
   104     
       
   105     XQSettingsKey *mSlideShowEffectCenRepKey[ NBR_SLIDESHOW_EFFECT ];
       
   106     
       
   107     
       
   108     XQSettingsKey *mSlowCenRepKey;
       
   109     XQSettingsKey *mMediumCenRepKey;
       
   110     XQSettingsKey *mFastCenRepKey;
       
   111     
       
   112     static GlxSetting mObj;
       
   113 };
       
   114 
       
   115 
       
   116 
       
   117 #endif //GLXSETTING_H