calendarui/settings/settingsui/src/CalenSliderSettingItem.cpp
branchRCL_3
changeset 66 bd7edf625bdd
parent 0 f979ecb2b13e
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2006-2006 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:   Customized slider setting item.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #include "CalenSliderSettingItem.h"
       
    21 
       
    22 #include <aknslider.h>
       
    23 
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 
       
    28 // ---------------------------------------------------------------------------
       
    29 // Constructor
       
    30 // ---------------------------------------------------------------------------
       
    31 //
       
    32 CCalenSliderSettingItem::CCalenSliderSettingItem(TInt aIdentifier, TInt& aSliderValue, TInt aSliderResourceID) : 
       
    33     CAknSliderSettingItem( aIdentifier, aSliderValue ),
       
    34     iSliderResourceID( aSliderResourceID )
       
    35     {
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // Destructor
       
    40 // ---------------------------------------------------------------------------
       
    41 //
       
    42 CCalenSliderSettingItem::~CCalenSliderSettingItem()
       
    43     {
       
    44     delete iInternalText;
       
    45     }
       
    46 
       
    47 // ---------------------------------------------------------------------------
       
    48 // Overridden CAknSliderSettingItem::CreateBitmapL
       
    49 // ---------------------------------------------------------------------------
       
    50 //
       
    51 CFbsBitmap* CCalenSliderSettingItem::CreateBitmapL()
       
    52     {
       
    53     return 0;
       
    54     }
       
    55 
       
    56 // ---------------------------------------------------------------------------
       
    57 // Overridden CAknSliderSettingItem::SettingTextL
       
    58 // ---------------------------------------------------------------------------
       
    59 //
       
    60 const TDesC& CCalenSliderSettingItem::SettingTextL()
       
    61     {
       
    62     delete iInternalText;
       
    63     iInternalText = NULL;
       
    64     iInternalText = CAknSlider::CreateValueTextInHBufCL( InternalSliderValue(), iSliderResourceID );
       
    65 
       
    66     if( iInternalText->Length() > 0 )
       
    67         {
       
    68         return *iInternalText;
       
    69         }
       
    70     else
       
    71         {
       
    72         return EmptyItemText();
       
    73         }
       
    74     }
       
    75 
       
    76 
       
    77 // End of File