calendarui/settings/settingsui/inc/calennestedsettingdialog.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Setting page opened from a setting item.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENNESTEDSETTINGDIALOG_H
       
    21 #define CALENNESTEDSETTINGDIALOG_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <AknDialog.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CAknSettingStyleListBox;
       
    28 class CAknsBasicBackgroundControlContext;
       
    29 class CAknSettingItemArray;
       
    30 class CAknSettingItem;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34  * CCalenNestedSettingDialog - a setting dialog launched from a setting item.
       
    35  */
       
    36 class CCalenNestedSettingDialog : public CAknDialog
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39         /**
       
    40          * Two-phased constructor. Ownership of array and contents
       
    41          * to remain with caller.
       
    42          */
       
    43         static CCalenNestedSettingDialog* NewL( RPointerArray<CAknSettingItem>& aSettings );
       
    44 
       
    45         /**
       
    46          * Destructor.
       
    47          */
       
    48         ~CCalenNestedSettingDialog();
       
    49 
       
    50     public:  // From CAknDialog
       
    51         /**
       
    52          * Processes menu choices.
       
    53          * @param aCommandId command id.
       
    54          */
       
    55         void ProcessCommandL( TInt aCommandId );
       
    56 
       
    57         /**
       
    58          * Handles key presses.
       
    59          * @param aKeyEvent the key event
       
    60          * @param aType the type of key press
       
    61          */
       
    62         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
    63                                      TEventCode aType );
       
    64 
       
    65     protected:  // From CAknDialog
       
    66         /**
       
    67          * Called before layout operations performed.
       
    68          * @see CAknDialog.
       
    69          */
       
    70         void PreLayoutDynInitL();
       
    71 
       
    72         /**
       
    73          * Checks to see if exiting is a vaild action from the given command.
       
    74          * @param aButtonId command to check.
       
    75          * @return ETrue if the command is a valid command to exit on, EFalse otherwise.
       
    76          * @see CAknDialog.
       
    77          */
       
    78         TBool OkToExitL( TInt aButtonId );
       
    79 
       
    80     protected:  // From CCoeControl
       
    81         /**
       
    82          * Handles resource changes (i.e. screen resolution changes).
       
    83          * @param aType bitmask of resources changed.
       
    84          * @see CCoeControl.
       
    85          */
       
    86         void HandleResourceChange( TInt aType );
       
    87 
       
    88         /**
       
    89          * Called by the framework after SetRect gets called.
       
    90          * @see CCoeControl.
       
    91          */
       
    92         void SizeChanged();
       
    93 
       
    94         /**
       
    95          * Draws the control. We override to add skin support.
       
    96          * @see CCoeControl.
       
    97          */
       
    98         void Draw(const TRect& aRect) const;
       
    99 
       
   100         /**
       
   101          * Returns how many controls are contained in this control.
       
   102          * @return the number of component controls contained within.
       
   103          * @see CCoeControl.
       
   104          */
       
   105         TInt CountComponentControls() const;
       
   106 
       
   107         /**
       
   108          * Returns the component control at the given index.
       
   109          * @param aIndex index of the control to return.
       
   110          * @return component control at the given index.
       
   111          * @see CCoeControl.
       
   112          */
       
   113         CCoeControl* ComponentControl( TInt aIndex ) const;
       
   114 
       
   115     protected:  // From MObjectProvider
       
   116         /**
       
   117          * Provides the required object = in this case the background skin context.
       
   118          * @aId id of required object
       
   119          * @return supplied object.
       
   120          * @see MObjectProvider.
       
   121          */
       
   122         TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   123 
       
   124     protected:  // Functions from base classes
       
   125 
       
   126     private:  // Construction and destruction
       
   127         
       
   128         /**
       
   129          * C++ constructor
       
   130          */
       
   131         CCalenNestedSettingDialog();
       
   132         /**
       
   133          * Second phase of construction.
       
   134          */
       
   135         void ConstructL( RPointerArray<CAknSettingItem>& aSettings );
       
   136         
       
   137         
       
   138 	    /**
       
   139 	     * From CCoeControl Handle pointer event
       
   140 	     */
       
   141 	    void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
   142 	    
       
   143 
       
   144     protected: //Data
       
   145         
       
   146 
       
   147 	    // flag for touch ui long tap functionality
       
   148 	    TBool    iFirstTap;     
       
   149 
       
   150 
       
   151     private:  // Data
       
   152         CAknSettingItemArray* iSettingItemArray;
       
   153 
       
   154         // The listbox containing the settings items.
       
   155         CAknSettingStyleListBox* iListBox;
       
   156 
       
   157         // The background control context, used to draw the background skin.
       
   158         CAknsBasicBackgroundControlContext* iBgContext;
       
   159     };
       
   160 
       
   161 #endif // CALENNESTEDSETTINGDIALOG_H
       
   162 
       
   163 // End of File