phoneplugins/infowidgetplugin/infowidget/src/infowidgetpreferences_s.cpp
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 45 6b911d05207e
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
       
     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 
       
    18 #include "infowidgetpreferences.h"
       
    19 #include "infowidgetlogging.h"
       
    20 
       
    21 /*!
       
    22     InfoWidgetPreferences::InfoWidgetPreferences() 
       
    23 */
       
    24 InfoWidgetPreferences::InfoWidgetPreferences(IHsWidgetPreferenceService &preferenceService, 
       
    25     QObject* parent)
       
    26     : QObject(parent)
       
    27 {
       
    28     DPRINT << "DUMMY IMPLEMENTATION";
       
    29 
       
    30     m_options = InfoWidgetPreferences::DisplayActiveLine|
       
    31             InfoWidgetPreferences::DisplayMcn|
       
    32             InfoWidgetPreferences::DisplaySatText|
       
    33             InfoWidgetPreferences::DisplayHomeZone;
       
    34 }
       
    35 
       
    36 /*!
       
    37     InfoWidgetPreferences::~InfoWidgetPreferences() 
       
    38 */
       
    39 InfoWidgetPreferences::~InfoWidgetPreferences()
       
    40 {
       
    41     DPRINT << "DUMMY IMPLEMENTATION";
       
    42 }
       
    43 
       
    44 /*!
       
    45     InfoWidgetPreferences::loadPreferences() 
       
    46 */
       
    47 void InfoWidgetPreferences::loadPreferences()
       
    48 {
       
    49     DPRINT << "DUMMY IMPLEMENTATION";
       
    50 }
       
    51 
       
    52 /*!
       
    53     InfoWidgetPreferences::storePreferences() 
       
    54 */
       
    55 void InfoWidgetPreferences::storePreferences()
       
    56 {
       
    57     DPRINT << "DUMMY IMPLEMENTATION";
       
    58 }
       
    59 
       
    60 /*!
       
    61     InfoWidgetPreferences::preference() 
       
    62 */
       
    63 QString InfoWidgetPreferences::preference(Option preferenceId)
       
    64 {
       
    65     DPRINT << "DUMMY IMPLEMENTATION";
       
    66     DPRINT << ": preference id: " << static_cast<int>(preferenceId); 
       
    67     
       
    68     QString preferenceString;
       
    69     if (m_options.testFlag(preferenceId)) {
       
    70         preferenceString = DISPLAY_SETTING_ON; 
       
    71     } else {
       
    72         preferenceString = DISPLAY_SETTING_OFF;  
       
    73     } 
       
    74     
       
    75     return preferenceString; 
       
    76 }
       
    77 
       
    78 /*!
       
    79     InfoWidgetPreferences::setPreference() 
       
    80 */
       
    81 void InfoWidgetPreferences::setPreference(Option preferenceId, 
       
    82         QString preferenceString)
       
    83 {
       
    84     DPRINT << "DUMMY IMPLEMENTATION";
       
    85     DPRINT << ": preference id: " << static_cast<int>(preferenceId);
       
    86     DPRINT << ": preference string: " << preferenceString; 
       
    87 
       
    88     DPRINT << ": initial options: " << m_options;
       
    89     
       
    90     if (preferenceString.compare(DISPLAY_SETTING_ON) == 0) {
       
    91         m_options |= preferenceId; 
       
    92     } else {
       
    93         m_options &= ~preferenceId; 
       
    94     }
       
    95     
       
    96     DPRINT << ": modified options: " << m_options;
       
    97 }
       
    98 
       
    99 // End of File.
       
   100