eventsui/eventseditor/inc/evtmgmtuidesccomponent.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2008 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:   Description component for retrieving description.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef EVTMGMTUIDESCCOMPONENT_H_
       
    20 #define EVTMGMTUIDESCCOMPONENT_H_
       
    21 
       
    22 #include <e32base.h>        // CBase
       
    23 
       
    24 // Forward Declaration
       
    25 class CNotepadApi;
       
    26 
       
    27 /**
       
    28  *  @class CEvtMgmtUiDescComponent
       
    29  *  Class that represents Description component of editor
       
    30  *
       
    31  *  This class acts as description component of editor.
       
    32  *  It  is used to retrieve description from notepad.
       
    33  *  It is also used to create new description using notepad.
       
    34  *  Note: Created description is not stored in Notepad application.
       
    35  *
       
    36  *  @since S60 v9.1
       
    37  */
       
    38 
       
    39 class CEvtMgmtUiDescComponent: public CBase
       
    40     {
       
    41 private:
       
    42     
       
    43     public:  // Constructor and destructor  
       
    44         /**
       
    45          * Static Two phase constructor
       
    46          * @param [in] aPrevDesc - description of existing event.
       
    47          *                       - empty for newly created event        
       
    48          */
       
    49         static CEvtMgmtUiDescComponent* NewL(const TPtrC aPrevDesc);
       
    50         
       
    51       /**
       
    52        * Static Two phase constructor
       
    53        * @param [in] aPrevDesc - description of existing event.
       
    54        *                       - empty for newly created event        
       
    55        */
       
    56       static CEvtMgmtUiDescComponent* NewLC(const TPtrC aPrevDesc);
       
    57 
       
    58       /**
       
    59        * Virtual destructor
       
    60        */
       
    61       virtual ~CEvtMgmtUiDescComponent(); 
       
    62       
       
    63     public:// new functions
       
    64       /**
       
    65        * It displays notepad editor and saves in descriptor variable
       
    66        * 
       
    67        * @since S60 v9.1
       
    68        * 
       
    69        * @return KErrCancel if deleted
       
    70        *         KErrAlreadyExists if not modified
       
    71        *         KErrNone if modified
       
    72        */
       
    73         TInt DisplayNotepadEditorL(); 
       
    74         
       
    75        /**
       
    76        * It opens system's memo popup dialog and 
       
    77        * saves selected memo as descriptor.
       
    78        * 
       
    79        * @since S60 v9.1
       
    80        *  
       
    81        * @return KErrCancel if cancel or no note
       
    82        *         KErrNone if note is selected
       
    83        */
       
    84         TInt DescFromExistingNotesL();
       
    85                 
       
    86         /**
       
    87         * It retrieves descriptor
       
    88         * 
       
    89         * @since S60 v9.1
       
    90         * 
       
    91         * @return selected descriptor
       
    92         */
       
    93          TPtrC Desc() const;        
       
    94 
       
    95        
       
    96     private:  // Constructor
       
    97         /**
       
    98          * C++ Default constructor
       
    99          */       
       
   100         CEvtMgmtUiDescComponent();
       
   101   
       
   102         /**
       
   103          * Second phase of the two phase constructor
       
   104          *  @param [in] aPrevDesc - description of existing event.
       
   105          *                        - empty for newly created event        
       
   106          */ 
       
   107          void ConstructL( const TPtrC aPrevDesc );
       
   108     
       
   109     private:
       
   110         /**
       
   111          * description value
       
   112          * owns
       
   113          */
       
   114         HBufC* iDesc;
       
   115 		
       
   116         /**
       
   117          * Notepad Instance
       
   118          * owns
       
   119          */
       
   120         CNotepadApi* iNotepad;
       
   121     };
       
   122 
       
   123 #endif //EVTMGMTUIDESCCOMPONENT_H_