|
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 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Creates a new instance of this class. |
|
41 * |
|
42 * @param aDataText Original name of the group. |
|
43 * @param aGroupsView Groups list view. |
|
44 * @param aNameGeneration Indicates whether to generate |
|
45 * group name. |
|
46 * @return A new instance of this class. |
|
47 */ |
|
48 static CPguGroupNameQueryDlg* NewL( |
|
49 TDes& aDataText, |
|
50 MVPbkContactViewBase& aGroupsView, |
|
51 MPbk2ContactNameFormatter& aNameFormatter, |
|
52 TBool aNameGeneration ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CPguGroupNameQueryDlg(); |
|
58 |
|
59 public: // From CAknTextQueryDialog |
|
60 TBool OkToExitL( |
|
61 TInt aButtonId ); |
|
62 |
|
63 private: // Implementation |
|
64 CPguGroupNameQueryDlg( |
|
65 TDes& aDataText, |
|
66 MVPbkContactViewBase& aGroupsView, |
|
67 MPbk2ContactNameFormatter& aNameFormatter ); |
|
68 void ConstructL( |
|
69 TDes& aDataText, |
|
70 TBool aNameGeneration ); |
|
71 void UpdateGroupTitleL(); |
|
72 TBool ContainsL( |
|
73 const TDesC& aText ); |
|
74 |
|
75 private: // Data |
|
76 /// Ref: Groups view |
|
77 MVPbkContactViewBase& iGroupsListView; |
|
78 /// Ref: Contact name formatter |
|
79 MPbk2ContactNameFormatter& iNameFormatter; |
|
80 /// Own: Copy of original group name |
|
81 HBufC* iOriginalName; |
|
82 }; |
|
83 |
|
84 #endif // CPGUGROUPNAMEQUERYDLG_H |
|
85 |
|
86 // End of File |