calendarui/regionalplugins/Thai/inc/CalenThaiPlugin.h
branchRCL_3
changeset 29 12af337248b1
parent 0 f979ecb2b13e
child 30 bd7edf625bdd
equal deleted inserted replaced
28:96907930389d 29:12af337248b1
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   Calendar Thai Plugin.
    14 * Description:  
    15  *
    15  *
    16 */
    16 */
    17 
       
    18 
    17 
    19 
    18 
    20 #ifndef __CALENTHAIPLUGIN_H__
    19 #ifndef __CALENTHAIPLUGIN_H__
    21 #define __CALENTHAIPLUGIN_H__
    20 #define __CALENTHAIPLUGIN_H__
    22 
    21 
    23 #include <e32base.h>
    22 #include <e32base.h>
    24 #include <ConeResLoader.h>
    23 #include <coneresloader.h>
    25 #include <eiklabel.h>
    24 
       
    25 #include <hblabel.h>
    26 
    26 
    27 #include <calencommandhandler.h>
    27 #include <calencommandhandler.h>
    28 #include <calennotificationhandler.h>
    28 #include <calennotificationhandler.h>
    29 #include <calenservices.h>
    29 #include <calenservices.h>
    30 #include <calencustomisation.h>
       
    31 
    30 
    32 #include "CalendarVariant.hrh"
       
    33 
    31 
    34 class MCalenPreview;
    32 #include "calencustomisation.h"
       
    33 
       
    34 class HbWidget;
       
    35 class QString;
       
    36 class HbMenu;
       
    37 
       
    38 class CalenPluginLabel : public HbLabel
       
    39     {
       
    40 public:
       
    41     CalenPluginLabel(QGraphicsItem *parent=0);
       
    42     ~CalenPluginLabel();     
       
    43 
       
    44 private:
       
    45     void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );    
       
    46     };
    35 
    47 
    36 NONSHARABLE_CLASS(CCalenThaiPlugin) : public CCalenCustomisation,
    48 NONSHARABLE_CLASS(CCalenThaiPlugin) : public CCalenCustomisation,
    37                                       public MCalenCommandHandler,
    49                                       public MCalenCommandHandler,
    38                                       public MCalenNotificationHandler   
    50                                       public MCalenNotificationHandler   
    39     {
    51     {
    40     public: // public API 
    52     public: // public API 
    41             static CCalenThaiPlugin* NewL( MCalenServices* aServices );
    53             static CCalenThaiPlugin* NewL( MCalenServices* aServices );
    42             virtual ~CCalenThaiPlugin();
    54             virtual ~CCalenThaiPlugin();
    43                 
    55                 
    44     protected://From CCalenCustomisation
    56     protected://From CCalenCustomisation        
    45         
    57         	
    46         	void GetCustomViewsL(  RPointerArray<CCalenView>& aCustomViewArray );
    58             HbWidget* InfobarL( );               
    47     		void GetCustomSettingsL( RPointerArray<CAknSettingItem>& aCustomSettingArray );
    59 			MCalenCommandHandler* CommandHandlerL( TInt aCommand );
    48             CCoeControl* InfobarL( const TRect& aRect );
    60 			QString* InfobarTextL();
    49             const TDesC& InfobarL();
    61 			void CustomiseMenu(HbMenu* aHbMenu);
    50             MCalenPreview* CustomPreviewPaneL( TRect& aRect );
       
    51             CCoeControl* PreviewPaneL(  TRect& aRect );
       
    52             MCalenCommandHandler* CommandHandlerL( TInt aCommand );
       
    53             void RemoveViewsFromCycle( RArray<TInt>& aViews );
       
    54             TBool CustomiseMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    55             TBool CanBeEnabledDisabled();
       
    56             TAny* CalenCustomisationExtensionL( TUid aExtensionUid );
       
    57             
    62             
    58     protected:// From MCalenCommandHandler
    63     protected:// From MCalenCommandHandler
    59             TBool HandleCommandL( const TCalenCommand& aCommand );
    64             TBool HandleCommandL( const TCalenCommand& aCommand );
    60             TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid );
       
    61         
    65         
    62     protected://From MCalenNotificationHandler 
    66     protected://From MCalenNotificationHandler 
    63             void HandleNotification(const TCalenNotification aNotification );
    67             void HandleNotification(const TCalenNotification aNotification );
    64         
    68         
    65     private:
    69     private:
    66             void SetLabelContentL( CEikLabel& aLabel );
    70            
    67             void UpdateLocalizerInfoL();
    71             void UpdateLocalizerInfoL();
    68         
    72         
    69     private: // own methods
    73     private: // own methods
    70             CCalenThaiPlugin(MCalenServices* aServices);
    74             CCalenThaiPlugin(MCalenServices* aServices);
    71             void ConstructL();
    75             void ConstructL();
    72             
    76             
    73     private: // data
    77     private: // data
    74             TBuf<200> iThaiYearText;
    78             TBuf<200> iThaiYearText;            
    75             CEikLabel* iLabelControl ;//Owns
    79             MCalenServices* iServices;           
    76             MCalenServices* iServices;
       
    77             HBufC* iInfoBarText; //Owns
       
    78     };
    80     };
    79 
    81 
    80 
    82 
    81 NONSHARABLE_CLASS(CCalenPluginLabel) : public CEikLabel 
       
    82 	{
       
    83 	public:
       
    84         	static CCalenPluginLabel* NewL(CCalenThaiPlugin& iPlugin);
       
    85         	~CCalenPluginLabel();
       
    86 	
       
    87 	private:
       
    88 	        CCalenPluginLabel(CCalenThaiPlugin& iPlugin);
       
    89         	void ConstructL();
       
    90         	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    91         	void Draw( const TRect& aRect) const;
       
    92         	
       
    93 	private:
       
    94 	       CCalenThaiPlugin& iPlugin;
       
    95 	};	
       
    96 
       
    97 #endif // __CALENTHAIPLUGIN_H__
    83 #endif // __CALENTHAIPLUGIN_H__