--- a/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Tue Feb 02 10:12:19 2010 +0200
+++ b/calendarui/regionalplugins/lunarchinese/inc/CalenLunarChinesePlugin.h Fri Apr 16 14:57:40 2010 +0300
@@ -17,40 +17,51 @@
-#ifndef __CALENLUNARPLUGIN_H__
-#define __CALENLUNARPLUGIN_H__
+#ifndef __CALENLUNARCHINESEPLUGIN_H__
+#define __CALENLUNARCHINESEPLUGIN_H__
//SYSTEM INCLUDES
#include <e32base.h>
#include <ecom.h>
#include <ConeResLoader.h>
+#include <QtGui>
+
+#include <hblabel.h>
+
//CALENDAR INCLUDES
#include <calencommandhandler.h>
#include <calennotificationhandler.h>
#include <calenservices.h>
#include <eiklabel.h>
-#include <coecntrl.h>
+#include <COECNTRL.H>
#include <calencustomisation.h>
#include "CalendarVariant.hrh"
//FORWARD DECLARE
+class QString;
+
+class HbWidget;
+class HbMenu;
+
class CEikonEnv;
class CCalenLunarInfoProvider;
class CCalenLunarLocalizer;
class CCalenLunarLocalizedInfo;
-class CEikLabel;
-class MCalenPreview;
+
+
//CLASS DECLARATION
-NONSHARABLE_CLASS(CCalenLunarChinesePlugin) : public CCalenCustomisation,
- public MCalenCommandHandler,
- public MCalenNotificationHandler
+class CCalenLunarChinesePlugin :public CCalenCustomisation,
+ public MCalenCommandHandler,
+ public MCalenNotificationHandler
+
{
+
public:
static CCalenLunarChinesePlugin* NewL( MCalenServices* aServices );
@@ -60,18 +71,11 @@
CCalenLunarChinesePlugin( MCalenServices* aServices);
void ConstructL();
- public: //From CCalenCustomisation
- void GetCustomViewsL( RPointerArray<CCalenView>& aCustomViewArray );
- void GetCustomSettingsL( RPointerArray<CAknSettingItem>& aCustomSettingArray );
- CCoeControl* InfobarL( const TRect& aRect );
- const TDesC& InfobarL();
- MCalenPreview* CustomPreviewPaneL( TRect& aRect );
- CCoeControl* PreviewPaneL( TRect& aRect );
+ public: //From CCalenCustomisation
+ HbWidget* InfobarL( );
+ QString* InfobarTextL();
MCalenCommandHandler* CommandHandlerL( TInt aCommand );
- void RemoveViewsFromCycle( RArray<TInt>& aViews );
- TBool CustomiseMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
- TBool CanBeEnabledDisabled();
- TAny* CalenCustomisationExtensionL( TUid aExtensionUid );
+ void CustomiseMenu(HbMenu* aHbMenu);
public:// From MCalenCommandHandler
TBool HandleCommandL( const TCalenCommand& aCommand );
@@ -81,9 +85,8 @@
void HandleNotification( const TCalenNotification aNotification );
private:
- void SetLabelContentL( CEikLabel& aLabel ,const TRect& aRect);
- void SetLabelContentExtraL( CEikLabel& aLabel, TRect& aRect);
- void FormatExtraRowStringL( CEikLabel& aLabel,TBool aTwoLines);
+ void SetLabelContentL( HbLabel& aLabel );
+ void FormatExtraRowStringL( HbLabel& aLabel,TBool aTwoLines);
void UpdateLocalizerInfoL();
void ExecuteMessageDialogL( TDesC& aMsgText );
@@ -119,9 +122,9 @@
HBufC* iInfoBarText;
/**
- * This control is used in avkon view.
+ * This control is used in view.
*/
- CEikLabel* iLabelControl;
+ HbLabel* iLabelControl;
TInt iStart;
TInt iEnd;
TRect iRect;
@@ -129,28 +132,26 @@
};
-
-NONSHARABLE_CLASS(CCalenPluginLabel) : public CEikLabel
- {
- public:
- static CCalenPluginLabel* NewL(CCalenLunarChinesePlugin& iPlugin);
-
- private:
- ~CCalenPluginLabel();
- CCalenPluginLabel(CCalenLunarChinesePlugin& iPlugin);
- void ConstructL();
+class CalenPluginLabel : public HbLabel
+ {
+ Q_OBJECT
+
+ public:
+ CalenPluginLabel( CCalenLunarChinesePlugin& aPlugin,QGraphicsItem *parent=0);
+ ~CalenPluginLabel();
- private: //CCoeControl
- void HandlePointerEventL(const TPointerEvent& aPointerEvent);
- void Draw( const TRect& aRect) const;
-
- private:
- CCalenLunarChinesePlugin& iPlugin;
-
- };
+ public slots:
+ void showLunarData();
-#endif //__CALENLUNARPLUGIN_H__
+ private:
+ void paint ( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0 );
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ private:
+ CCalenLunarChinesePlugin& iPlugin;
+ };
+
+#endif //__CALENLUNARCHINESEPLUGIN_H__
-
\ No newline at end of file
+