calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h
changeset 89 b57382753122
parent 70 a5ed90760192
equal deleted inserted replaced
83:5aadd1120515 89:b57382753122
    15  *
    15  *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19  
    19  
    20 #ifndef __CALENLUNARCHINESEPLUGIN_H__
    20 #ifndef __CALENLUNARPLUGIN_H__
    21 #define __CALENLUNARCHINESEPLUGIN_H__
    21 #define __CALENLUNARPLUGIN_H__
    22 
    22 
    23 //SYSTEM INCLUDES
    23 //SYSTEM INCLUDES
       
    24 #include <e32base.h>
    24 #include <ecom.h>
    25 #include <ecom.h>
       
    26 #include <ConeResLoader.h> 
    25 
    27 
    26 //CALENDAR INCLUDES
    28 //CALENDAR INCLUDES
    27 #include <calencommandhandler.h>
    29 #include <calencommandhandler.h>
    28 #include <calennotificationhandler.h>
    30 #include <calennotificationhandler.h>
    29 #include <calenservices.h>
    31 #include <calenservices.h>
       
    32 #include <eiklabel.h>
       
    33 #include <coecntrl.h>
    30 #include <calencustomisation.h>
    34 #include <calencustomisation.h>
    31 
    35 
    32 #include "CalendarVariant.hrh"
    36 #include "calendarvariant.hrh"
    33 
    37 
    34 
    38 
    35 //FORWARD DECLARE
    39 //FORWARD DECLARE
    36 class QString;
    40 class CEikonEnv;
    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 CalenRegionalInfo;
    44 class CEikLabel;
    45 class HbMessageBox;
    45 class MCalenPreview;
    46 
       
    47 
       
    48 
    46 
    49 
    47 
    50 //CLASS DECLARATION
    48 //CLASS DECLARATION
    51 class CCalenLunarChinesePlugin :public CCalenCustomisation,
    49 NONSHARABLE_CLASS(CCalenLunarChinesePlugin) : 	public CCalenCustomisation,
    52 								public MCalenCommandHandler,
    50 												public MCalenCommandHandler,
    53 								public MCalenNotificationHandler
    51 												public MCalenNotificationHandler
    54 												
       
    55 									
    52 									
    56 	{
    53 	{
    57 	
       
    58 	public:
    54 	public:
    59 	    
    55 	    
    60 	    static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices );
    56 	    static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices );
    61 	    virtual ~CCalenLunarChinesePlugin();
    57 	    virtual ~CCalenLunarChinesePlugin();
    62     
    58     
    63 	private:
    59 	private:
    64 		CCalenLunarChinesePlugin( MCalenServices* aServices);
    60 		CCalenLunarChinesePlugin( MCalenServices* aServices);
    65 		void ConstructL();
    61 		void ConstructL();
    66 		
    62 		
    67 	public: //From CCalenCustomisation		
    63 	public: //From CCalenCustomisation
    68 		HbWidget* InfobarL( );
    64 		void GetCustomViewsL(  RPointerArray<CCalenView>& aCustomViewArray );
    69         QString* InfobarTextL();        
    65 		void GetCustomSettingsL( RPointerArray<CAknSettingItem>& aCustomSettingArray );
       
    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 );
    70         MCalenCommandHandler* CommandHandlerL( TInt aCommand );
    71         void CustomiseMenu(HbMenu* aHbMenu);
    71         void RemoveViewsFromCycle( RArray<TInt>& aViews );
       
    72         TBool CustomiseMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    73         TBool CanBeEnabledDisabled();
       
    74         TAny* CalenCustomisationExtensionL( TUid aExtensionUid );
    72         
    75         
    73     public:// From MCalenCommandHandler
    76     public:// From MCalenCommandHandler
    74         TBool HandleCommandL( const TCalenCommand& aCommand );
    77         TBool HandleCommandL( const TCalenCommand& aCommand );
    75         TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid );
    78         TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid );
    76     
    79     
    77     public://From MCalenNotificationHandler 
    80     public://From MCalenNotificationHandler 
    78         void HandleNotification( const TCalenNotification aNotification );
    81         void HandleNotification( const TCalenNotification aNotification );
    79         
    82         
    80     private:
    83     private:
    81         void FormatExtraRowStringL();
    84         void SetLabelContentL( CEikLabel& aLabel ,const TRect& aRect);
       
    85         void SetLabelContentExtraL( CEikLabel& aLabel, TRect& aRect);
       
    86         void FormatExtraRowStringL( CEikLabel& aLabel,TBool aTwoLines);
    82         void UpdateLocalizerInfoL();
    87         void UpdateLocalizerInfoL();
    83        void ExecuteMessageDialogL( QString aMsgText );
    88         void ExecuteMessageDialogL( TDesC& aMsgText );
    84        
    89        
    85     public:
    90     public:
    86         void ShowDetailsL();
    91         void ShowDetailsL();
    87         
    92         
    88     private:
    93     private:
   110 		/**
   115 		/**
   111 		* This text object is used for hitchcock
   116 		* This text object is used for hitchcock
   112 		* infobar in Month/Day/Week.
   117 		* infobar in Month/Day/Week.
   113 		*/
   118 		*/
   114 		HBufC* iInfoBarText;
   119 		HBufC* iInfoBarText;
       
   120 		
       
   121 		/**
       
   122 		* This control is used in avkon view.
       
   123 		*/
       
   124 	    CEikLabel* iLabelControl;
   115 	    TInt iStart;
   125 	    TInt iStart;
   116 	    TInt iEnd;
   126 	    TInt iEnd;
   117 	    HbTranslator* iTranslator;
   127 	    TRect iRect;
       
   128 	    TInt  iResourceFileOffset;
   118 	    
   129 	    
   119 	    CalenRegionalInfo* iRegionalInfo ;
       
   120 	    
       
   121 	    HbMessageBox* mPopup;
       
   122 	};
   130 	};
   123 	
   131 	
   124 #endif //__CALENLUNARCHINESEPLUGIN_H__
   132 
       
   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