diff -r 2580314736af -r 2669f8761a99 presencesettingsui/src/psuiintegersettingitem.cpp --- a/presencesettingsui/src/psuiintegersettingitem.cpp Thu Aug 19 10:19:02 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2006 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: Setting item for integer settings -* -*/ - - - - -// INCLUDE FILES -#include -#include -#include "psuigspluginmodel.h" -#include "psuiintegersettingitem.h" - -// ========================= MEMBER FUNCTIONS ================================ - -// --------------------------------------------------------------------------- -// CPSUIIntegerSettingItem::CPSUIIntegerSettingItem() -// See header for details. -// --------------------------------------------------------------------------- -// -CPSUIIntegerSettingItem::CPSUIIntegerSettingItem( TInt aIdentifier, TInt& aValue ) - : CAknIntegerEdwinSettingItem ( aIdentifier, aValue ), - iPSUIInternalTextPtr( 0,0 ) - { - } - -// --------------------------------------------------------------------------- -// CPSUIIntegerSettingItem::~CPSUIIntegerSettingItem() -// See header for details. -// --------------------------------------------------------------------------- -// -CPSUIIntegerSettingItem::~CPSUIIntegerSettingItem() - { - delete iPSUIInternalText; - } - -// --------------------------------------------------------------------------- -// CPSUIIntegerSettingItem::CompleteConstructionL() -// See header for details. -// --------------------------------------------------------------------------- -// -void CPSUIIntegerSettingItem::CompleteConstructionL() - { - const TInt KPSUIMaxIntegerDigits = 2 * EAknMaxIntegerDigits;// a bit longer for storing also empty texts - iPSUIInternalText = HBufC::NewMaxL( KPSUIMaxIntegerDigits ); - } - -// --------------------------------------------------------------------------- -// CPSUIIntegerSettingItem::SettingTextL() -// See header for details. -// --------------------------------------------------------------------------- -// -const TDesC& CPSUIIntegerSettingItem::SettingTextL() - { - _LIT( KAknIntegerFormat, "%d" ); - iPSUIInternalTextPtr.Set( iPSUIInternalText->Des() ); - TInt& intValueRef = InternalValueRef(); - if ( intValueRef == KErrNotFound ) - { - iPSUIInternalTextPtr.Zero(); - iPSUIInternalTextPtr.Append( EmptyItemText() ); - iPSUIInternalTextPtr.Append( KColumnListSeparator ); - } - else - { - iPSUIInternalTextPtr.Format( KAknIntegerFormat, intValueRef ); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion( - iPSUIInternalTextPtr ); - } - - return iPSUIInternalTextPtr; - } - -// End of File