meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrviewerdescriptionfield.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Meeting request description field
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CESMRVIEWERDESCRIPTIONFIELD_H
       
    19 #define CESMRVIEWERDESCRIPTIONFIELD_H
       
    20 
       
    21 #include <e32cmn.h>
       
    22 #include <eikedwob.h>
       
    23 #include "cesmrfield.h"
       
    24 #include "cesmrrichtextviewer.h"
       
    25 
       
    26 class CESMRLocationPlugin;
       
    27 class CESMRFeatureSettings;
       
    28 class CESMRUrlParserPlugin;
       
    29 
       
    30 /**
       
    31  * Description field is a custom control
       
    32  * that shows the description of a calendar event.
       
    33  */
       
    34 NONSHARABLE_CLASS( CESMRViewerDescriptionField ): public CESMRField,
       
    35                                                   public MEikEdwinSizeObserver,
       
    36                                                   public MESMRRichTextObserver
       
    37     {
       
    38 
       
    39 public:
       
    40     /**
       
    41      * Constructor of the description field.
       
    42      *
       
    43      * @return New description field object.
       
    44      */
       
    45     static CESMRViewerDescriptionField* NewL();
       
    46 
       
    47     // Destructor
       
    48     ~CESMRViewerDescriptionField();
       
    49 
       
    50 protected: // From CESMRField
       
    51     void InternalizeL( MESMRCalEntry& aEntry );
       
    52     void InitializeL();
       
    53     void GetCursorLineVerticalPos( TInt& aUpper, TInt& aLower );
       
    54     void ListObserverSet();
       
    55     TBool ExecuteGenericCommandL( TInt aCommand );
       
    56     void SetOutlineFocusL( TBool aFocus );
       
    57     void HandleLongtapEventL( const TPoint& aPosition );
       
    58     TBool SupportsLongTapFunctionalityL(
       
    59         		 const TPointerEvent &aPointerEvent );
       
    60 
       
    61 public: // From CCoeControl
       
    62     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType );
       
    63     TSize MinimumSize();
       
    64     void SizeChanged();
       
    65     TInt CountComponentControls() const;
       
    66     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    67 
       
    68 public:
       
    69     // From MEikEdwinSizeObserver
       
    70     TBool HandleEdwinSizeEventL( CEikEdwin* aEdwin, TEdwinSizeEvent aType,
       
    71             TSize aSize );
       
    72 
       
    73 protected:
       
    74     TBool HandleRichTextLinkSelection( const CESMRRichTextLink* aLink );
       
    75 
       
    76 private: // Implementation
       
    77     CESMRViewerDescriptionField();
       
    78     void ConstructL();
       
    79     void AddShowOnMapLinkL( MESMRCalEntry& aEntry );
       
    80     void SetShowOnMapLinkMiddleSoftKeyL();
       
    81     CESMRFeatureSettings& FeaturesL();
       
    82     CESMRLocationPlugin& LocationPluginL();
       
    83     void ShowLocationOnMapL( const CESMRRichTextLink& aLink );
       
    84     void StoreGeoValueL( CCalEntry& aCalEntry,
       
    85                          const TDesC& aLocationUrl );
       
    86     CESMRUrlParserPlugin& UrlParserL();
       
    87 
       
    88 private:
       
    89 
       
    90     /**
       
    91      * Field size.
       
    92      */
       
    93     TSize iSize;
       
    94 
       
    95     /**
       
    96      * Rich text viewer.
       
    97      * Own.
       
    98      */
       
    99     CESMRRichTextViewer* iRichTextViewer;
       
   100 
       
   101     /**
       
   102      * Location plugin.
       
   103      * Own.
       
   104      */
       
   105     CESMRLocationPlugin* iLocationPlugin;
       
   106 
       
   107     /**
       
   108      * Feature settings.
       
   109      * Own.
       
   110      */
       
   111     CESMRFeatureSettings* iFeatures;
       
   112 
       
   113     /**
       
   114      * Location URL parser.
       
   115      * Own.
       
   116      */
       
   117     CESMRUrlParserPlugin* iUrlParser;
       
   118     };
       
   119 
       
   120 #endif /* CESMRVIEWERDESCRIPTIONFIELD_H */