diff -r 92ab7f8d0eab -r 6bb1b21d2484 phoneplugins/infowidgetprovider/infowidget/src/infowidgetpreferences.cpp --- a/phoneplugins/infowidgetprovider/infowidget/src/infowidgetpreferences.cpp Fri Mar 19 09:28:42 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* - * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Nokia Corporation - initial contribution. - * - * Contributors: - * - * Description: - * - */ - -#include "infowidgetpreferences.h" -#include "infowidgetlogging.h" - - -/*! - InfoWidgetPreferences::InfoWidgetPreferences() -*/ -InfoWidgetPreferences::InfoWidgetPreferences(QObject *parent): - QObject(parent) -{ - DPRINT; -} - -/*! - InfoWidgetPreferences::~InfoWidgetPreferences() -*/ -InfoWidgetPreferences::~InfoWidgetPreferences() -{ - DPRINT; -} - -/*! - InfoWidgetPreferences::loadPreferences() -*/ -void InfoWidgetPreferences::loadPreferences() -{ - DPRINT; -} - -/*! - InfoWidgetPreferences::storePreferences() -*/ -void InfoWidgetPreferences::storePreferences() -{ - DPRINT; -} - -/*! - InfoWidgetPreferences::preference() -*/ -QString InfoWidgetPreferences::preference(Option preferenceId) const -{ - DPRINT << ": preference id: " << static_cast(preferenceId); - - QString preferenceString; - if (m_options.testFlag(preferenceId)) { - preferenceString = DISPLAY_SETTING_ON; - } else { - preferenceString = DISPLAY_SETTING_OFF; - } - - return preferenceString; -} - -/*! - InfoWidgetPreferences::setPreference() -*/ -void InfoWidgetPreferences::setPreference(Option preferenceId, - const QString& preferenceString) -{ - DPRINT << ": preference id: " << static_cast(preferenceId); - DPRINT << ": preference string: " << preferenceString; - DPRINT << ": initial options: " << m_options; - - if (preferenceString.compare(DISPLAY_SETTING_ON) == 0) { - m_options |= preferenceId; - } else { - m_options &= ~preferenceId; - } - - DPRINT << ": modified options: " << m_options; -} - -/*! - InfoWidgetPreferences::visibleItemCount() -*/ -int InfoWidgetPreferences::visibleItemCount() -{ - DPRINT << ": IN"; - - int visibleItems = 0; - if (m_options.testFlag(DisplayHomeZone)){ - visibleItems++; - } - if (m_options.testFlag(DisplayMcn)){ - visibleItems++; - } - if (m_options.testFlag(DisplayActiveLine)){ - visibleItems++; - } - if (m_options.testFlag(DisplaySatText)){ - visibleItems++; - } - - DPRINT << ": visible item count: " << visibleItems; - return visibleItems; -} - -// End of File. -