meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmralarmfield.h
branchRCL_3
changeset 12 4ce476e64c59
parent 0 8466d47a6819
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
     1 /*
     1 /*
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    17 
    17 
    18 
    18 
    19 #ifndef CESMRALARMFIELD_H
    19 #ifndef CESMRALARMFIELD_H
    20 #define CESMRALARMFIELD_H
    20 #define CESMRALARMFIELD_H
    21 
    21 
    22 #include "cesmriconfield.h"
    22 #include "cesmrfield.h"
    23 
    23 
    24 class CEikLabel;
    24 class CMRLabel;
    25 class CESMRAlarm;
    25 class CESMRAlarm;
       
    26 class CMRImage;
    26 class MESMRFieldValidator;
    27 class MESMRFieldValidator;
    27 
    28 
    28 /**
    29 /**
    29  * Alarm field defines the time before the meeting when
    30  * Alarm field defines the time before the meeting when
    30  * alarm should be showed. User can traverse between the
    31  * alarm should be showed. User can traverse between the
    31  * different alarm values by pressing left/right keys or
    32  * different alarm values by pressing left/right keys or
    32  * open a dialog by pressing ok button.
    33  * open a dialog by pressing ok button.
    33  *
    34  *
    34  * @see cesmralarm.h
    35  * @see cesmralarm.h
    35  */
    36  */
    36 NONSHARABLE_CLASS( CESMRAlarmField ) : public CESMRIconField
    37 NONSHARABLE_CLASS( CESMRAlarmField ) : public CESMRField
    37     {
    38     {
    38 public:
    39 public:
    39     /**
    40     /**
    40      * Two phase constructor.
    41      * Two phase constructor.
    41      */
    42      */
    45      * Destructor.
    46      * Destructor.
    46      */
    47      */
    47     ~CESMRAlarmField();
    48     ~CESMRAlarmField();
    48 
    49 
    49 public: // From CESMRField
    50 public: // From CESMRField
    50     void InitializeL();
       
    51     void InternalizeL( MESMRCalEntry& aEntry );
    51     void InternalizeL( MESMRCalEntry& aEntry );
    52     void ExternalizeL( MESMRCalEntry& aEntry );
    52     void ExternalizeL( MESMRCalEntry& aEntry );
    53     void SetOutlineFocusL( TBool aFocus );
    53     void SetOutlineFocusL( TBool aFocus );
    54     TBool OkToLoseFocusL( TESMREntryFieldId aId );
    54     TBool OkToLoseFocusL( TESMREntryFieldId aId );
    55     void ExecuteGenericCommandL( TInt aCommand );
    55     TBool ExecuteGenericCommandL( TInt aCommand );
    56 
    56 
    57 public: // From CCoeControl
    57 public: // From CCoeControl
    58     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
    58     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
    59 
    59     TInt CountComponentControls() const;
       
    60     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    61     void SizeChanged();
       
    62     
    60 private:
    63 private:
    61     /**
    64     /**
    62      * Constructor
    65      * Constructor
    63      */
    66      */
    64     CESMRAlarmField( MESMRFieldValidator* aValidator );
    67     CESMRAlarmField( MESMRFieldValidator* aValidator );
    96       */
    99       */
    97     void ExecuteMSKCommandL();
   100     void ExecuteMSKCommandL();
    98 
   101 
    99 private:
   102 private:
   100     /**
   103     /**
   101      *  Not own: Label for current alarm value
   104      *  Own: Label for current alarm value
   102      */
   105      */
   103     CEikLabel* iAlarm;
   106     CMRLabel* iAlarm;
       
   107     
       
   108     /// Own: Icon for alarm field
       
   109     CMRImage* iIcon;
   104 
   110 
   105     /**
   111     /**
   106      * Own: List of CESMRAlarm objects
   112      * Own: List of CESMRAlarm objects
   107      */
   113      */
   108     RPointerArray< CESMRAlarm > iArray;
   114     RPointerArray< CESMRAlarm > iArray;
   111      * Index pointing to iArray.
   117      * Index pointing to iArray.
   112      */
   118      */
   113     TInt iOptIndex;
   119     TInt iOptIndex;
   114 
   120 
   115     /**
   121     /**
   116      * Not owned. Validator class for time and sanity checks.
       
   117      */
       
   118     MESMRFieldValidator* iValidator;
       
   119 
       
   120     /**
       
   121      * Own: Relative alarm validity
   122      * Own: Relative alarm validity
   122      */
   123      */
   123     TBool iRelativeAlarmValid;
   124     TBool iRelativeAlarmValid;
   124     };
   125     };
   125 
   126