mulwidgets/mulcoverflowwidget/src/mulcoverlogicaltemplatebase.cpp
changeset 17 3eca7e70b1b8
parent 3 4526337fb576
equal deleted inserted replaced
3:4526337fb576 17:3eca7e70b1b8
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Description of various grid templates
       
    15  *
       
    16 */
       
    17 
       
    18  
       
    19 #include "mulcoverlogicaltemplatebase.h"
       
    20 
       
    21 namespace Alf
       
    22 	{
       
    23 	
       
    24 	MulCoverLogicalTemplateBase::~MulCoverLogicalTemplateBase()
       
    25 		{	   
       
    26 	    for(int i =0; i < mTemplatePrtStruct.size(); ++i)
       
    27 	        {
       
    28 	        delete mTemplatePrtStruct[i];            
       
    29 	        }
       
    30 	        
       
    31 	      for(int i =0; i < mTemplateLscStruct.size(); ++i)
       
    32 	        {
       
    33 	        delete mTemplateLscStruct[i];            
       
    34 	        }      
       
    35 		}
       
    36 	//----------------------------------------------------------------
       
    37 	// GetElementStructure
       
    38 	//----------------------------------------------------------------
       
    39 	// 
       
    40 	const LCTElementStructure* MulCoverLogicalTemplateBase::GetElementStructure(
       
    41 	    TMulCurrentOrientation aCurOrient,
       
    42 	    const char* aElemId) 
       
    43 	    {
       
    44 
       
    45 	    LCTElementStructure* returnElem = NULL;
       
    46 	    
       
    47 	    if(aCurOrient == EMulPortrait)
       
    48 	        {
       
    49 	        
       
    50 	        for (vector<LCTElementStructure*>::const_iterator itP = mTemplatePrtStruct.begin();
       
    51 	             itP!=mTemplatePrtStruct.end(); ++itP) 
       
    52 	            {
       
    53 	            if(!strcmp(((*itP)->GetId()).getUtf8(),aElemId))
       
    54 	                returnElem =  (*itP);
       
    55 	            }  
       
    56 	        }
       
    57 	    else if(aCurOrient == EMulLandScape)
       
    58 	        {
       
    59 	        for (vector<LCTElementStructure*>::const_iterator itL = mTemplateLscStruct.begin();
       
    60 	             itL!=mTemplateLscStruct.end(); ++itL) 
       
    61 	            {
       
    62 	            if(!strcmp(((*itL)->GetId()).getUtf8(),aElemId))
       
    63 	                returnElem = (*itL);
       
    64 	            }  
       
    65 	        }
       
    66 	    return returnElem;
       
    67 	    
       
    68 	    }
       
    69     
       
    70 	void  MulCoverLogicalTemplateBase::PopulateData ()
       
    71 		{
       
    72 		}
       
    73 	}// End of Alf
       
    74