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 controller |
14 * Description: Calendar controller |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
17 |
19 |
18 |
20 #ifndef CALENACTIONUI_H |
19 #ifndef CALENACTIONUI_H |
21 #define CALENACTIONUI_H |
20 #define CALENACTIONUI_H |
22 |
21 |
23 // INCLUDES |
22 // INCLUDES |
24 #include <e32base.h> |
23 #include <e32base.h> |
25 #include <calencommandhandler.h> |
24 #include "hb_calencommands.hrh" |
26 #include <calencommands.hrh> |
25 #include "calencommandhandler.h" |
27 |
26 |
28 // FORWARD DECLARATIONS |
27 // FORWARD DECLARATIONS |
29 class CCalenController; |
28 class CCalenController; |
30 class CCalenDeleteUi; |
29 class CalenDeleteUi; |
31 class CCalenEditUi; |
30 class CCalenEditUi; |
32 class CCalenLocationUi; |
|
33 class CCalenCustomisationManager; |
|
34 class MCalenCommandHandler; |
31 class MCalenCommandHandler; |
35 class CCalenAttachmentUi; |
|
36 |
32 |
37 // CLASS DEFINITIONS |
33 // CLASS DEFINITIONS |
|
34 |
38 /** |
35 /** |
39 * The action ui handles events passed from the controller and delegates |
36 * The action ui handles events passed from the controller and delegates |
40 * them to the appropriate place (i.e. the specific action ui classes). |
37 * them to the appropriate place (i.e. the specific action ui classes). |
41 */ |
38 */ |
42 class CCalenActionUi : public CBase, |
39 class CCalenActionUi : public CBase, |
43 public MCalenCommandHandler |
40 public MCalenCommandHandler |
44 { |
41 { |
|
42 public: // Construction and destruction |
|
43 /** |
|
44 * 1st phase constructor |
|
45 * @param aController A reference to CCalenController |
|
46 */ |
|
47 static CCalenActionUi* NewL( CCalenController& aController ); |
|
48 |
|
49 /** |
|
50 * Virtual destructor |
|
51 */ |
|
52 virtual ~CCalenActionUi(); |
45 |
53 |
46 public: // Construction and destruction |
54 public: // MCalenCommandHandler |
|
55 TBool HandleCommandL( const TCalenCommand& aCommand ); |
47 |
56 |
48 /** |
57 public: // New functions |
49 * 1st phase constructor |
58 |
50 * @param aController A reference to calencontroller |
59 /** |
51 */ |
60 * Gets a command handler or NULL. |
52 static CCalenActionUi* NewL( CCalenController& aController ); |
61 */ |
|
62 MCalenCommandHandler* GetCommandHandlerL( TInt aCommand ); |
|
63 /** |
|
64 * This Function saves the entries |
|
65 * should only calls after edit or create function has called |
|
66 */ |
|
67 void saveAndCloseEditor(); |
53 |
68 |
54 /** |
69 private: // Construction and destruction |
55 * Virtual destructor |
70 /** |
56 */ |
71 * C++ constructor, non-leaving |
57 virtual ~CCalenActionUi(); |
72 * @param aController A reference to the CCalenController |
|
73 */ |
|
74 CCalenActionUi( CCalenController& aController ); |
|
75 |
|
76 /** |
|
77 * 2nd phase constructor |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 /** |
|
82 * Launches the settings view |
|
83 */ |
|
84 void launchSettingsView(); |
|
85 |
58 |
86 |
59 public: // From MCalenCommandHandler |
87 private: // Data |
60 |
88 CalenDeleteUi* iDeleteUi; // pointer to the deleteui |
61 /** |
89 CCalenEditUi* iEditUi; // pointer to the seditui |
62 * Handles key presses. |
90 CCalenController& iController; // reference to the CCalenController |
63 * |
|
64 * @param aCommand The command Id of the key. |
|
65 */ |
|
66 TBool HandleCommandL( const TCalenCommand& aCommand ); |
|
67 |
|
68 /** |
|
69 * Allows extending this API without breaking BC. |
|
70 * |
|
71 * @param aExtensionUid specifies |
|
72 * @return extension of the requested type |
|
73 */ |
|
74 TAny* CalenCommandHandlerExtensionL( TUid aExtensionUid ); |
|
75 |
|
76 public: // New functions |
|
77 |
|
78 /** |
|
79 * Handle actionui related command |
|
80 * @param aCommand A command to be handled |
|
81 * @return a boolean showing wether the command is being handled or not |
|
82 */ |
|
83 //TBool HandleActionUiCommandL( TInt aCommand ); |
|
84 |
|
85 /** |
|
86 * Gets a command handler or NULL. |
|
87 */ |
|
88 MCalenCommandHandler* GetCommandHandlerL( TInt aCommand ); |
|
89 |
|
90 /** |
|
91 * Function to tell whether editor is active or not |
|
92 * @return ETrue if editor is active else EFalse |
|
93 */ |
|
94 TBool IsEditorActive(); |
|
95 |
|
96 private: // Construction and destruction |
|
97 |
|
98 /** |
|
99 * C++ constructor, non-leaving |
|
100 * @param aController A reference to the calencontroller |
|
101 */ |
|
102 CCalenActionUi( CCalenController& aController ); |
|
103 |
|
104 /** |
|
105 * 2nd phase constructor |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 private: // New functions |
|
110 |
|
111 /** |
|
112 * Show settings dialog |
|
113 */ |
|
114 void ShowSettingsL(); |
|
115 /** |
|
116 * Show calenders dialog |
|
117 */ |
|
118 void ShowCalendarsL(); |
|
119 |
|
120 private: // Data |
|
121 |
|
122 CCalenDeleteUi* iDeleteUi; // pointer to the deleteui |
|
123 CCalenEditUi* iEditUi; // pointer to the seditui |
|
124 CCalenLocationUi* iLocationUi; // pointer to the locationui |
|
125 CCalenController& iController; // reference to the calencontroller |
|
126 CCalenAttachmentUi* iAttachmentUi; |
|
127 |
|
128 }; |
91 }; |
129 |
92 |
130 #endif // CALENACTIONUI_H |
93 #endif // CALENACTIONUI_H |
131 |
94 |
132 // End of file |
95 // End of file |