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 * Zhiqiang Yang <zhiqiang.yang@nokia.com> |
|
14 * |
|
15 * Description: |
|
16 * The header file of the file browse view of file manager |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef FMFILEVIEW_H |
|
21 #define FMFILEVIEW_H |
|
22 |
|
23 #include "fmcommon.h" |
|
24 #include "fmfilebrowsewidget.h" |
|
25 #include "fmviewbase.h" |
|
26 |
|
27 |
|
28 class HbLineEdit; |
|
29 class HbPushButton; |
|
30 class HbMenu; |
|
31 class FmOperationService; |
|
32 |
|
33 class FmFileView : public FmViewBase |
|
34 { |
|
35 Q_OBJECT |
|
36 public: |
|
37 FmFileView(); |
|
38 virtual ~FmFileView(); |
|
39 |
|
40 void setRootLevelPath( const QString &pathName ); |
|
41 void setFindDisabled( bool display ); |
|
42 |
|
43 public slots: |
|
44 void setRootPath( const QString &pathName ); |
|
45 |
|
46 // triggered when drive is ejected/inserted. connected by FmViewManager |
|
47 void on_driveChanged(); |
|
48 |
|
49 signals: |
|
50 // connected by viewmanager to close view |
|
51 void popViewAndShow(); |
|
52 |
|
53 private slots: |
|
54 |
|
55 void on_switchStyle_triggered(); |
|
56 void on_setSelectable_triggered(); |
|
57 void on_delete_triggered(); |
|
58 void on_copy_triggered(); |
|
59 void on_move_triggered(); |
|
60 void on_newFolder_triggered(); |
|
61 void on_upAction_triggered(); |
|
62 void on_leftAction_triggered(); |
|
63 void on_rightAction_triggered(); |
|
64 void on_sortNameAction_triggered(); |
|
65 void on_sortTimeAction_triggered(); |
|
66 void on_sortSizeAction_triggered(); |
|
67 void on_sortTypeAction_triggered(); |
|
68 |
|
69 void startSearch( const QString &targetPath, const QString &criteria ); |
|
70 void on_mainWidget_setEmptyMenu( bool isMenuEmpty ); |
|
71 void on_mainWidget_setTitle( const QString &title ); |
|
72 |
|
73 #ifdef FM_CHANGE_ORIENT_ENABLE |
|
74 void on_rotateAction_triggered(); |
|
75 #endif |
|
76 |
|
77 private: |
|
78 void initMenu(); |
|
79 void initMainWidget(); |
|
80 void initToolBar(); |
|
81 |
|
82 void setStyle( FmFileBrowseWidget::Style style ); |
|
83 void setSelectable( bool enable ); |
|
84 void infoNoFileSelected(); |
|
85 void removeToolBarAction(); |
|
86 |
|
87 /** |
|
88 * Create Default folder name while create folder. |
|
89 * |
|
90 * @param path Current path. |
|
91 * @return Default folder name for new folder. |
|
92 */ |
|
93 QString createDefaultFolderName( const QString &path ); |
|
94 |
|
95 private: |
|
96 FmFileBrowseWidget *mWidget; |
|
97 HbPushButton *mUpButton; |
|
98 //HbLineEdit *mLineEdit; |
|
99 HbAction *mStyleAction; |
|
100 HbAction *mSelectableAction; |
|
101 HbAction *mFindAction; |
|
102 QString rootLevelPath; |
|
103 |
|
104 FmOperationService *mOperationService; |
|
105 |
|
106 HbAction *mToolBarRightAction; |
|
107 HbMenu *mMenu; |
|
108 |
|
109 // store the disable state of find action. true for disabled |
|
110 bool mIsFindDisabled; |
|
111 }; |
|
112 |
|
113 #endif |
|
114 |
|