calendarui/controller/inc/calenactionui.h
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 55 2c54b51f39c4
equal deleted inserted replaced
0:f979ecb2b13e 18:c198609911f9
     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 );
    53 
    63 
    54     /**
    64     private:  // Construction and destruction
    55      * Virtual destructor
    65         /**
    56      */
    66          * C++ constructor, non-leaving
    57     virtual ~CCalenActionUi();
    67          * @param aController A reference to the CCalenController
       
    68          */
       
    69         CCalenActionUi( CCalenController& aController );
       
    70         
       
    71         /**
       
    72          * 2nd phase constructor
       
    73          */
       
    74         void ConstructL();
       
    75         
       
    76         /**
       
    77          * Launches the settings view
       
    78          */
       
    79         void launchSettingsView();
       
    80    
    58 
    81 
    59 public: // From MCalenCommandHandler
    82     private:  // Data
    60 
    83         CalenDeleteUi*             iDeleteUi;     // pointer to the deleteui
    61     /**
    84         CCalenEditUi*                iEditUi;         // pointer to the seditui       
    62      * Handles key presses.
    85         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     };
    86     };
   129 
    87 
   130 #endif // CALENACTIONUI_H
    88 #endif // CALENACTIONUI_H
   131 
    89 
   132 // End of file
    90 // End of file