|
1 /* |
|
2 * Copyright (c) 2002-2006 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: Dialog for asking file name from user |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CFILEMANAGERFILENAMEQUERYDLG_H |
|
21 #define CFILEMANAGERFILENAMEQUERYDLG_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <AknQueryDialog.h> // CAknTextQueryDialog |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CFileManagerEngine; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Dialog for querying file names in File Manager |
|
32 * |
|
33 * @lib FileManagerView.lib |
|
34 * @since S60 2.0 |
|
35 */ |
|
36 NONSHARABLE_CLASS(CFileManagerFileNameQueryDlg) : public CAknTextQueryDialog |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. |
|
42 * @param aOldName Old name of the file, this will be the default name |
|
43 * @param aNewName User entered new name of the file. |
|
44 * @param aEngine Reference to File Manager engine. |
|
45 * @return Newly created query dialog. |
|
46 */ |
|
47 static CFileManagerFileNameQueryDlg* NewL( |
|
48 const TDesC& aOldName, |
|
49 TDes& aNewName, |
|
50 CFileManagerEngine& aEngine ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CFileManagerFileNameQueryDlg(); |
|
56 |
|
57 private: // from CAknTextQueryDialog |
|
58 /** |
|
59 * @see CAknTextQueryDialog |
|
60 */ |
|
61 TBool OkToExitL( TInt aButtonId ); |
|
62 |
|
63 /** |
|
64 * @see CAknTextQueryDialog |
|
65 */ |
|
66 TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
67 |
|
68 private: |
|
69 /** |
|
70 * C++ default constructor. |
|
71 */ |
|
72 CFileManagerFileNameQueryDlg( |
|
73 TDes& aNewName, CFileManagerEngine& aEngine ); |
|
74 |
|
75 /** |
|
76 * Symbian OS 2nd phase constructor. |
|
77 * @param aOldName Old name of the file, this will be the default name |
|
78 */ |
|
79 void ConstructL( const TDesC& aOldName ); |
|
80 |
|
81 /** |
|
82 * Performs exit checking |
|
83 * @param aButtonId Button identifier |
|
84 */ |
|
85 TBool DoOkToExitL( TInt aButtonId ); |
|
86 |
|
87 private: // Data |
|
88 /// Ref: Reference to File Manager engine |
|
89 CFileManagerEngine& iEngine; |
|
90 /// Own: Old file name |
|
91 HBufC* iOldName; |
|
92 /// For blocking unwanted softkey events |
|
93 TBool iCallbackDisabled; |
|
94 }; |
|
95 |
|
96 #endif // CFILEMANAGERFILENAMEQUERYDLG_H |
|
97 |
|
98 // End of File |