calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h
branchRCL_3
changeset 29 12af337248b1
parent 0 f979ecb2b13e
child 30 bd7edf625bdd
equal deleted inserted replaced
28:96907930389d 29:12af337248b1
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19  
    19  
    20 #ifndef __CALENLUNARPLUGIN_H__
    20 #ifndef __CALENLUNARCHINESEPLUGIN_H__
    21 #define __CALENLUNARPLUGIN_H__
    21 #define __CALENLUNARCHINESEPLUGIN_H__
    22 
    22 
    23 //SYSTEM INCLUDES
    23 //SYSTEM INCLUDES
    24 #include <e32base.h>
       
    25 #include <ecom.h>
    24 #include <ecom.h>
    26 #include <ConeResLoader.h> 
       
    27 
    25 
    28 //CALENDAR INCLUDES
    26 //CALENDAR INCLUDES
    29 #include <calencommandhandler.h>
    27 #include <calencommandhandler.h>
    30 #include <calennotificationhandler.h>
    28 #include <calennotificationhandler.h>
    31 #include <calenservices.h>
    29 #include <calenservices.h>
    32 #include <eiklabel.h>
       
    33 #include <coecntrl.h>
       
    34 #include <calencustomisation.h>
    30 #include <calencustomisation.h>
    35 
    31 
    36 #include "CalendarVariant.hrh"
    32 #include "CalendarVariant.hrh"
    37 
    33 
    38 
    34 
    39 //FORWARD DECLARE
    35 //FORWARD DECLARE
    40 class CEikonEnv;
    36 class QString;
       
    37 class HbTranslator;
       
    38 class HbWidget;
       
    39 class HbMenu;
       
    40 
    41 class CCalenLunarInfoProvider;
    41 class CCalenLunarInfoProvider;
    42 class CCalenLunarLocalizer;
    42 class CCalenLunarLocalizer;
    43 class CCalenLunarLocalizedInfo;
    43 class CCalenLunarLocalizedInfo;
    44 class CEikLabel;
    44 class CalenRegionalInfo;
    45 class MCalenPreview;
    45 
       
    46 
    46 
    47 
    47 
    48 
    48 //CLASS DECLARATION
    49 //CLASS DECLARATION
    49 NONSHARABLE_CLASS(CCalenLunarChinesePlugin) : 	public CCalenCustomisation,
    50 class CCalenLunarChinesePlugin :public CCalenCustomisation,
    50 												public MCalenCommandHandler,
    51 								public MCalenCommandHandler,
    51 												public MCalenNotificationHandler
    52 								public MCalenNotificationHandler
       
    53 												
    52 									
    54 									
    53 	{
    55 	{
       
    56 	
    54 	public:
    57 	public:
    55 	    
    58 	    
    56 	    static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices );
    59 	    static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices );
    57 	    virtual ~CCalenLunarChinesePlugin();
    60 	    virtual ~CCalenLunarChinesePlugin();
    58     
    61     
    59 	private:
    62 	private:
    60 		CCalenLunarChinesePlugin( MCalenServices* aServices);
    63 		CCalenLunarChinesePlugin( MCalenServices* aServices);
    61 		void ConstructL();
    64 		void ConstructL();
    62 		
    65 		
    63 	public: //From CCalenCustomisation
    66 	public: //From CCalenCustomisation		
    64 		void GetCustomViewsL(  RPointerArray<CCalenView>& aCustomViewArray );
    67 		HbWidget* InfobarL( );
    65 		void GetCustomSettingsL( RPointerArray<CAknSettingItem>& aCustomSettingArray );
    68         QString* InfobarTextL();        
    66         CCoeControl* InfobarL( const TRect& aRect );
       
    67         const TDesC& InfobarL();
       
    68         MCalenPreview* CustomPreviewPaneL( TRect& aRect );
       
    69         CCoeControl* PreviewPaneL(  TRect& aRect );
       
    70         MCalenCommandHandler* CommandHandlerL( TInt aCommand );
    69         MCalenCommandHandler* CommandHandlerL( TInt aCommand );
    71         void RemoveViewsFromCycle( RArray<TInt>& aViews );
    70         void CustomiseMenu(HbMenu* aHbMenu);
    72         TBool CustomiseMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    73         TBool CanBeEnabledDisabled();
       
    74         TAny* CalenCustomisationExtensionL( TUid aExtensionUid );
       
    75         
    71         
    76     public:// From MCalenCommandHandler
    72     public:// From MCalenCommandHandler
    77         TBool HandleCommandL( const TCalenCommand& aCommand );
    73         TBool HandleCommandL( const TCalenCommand& aCommand );
    78         TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid );
    74         TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid );
    79     
    75     
    80     public://From MCalenNotificationHandler 
    76     public://From MCalenNotificationHandler 
    81         void HandleNotification( const TCalenNotification aNotification );
    77         void HandleNotification( const TCalenNotification aNotification );
    82         
    78         
    83     private:
    79     private:
    84         void SetLabelContentL( CEikLabel& aLabel ,const TRect& aRect);
    80         void FormatExtraRowStringL();
    85         void SetLabelContentExtraL( CEikLabel& aLabel, TRect& aRect);
       
    86         void FormatExtraRowStringL( CEikLabel& aLabel,TBool aTwoLines);
       
    87         void UpdateLocalizerInfoL();
    81         void UpdateLocalizerInfoL();
    88         void ExecuteMessageDialogL( TDesC& aMsgText );
    82        void ExecuteMessageDialogL( QString aMsgText );
    89        
    83        
    90     public:
    84     public:
    91         void ShowDetailsL();
    85         void ShowDetailsL();
    92         
    86         
    93     private:
    87     private:
   115 		/**
   109 		/**
   116 		* This text object is used for hitchcock
   110 		* This text object is used for hitchcock
   117 		* infobar in Month/Day/Week.
   111 		* infobar in Month/Day/Week.
   118 		*/
   112 		*/
   119 		HBufC* iInfoBarText;
   113 		HBufC* iInfoBarText;
   120 		
       
   121 		/**
       
   122 		* This control is used in avkon view.
       
   123 		*/
       
   124 	    CEikLabel* iLabelControl;
       
   125 	    TInt iStart;
   114 	    TInt iStart;
   126 	    TInt iEnd;
   115 	    TInt iEnd;
   127 	    TRect iRect;
   116 	    HbTranslator* iTranslator;
   128 	    TInt  iResourceFileOffset;
       
   129 	    
   117 	    
       
   118 	    CalenRegionalInfo* iRegionalInfo ;
   130 	};
   119 	};
   131 	
   120 	
   132 
   121 #endif //__CALENLUNARCHINESEPLUGIN_H__
   133 NONSHARABLE_CLASS(CCalenPluginLabel) : public CEikLabel 
       
   134 	{
       
   135 		public:
       
   136 		static CCalenPluginLabel* NewL(CCalenLunarChinesePlugin& iPlugin);
       
   137 		
       
   138 		private:
       
   139 		~CCalenPluginLabel();
       
   140 		CCalenPluginLabel(CCalenLunarChinesePlugin& iPlugin);
       
   141 		void ConstructL();
       
   142 		
       
   143 		private: //CCoeControl
       
   144 		void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
   145         void Draw( const TRect& aRect) const;
       
   146 		
       
   147 		private:
       
   148 		CCalenLunarChinesePlugin& iPlugin;
       
   149 		
       
   150 	};	
       
   151 
       
   152 #endif //__CALENLUNARPLUGIN_H__
       
   153 
       
   154 
       
   155 
       
   156