2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 *@file: MfSubBaseFileManageForm.h
19 *@brief: This file contains SubBaseFileManageForm class, which is responsible for
20 *Operations like copy, move, delete.
23 #ifndef _MF_SUB_BASE_FILE_MANAGE_FORM_H_
24 #define _MF_SUB_BASE_FILE_MANAGE_FORM_H_
26 #include <FGraphics.h>
29 #include "MfBaseForm.h"
30 #include "MfBaseItemProvider.h"
31 #include "MfContentListItem.h"
32 #include "MfCustomListViewForPopup.h"
33 #include "MfFolderEntryDetailPresentationModel.h"
34 #include "MfFolderEntryEditorPresentationModel.h"
35 #include "MfFolderEntryPresentationModel.h"
36 #include "MfFolderNavigationPresentationModel.h"
37 #include "MfIFileEventNotification.h"
38 #include "MfMediaMetaData.h"
39 #include "MfMyFilesApp.h"
40 #include "MfThumbnailManager.h"
41 #include "MfThumbnailItemProviderAndListener.h"
43 #include "MfUtility.h"
45 class SubBaseFileManageForm
47 , public Tizen::Io::IFileEventListener
48 /* , public Tizen::Ui::Controls::IIconListViewItemEventListener
49 , public Tizen::Ui::Controls::IScrollEventListener*/
52 //!This is the constructor for the class
54 * @fn SubBaseFileManageForm(void)
55 * @param Takes no parameters
56 * @return No value returned
58 SubBaseFileManageForm(void);
60 //!This is the Destructor for the class
61 /*!@fn ~SubBaseFileManageForm(void)
62 * @param Takes no parameters
63 * @return No value returned
65 virtual ~SubBaseFileManageForm(void);
68 virtual void SubBaseOnActionPerformed(const Tizen::Ui::Control& source, int actionId);
69 virtual void SubBaseOnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
70 void SubBaseOnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView& iconListView, int index, Tizen::Ui::Controls::IconListViewItemStatus status);
71 void SubBaseOnNotificationReceived(Tizen::Base::Collection::ArrayList* pArgs);
72 void SubBaseOnThumbnailReceived(ThumbRequest* pThumbReq);
73 void OnAppControlCompleted(void);
74 void OnSettingValueChanged(void);
76 * A private member function taking and returning no arguments.
78 * Used to copy the items selected in the Edit view
79 * @param An integer value
80 * @return Void return type
85 * A private member function taking and returning no arguments.
86 * @fn CreateDeleteConfirmationPopUp()
87 * @brief Called OnContextItemStateChanged(), used to personalize the Delete Confirmation PopUp.
88 * @param No parameters taken.
89 * @return[result] An ErrorCode.
91 result CreateDeleteConfirmationPopUp(void);
94 * A private member function which creates the FileProcessingPopUp
95 * @fn CreateFileProgressingPopup(void)
96 * @brief It creates the FileProcessingPopUp
100 result CreateFileProgressingPopup(void);
103 * A private member function taking and returning no arguments.
104 * @fn CreateFooterItems
105 * @brief Called during OnInitializing(), gets the form Footer, intializes FooterItems and
106 * adds them to the footer of the form.
107 * @param No parameters
108 * @return Void return type
110 void CreateFooterControls(void);
112 void RemoveFooter(void);
114 * A private member function taking and returning no arguments.
115 * @fn CreateLabelControl
116 * Responsible for creating the label item in Edit form
117 * @param No parameters
118 * @return Void return type
120 void CreateLabelControl(void);
122 * A private member function taking and returning no arguments.
123 * @fn CreateShareContextMenu()
124 * @brief Called OnInitializing(), used to personalize the Context Menu for Sharing files.
125 * @param No parameters taken.
126 * @return[result] An ErrorCode.
128 result CreateShareContextMenu(void);
131 * A private member function taking and returning no arguments.
133 * Used to delete the items selected in the Edit view
134 * @param An integer value
135 * @return Void return type
137 void DeleteFile(void);
140 * A private member function which Hides the FileProcessingPopUp
141 * @fn HideFileProgressingPopup(void)
142 * @brief It HIdes the FileProcessingPopUp
146 void HideFileProgressingPopup(void);
149 * A private member function taking and returning no arguments.
150 * @fn LoadRenameForm(int index)
151 * @brief Called OnActionPerformed on the ContextItem, initializes the Rename form.
152 * @param [int] index, of the element from where the context item was clicked.
153 * @return Void return type
155 void LoadRenameForm(int index);
158 * A private member function taking and returning no arguments.
160 * Used to move the items selected in the Edit view
161 * @param No Parameters Take.
162 * @return Void return type
167 * A private member function taking and returning no arguments.
168 * @fn SetFooterVisibility
169 * Sets the Footer items in the footer
170 * @param No parameters
171 * @return Void return type
173 void SetFooterVisibility(int mode);
176 * A private member function taking and returning no arguments.
177 * @fn ShareFile(ShareVia shareType)
178 * Used to move the items selected in the Edit view
179 * @param [int] ShareVia An enum value indicating the ShareType.
180 * @return Void return type
182 void ShareFile(ShareVia shareType);
185 * A private member function which Show the FileProcessingPopUp
186 * @fn ShowFileProgressingPopup(void)
187 * @brief It Show the FileProcessingPopUp
191 void ShowFileProgressingPopup(void);
193 void SortArrayList(Tizen::Base::Collection::ArrayList* pArrList);
195 void ToggleFooter(void);
198 virtual void OnFileEventOccured(const unsigned long events,const Tizen::Base::String & path, const unsigned int eventId);
204 //ButtonPanel Controls
205 static const int IDA_BTN_DELETE = 101;
206 static const int IDA_BTN_SHARE = 102;
207 static const int IDA_BTN_MOVE = 103;
208 static const int IDA_BTN_COPY = 104;
209 static const int IDA_BTN_CANCEL = 105;
210 static const int IDA_BTN_CHECKED = 106;
211 static const int IDA_BTN_UNCHECKED = 107;
212 static const int IDA_BTN_SELECTED = 108;
213 static const int IDA_BTN_SHARE_MESSAGE = 109;
214 static const int IDA_BTN_SHARE_EMAIL = 110;
215 static const int IDA_BTN_SHARE_BLUETOOTH = 111;
216 static const int IDA_BTN_SHARE_WIFI_DIRECT = 112;
217 static const int IDA_BTN_MORE = 113;
219 static const int ID_ITEM_RENAME = 130;
220 static const int ID_ITEM_IMAGE = 107;
222 static const int IDA_BTN_POPUP_SHARE_CLOSE = 122;
223 static const int IDA_BTN_ANIMATION_POPUP_CANCEL = 136;
225 static const int IDA_CANCEL_DELETION = 203;
226 static const int IDA_DELETE_FILE = 204;
228 static FolderEntryPresentationModel* _pFolderEntryPM;
230 BaseItemProvider* _pBaseItemProvider;
231 CustomListViewForPopup* _pCustomListViewForPopup;
232 FolderEntryEditorPresentationModel* _pFileManager;
233 FolderEntryDetailPresentationModel _pMediaUtility;
234 MediaMetaData* _pMediaMetaData;
235 ThumbnailItemProviderAndListener* _pThumbnailItemProvider;
236 ThumbnailManager* _pThumbnailManager;
238 Tizen::Base::Collection::ArrayList* _pFilenames;
239 int _renameItemIndex;
241 int _fileProcessedCount;
243 Tizen::Base::String* _pStrItemSelectedCount;
244 Tizen::Base::String _currentDirectoryPath;
245 Tizen::Base::String _previousSceneId;
247 Tizen::Ui::Controls::Button* _pCancelDeletion;
248 Tizen::Ui::Controls::Button* _pDeleteFile;
249 Tizen::Ui::Controls::Button* _pFileProgressingCancelButton;
250 Tizen::Ui::Controls::ButtonItem _pCheckButtonSelectAll;
251 Tizen::Ui::Controls::ButtonItem _pButtonItemMore;
252 Tizen::Ui::Controls::ContextMenu* _pShareContextMenu;
253 Tizen::Ui::Controls::ContextMenu* _pMoreContextMenu;
254 Tizen::Ui::Controls::Footer* _pFooter;
255 Tizen::Ui::Controls::FooterItem* _pDelete;
256 Tizen::Ui::Controls::FooterItem* _pShare;
257 Tizen::Ui::Controls::IconListView* _pEditIconListView;
258 Tizen::Ui::Controls::Label* _pFileProgressingLabel;
259 Tizen::Ui::Controls::Label* _pFileProgressingHeaderLabel;
260 Tizen::Ui::Controls::Label* _pLabelNumberOfItems;
261 Tizen::Ui::Controls::ListView* _pEditListView;
262 Tizen::Ui::Controls::ListContextItem* _pItemContext;
263 Tizen::Ui::Controls::Popup* _pDeleteConfirmationPopUp;
264 Tizen::Ui::Controls::Popup* _pFileProgressingPopup;
265 Tizen::Ui::Controls::Progress* _pAnimationProgress;
266 Tizen::Io::FileEventManager* _pFileEventManager;
269 #endif //_MF_FILE_MANAGE_FORM_H_