--- a/meetingrequest/mrgui/mrfieldbuilderplugin/src/cmralarmonofffield.cpp Tue May 25 12:23:16 2010 +0300
+++ b/meetingrequest/mrgui/mrfieldbuilderplugin/src/cmralarmonofffield.cpp Wed Jun 09 09:22:57 2010 +0300
@@ -50,11 +50,11 @@
// CMRAlarmOnOffField::CMRAlarmOnOffField
// ---------------------------------------------------------------------------
//
-CMRAlarmOnOffField::CMRAlarmOnOffField()
+CMRAlarmOnOffField::CMRAlarmOnOffField()
{
FUNC_LOG;
iStatus = ETrue;
-
+
SetFieldId ( EESMRFieldAlarmOnOff );
SetFocusType ( EESMRHighlightFocus );
}
@@ -68,10 +68,10 @@
FUNC_LOG;
iValidator = aValidator;
iValidator->SetAbsoluteAlarmOnOffFieldL( *this );
-
+
iIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapAlarm );
iIcon->SetParent( this );
-
+
iLabel = CMRLabel::NewL();
CESMRField::ConstructL( iLabel ); // ownership transfered
iLabel->SetTextL( KNullDesC() );
@@ -140,8 +140,8 @@
iStatus = ETrue;// Change the status to "ON" for these dialog default
}
break;
-
- case MESMRCalEntry::EESMRCalEntryAnniversary: // Anniversary
+
+ case MESMRCalEntry::EESMRCalEntryAnniversary: // Anniversary
{
iStatus = ETrue;// Change the status to "ON" for these dialog default
}
@@ -149,7 +149,7 @@
// Flow through
case MESMRCalEntry::EESMRCalEntryMemo: // Memo
case MESMRCalEntry::EESMRCalEntryReminder: // Reminder
-
+
default:
iStatus = EFalse; // Change the status to "OFF" for these dialog default
break;
@@ -198,7 +198,7 @@
CESMRField::SetOutlineFocusL( aFocus );
iLabel->SetFocus( aFocus );
-
+
if( aFocus ) //Focus is gained on the field
{
if ( iStatus )
@@ -235,11 +235,11 @@
FUNC_LOG;
TBool isUsed( EFalse );
// EAknCmdOpen is added for the Pointer events, see ListPane
- if( aCommand == EESMRCmdAlarmOn || aCommand == EESMRCmdAlarmOff
+ if( aCommand == EESMRCmdAlarmOn || aCommand == EESMRCmdAlarmOff
|| aCommand == EAknCmdOpen )
{
HandleTactileFeedbackL();
-
+
SwitchMiddleSoftKeyL();
isUsed = ETrue;
}
@@ -257,13 +257,13 @@
ResetFieldL();
if( iStatus )
{
- ChangeMiddleSoftKeyL( EESMRCmdAlarmOff,R_QTN_MEET_REQ_ALARM_OFF );
+ ChangeMiddleSoftKeyL( EESMRCmdAlarmOff,R_QTN_MEET_REQ_ALARM_OFF );
}
else
{
- ChangeMiddleSoftKeyL( EESMRCmdAlarmOn,R_QTN_MEET_REQ_ALARM_ON );
+ ChangeMiddleSoftKeyL( EESMRCmdAlarmOn,R_QTN_MEET_REQ_ALARM_ON );
}
-
+
if( iLabel->IsVisible() )
{
iLabel->DrawDeferred();
@@ -313,27 +313,24 @@
TAknLayoutRect rowLayoutRect =
NMRLayoutManager::GetFieldRowLayoutRect( rect, 1 );
rect = rowLayoutRect.Rect();
-
+
TAknWindowComponentLayout iconLayout =
- NMRLayoutManager::GetWindowComponentLayout(
+ NMRLayoutManager::GetWindowComponentLayout(
NMRLayoutManager::EMRLayoutTextEditorIcon );
AknLayoutUtils::LayoutImage( iIcon, rect, iconLayout );
-
+
TAknLayoutRect bgLayoutRect =
- NMRLayoutManager::GetLayoutRect(
+ NMRLayoutManager::GetLayoutRect(
rect, NMRLayoutManager::EMRLayoutTextEditorBg );
TRect bgRect( bgLayoutRect.Rect() );
// Move focus rect so that it's relative to field's position.
bgRect.Move( -Position() );
SetFocusRect( bgRect );
-
- TAknLayoutText labelLayout =
- NMRLayoutManager::GetLayoutText(
- rect, NMRLayoutManager::EMRTextLayoutTextEditor );
- iLabel->SetRect( labelLayout.TextRect() );
-
- // Setting font for the label also
- iLabel->SetFont( labelLayout.Font() );
+
+ TAknTextComponentLayout labelLayout =
+ NMRLayoutManager::GetTextComponentLayout(
+ NMRLayoutManager::EMRTextLayoutTextEditor );
+ AknLayoutUtils::LayoutLabel( iLabel, rect, labelLayout );
}
// ---------------------------------------------------------------------------
@@ -378,7 +375,7 @@
// CMRAlarmOnOffField::SetContainerWindowL
// ---------------------------------------------------------------------------
//
-void CMRAlarmOnOffField::SetContainerWindowL(
+void CMRAlarmOnOffField::SetContainerWindowL(
const CCoeControl& aContainer )
{
FUNC_LOG;