|
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 * from CAknDialog |
|
106 */ |
|
107 void HandleDialogPageEventL (TInt); |
|
108 |
|
109 protected: |
|
110 /** |
|
111 * from CCoeControl |
|
112 */ |
|
113 TKeyResponse OfferKeyEventL( |
|
114 const TKeyEvent& aKeyEvent, |
|
115 TEventCode aType); |
|
116 |
|
117 private: // Functions from base classes |
|
118 /** |
|
119 * From MContactDbObserver, Handles an event of type aEventType. |
|
120 */ |
|
121 void HandleDatabaseEventL(TContactDbObserverEvent aEvent); |
|
122 |
|
123 private: // functions |
|
124 /** |
|
125 * |
|
126 */ |
|
127 void LoadCbaL(); |
|
128 |
|
129 private: // data |
|
130 CSpdiaControl* iControl; |
|
131 |
|
132 TInt& iDial; |
|
133 CPbkContactChangeNotifier* iPbkNotifier; // owned by this |
|
134 CSpdiaGrid* iGrid; |
|
135 TSize iCellSize; |
|
136 TInt iCbaID; |
|
137 TBool iNeedUpdate; |
|
138 TInt iPrevIndex; |
|
139 }; |
|
140 |
|
141 #endif // SPDIAGRIDDLG_H |
|
142 |
|
143 |
|
144 // End of File |
|
145 |