63
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-2007 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: Phonebook 2 group members view.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef CPGUGROUPMEMBERSVIEW_H
|
|
20 |
#define CPGUGROUPMEMBERSVIEW_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <vwsdef.h>
|
|
25 |
#include <MPbk2UIExtensionView.h>
|
|
26 |
#include <eiklbo.h>
|
|
27 |
#include <aknmarkingmodeobserver.h>
|
|
28 |
|
|
29 |
// FORWARD DECLARATIONS
|
|
30 |
class CPbk2UIExtensionView;
|
|
31 |
class CPbk2NamesListControl;
|
|
32 |
class CPbk2ContactNavigation;
|
|
33 |
template<class ControlType> class CPbk2ControlContainer;
|
|
34 |
class MPbk2ContactUiControl;
|
|
35 |
class CGroupMembersViewActivation;
|
|
36 |
class MVPbkContactLink;
|
|
37 |
|
|
38 |
// CLASS DECLARATIONS
|
|
39 |
|
|
40 |
/**
|
|
41 |
* Phonebook group members view activation state switcher interface.
|
|
42 |
*/
|
|
43 |
class MPbk2GroupMembersViewActivationCallback
|
|
44 |
{
|
|
45 |
public: // Interface
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Transforms view's activation state to ready.
|
|
49 |
*
|
|
50 |
* @param aGroupIndex Index of group.
|
|
51 |
*/
|
|
52 |
virtual void TransformViewActivationStateToReadyL(
|
|
53 |
const TInt aGroupIndex ) = 0;
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Restores previous state.
|
|
57 |
*/
|
|
58 |
virtual void RestoreStateL() = 0;
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Returns focused contact.
|
|
62 |
*
|
|
63 |
* @return Link to the focused contact.
|
|
64 |
*/
|
|
65 |
virtual MVPbkContactLink* FocusedContact() const = 0;
|
|
66 |
|
|
67 |
/**
|
|
68 |
* Sets focused contact.
|
|
69 |
*
|
|
70 |
* @param aGroupLink Focused group link.
|
|
71 |
*/
|
|
72 |
virtual void SetFocusedContact(
|
|
73 |
MVPbkContactLink* aGroupLink ) = 0;
|
|
74 |
|
|
75 |
protected: // Disabled fuctions
|
|
76 |
~MPbk2GroupMembersViewActivationCallback()
|
|
77 |
{}
|
|
78 |
};
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Phonebook 2 group members view.
|
|
82 |
*/
|
|
83 |
class CPguGroupMembersView : public CBase,
|
|
84 |
public MPbk2UIExtensionView,
|
|
85 |
public MEikListBoxObserver,
|
|
86 |
private MPbk2GroupMembersViewActivationCallback,
|
|
87 |
public MAknMarkingModeObserver
|
|
88 |
|
|
89 |
|
|
90 |
{
|
|
91 |
public: // Construction and destruction
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Creates a new instance of this class.
|
|
95 |
*
|
|
96 |
* @param aView The extension view.
|
|
97 |
* @return A new instance of this class.
|
|
98 |
*/
|
|
99 |
static CPguGroupMembersView* NewL(
|
|
100 |
CPbk2UIExtensionView& aView );
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Destructor.
|
|
104 |
*/
|
|
105 |
~CPguGroupMembersView();
|
|
106 |
|
|
107 |
public: // From MPbk2UIExtensionView
|
|
108 |
void HandleStatusPaneSizeChange();
|
|
109 |
CPbk2ViewState* ViewStateLC() const;
|
|
110 |
TBool HandleCommandKeyL(
|
|
111 |
const TKeyEvent& aKeyEvent,
|
|
112 |
TEventCode aType );
|
|
113 |
TInt GetViewSpecificMenuFilteringFlagsL() const;
|
|
114 |
void DoActivateL(
|
|
115 |
const TVwsViewId& aPrevViewId,
|
|
116 |
TUid aCustomMessageId,
|
|
117 |
const TDesC8& aCustomMessage );
|
|
118 |
void DoDeactivate();
|
|
119 |
void HandleCommandL(
|
|
120 |
TInt aCommand );
|
|
121 |
void DynInitMenuPaneL(
|
|
122 |
TInt aResourceId,
|
|
123 |
CEikMenuPane* aMenuPane );
|
|
124 |
void HandlePointerEventL(
|
|
125 |
const TPointerEvent& aPointerEvent );
|
|
126 |
void HandleLongTapEventL(
|
|
127 |
const TPoint& aPenEventLocation,
|
|
128 |
const TPoint& aPenEventScreenLocation );
|
|
129 |
|
|
130 |
public: // From MAknMarkingModeObserver
|
|
131 |
|
|
132 |
/**
|
|
133 |
* This method is called when marking mode is activated or deactivated.
|
|
134 |
*
|
|
135 |
* @param aActivated @c ETrue if marking mode was activate, @c EFalse
|
|
136 |
* if marking mode was deactivated.
|
|
137 |
*/
|
|
138 |
void MarkingModeStatusChanged( TBool aActivated );
|
|
139 |
|
|
140 |
/**
|
|
141 |
* This method is called just before marking mode is closed. Client can
|
|
142 |
* either accept or decline closing.
|
|
143 |
*
|
|
144 |
* @return @c ETrue if marking mode should be closed, otherwise @c EFalse.
|
|
145 |
*/
|
|
146 |
TBool ExitMarkingMode() const;
|
|
147 |
|
|
148 |
protected:
|
|
149 |
// from MEikListBoxObserver
|
|
150 |
void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
|
|
151 |
|
|
152 |
private: // From MPbk2GroupMembersViewActivationCallback
|
|
153 |
void TransformViewActivationStateToReadyL(
|
|
154 |
const TInt aGroupIndex );
|
|
155 |
void RestoreStateL() const;
|
|
156 |
MVPbkContactLink* FocusedContact() const;
|
|
157 |
void SetFocusedContact(
|
|
158 |
MVPbkContactLink* aGroupLink );
|
|
159 |
|
|
160 |
private: // Implementation
|
|
161 |
CPguGroupMembersView(
|
|
162 |
CPbk2UIExtensionView& aView );
|
|
163 |
void StoreStateL();
|
|
164 |
void RestoreStateL();
|
|
165 |
void UpdateViewStateL(
|
|
166 |
const TUid aCustomMessageId,
|
|
167 |
const TDesC8& aCustomMessage );
|
|
168 |
class CGroupMembersViewImpl;
|
|
169 |
class CGroupMembersAllGroupsNotReady;
|
|
170 |
class CGroupMembersAllGroupsReady;
|
|
171 |
void ReturnToPreviousViewL() const;
|
|
172 |
void ShowContextMenuL();
|
|
173 |
|
|
174 |
private: // Data
|
|
175 |
/// Ref: View that contains this extension view
|
|
176 |
CPbk2UIExtensionView& iView;
|
|
177 |
/// Own: Stored control state
|
|
178 |
CPbk2ViewState* iControlState;
|
|
179 |
/// Own: Focused group
|
|
180 |
MVPbkContactLink* iFocusedGroup;
|
|
181 |
/// Own: The view which this view was activated from
|
|
182 |
TVwsViewId iPreviousViewId;
|
|
183 |
/// Own: View activation state machine
|
|
184 |
CGroupMembersViewImpl* iViewImpl;
|
|
185 |
};
|
|
186 |
|
|
187 |
#endif // CPGUGROUPMEMBERSVIEW_H
|
|
188 |
|
|
189 |
// End of File
|