63
|
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: Provides Image conflict resolution dialog
|
|
15 |
* for Contact Merge command.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef CPBK2MERGEPHOTOCONFLICTDLG_H
|
|
20 |
#define CPBK2MERGEPHOTOCONFLICTDLG_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32std.h>
|
|
24 |
#include <e32base.h>
|
|
25 |
#include <AknDialog.h>
|
|
26 |
#include <eiklbo.h>
|
|
27 |
#include <MPbk2ImageOperationObservers.h>
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
class CEikFormattedCellListBox;
|
|
31 |
class CAknNavigationDecorator;
|
|
32 |
class CFbsBitmap;
|
|
33 |
class CPbk2ImageManager;
|
|
34 |
class MPbk2ImageOperation;
|
|
35 |
class MVPbkBaseContact;
|
|
36 |
class CVPbkContactManager;
|
|
37 |
|
|
38 |
/**
|
|
39 |
* CPbk2MergePhotoConflictDlg
|
|
40 |
*
|
|
41 |
*/
|
|
42 |
NONSHARABLE_CLASS( CPbk2MergePhotoConflictDlg ) : public CAknDialog,
|
|
43 |
private MPbk2ImageGetObserver,
|
|
44 |
private MEikListBoxObserver
|
|
45 |
{
|
|
46 |
public: // construction
|
|
47 |
|
|
48 |
/**
|
|
49 |
* Two-phased constructor.
|
|
50 |
*/
|
|
51 |
IMPORT_C static CPbk2MergePhotoConflictDlg* NewL( MVPbkBaseContact* aFirstContact,
|
|
52 |
MVPbkBaseContact* aSecondContact,
|
|
53 |
TInt* aResult );
|
|
54 |
|
|
55 |
/**
|
|
56 |
* Destructor.
|
|
57 |
*/
|
|
58 |
~CPbk2MergePhotoConflictDlg();
|
|
59 |
|
|
60 |
private: // construction
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Constructor for performing 1st stage construction
|
|
64 |
*/
|
|
65 |
CPbk2MergePhotoConflictDlg( MVPbkBaseContact* aFirstContact,
|
|
66 |
MVPbkBaseContact* aSecondContact,
|
|
67 |
TInt* aResult );
|
|
68 |
/**
|
|
69 |
* Default constructor for performing 2nd stage construction
|
|
70 |
*/
|
|
71 |
void ConstructL();
|
|
72 |
|
|
73 |
private: // from MEikListBoxObserver
|
|
74 |
|
|
75 |
void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
|
|
76 |
|
|
77 |
private: // from CAknDialog
|
|
78 |
|
|
79 |
void PreLayoutDynInitL();
|
|
80 |
|
|
81 |
TBool OkToExitL( TInt aButtonId );
|
|
82 |
|
|
83 |
TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
|
|
84 |
|
|
85 |
void SizeChanged();
|
|
86 |
|
|
87 |
private: //functions from MPbk2ImageGetObserver
|
|
88 |
void Pbk2ImageGetComplete(
|
|
89 |
MPbk2ImageOperation& aOperation,
|
|
90 |
CFbsBitmap* aBitmap );
|
|
91 |
|
|
92 |
void Pbk2ImageGetFailed(
|
|
93 |
MPbk2ImageOperation& aOperation,
|
|
94 |
TInt aError );
|
|
95 |
|
|
96 |
private: // new methods
|
|
97 |
|
|
98 |
void SetIconsL();
|
|
99 |
|
|
100 |
void SetItemsL();
|
|
101 |
|
|
102 |
void SwitchRadioButtonL();
|
|
103 |
|
|
104 |
void SetNaviPaneL();
|
|
105 |
|
|
106 |
void SetTitlePaneL( TBool aCustom );
|
|
107 |
|
|
108 |
void InitBitmapAsyncL( MVPbkBaseContact& aContact );
|
|
109 |
|
|
110 |
void StopWait();
|
|
111 |
|
|
112 |
void StartWait();
|
|
113 |
|
|
114 |
private: // new methods
|
|
115 |
|
|
116 |
/// Not own: Pointer for list control
|
|
117 |
CEikFormattedCellListBox* iListBox;
|
|
118 |
/// Own: Navi pane control
|
|
119 |
CAknNavigationDecorator* iNaviDecorator;
|
|
120 |
/// Not own: first bitmap to display
|
|
121 |
CFbsBitmap* iFirstImage;
|
|
122 |
/// Not own: second bitmap to display
|
|
123 |
CFbsBitmap* iSecondImage;
|
|
124 |
/// Not own: index of selected image
|
|
125 |
TInt* iSelectedItem;
|
|
126 |
/// Own: Selection indicator string
|
|
127 |
HBufC* iSelectedString;
|
|
128 |
/// Not own: contact to be merged
|
|
129 |
MVPbkBaseContact* iFirstContact;
|
|
130 |
/// not own: contact to be merged
|
|
131 |
MVPbkBaseContact* iSecondContact;
|
|
132 |
/// Not own: contact manager
|
|
133 |
CVPbkContactManager* iContactManager;
|
|
134 |
/// own: image manager
|
|
135 |
CPbk2ImageManager* iImageManager;
|
|
136 |
/// Own. Image operation for first contact
|
|
137 |
MPbk2ImageOperation* iImageOperationFirst;
|
|
138 |
|
|
139 |
/// Own. Image operation for first contact
|
|
140 |
MPbk2ImageOperation* iImageOperationSecond;
|
|
141 |
|
|
142 |
/// Own. size of image to be shown in photo conflict dialog
|
|
143 |
TSize iSize;
|
|
144 |
|
|
145 |
/// Own: Active scheduler waiter
|
|
146 |
CActiveSchedulerWait* iWait;
|
|
147 |
|
|
148 |
};
|
|
149 |
|
|
150 |
#endif // CPBK2MERGEPHOTOCONFLICTDLG_H
|