meetingrequest/mrgui/mrfieldbuilderplugin/inc/cesmrvieweralarmtimefield.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2009 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:  ESMR viewer alarm field.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CESMRVIEWERALARMTIMEFIELD_H
       
    20 #define CESMRVIEWERALARMTIMEFIELD_H
       
    21 
       
    22 #include <eikrted.h>
       
    23 #include <eikedwob.h>
       
    24 
       
    25 #include "cesmrfield.h"
       
    26 
       
    27 // Forward declarations
       
    28 class CMRImage;
       
    29 class CMRLabel;
       
    30 
       
    31 /**
       
    32  * This class is a custom field control that shows the alarm time of calendar events
       
    33  */
       
    34 NONSHARABLE_CLASS( CESMRViewerAlarmTimeField ) : public CESMRField
       
    35     {
       
    36 public:
       
    37     /**
       
    38      * Creates new CESMRViewerAlarmTimeField object. Ownership
       
    39      * is transferred to caller.
       
    40      * @return Pointer to created object,
       
    41      */
       
    42     static CESMRViewerAlarmTimeField* NewL();
       
    43     
       
    44     /**
       
    45      * C++ Destructor.
       
    46      */
       
    47     ~CESMRViewerAlarmTimeField();
       
    48     
       
    49 public: // From CESMRField
       
    50     void InternalizeL( MESMRCalEntry& aEntry );
       
    51     void SetOutlineFocusL( TBool aFocus );
       
    52     TBool ExecuteGenericCommandL( TInt aCommand );
       
    53     void LockL();
       
    54     
       
    55 public: // From CCoeControl
       
    56     void SizeChanged();
       
    57     TInt CountComponentControls() const;
       
    58     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    59     
       
    60 private: // Implementation
       
    61     CESMRViewerAlarmTimeField();
       
    62     void ConstructL();
       
    63     void FormatAlarmTimeL();
       
    64     
       
    65 private: // data    
       
    66     // Own: Field icon
       
    67     CMRImage* iIcon;
       
    68     /// Own: lock icon
       
    69     CMRImage* iLockIcon;
       
    70     // Ref: Field text label
       
    71     CMRLabel* iLabel;
       
    72     /// Own: Alarm time
       
    73     TTime iAlarmTime;
       
    74     };
       
    75 
       
    76 #endif // CESMRVIEWERALARMTIMEFIELD_H