meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrresponseitem.cpp
branchRCL_3
changeset 22 d620048b4810
parent 20 efd4f1afd43e
equal deleted inserted replaced
20:efd4f1afd43e 22:d620048b4810
    92 // -----------------------------------------------------------------------------
    92 // -----------------------------------------------------------------------------
    93 //
    93 //
    94 void CESMRResponseItem::ConstructL( const TDesC& aItemText, TBool aHasIcon )
    94 void CESMRResponseItem::ConstructL( const TDesC& aItemText, TBool aHasIcon )
    95     {
    95     {
    96     FUNC_LOG;
    96     FUNC_LOG;
    97     iSelectionLabel = CMRLabel::NewL();
    97     iSelectionLabel = CMRLabel::NewL( this );
    98     iSelectionLabel->SetTextL( aItemText );
    98     iSelectionLabel->SetTextL( aItemText );
    99 
    99 
   100     // Response item might not have icon. e.g. topic line
   100     // Response item might not have icon. e.g. topic line
   101     iHasIcon = aHasIcon;
   101     iHasIcon = aHasIcon;
   102     if( aHasIcon )
   102     if( aHasIcon )
   297         TRAP_IGNORE(SetTextToLabelL());
   297         TRAP_IGNORE(SetTextToLabelL());
   298         }
   298         }
   299     }
   299     }
   300 
   300 
   301 // -----------------------------------------------------------------------------
   301 // -----------------------------------------------------------------------------
       
   302 // CESMRResponseItem::SetContainerWindowL
       
   303 // -----------------------------------------------------------------------------
       
   304 //
       
   305 void CESMRResponseItem::SetContainerWindowL( const CCoeControl& aContainer )
       
   306     {
       
   307     FUNC_LOG;
       
   308     
       
   309     CCoeControl::SetContainerWindowL( aContainer );
       
   310     
       
   311     TInt count( CountComponentControls() );
       
   312     
       
   313     for ( TInt i = 0; i < count; ++i )
       
   314         {
       
   315         ComponentControl( i )->SetContainerWindowL( *this );
       
   316         }
       
   317     }
       
   318 
       
   319 // -----------------------------------------------------------------------------
   302 // CESMRResponseItem::IconL
   320 // CESMRResponseItem::IconL
   303 // -----------------------------------------------------------------------------
   321 // -----------------------------------------------------------------------------
   304 //
   322 //
   305 CMRImage* CESMRResponseItem::IconL( TBool aChecked )
   323 CMRImage* CESMRResponseItem::IconL( TBool aChecked )
   306     {
   324     {
   310 
   328 
   311     if( aChecked )
   329     if( aChecked )
   312         {
   330         {
   313         iconID = NMRBitmapManager::EMRBitmapCheckBoxOn;
   331         iconID = NMRBitmapManager::EMRBitmapCheckBoxOn;
   314         }
   332         }
   315     CMRImage* icon = CMRImage::NewL( iconID );
   333     CMRImage* icon = CMRImage::NewL( iconID, this );
   316     return icon;
   334     return icon;
   317     }
   335     }
   318 
   336 
   319 // -----------------------------------------------------------------------------
   337 // -----------------------------------------------------------------------------
   320 // CESMRResponseItem::SetHighlight
   338 // CESMRResponseItem::SetHighlight