|
1 /******************************************************************************* |
|
2 * Copyright (c) 2005, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - S60 implementation |
|
10 *******************************************************************************/ |
|
11 |
|
12 |
|
13 #ifndef SWTFILEDIALOG_H |
|
14 #define SWTFILEDIALOG_H |
|
15 |
|
16 |
|
17 #include "eswtwidgetscore.h" |
|
18 |
|
19 |
|
20 /** |
|
21 * CSwtFileDialog |
|
22 * @lib eswt |
|
23 */ |
|
24 NONSHARABLE_CLASS(CSwtFileDialog) |
|
25 : public CBase |
|
26 , public MSwtFileDialog |
|
27 { |
|
28 public: |
|
29 /** |
|
30 * Two phase constructor. |
|
31 * @param aInitPath full path of the file that will be selected by |
|
32 * default when the dialog opens. |
|
33 * @param aTitle title of the dialog. |
|
34 * @param aStyle Supported styles: KSwtStyleOpen or KSwtStyleSave. |
|
35 * @return CSwtFileDialog pointer |
|
36 */ |
|
37 static CSwtFileDialog* NewL(const TDesC& aInitPath, |
|
38 const TDesC& aTitle, TInt aStyle); |
|
39 |
|
40 protected: |
|
41 /** |
|
42 * Second phase constructor. |
|
43 * @param aInitPath initial path to the file that will be selected |
|
44 * by default when the dialog is opened. |
|
45 * @param aTitle title of the dialog. |
|
46 */ |
|
47 void ConstructL(const TDesC& aInitPath, const TDesC& aTitle); |
|
48 |
|
49 /** |
|
50 * First phase Constructor. |
|
51 * @param aStyle Supported styles: KSwtStyleOpen or KSwtStyleSave. |
|
52 */ |
|
53 CSwtFileDialog(TInt aStyle); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CSwtFileDialog(); |
|
59 |
|
60 // From MSwtFileDialog |
|
61 public: |
|
62 HBufC* OpenLD(); |
|
63 |
|
64 private: // Data |
|
65 /** |
|
66 * Path to the selected file. |
|
67 * Own |
|
68 */ |
|
69 HBufC* iPath; |
|
70 |
|
71 /** |
|
72 * The title of the file selection dialog. |
|
73 * Own |
|
74 */ |
|
75 HBufC* iTitle; |
|
76 |
|
77 /** |
|
78 * Supported styles: KSwtStyleOpen or KSwtStyleSave. |
|
79 */ |
|
80 TInt iStyle; |
|
81 }; |
|
82 |
|
83 #endif // SWTFILEDIALOG_H |