meetingrequest/mrgui/mrfieldbuilderplugin/inc/cmralarmonofffield.h
branchRCL_3
changeset 12 4ce476e64c59
child 16 b5fbb9b25d57
equal deleted inserted replaced
11:0396474f30f5 12:4ce476e64c59
       
     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 alarm on off field header
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMRALARMONOFFFIELD_H
       
    20 #define CMRALARMONOFFFIELD_H
       
    21 
       
    22 #include "CESMRfield.h"
       
    23 #include "mmrabsolutealarmcontroller.h"
       
    24 
       
    25 class CMRLabel;
       
    26 class CMRImage;
       
    27 class MESMRFieldValidator;
       
    28 //class MMRAbsoluteAlarmController;
       
    29 
       
    30 /**
       
    31  * Creates an alarm on off field for setting absolute alarm on/off
       
    32  */
       
    33 NONSHARABLE_CLASS( CMRAlarmOnOffField ): public CESMRField,
       
    34                                          public MMRAbsoluteAlarmController
       
    35     {
       
    36 public:
       
    37     /**
       
    38      * Creates new CMRAlarmOnOffField object. Ownership
       
    39      * is transferred to caller.
       
    40      * @return Pointer to created object,
       
    41      */
       
    42     static CMRAlarmOnOffField* NewL( MESMRFieldValidator* aValidator );
       
    43 
       
    44     /**
       
    45      * C++ Destructor.
       
    46      */
       
    47     ~CMRAlarmOnOffField();
       
    48     
       
    49 public: // From MMRAbsoluteAlarmController
       
    50     void SetAbsoluteAlarmOn();
       
    51     void SetAbsoluteAlarmOff();
       
    52 
       
    53 private: // From CMRField
       
    54     void InternalizeL( MESMRCalEntry& aEntry );
       
    55     void SetOutlineFocusL( TBool aFocus );
       
    56     TBool ExecuteGenericCommandL( TInt aCommand );
       
    57 
       
    58 private: // From CCoeControl
       
    59     TKeyResponse OfferKeyEventL(const TKeyEvent& aEvent, TEventCode aType);
       
    60     void MakeVisible(TBool aVisible);
       
    61     void SizeChanged();
       
    62     TInt CountComponentControls() const;
       
    63     CCoeControl* ComponentControl( TInt aIndex ) const;
       
    64     void SetContainerWindowL( const CCoeControl& aContainer );
       
    65 
       
    66 private:
       
    67     /**
       
    68      * Constructor.
       
    69      *
       
    70      * @param aValidator validator object
       
    71      */
       
    72     CMRAlarmOnOffField();
       
    73 
       
    74     /**
       
    75      * Second phase constructor.
       
    76      */
       
    77     void ConstructL( MESMRFieldValidator* aValidator );
       
    78 
       
    79     /**
       
    80      * Reset field value.
       
    81      */
       
    82     void ResetFieldL();
       
    83 
       
    84     /**
       
    85      * Switch middle softkey: on/off
       
    86      */
       
    87     void SwitchMiddleSoftKeyL();
       
    88 
       
    89 private:
       
    90   
       
    91     // Not Own. Field label.
       
    92     CMRLabel* iLabel;
       
    93 
       
    94     // Own. Field icon
       
    95     CMRImage* iIcon;
       
    96     
       
    97     // Current value.
       
    98     TBool iStatus;
       
    99     };
       
   100 
       
   101 #endif  // CMRALARMONOFFFIELD_H
       
   102