DirectPrint/DirectPrintApp/engine/src/directprinttextcapability.cpp
branchRCL_3
changeset 12 613a5ff70823
child 15 2275db202402
equal deleted inserted replaced
8:3f1fec088555 12:613a5ff70823
       
     1 /*
       
     2 * Copyright (c) 2010 Kanrikogaku Kenkyusho, Ltd.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "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 * Kanrikogaku Kenkyusho, Ltd. - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * {Description of the file}
       
    16 *
       
    17 */
       
    18 
       
    19 // System include files
       
    20 #include <stringloader.h>
       
    21 #include <akntextsettingpage.h>
       
    22 #include <DirectPrintApp.rsg>
       
    23 
       
    24 #include "directprinttextcapability.h"
       
    25 
       
    26 // Destructor
       
    27 CDirectPrintTextCapability::~CDirectPrintTextCapability()
       
    28 	{
       
    29 	}
       
    30 
       
    31 HBufC* CDirectPrintTextCapability::ListBoxTextL()
       
    32 	{
       
    33 	const TInt KGranularity( 4 );
       
    34 
       
    35 	CDesCArrayFlat* strings = new ( ELeave ) CDesCArrayFlat( KGranularity );
       
    36 	CleanupStack::PushL( strings );
       
    37 	strings->AppendL( iTitle );
       
    38 	strings->AppendL( iText );
       
    39 
       
    40 	HBufC* buf = StringLoader::LoadL( R_QTN_LBOX_FORMAT, *strings );
       
    41 	CleanupStack::PopAndDestroy();  // strings
       
    42 
       
    43 	return buf;
       
    44 	}
       
    45 
       
    46 CDirectPrintBaseCapability* CDirectPrintTextCapability::CloneL()
       
    47 	{
       
    48 	CDirectPrintTextCapability* clone = new ( ELeave ) CDirectPrintTextCapability;
       
    49 
       
    50 	clone->iIndexOnList = iIndexOnList;
       
    51 	clone->iTitle = iTitle;
       
    52 	clone->iUid = iUid;
       
    53 	clone->iValue = iValue;
       
    54 	clone->iText = iText;
       
    55 
       
    56 	return clone;
       
    57 	}
       
    58 
       
    59 CAknSettingItem* CDirectPrintTextCapability::SettingItemLC(TInt aIndex)
       
    60 	{
       
    61 	CAknTextSettingItem* item = new (ELeave) CAknTextSettingItem(aIndex, iText);
       
    62 	CleanupStack::PushL(item);
       
    63 	item->SetEmptyItemTextL( _L("") );
       
    64 	item->ConstructL(EFalse, aIndex, iTitle, NULL, R_DIRECTPRINT_PRINTERSETTING_TEXT_SETTING_PAGE, -1);
       
    65 
       
    66 	return item;
       
    67 	}
       
    68 
       
    69 //  End of File