meetingrequest/mrgui/mrfieldbuilderplugin/src/cesmrviewerdetailedsubjectfield.cpp
branchRCL_3
changeset 60 d620048b4810
parent 24 b5fbb9b25d57
equal deleted inserted replaced
52:efd4f1afd43e 60:d620048b4810
   113 // ---------------------------------------------------------------------------
   113 // ---------------------------------------------------------------------------
   114 //
   114 //
   115 void CESMRViewerDetailedSubjectField::ConstructL()
   115 void CESMRViewerDetailedSubjectField::ConstructL()
   116     {
   116     {
   117     FUNC_LOG;
   117     FUNC_LOG;
   118     iFieldIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapOccasion );
   118     iFieldIcon = CMRImage::NewL(
   119     iFieldIcon->SetParent( this );
   119             NMRBitmapManager::EMRBitmapOccasion,
   120 
   120             this );
       
   121     
   121     iRichTextViewer = CESMRRichTextViewer::NewL( this );
   122     iRichTextViewer = CESMRRichTextViewer::NewL( this );
   122     CESMRField::ConstructL( iRichTextViewer ); // ownership transferred
   123     CESMRField::ConstructL( iRichTextViewer ); // ownership transferred
   123     iRichTextViewer->SetEdwinSizeObserver( this );
   124     iRichTextViewer->SetEdwinSizeObserver( this );
   124     iRichTextViewer->SetParent( this );
   125     iRichTextViewer->SetParent( this );
   125     iRichTextViewer->SetLinkObserver( this );
   126     iRichTextViewer->SetLinkObserver( this );
   197     if( !IsLocked() )
   198     if( !IsLocked() )
   198     	{
   199     	{
   199     	if( entry.PriorityL() == EFSCalenMRPriorityHigh )
   200     	if( entry.PriorityL() == EFSCalenMRPriorityHigh )
   200     		{
   201     		{
   201     		iPriorityIcon = CMRImage::NewL(
   202     		iPriorityIcon = CMRImage::NewL(
   202     				NMRBitmapManager::EMRBitmapPriorityHigh, ETrue );
   203     				NMRBitmapManager::EMRBitmapPriorityHigh,
   203     		iPriorityIcon->SetParent( this );
   204     				this,
       
   205     				ETrue );
   204     		}
   206     		}
   205     	if( entry.PriorityL() == EFSCalenMRPriorityLow )
   207     	if( entry.PriorityL() == EFSCalenMRPriorityLow )
   206     		{
   208     		{
   207     		iPriorityIcon = CMRImage::NewL(
   209     		iPriorityIcon = CMRImage::NewL(
   208     				NMRBitmapManager::EMRBitmapPriorityLow, ETrue );
   210     				NMRBitmapManager::EMRBitmapPriorityLow,
   209     		iPriorityIcon->SetParent( this );
   211     				this,
       
   212     				ETrue );
   210     		}
   213     		}
   211     	}
   214     	}
   212 
   215 
   213 
   216 
   214     if ( MESMRCalEntry::EESMRCalEntryMeetingRequest == entryType )
   217     if ( MESMRCalEntry::EESMRCalEntryMeetingRequest == entryType )
   263     if ( CCalEntry::EAnniv  != aEntry.Entry().EntryTypeL() )
   266     if ( CCalEntry::EAnniv  != aEntry.Entry().EntryTypeL() )
   264         {
   267         {
   265         delete iFieldIcon;
   268         delete iFieldIcon;
   266         iFieldIcon = NULL;
   269         iFieldIcon = NULL;
   267 
   270 
   268         iFieldIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapSubject );
   271         iFieldIcon = CMRImage::NewL(
   269         iFieldIcon->SetParent( this );
   272                 NMRBitmapManager::EMRBitmapSubject,
   270 
   273                 this );
   271         DrawDeferred();
   274         }
   272         }
   275     
   273     iDisableRedraw = ETrue;
   276     SizeChanged();
   274     }
   277     }
   275 
   278 
   276 // ---------------------------------------------------------------------------
   279 // ---------------------------------------------------------------------------
   277 // CESMRViewerDetailedSubjectField::OfferKeyEventL()
   280 // CESMRViewerDetailedSubjectField::OfferKeyEventL()
   278 // ---------------------------------------------------------------------------
   281 // ---------------------------------------------------------------------------
   301     iSize = aSize;
   304     iSize = aSize;
   302 
   305 
   303     if ( iObserver && aEdwin == iRichTextViewer )
   306     if ( iObserver && aEdwin == iRichTextViewer )
   304        {
   307        {
   305        iObserver->ControlSizeChanged( this );
   308        iObserver->ControlSizeChanged( this );
       
   309        
       
   310        if ( !iOutlineFocus )
       
   311            {
       
   312            RecordField();
       
   313            }
       
   314        
   306        reDraw = ETrue;
   315        reDraw = ETrue;
   307        }
   316        }
   308 
   317 
   309     return reDraw;
   318     return reDraw;
   310     }
   319     }
   416 
   425 
   417 	CESMRField::LockL();
   426 	CESMRField::LockL();
   418 
   427 
   419 	delete iPriorityIcon;
   428 	delete iPriorityIcon;
   420 	iPriorityIcon = NULL;
   429 	iPriorityIcon = NULL;
   421 	iPriorityIcon = CMRImage::NewL( NMRBitmapManager::EMRBitmapLockField, ETrue );
   430 	iPriorityIcon = CMRImage::NewL(
   422 	iPriorityIcon->SetParent( this );
   431 	        NMRBitmapManager::EMRBitmapLockField,
       
   432 	        this,
       
   433 	        ETrue );
   423 	}
   434 	}
   424 
   435 
   425 // ---------------------------------------------------------------------------
   436 // ---------------------------------------------------------------------------
   426 // CESMRViewerDetailedSubjectField::SetMiddleSoftkeyL
   437 // CESMRViewerDetailedSubjectField::SetMiddleSoftkeyL
   427 // ---------------------------------------------------------------------------
   438 // ---------------------------------------------------------------------------
   587             }
   598             }
   588         }
   599         }
   589     }
   600     }
   590 
   601 
   591 // ---------------------------------------------------------------------------
   602 // ---------------------------------------------------------------------------
   592 // CESMRViewerDetailedSubjectField::SetContainerWindowL
       
   593 // ---------------------------------------------------------------------------
       
   594 //
       
   595 void CESMRViewerDetailedSubjectField::SetContainerWindowL(
       
   596         const CCoeControl& aContainer )
       
   597     {
       
   598     CCoeControl::SetContainerWindowL( aContainer );
       
   599     iRichTextViewer->SetContainerWindowL( aContainer );
       
   600     iRichTextViewer->SetParent( this );
       
   601     }
       
   602 
       
   603 // ---------------------------------------------------------------------------
       
   604 // CESMRViewerDetailedSubjectField::SupportsLongTapFunctionalityL
   603 // CESMRViewerDetailedSubjectField::SupportsLongTapFunctionalityL
   605 // ---------------------------------------------------------------------------
   604 // ---------------------------------------------------------------------------
   606 //
   605 //
   607 TBool CESMRViewerDetailedSubjectField::SupportsLongTapFunctionalityL(
   606 TBool CESMRViewerDetailedSubjectField::SupportsLongTapFunctionalityL(
   608 		const TPointerEvent &aPointerEvent )
   607 		const TPointerEvent &aPointerEvent )