calendarui/controller/inc/calenactionui.h
branchRCL_3
changeset 66 bd7edf625bdd
parent 65 12af337248b1
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
     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 
    17 
    18 
    18 
    19 
    19 #ifndef CALENACTIONUI_H
    20 #ifndef CALENACTIONUI_H
    20 #define CALENACTIONUI_H
    21 #define CALENACTIONUI_H
    21 
    22 
    22 // INCLUDES
    23 // INCLUDES
    23 #include <e32base.h>
    24 #include <e32base.h>
    24 #include "hb_calencommands.hrh"
    25 #include <calencommandhandler.h>
    25 #include "calencommandhandler.h"
    26 #include <calencommands.hrh>
    26 
    27 
    27 // FORWARD DECLARATIONS
    28 // FORWARD DECLARATIONS
    28 class CCalenController;
    29 class CCalenController;
    29 class CalenDeleteUi;
    30 class CCalenDeleteUi;
    30 class CCalenEditUi;
    31 class CCalenEditUi;
       
    32 class CCalenLocationUi;
       
    33 class CCalenCustomisationManager;
    31 class MCalenCommandHandler;
    34 class MCalenCommandHandler;
       
    35 class CCalenAttachmentUi;
    32 
    36 
    33 // CLASS DEFINITIONS
    37 // CLASS DEFINITIONS
    34 
       
    35 /**
    38 /**
    36  * The action ui handles events passed from the controller and delegates
    39  * The action ui handles events passed from the controller and delegates
    37  * them to the appropriate place (i.e. the specific action ui classes).
    40  * them to the appropriate place (i.e. the specific action ui classes).
    38  */
    41  */
    39 class CCalenActionUi : public CBase,
    42 class CCalenActionUi : public CBase,
    40                        public MCalenCommandHandler
    43                        public MCalenCommandHandler
    41     {
    44     {
    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();
       
    53 
    45 
    54     public: // MCalenCommandHandler
    46 public:  // Construction and destruction
    55         TBool HandleCommandL( const TCalenCommand& aCommand );
       
    56 
    47 
    57     public:  // New functions
    48     /**
    58         
    49      * 1st phase constructor
    59         /**
    50      * @param aController A reference to calencontroller
    60          * Gets a command handler or NULL.
    51      */
    61          */
    52     static CCalenActionUi* NewL( CCalenController& aController );
    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();
       
    68 
    53 
    69     private:  // Construction and destruction
    54     /**
    70         /**
    55      * Virtual destructor
    71          * C++ constructor, non-leaving
    56      */
    72          * @param aController A reference to the CCalenController
    57     virtual ~CCalenActionUi();
    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    
       
    86 
    58 
    87     private:  // Data
    59 public: // From MCalenCommandHandler
    88         CalenDeleteUi*             iDeleteUi;     // pointer to the deleteui
    60 
    89         CCalenEditUi*                iEditUi;         // pointer to the seditui       
    61     /**
    90         CCalenController&           iController;    // reference to the CCalenController
    62      * Handles key presses.
       
    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 
    91     };
   128     };
    92 
   129 
    93 #endif // CALENACTIONUI_H
   130 #endif // CALENACTIONUI_H
    94 
   131 
    95 // End of file
   132 // End of file