phonebookui/Speeddial/ControlInc/SpdiaGridDlg.h
branchRCL_3
changeset 63 f4a778e096c2
child 64 c1e8ba0c2b16
equal deleted inserted replaced
62:5b6f26637ad3 63:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2002 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:     The main UI container element of the Speeddial Control 
       
    15 *                Utility that contains the 3x3 grid of speeddial entries.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef     SPDIAGRIDDLG_H
       
    25 #define     SPDIAGRIDDLG_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include <AknGrid.h>
       
    29 #include <AknDialog.h>   // CEikDialog
       
    30 #include <MPbkContactDbObserver.h>
       
    31 
       
    32 //  FORWARD DECLARATIONS
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class CSpdiaControl;
       
    36 class CSpdiaGrid;
       
    37 class CPbkContactChangeNotifier;
       
    38 
       
    39 /**
       
    40 *  The main UI container element of the Speeddial Control Utility 
       
    41 *  that contains the 3x3 grid of speeddial entries.
       
    42 *
       
    43 *  @since 
       
    44 */
       
    45 class CSpdiaGridDlg : public CAknDialog,
       
    46                       public MPbkContactDbObserver
       
    47     {
       
    48     public:  // Constructors and destructor
       
    49         /**
       
    50         * Creates a selection grid dialog.
       
    51         *
       
    52         * @param aDial   select dial number.
       
    53         */
       
    54         static CSpdiaGridDlg* NewL(TInt& aDial, const CSpdiaControl& aControl);
       
    55 
       
    56         /**
       
    57         * Construction.
       
    58         */ 
       
    59         CSpdiaGridDlg(TInt& aDial, const CSpdiaControl& aControl);
       
    60 
       
    61         /**
       
    62         * Construction.
       
    63         */ 
       
    64         CSpdiaGridDlg();
       
    65 
       
    66         /**
       
    67         * Destructor.
       
    68         */ 
       
    69         virtual ~CSpdiaGridDlg();
       
    70         
       
    71         /**
       
    72         * From CAknDialog takes care of skin changes and layout.
       
    73         * @param aType skin event identifier.
       
    74         */
       
    75         void HandleResourceChange(TInt aType);
       
    76 
       
    77     public: // data structures
       
    78 
       
    79     public:  // constructors
       
    80 
       
    81     public:  // constructors
       
    82         void FocusChanged(TDrawNow aDrawNow);
       
    83 
       
    84     protected:
       
    85         /**
       
    86         * from CAknDialog
       
    87         */ 
       
    88         void PreLayoutDynInitL();
       
    89 
       
    90         /**
       
    91         * from CAknDialog
       
    92         */
       
    93         void PostLayoutDynInitL();
       
    94 
       
    95         /**
       
    96         * from CAknDialog
       
    97         */ 
       
    98         SEikControlInfo CreateCustomControlL(TInt aControlType);
       
    99 
       
   100         /**
       
   101         * from CAknDialog
       
   102         */ 
       
   103         TBool OkToExitL(TInt aButtonId);
       
   104         
       
   105         /**
       
   106         * From CCoeControl,HandlePointerEventL.
       
   107         */
       
   108         void HandlePointerEventL( const TPointerEvent& aPointerEvent );
       
   109 
       
   110     protected:
       
   111         /**
       
   112         * from CCoeControl
       
   113         */ 
       
   114         TKeyResponse OfferKeyEventL(
       
   115                     const TKeyEvent& aKeyEvent,
       
   116                     TEventCode aType);
       
   117 
       
   118     private: // Functions from base classes
       
   119         /**
       
   120         * From MContactDbObserver, Handles an event of type aEventType.
       
   121         */
       
   122         void HandleDatabaseEventL(TContactDbObserverEvent aEvent);
       
   123 
       
   124     private:  // functions
       
   125         /**
       
   126         * 
       
   127         */ 
       
   128         void LoadCbaL();
       
   129 
       
   130     private:  // data
       
   131         CSpdiaControl* iControl;
       
   132 
       
   133         TInt&       iDial;
       
   134         CPbkContactChangeNotifier* iPbkNotifier;    // owned by this
       
   135         CSpdiaGrid* iGrid;
       
   136         TSize       iCellSize;
       
   137         TInt        iCbaID;
       
   138         TBool       iNeedUpdate;
       
   139         TInt        iPrevIndex;
       
   140         // Grid index in which the button down
       
   141         TInt iButton1DownIndex;
       
   142    };
       
   143 
       
   144 #endif  // SPDIAGRIDDLG_H
       
   145             
       
   146 
       
   147 // End of File
       
   148