|
1 /* |
|
2 * Copyright (c) 2005-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 name query dialog. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPGUGROUPNAMEQUERYDLG_H |
|
20 #define CPGUGROUPNAMEQUERYDLG_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <AknQueryDialog.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class MVPbkContactViewBase; |
|
27 class MPbk2ContactNameFormatter; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Phonebook 2 group name query dialog. |
|
33 * Responsible for quering group name. |
|
34 */ |
|
35 class CPguGroupNameQueryDlg : public CAknTextQueryDialog, |
|
36 public MCoeForegroundObserver |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Creates a new instance of this class. |
|
42 * |
|
43 * @param aDataText Original name of the group. |
|
44 * @param aGroupsView Groups list view. |
|
45 * @param aNameGeneration Indicates whether to generate |
|
46 * group name. |
|
47 * @return A new instance of this class. |
|
48 */ |
|
49 static CPguGroupNameQueryDlg* NewL( |
|
50 TDes& aDataText, |
|
51 MVPbkContactViewBase& aGroupsView, |
|
52 MPbk2ContactNameFormatter& aNameFormatter, |
|
53 TBool aNameGeneration ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 ~CPguGroupNameQueryDlg(); |
|
59 |
|
60 public: // From CAknTextQueryDialog |
|
61 TBool OkToExitL( |
|
62 TInt aButtonId ); |
|
63 |
|
64 private: // From MCoeForegroundObserver |
|
65 void HandleGainingForeground(); |
|
66 void HandleLosingForeground(); |
|
67 |
|
68 private: // Implementation |
|
69 CPguGroupNameQueryDlg( |
|
70 TDes& aDataText, |
|
71 MVPbkContactViewBase& aGroupsView, |
|
72 MPbk2ContactNameFormatter& aNameFormatter ); |
|
73 void ConstructL( |
|
74 TDes& aDataText, |
|
75 TBool aNameGeneration ); |
|
76 void UpdateGroupTitleL(); |
|
77 TBool ContainsL( |
|
78 const TDesC& aText ); |
|
79 |
|
80 private: // Data |
|
81 /// Ref: Groups view |
|
82 MVPbkContactViewBase& iGroupsListView; |
|
83 /// Ref: Contact name formatter |
|
84 MPbk2ContactNameFormatter& iNameFormatter; |
|
85 /// Own: Copy of original group name |
|
86 HBufC* iOriginalName; |
|
87 }; |
|
88 |
|
89 #endif // CPGUGROUPNAMEQUERYDLG_H |
|
90 |
|
91 // End of File |