calendarui/controller/inc/calenactionui.h
changeset 0 f979ecb2b13e
child 18 c198609911f9
child 65 12af337248b1
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   Calendar controller
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENACTIONUI_H
       
    21 #define CALENACTIONUI_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <calencommandhandler.h>
       
    26 #include <calencommands.hrh>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CCalenController;
       
    30 class CCalenDeleteUi;
       
    31 class CCalenEditUi;
       
    32 class CCalenLocationUi;
       
    33 class CCalenCustomisationManager;
       
    34 class MCalenCommandHandler;
       
    35 class CCalenAttachmentUi;
       
    36 
       
    37 // CLASS DEFINITIONS
       
    38 /**
       
    39  * The action ui handles events passed from the controller and delegates
       
    40  * them to the appropriate place (i.e. the specific action ui classes).
       
    41  */
       
    42 class CCalenActionUi : public CBase,
       
    43                        public MCalenCommandHandler
       
    44     {
       
    45 
       
    46 public:  // Construction and destruction
       
    47 
       
    48     /**
       
    49      * 1st phase constructor
       
    50      * @param aController A reference to calencontroller
       
    51      */
       
    52     static CCalenActionUi* NewL( CCalenController& aController );
       
    53 
       
    54     /**
       
    55      * Virtual destructor
       
    56      */
       
    57     virtual ~CCalenActionUi();
       
    58 
       
    59 public: // From MCalenCommandHandler
       
    60 
       
    61     /**
       
    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 
       
   128     };
       
   129 
       
   130 #endif // CALENACTIONUI_H
       
   131 
       
   132 // End of file