meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrtrackingfieldlabel.cpp
branchRCL_3
changeset 12 4ce476e64c59
parent 0 8466d47a6819
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    19 #include "emailtrace.h"
    19 #include "emailtrace.h"
    20 #include "cesmrtrackingfieldlabel.h"
    20 #include "cesmrtrackingfieldlabel.h"
    21 
    21 
    22 // USER INCLUDES
    22 // USER INCLUDES
    23 #include "mesmrlistobserver.h"
    23 #include "mesmrlistobserver.h"
    24 #include "cesmrborderlayer.h"
       
    25 
    24 
    26 // SYSTEM INCLUDES
    25 // SYSTEM INCLUDES
    27 #include <eiklabel.h>
    26 #include <eiklabel.h>
    28 #include <avkon.hrh>
    27 #include <avkon.hrh>
    29 #include <caluser.h>
    28 #include <caluser.h>
    30 #include <calentry.h>
    29 #include <calentry.h>
    31 #include <StringLoader.h>
    30 #include <stringloader.h>
    32 #include <esmrgui.rsg>
    31 #include <esmrgui.rsg>
    33 
    32 
    34 // ======== MEMBER FUNCTIONS ========
    33 // ======== MEMBER FUNCTIONS ========
    35 
    34 
    36 // ---------------------------------------------------------------------------
    35 // ---------------------------------------------------------------------------
    57     FUNC_LOG;
    56     FUNC_LOG;
    58     SetFieldId ( (iRole == CCalAttendee::EReqParticipant) ? EESMRFieldReqTrack
    57     SetFieldId ( (iRole == CCalAttendee::EReqParticipant) ? EESMRFieldReqTrack
    59             : EESMRFieldOptTrack );
    58             : EESMRFieldOptTrack );
    60 
    59 
    61     iTitle = new (ELeave) CEikLabel();
    60     iTitle = new (ELeave) CEikLabel();
    62     iTitle->SetLabelAlignment ( CESMRLayoutManager::IsMirrored ( ) ? ELayoutAlignRight
       
    63             : ELayoutAlignLeft );
       
    64 
       
    65 
    61 
    66     HBufC* label = StringLoader::LoadLC (iRole == CCalAttendee::EReqParticipant ?
    62     HBufC* label = StringLoader::LoadLC (iRole == CCalAttendee::EReqParticipant ?
    67             R_QTN_MEET_REQ_LABEL_REQUIRED : R_QTN_MEET_REQ_LABEL_OPT );
    63             R_QTN_MEET_REQ_LABEL_REQUIRED : R_QTN_MEET_REQ_LABEL_OPT );
    68 
    64 
    69     iTitle->SetTextL ( *label );
    65     iTitle->SetTextL ( *label );
    78 // ---------------------------------------------------------------------------
    74 // ---------------------------------------------------------------------------
    79 //
    75 //
    80 void CESMRTrackingFieldLabel::InitializeL()
    76 void CESMRTrackingFieldLabel::InitializeL()
    81     {
    77     {
    82     FUNC_LOG;
    78     FUNC_LOG;
    83     iTitleSize = iLayout->FieldSize ( EESMRFieldAttendeeLabel );
    79     // TODO: Do not use old layout manager anymore
    84     iTitle->SetFont( iLayout->Font (iCoeEnv, EESMRFieldAttendeeLabel ) );
    80     //iTitleSize = iLayout->FieldSize ( EESMRFieldAttendeeLabel );
       
    81     
       
    82     // TODO: use XML Data
       
    83     //iTitle->SetFont( iLayout->Font (iCoeEnv, EESMRFieldAttendeeLabel ) );
    85     }
    84     }
    86 
    85 
    87 // ---------------------------------------------------------------------------
    86 // ---------------------------------------------------------------------------
    88 // CESMRTrackingFieldLabel::SizeChanged
    87 // CESMRTrackingFieldLabel::SizeChanged
    89 // ---------------------------------------------------------------------------
    88 // ---------------------------------------------------------------------------
    90 //
    89 //
    91 void CESMRTrackingFieldLabel::SizeChanged( )
    90 void CESMRTrackingFieldLabel::SizeChanged( )
    92     {
    91     {
    93     FUNC_LOG;
    92     FUNC_LOG;
    94     TRect rect = Rect ( );
    93     TRect rect = Rect ( );
    95     if ( CESMRLayoutManager::IsMirrored ( ) )
    94     /*if ( CESMRLayoutManager::IsMirrored ( ) )
    96         {
    95         {
    97         TPoint titlePos( rect.iBr.iX - iTitleSize.iWidth, rect.iTl.iY);
    96         TPoint titlePos( rect.iBr.iX - iTitleSize.iWidth, rect.iTl.iY);
    98         iTitle->SetExtent ( titlePos, iTitleSize );
    97         iTitle->SetExtent ( titlePos, iTitleSize );
    99         }
    98         }
   100     else
    99     else
   101         {
   100         {
   102         // title
   101         // title
   103         iTitle->SetExtent ( rect.iTl, iTitleSize );
   102         iTitle->SetExtent ( rect.iTl, iTitleSize );
   104         }
   103         }
       
   104         */
   105     }
   105     }
   106 
   106 
   107 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
   108 // CESMRTrackingFieldLabel::HandleEdwinSizeEventL
   108 // CESMRTrackingFieldLabel::HandleEdwinSizeEventL
   109 // ---------------------------------------------------------------------------
   109 // ---------------------------------------------------------------------------