--- a/calendarui/controller/inc/calencontroller.h Mon May 03 12:30:32 2010 +0300
+++ b/calendarui/controller/inc/calencontroller.h Mon Jun 28 15:22:02 2010 +0530
@@ -25,6 +25,7 @@
#include <apadef.h> // TApaCommand
#include <qglobal.h> // Q_DECL_EXPORT macro
#include <agendautil.h>
+#include <qobject>
#include "hb_calencommands.hrh" // Calendar commands
#include "calennotificationhandler.h" // TCalenNotification
#include "calenservices.h"
@@ -58,29 +59,42 @@
* The controller handles events from the rest of Calendar and delegates
* them to the appropriate place (i.e. the action ui classes).
*/
-class CALENCONTROLLER_EXPORT CCalenController : public MCalenServicesFactory
+class CALENCONTROLLER_EXPORT CCalenController : public QObject, public MCalenServicesFactory
{
-
+ Q_OBJECT
+
public: // Construction and destruction
- /**
+ /**
* C++ constructor
*/
- CCalenController(bool isFromServiceFrmwrk);
+ CCalenController();
/**
- * Constructs CCalenController with existing CAknViewAppUi. If the
- * controller has been previously initialized with the same CAknViewAppUi,
- * the existing instance will be returned.
- * @param aAppUi Reference to CAknViewAppUi
- * @return CCalenController pointer
- */
- static CCalenController* InstanceL();
+ * Second phase contruction for controller
+ */
+ void constructController();
+
+ /**
+ * Constructs CCalenController with existing CAknViewAppUi. If the
+ * controller has been previously initialized with the same CAknViewAppUi,
+ * the existing instance will be returned.
+ * @param aAppUi Reference to CAknViewAppUi
+ * @return CCalenController pointer
+ */
+ static CCalenController* InstanceL();
- /**
- * CCalenController is a reference counting singleton. Call Release()
- * when you are done with it, it will clean itself when it needs to
- */
- void Release();
+
+ /**
+ * Releases all plugins, should only be called when
+ * the application is exiting.
+ */
+ void ReleaseCustomisations();
+
+ /**
+ * CCalenController is a reference counting singleton. Call Release()
+ * when you are done with it, it will clean itself when it needs to
+ */
+ void Release();
/**
* destructor
@@ -205,6 +219,12 @@
*/
CCalenCustomisationManager& CustomisationManager();
+ /**
+ * Filters the events eg. Locale/language change events
+ * @param event
+ */
+ bool eventFilter(QObject *object, QEvent *event);
+
private: // Construction and destruction
/**
@@ -222,7 +242,6 @@
CalenContextImpl* mContext;
AgendaUtil *mAgendaUtil; // Agenda interface provider
CalenServicesImpl* iServices; // Services.
- HbMainWindow* iMainWindow;
CalenNotifier* iNotifier; // Broadcasts calendar events
CCalenStateMachine* iStateMachine;
CCalenActionUi* iActionUi; // Default internal command handling