From c6b4867fdce930f4ec091bd39060a699e30b4338 Mon Sep 17 00:00:00 2001 From: Jinkun Jang Date: Wed, 13 Mar 2013 01:38:53 +0900 Subject: [PATCH] Tizen 2.1 base --- CMakeLists.txt | 32 + LICENSE.Flora | 206 +++ NOTICE | 3 + inc/GlAlbumEventListener.h | 37 + inc/GlAlbumInfo.h | 80 ++ inc/GlAlbumListEditorForm.h | 107 ++ inc/GlAlbumListForm.h | 91 ++ inc/GlAlbumListPresentationModel.h | 108 ++ inc/GlAlbumNameEditorForm.h | 76 + inc/GlAllListEditorPanel.h | 88 ++ inc/GlAllListPanel.h | 72 + inc/GlAllListSelectionPanel.h | 86 ++ inc/GlBaseForm.h | 31 + inc/GlBasePanel.h | 31 + inc/GlCommonUtil.h | 35 + inc/GlFileListEditorForm.h | 73 + inc/GlFileListForm.h | 61 + inc/GlFileListPresentationModel.h | 129 ++ inc/GlFormFactory.h | 38 + inc/GlGalleryApp.h | 72 + inc/GlImageListEditorPanel.h | 86 ++ inc/GlImageListPanel.h | 71 + inc/GlMainFrame.h | 39 + inc/GlPanelFactory.h | 38 + inc/GlResourceManager.h | 39 + inc/GlSettingIntervalForm.h | 89 ++ inc/GlSettingMainForm.h | 91 ++ inc/GlSettingPresentationModel.h | 62 + inc/GlSettingTransitionForm.h | 89 ++ inc/GlThumbnailEvent.h | 40 + inc/GlThumbnailEventArg.h | 41 + inc/GlThumbnailEventListener.h | 35 + inc/GlThumbnailInfo.h | 60 + inc/GlThumbnailJob.h | 53 + inc/GlThumbnailProvider.h | 72 + inc/GlTypes.h | 214 +++ inc/GlVideoListEditorPanel.h | 88 ++ inc/GlVideoListPanel.h | 74 + manifest.xml | 91 ++ packaging/apps.Gallery.spec | 61 + res/ara-AE.xml | 70 + res/aze-AZ.xml | 70 + res/bul-BG.xml | 70 + res/cat-ES.xml | 70 + res/ces-CZ.xml | 70 + res/dan-DK.xml | 70 + res/deu-DE.xml | 70 + res/ell-GR.xml | 70 + res/eng-GB.xml | 70 + res/eng-PH.xml | 70 + res/eng-US.xml | 70 + res/est-EE.xml | 70 + res/eus-ES.xml | 70 + res/fin-FI.xml | 70 + res/fra-CA.xml | 70 + res/fra-FR.xml | 70 + res/gle-IE.xml | 70 + res/glg-ES.xml | 70 + res/hin-IN.xml | 70 + res/hrv-HR.xml | 70 + res/hun-HU.xml | 70 + res/hye-AM.xml | 70 + res/isl-IS.xml | 70 + res/ita-IT.xml | 70 + res/jpn-JP.xml | 70 + res/kat-GE.xml | 70 + res/kaz-KZ.xml | 70 + res/kor-KR.xml | 70 + res/lav-LV.xml | 70 + res/lit-LT.xml | 70 + res/mkd-MK.xml | 70 + res/nld-NL.xml | 70 + res/nob-NO.xml | 70 + res/pol-PL.xml | 70 + res/por-BR.xml | 70 + res/por-PT.xml | 70 + res/ron-RO.xml | 70 + res/rus-RU.xml | 70 + res/screen-density-xhigh/T01_Nocontents_broken.png | Bin 0 -> 6301 bytes .../T01_Nocontents_picture.png | Bin 0 -> 7487 bytes res/screen-density-xhigh/T01_btn_play.png | Bin 0 -> 9395 bytes .../T01_button_circle_bg_normal.png | Bin 0 -> 5130 bytes .../T01_button_circle_bg_normal_press.png | Bin 0 -> 5141 bytes res/screen-density-xhigh/T01_button_rename.png | Bin 0 -> 3186 bytes res/screen-density-xhigh/T01_button_reveal.png | Bin 0 -> 3108 bytes .../T01_controlbar_icon_addtag.png | Bin 0 -> 3930 bytes .../T01_controlbar_icon_camera.png | Bin 0 -> 3903 bytes .../T01_controlbar_icon_delete.png | Bin 0 -> 3518 bytes .../T01_controlbar_icon_done.png | Bin 0 -> 3322 bytes .../T01_controlbar_icon_download.png | Bin 0 -> 3415 bytes .../T01_controlbar_icon_edit.png | Bin 0 -> 3305 bytes .../T01_controlbar_icon_more.png | Bin 0 -> 659 bytes .../T01_controlbar_icon_move.png | Bin 0 -> 3289 bytes .../T01_controlbar_icon_save.png | Bin 0 -> 3238 bytes .../T01_controlbar_icon_share02.png | Bin 0 -> 3637 bytes .../T01_controlbar_icon_slideshow.png | Bin 0 -> 3183 bytes res/screen-density-xhigh/T01_grid_select_check.png | Bin 0 -> 4247 bytes .../T01_icon_thumbnail_bookmark.png | Bin 0 -> 3807 bytes .../T01_icon_thumbnail_favorite.png | Bin 0 -> 3974 bytes res/screen-density-xhigh/T01_main_folder_bg.png | Bin 0 -> 4436 bytes .../T01_places_thumbnail_bg.png | Bin 0 -> 3330 bytes res/screen-size-normal/IDL_FORM.xml | 27 + res/slk-SK.xml | 70 + res/slv-SI.xml | 70 + res/spa-ES.xml | 70 + res/spa-MX.xml | 70 + res/srp-RS.xml | 70 + res/swe-SE.xml | 70 + res/tur-TR.xml | 70 + res/ukr-UA.xml | 70 + res/uzb-UZ.xml | 70 + res/zho-CN.xml | 70 + res/zho-HK.xml | 70 + res/zho-SG.xml | 70 + res/zho-TW.xml | 70 + shared/data/GalleryDefaultSettings.ini | 3 + shared/res/screen-density-xhigh/mainmenu.png | Bin 0 -> 24178 bytes shared/trusted/nofile.dummy | 0 src/GlAlbumInfo.cpp | 474 +++++++ src/GlAlbumListEditorForm.cpp | 843 +++++++++++ src/GlAlbumListForm.cpp | 571 ++++++++ src/GlAlbumListPresentationModel.cpp | 1348 ++++++++++++++++++ src/GlAlbumNameEditorForm.cpp | 395 ++++++ src/GlAllListEditorPanel.cpp | 788 +++++++++++ src/GlAllListPanel.cpp | 359 +++++ src/GlAllListSelectionPanel.cpp | 731 ++++++++++ src/GlCommonUtil.cpp | 57 + src/GlFileListEditorForm.cpp | 869 ++++++++++++ src/GlFileListForm.cpp | 285 ++++ src/GlFileListPresentationModel.cpp | 1497 ++++++++++++++++++++ src/GlFormFactory.cpp | 115 ++ src/GlGalleryApp.cpp | 245 ++++ src/GlGalleryEntry.cpp | 56 + src/GlImageListEditorPanel.cpp | 698 +++++++++ src/GlImageListPanel.cpp | 298 ++++ src/GlMainFrame.cpp | 111 ++ src/GlPanelFactory.cpp | 108 ++ src/GlResourceManager.cpp | 56 + src/GlSettingIntervalForm.cpp | 677 +++++++++ src/GlSettingMainForm.cpp | 816 +++++++++++ src/GlSettingPresentationModel.cpp | 303 ++++ src/GlSettingTransitionForm.cpp | 618 ++++++++ src/GlThumbnailEvent.cpp | 40 + src/GlThumbnailEventArg.cpp | 58 + src/GlThumbnailInfo.cpp | 127 ++ src/GlThumbnailJob.cpp | 64 + src/GlThumbnailProvider.cpp | 480 +++++++ src/GlTypes.cpp | 133 ++ src/GlVideoListEditorPanel.cpp | 832 +++++++++++ src/GlVideoListPanel.cpp | 322 +++++ 150 files changed, 20863 insertions(+) create mode 100755 CMakeLists.txt create mode 100644 LICENSE.Flora create mode 100644 NOTICE create mode 100644 inc/GlAlbumEventListener.h create mode 100644 inc/GlAlbumInfo.h create mode 100644 inc/GlAlbumListEditorForm.h create mode 100644 inc/GlAlbumListForm.h create mode 100644 inc/GlAlbumListPresentationModel.h create mode 100644 inc/GlAlbumNameEditorForm.h create mode 100644 inc/GlAllListEditorPanel.h create mode 100644 inc/GlAllListPanel.h create mode 100644 inc/GlAllListSelectionPanel.h create mode 100644 inc/GlBaseForm.h create mode 100644 inc/GlBasePanel.h create mode 100644 inc/GlCommonUtil.h create mode 100644 inc/GlFileListEditorForm.h create mode 100644 inc/GlFileListForm.h create mode 100644 inc/GlFileListPresentationModel.h create mode 100644 inc/GlFormFactory.h create mode 100644 inc/GlGalleryApp.h create mode 100644 inc/GlImageListEditorPanel.h create mode 100644 inc/GlImageListPanel.h create mode 100644 inc/GlMainFrame.h create mode 100644 inc/GlPanelFactory.h create mode 100644 inc/GlResourceManager.h create mode 100644 inc/GlSettingIntervalForm.h create mode 100644 inc/GlSettingMainForm.h create mode 100644 inc/GlSettingPresentationModel.h create mode 100644 inc/GlSettingTransitionForm.h create mode 100644 inc/GlThumbnailEvent.h create mode 100644 inc/GlThumbnailEventArg.h create mode 100644 inc/GlThumbnailEventListener.h create mode 100644 inc/GlThumbnailInfo.h create mode 100644 inc/GlThumbnailJob.h create mode 100644 inc/GlThumbnailProvider.h create mode 100644 inc/GlTypes.h create mode 100644 inc/GlVideoListEditorPanel.h create mode 100644 inc/GlVideoListPanel.h create mode 100644 manifest.xml create mode 100644 packaging/apps.Gallery.spec create mode 100644 res/ara-AE.xml create mode 100644 res/aze-AZ.xml create mode 100644 res/bul-BG.xml create mode 100644 res/cat-ES.xml create mode 100644 res/ces-CZ.xml create mode 100644 res/dan-DK.xml create mode 100644 res/deu-DE.xml create mode 100644 res/ell-GR.xml create mode 100644 res/eng-GB.xml create mode 100644 res/eng-PH.xml create mode 100644 res/eng-US.xml create mode 100644 res/est-EE.xml create mode 100644 res/eus-ES.xml create mode 100644 res/fin-FI.xml create mode 100644 res/fra-CA.xml create mode 100644 res/fra-FR.xml create mode 100644 res/gle-IE.xml create mode 100644 res/glg-ES.xml create mode 100644 res/hin-IN.xml create mode 100644 res/hrv-HR.xml create mode 100644 res/hun-HU.xml create mode 100644 res/hye-AM.xml create mode 100644 res/isl-IS.xml create mode 100644 res/ita-IT.xml create mode 100644 res/jpn-JP.xml create mode 100644 res/kat-GE.xml create mode 100644 res/kaz-KZ.xml create mode 100644 res/kor-KR.xml create mode 100644 res/lav-LV.xml create mode 100644 res/lit-LT.xml create mode 100644 res/mkd-MK.xml create mode 100644 res/nld-NL.xml create mode 100644 res/nob-NO.xml create mode 100644 res/pol-PL.xml create mode 100644 res/por-BR.xml create mode 100644 res/por-PT.xml create mode 100644 res/ron-RO.xml create mode 100644 res/rus-RU.xml create mode 100644 res/screen-density-xhigh/T01_Nocontents_broken.png create mode 100644 res/screen-density-xhigh/T01_Nocontents_picture.png create mode 100644 res/screen-density-xhigh/T01_btn_play.png create mode 100644 res/screen-density-xhigh/T01_button_circle_bg_normal.png create mode 100644 res/screen-density-xhigh/T01_button_circle_bg_normal_press.png create mode 100644 res/screen-density-xhigh/T01_button_rename.png create mode 100644 res/screen-density-xhigh/T01_button_reveal.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_addtag.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_camera.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_delete.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_done.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_download.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_edit.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_more.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_move.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_save.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_share02.png create mode 100644 res/screen-density-xhigh/T01_controlbar_icon_slideshow.png create mode 100644 res/screen-density-xhigh/T01_grid_select_check.png create mode 100644 res/screen-density-xhigh/T01_icon_thumbnail_bookmark.png create mode 100644 res/screen-density-xhigh/T01_icon_thumbnail_favorite.png create mode 100644 res/screen-density-xhigh/T01_main_folder_bg.png create mode 100644 res/screen-density-xhigh/T01_places_thumbnail_bg.png create mode 100644 res/screen-size-normal/IDL_FORM.xml create mode 100644 res/slk-SK.xml create mode 100644 res/slv-SI.xml create mode 100644 res/spa-ES.xml create mode 100644 res/spa-MX.xml create mode 100644 res/srp-RS.xml create mode 100644 res/swe-SE.xml create mode 100644 res/tur-TR.xml create mode 100644 res/ukr-UA.xml create mode 100644 res/uzb-UZ.xml create mode 100644 res/zho-CN.xml create mode 100644 res/zho-HK.xml create mode 100644 res/zho-SG.xml create mode 100644 res/zho-TW.xml create mode 100644 shared/data/GalleryDefaultSettings.ini create mode 100644 shared/res/screen-density-xhigh/mainmenu.png create mode 100644 shared/trusted/nofile.dummy create mode 100644 src/GlAlbumInfo.cpp create mode 100644 src/GlAlbumListEditorForm.cpp create mode 100644 src/GlAlbumListForm.cpp create mode 100644 src/GlAlbumListPresentationModel.cpp create mode 100644 src/GlAlbumNameEditorForm.cpp create mode 100644 src/GlAllListEditorPanel.cpp create mode 100644 src/GlAllListPanel.cpp create mode 100644 src/GlAllListSelectionPanel.cpp create mode 100644 src/GlCommonUtil.cpp create mode 100644 src/GlFileListEditorForm.cpp create mode 100644 src/GlFileListForm.cpp create mode 100644 src/GlFileListPresentationModel.cpp create mode 100644 src/GlFormFactory.cpp create mode 100644 src/GlGalleryApp.cpp create mode 100644 src/GlGalleryEntry.cpp create mode 100644 src/GlImageListEditorPanel.cpp create mode 100644 src/GlImageListPanel.cpp create mode 100644 src/GlMainFrame.cpp create mode 100644 src/GlPanelFactory.cpp create mode 100644 src/GlResourceManager.cpp create mode 100644 src/GlSettingIntervalForm.cpp create mode 100644 src/GlSettingMainForm.cpp create mode 100644 src/GlSettingPresentationModel.cpp create mode 100644 src/GlSettingTransitionForm.cpp create mode 100644 src/GlThumbnailEvent.cpp create mode 100644 src/GlThumbnailEventArg.cpp create mode 100644 src/GlThumbnailInfo.cpp create mode 100644 src/GlThumbnailJob.cpp create mode 100644 src/GlThumbnailProvider.cpp create mode 100644 src/GlTypes.cpp create mode 100644 src/GlVideoListEditorPanel.cpp create mode 100644 src/GlVideoListPanel.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..49be476 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,32 @@ +# Target name and PKGID +## TODO : set application name and ID +SET(this_target Gallery) +SET(PKGID ijudt7w61q) + +# include directory +INCLUDE_DIRECTORIES( + /usr/include/osp + inc + ) + +# Source files +FILE(GLOB ${this_target}_SOURCE_FILES src/*.cpp) + +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE") + +# Create executable +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") +ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES}) + +# Set link libraries and link options +## TODO : add more link libraries and options +TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp osp-appfw osp-uifw osp-media osp-image osp-content pthread) +TARGET_LINK_LIBRARIES(${this_target} -Xlinker --allow-shlib-undefined -pthread -pie) + +# Copy info, data, res, and icons directories +INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKGID}/bin) + +# Copy resource +INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKGID}/info) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKGID}) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKGID}) diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..9c95663 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.0, May, 2012 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Compatibility Definition Document +and passes the Compatibility Test Suite as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. + +You may add Your own attribution notices within Derivative Works +that You distribute, alongside or as an addendum to the NOTICE text +from the Work, provided that such additional attribution notices +cannot be construed as modifying the License. You may add Your own +copyright statement to Your modifications and may provide additional or +different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works +as a whole, provided Your use, reproduction, and distribution of +the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..9ec42be --- /dev/null +++ b/NOTICE @@ -0,0 +1,3 @@ +Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1. +Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions. \ No newline at end of file diff --git a/inc/GlAlbumEventListener.h b/inc/GlAlbumEventListener.h new file mode 100644 index 0000000..7b16a45 --- /dev/null +++ b/inc/GlAlbumEventListener.h @@ -0,0 +1,37 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumEventListener.h + * @brief This is the header file for AlbumEventListener class. + */ + +#ifndef _GL_ALBUM_EVENT_LISTENER_H_ +#define _GL_ALBUM_EVENT_LISTENER_H_ + +#include +#include + +class IAlbumEventListener + : public Tizen::Base::Object +{ +public: + virtual ~IAlbumEventListener(void) {}; + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType) = 0; + virtual void OnThumbnailDecoded(const int index) = 0; +}; + +#endif /* _GL_ALBUM_EVENT_LISTENER_H_ */ diff --git a/inc/GlAlbumInfo.h b/inc/GlAlbumInfo.h new file mode 100644 index 0000000..e4d1728 --- /dev/null +++ b/inc/GlAlbumInfo.h @@ -0,0 +1,80 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumInfo.h + * @brief This is the header file for AlbumInfo class. + */ + +#ifndef _GL_ALBUM_INFO_H_ +#define _GL_ALBUM_INFO_H_ + +#include +#include +#include +#include "GlTypes.h" + +class AlbumInfo + : public Tizen::Base::Object +{ +public: + AlbumInfo(void); + virtual ~AlbumInfo(void); + + result Construct(void); + result Construct(const Tizen::Base::String& albumName, Tizen::Content::ContentType contentType , + const Tizen::Base::Collection::IList& directoryList, + const Tizen::Base::Collection::IList& contentIdList); + result Construct(const AlbumInfo& albumInfo); + + Tizen::Base::String GetAlbumName(void) const; + void SetAlbumName(const Tizen::Base::String& albumName); + Tizen::Base::String GetDirectory(int index) const; + Tizen::Base::Collection::IList* GetDirectoryListN(void) const; + void ClearDirectoryList(void); + void AppendDirectory(const Tizen::Base::String& directoryPath); + void AppendDirectoryList(const Tizen::Base::Collection::ICollection& directoryList); + int GetDirectoryCount(void) const; + + void ClearAll(void); + AlbumInfoType GetAlbumInfoType(void); + + Tizen::Graphics::Bitmap* GetFolderThumnailBitmap(int index); + void AppendFolderThumnailBitmap(Tizen::Graphics::Bitmap* folderThumnailBitmap, int index); + int GetFolderThumnailBitmapCount(void) const; + + void ClearContentIdList(void); + Tizen::Base::Collection::IList* GetContentIdListN(void) const; + Tizen::Content::ContentId GetContentId(int index) const; + void AppendContentId(const Tizen::Content::ContentId& contentId); + void AppendContentIdList(const Tizen::Base::Collection::ICollection& contentIdList); + int GetContentIdCount(void) const; + result RemoveContentIdAt(int index); + int GetEmptyBitmapIndex(void); + + Tizen::Base::String GetCreateDateString(void) const; + void SetCreateDateString(Tizen::Base::String& strMinimumDate, Tizen::Base::String& strMaximumDate); + +protected : + Tizen::Base::String __albumName; + Tizen::Base::Collection::IList* __pDirectoryFullPathList; + Tizen::Base::Collection::IList* __pContentIdList; + Tizen::Base::String __createFileDateString; + int __folderThumnailBitmapCount; + Tizen::Graphics::Bitmap* __pFolderThumnailBitmap[7]; +}; + +#endif /* _GL_ALBUM_INFO_H_ */ diff --git a/inc/GlAlbumListEditorForm.h b/inc/GlAlbumListEditorForm.h new file mode 100644 index 0000000..2a2b710 --- /dev/null +++ b/inc/GlAlbumListEditorForm.h @@ -0,0 +1,107 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListEditorForm.h + * @brief This is the header file for AlbumListEditorForm class. + */ + +#ifndef _GL_ALBUM_LIST_EDITOR_FORM_H_ +#define _GL_ALBUM_LIST_EDITOR_FORM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBaseForm.h" + +class AlbumListPresentationModel; +class AlbumListEditorForm + : public BaseForm + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + AlbumListEditorForm(); + virtual ~AlbumListEditorForm(); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, int index, + Tizen::Ui::Controls::IconListViewItemStatus status); + virtual void OnIconListViewOverlayBitmapSelected (Tizen::Ui::Controls::IconListView &iconListView, int index, + int overlayBitmapId); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, + Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + +private: + result InitializeHeader(void); + result InitializeFooter(void); + result InitializeControl(void); + result InitializePopup(void); + result SetRenameButtonImage(void); + void CreateIconListView(void); + void SetAllCheckState(bool state); + + void OnRequestEmailAction(void); + result DeleteFolder(void); + int GetCheckedFolder(void); + result Update(void); + void SetFooterButtonsState(bool enableState); + void SetButtonState(void); + +private: + int __checkedCount; + Tizen::Ui::Controls::CheckButton* __pAllCheckButton; + Tizen::Ui::Controls::Label* __pSelectCountLabel; + + Tizen::Ui::Controls::IconListView* __pEditorFolderIconList; + Tizen::Ui::Controls::ContextMenu* __pShareContextMenu; + Tizen::Ui::Controls::Popup* __pDeletePopup; + + Tizen::Graphics::Bitmap* __pEditFolderBitmap; + AlbumListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALBUM_LIST_EDITOR_FORM_H_ */ diff --git a/inc/GlAlbumListForm.h b/inc/GlAlbumListForm.h new file mode 100644 index 0000000..134d19f --- /dev/null +++ b/inc/GlAlbumListForm.h @@ -0,0 +1,91 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListForm.h + * @brief This is the header file for AlbumListForm class. + */ + +#ifndef _GL_ALBUM_LIST_FORM_H_ +#define _GL_ALBUM_LIST_FORM_H_ + +#include +#include +#include +#include +#include +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBaseForm.h" + +class AlbumListPresentationModel; +class AlbumListForm + : public BaseForm + , public Tizen::Base::Runtime::ITimerEventListener + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + AlbumListForm(void); + virtual ~AlbumListForm(void); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, + int index, Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + +private: + result InitializeHeader(void); + result InitializeFooter(void); + void CreateIconListView(void); + result Update(void); + +private: + Tizen::Ui::Controls::IconListView* __pAlbumViewIconList; + Tizen::Ui::Controls::ContextMenu* __pContextMenuMore; + int __itemCount; + Tizen::Base::Runtime::Timer* __pTimer; + AlbumListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALBUM_LIST_FORM_H_ */ diff --git a/inc/GlAlbumListPresentationModel.h b/inc/GlAlbumListPresentationModel.h new file mode 100644 index 0000000..2d00eee --- /dev/null +++ b/inc/GlAlbumListPresentationModel.h @@ -0,0 +1,108 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListPresentationModel.h + * @brief This is the header file for AlbumListPresentationModel class. + */ + +#ifndef _GL_ALBUM_LIST_PRESENTATION_MODEL_H_ +#define _GL_ALBUM_LIST_PRESENTATION_MODEL_H_ + +#include +#include +#include +#include +#include +#include +#include "GlAlbumEventListener.h" +#include "GlResourceManager.h" +#include "GlThumbnailEventListener.h" +#include "GlThumbnailProvider.h" +#include "GlTypes.h" + +class AlbumInfo; + +class AlbumListPresentationModel + : public Tizen::Base::Object + , public IThumbnailEventListener +{ +public: + static AlbumListPresentationModel* GetInstance(void); + +public: + result AddPresentationModelListener(IAlbumEventListener* listener); + result RemovePresentationModelListener(IAlbumEventListener& listner); + + void RequestThumbnail(const int folderIndex, int pathIndex); + void CancelThumbnailRequest(const int folderIndex); + void ClearThumbnailRequests(bool appTerminating = false); + result StartAppControl( const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, + const Tizen::Base::Collection::IMap* pDataList, Tizen::App::IAppControlResponseListener* pListener); + + void InitializeAlbumInfoList(const Tizen::Content::ContentType& contentType); + result DeleteContentInfoInDirectory(int index, Tizen::Content::ContentType contentType); + void CallAlbumChangedEvent(void); + int GetFolderCount(void); + + Tizen::Graphics::Bitmap* CreateMergeBitmapN(int index); + Tizen::Base::Collection::IList* GetAlbumInfoList(void); + + AppControlMode GetAppControlMode(void) const; + AppControlMediaType GetAppControlMediaType(void) const; + AppControlSelectionMode GetAppControlSelectionMode(void) const; + + virtual void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg); + +private: + AlbumListPresentationModel(void); + virtual ~AlbumListPresentationModel(void); + AlbumListPresentationModel(const AlbumListPresentationModel&); + const AlbumListPresentationModel& operator = (const AlbumListPresentationModel&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + void DrawPartialImage(Tizen::Graphics::Canvas& canvas, AlbumInfo* pAlbumInfo, int partialIndex, + const Tizen::Graphics::Rectangle& rectNew); + void DrawFontImage(Tizen::Graphics::Canvas& canvas, AlbumInfo* pAlbumInfo, int index); + + bool GetMinMaxDateTimeString(Tizen::Base::Collection::IList* pContentIdList, Tizen::Base::String& MinimumTime, + Tizen::Base::String& MaximumTime); + + Tizen::Base::String GetDirectoryName(Tizen::Base::String& directoryPath); + Tizen::Base::Collection::IList* GetContentIdListInDirectoryN(const Tizen::Base::String& directoryPath, + Tizen::Content::ContentType contentType) const; + Tizen::Base::String GetDirectoryNameFromFullPath(const Tizen::Base::String& fullPath) const; + +private: + static AlbumListPresentationModel* __pPresentationModelInstance; + static ThumbnailProvider* __pThumbnailProvider; + + Tizen::Graphics::Bitmap* __pFolderBackgroundBitmap; + static ThumbnailEvent* __pThumbnailEvent; + + static Tizen::Base::Collection::ArrayList* __pPresentationModelListener; + + static Tizen::Base::Collection::IList* __pAlbumInfoList; + + AppControlMode __appControlMode; + AppControlMediaType __appControlMediaType; + AppControlSelectionMode __appControlSelectionMode; +}; + +#endif /* _GL_ALBUM_LIST_PRESENTATION_MODEL_H_ */ diff --git a/inc/GlAlbumNameEditorForm.h b/inc/GlAlbumNameEditorForm.h new file mode 100644 index 0000000..0754f12 --- /dev/null +++ b/inc/GlAlbumNameEditorForm.h @@ -0,0 +1,76 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumNameEditorForm.h + * @brief This is the header file for AlbumNameEditorForm class. + */ + +#ifndef _GL_ALBUM_NAME_EDITOR_FORM_H_ +#define _GL_ALBUM_NAME_EDITOR_FORM_H_ + +#include +#include +#include +#include +#include +#include "GlTypes.h" + +class AlbumListPresentationModel; +class AlbumNameEditorForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::IOrientationEventListener + , public Tizen::Ui::ITextEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + AlbumNameEditorForm(); + virtual ~AlbumNameEditorForm(); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + virtual void OnOrientationChanged(const Tizen::Ui::Control &source, + Tizen::Ui::OrientationStatus orientationStatus); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnTextValueChanged(const Tizen::Ui::Control& source); + virtual void OnTextValueChangeCanceled(const Tizen::Ui::Control& source); + +private: + Tizen::Ui::Controls::EditField* __pNameEditField; + Tizen::Base::String __nameEditFieldText; + Tizen::Base::String __nameEditFieldPreText; + Tizen::Base::String __nameEditFieldTempText; + int __folderIndex; + AlbumNameEditorMode __albumNameEditorMode; + Tizen::Ui::Scenes::SceneId __callerSceneId; + Tizen::Ui::Scenes::SceneId __previousSceneId; + Tizen::Ui::Controls::MessageBox* __pMessageBox; + AlbumListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALBUM_NAME_EDITOR_FORM_H_ */ diff --git a/inc/GlAllListEditorPanel.h b/inc/GlAllListEditorPanel.h new file mode 100644 index 0000000..ba17fc2 --- /dev/null +++ b/inc/GlAllListEditorPanel.h @@ -0,0 +1,88 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListEditorPanel.h + * @brief This is the header file for AllListEditorPanel class. + */ + +#ifndef _GL_ALL_LIST_EDITOR_PANEL_H_ +#define _GL_ALL_LIST_EDITOR_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlThumbnailEventListener.h" +#include "GlBasePanel.h" + +class FileListPresentationModel; + +class AllListEditorPanel + : public BasePanel + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + AllListEditorPanel(void); + virtual ~AllListEditorPanel(void); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, + int index, Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + + result OnRequestDeleteAction(void); + result OnRequestEmailAction(void); + result OnRequestMoveToAction(Tizen::Base::String& destDirectory); + result OnRequestSlideShowAction(void); + int GetItemCheckedCount(void) const; + +private: + Tizen::Base::Collection::IList* GetItemCheckedIndexListN(void) const; + void ResetSelection(void); + void SetButtonState(void); + +private: + Tizen::Ui::Controls::IconListView* __pContentIconListView; + Tizen::Ui::Controls::CheckButton* __pCheckButton; + Tizen::Ui::Controls::Label* __pLabelSelectCnt; + Tizen::Ui::Controls::Button* __pButtonSelectRegion; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALL_LIST_EDITOR_PANEL_H_ */ diff --git a/inc/GlAllListPanel.h b/inc/GlAllListPanel.h new file mode 100644 index 0000000..83d1606 --- /dev/null +++ b/inc/GlAllListPanel.h @@ -0,0 +1,72 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListPanel.h + * @brief This is the header file for AllListPanel class. + */ + +#ifndef _GL_ALL_LIST_PANEL_H_ +#define _GL_ALL_LIST_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class AllListPanel + : public BasePanel + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + AllListPanel(); + virtual ~AllListPanel(); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, + int index, Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + + void Refresh(void); + +private: + Tizen::Ui::Controls::IconListView* __pContentIconListView; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALL_LIST_PANEL_H_ */ diff --git a/inc/GlAllListSelectionPanel.h b/inc/GlAllListSelectionPanel.h new file mode 100644 index 0000000..eebedfc --- /dev/null +++ b/inc/GlAllListSelectionPanel.h @@ -0,0 +1,86 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListSelectionPanel.h + * @brief This is the header file for AllListSelectionPanel class. + */ + +#ifndef _GL_ALL_LIST_SELECTION_PANEL_H_ +#define _GL_ALL_LIST_SELECTION_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class AllListSelectionPanel + : public BasePanel + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + AllListSelectionPanel(void); + virtual ~AllListSelectionPanel(void); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, + int index, Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + + result OnRequestDeleteAction(void); + result OnRequestEmailAction(void); + result OnRequestMoveToAction(Tizen::Base::String& destDirectory); + result OnRequestSlideShowAction(void); + + int GetItemCheckedCount(void) const; + Tizen::Base::Collection::IList* GetItemCheckedIndexListN(void); + +private: + int GetRealindexFromVirtualIndex(int virtualIndex); + int GetVirtualIndexFromRealIndex(int realIndex); + void ResetSelection(void); + void SetButtonState(void); + +private: + Tizen::Ui::Controls::IconListView* __pContentIconListView; + Tizen::Base::Collection::IList* __pSeletedIndexList; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_ALL_LIST_SELECTION_PANEL_H_ */ diff --git a/inc/GlBaseForm.h b/inc/GlBaseForm.h new file mode 100644 index 0000000..bf1e199 --- /dev/null +++ b/inc/GlBaseForm.h @@ -0,0 +1,31 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#ifndef _GL_BASE_FORM_H_ +#define _GL_BASE_FORM_H_ + +class BaseForm + : public Tizen::Ui::Controls::Form +{ +public: + virtual ~BaseForm(void){}; + virtual void OnUpdateContentList(void){}; +}; + + +#endif /* _GL_BASE_FORM_H_ */ diff --git a/inc/GlBasePanel.h b/inc/GlBasePanel.h new file mode 100644 index 0000000..68ab318 --- /dev/null +++ b/inc/GlBasePanel.h @@ -0,0 +1,31 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#ifndef _MP_BASE_PANEL_H_ +#define _MP_BASE_PANEL_H_ + +class BasePanel + : public Tizen::Ui::Controls::Panel +{ +public: + virtual ~BasePanel(void){}; + virtual void OnUpdateContentList(void) = 0; +}; + + +#endif /* _MP_BASE_PANEL_H_ */ diff --git a/inc/GlCommonUtil.h b/inc/GlCommonUtil.h new file mode 100644 index 0000000..d597576 --- /dev/null +++ b/inc/GlCommonUtil.h @@ -0,0 +1,35 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlCommonUtil.h + * @brief This is the header file for CommonUtil class. + */ + +#ifndef _GL_COMMON_UTIL_H_ +#define _GL_COMMON_UTIL_H_ + +#include +#include + +class CommonUtil +{ +public: + static Tizen::Graphics::Bitmap* GetEmptyThumbnailN(void); + static Tizen::Base::String DurationToTimeString(long duration); +}; + +#endif /* _GL_COMMON_UTIL_H_ */ diff --git a/inc/GlFileListEditorForm.h b/inc/GlFileListEditorForm.h new file mode 100644 index 0000000..0ccbe90 --- /dev/null +++ b/inc/GlFileListEditorForm.h @@ -0,0 +1,73 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListEditorForm.h + * @brief This is the header file for FileListEditorForm class. + */ + +#ifndef _GL_FILE_LIST_EDITOR_FORM_H_ +#define _GL_FILE_LIST_EDITOR_FORM_H_ + +#include +#include +#include +#include +#include "GlBaseForm.h" + +class FileListPresentationModel; + +class FileListEditorForm + : public BaseForm + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IFormBackEventListener +{ +public: + FileListEditorForm(void); + virtual ~FileListEditorForm(void); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + void SetTitleText(const Tizen::Base::String& titleText); + void RefreshFolderList(void); + void SetFooterButtonsState(bool enableState); + result MoveToAlbum(Tizen::Base::String& destDirectory); + +private: + result InitializeFooter(void); + Tizen::Base::String GetDirecotyNameFromFullPath(const Tizen::Base::String& fullPath)const; + result SetUpPopup(void); + +private: + Tizen::Ui::Controls::ContextMenu* __pContextMenuMore; + Tizen::Ui::Controls::ContextMenu* __pContextMenuShare; + Tizen::Ui::Controls::ContextMenu* __pContextEditorMenuMove; + Tizen::Ui::Controls::ContextMenu* __pContextSelectionMenuMove; + Tizen::Ui::Controls::Popup* __pDeletePopup; + Tizen::Graphics::Point __morePosition; + Tizen::Base::Collection::IList* __pContentDirectoryList; + Tizen::Base::Collection::IList* __pContentDirectoryNameList; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_FILE_LIST_EDITOR_FORM_H_ */ diff --git a/inc/GlFileListForm.h b/inc/GlFileListForm.h new file mode 100644 index 0000000..e40e06b --- /dev/null +++ b/inc/GlFileListForm.h @@ -0,0 +1,61 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListForm.h + * @brief This is the header file for FileListForm class. + */ + +#ifndef _GL_FILE_LIST_FORM_H_ +#define _GL_FILE_LIST_FORM_H_ + +#include +#include +#include +#include +#include "GlBaseForm.h" + +class FileListPresentationModel; + +class FileListForm + : public BaseForm + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IFormBackEventListener +{ +public: + FileListForm(void); + virtual ~FileListForm(void); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + void SetTitleText(const Tizen::Base::String& titleText); + +private: + result InitializeFooter(void); + +private: + Tizen::Ui::Controls::ContextMenu* __pContextMenuMore; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_FILE_LIST_FORM_H_ */ diff --git a/inc/GlFileListPresentationModel.h b/inc/GlFileListPresentationModel.h new file mode 100644 index 0000000..68f6337 --- /dev/null +++ b/inc/GlFileListPresentationModel.h @@ -0,0 +1,129 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListPresentationModel.h + * @brief This is the header file for FileListPresentationModel class. + */ + +#ifndef _GL_FILE_LIST_PRESENTATION_MODEL_H_ +#define _GL_FILE_LIST_PRESENTATION_MODEL_H_ + +#include +#include +#include +#include +#include +#include "GlAlbumEventListener.h" +#include "GlResourceManager.h" +#include "GlThumbnailEventListener.h" +#include "GlTypes.h" + +class ThumbnailProvider; +class ThumbnailInfo; +class ThumbnailEvent; + +class FileListPresentationModel + : public Tizen::Base::Object + , public IThumbnailEventListener +{ +public: + static FileListPresentationModel* GetInstance(void); + +public: + result GetThumbnailInSyncCacheN(const int index, Tizen::Base::String*& pName, + Tizen::Graphics::Bitmap*& pThumbnail); + result GetThumbnailVideoInSyncCacheN(const int index, Tizen::Base::String*& pName, + Tizen::Graphics::Bitmap*& pThumbnail, Tizen::Base::String*& pDuration); + void RequestThumbnail(const int index); + void CancelThumbnailRequest(const int index); + void ClearThumbnailRequests(bool appTerminating = false); + + static void AddPresentationModelListener(const IAlbumEventListener* listener); + static void RemovePresentationModelListener(const IAlbumEventListener& listener); + + result DeleteContentFileList(const Tizen::Base::Collection::IList& contentIndexList); + Tizen::Base::Collection::IList* GetCollisionIndexListN(const Tizen::Base::Collection::IList& contentIndexList, + const Tizen::Base::String& destDirectory); + result MoveToContentFileList(const Tizen::Base::Collection::IList& contentIndexList, + const Tizen::Base::String& destDirectory); + result StartAppControl( const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, + const Tizen::Base::Collection::IMap* pDataList, Tizen::App::IAppControlResponseListener* pListener); + result SetCurrentAlbumInfo(const Tizen::Base::String& albumName, + const Tizen::Base::Collection::IList& directoryList); + result RefreshCurrentAlbumContentInfoList(Tizen::Content::ContentType contentType); + Tizen::Base::String GetCurrentAlbumName(void); + void SetCurrentAlbumName(Tizen::Base::String& albumName); + Tizen::Content::ContentType GetCurrentAlbumContentType(void); + void SetCurrentAlbumContentType(Tizen::Content::ContentType contentType); + Tizen::Base::Collection::IList* GetAlbumDirectoryListN(void); + Tizen::Base::Collection::IList* GetAlbumContentInfoList(void); + Tizen::Content::ContentInfo* GetContentInfo(int index); + int GetCurrentAlbumContentInfoCount(void); + Tizen::Content::ContentId GetContentInfoIndex(int index); + Tizen::Base::String GetContentFilePath(int index); + Tizen::Base::String ConvertToAlbumName(const Tizen::Base::String& targetPath)const; + + AppControlMode GetAppControlMode(void) const; + AppControlMediaType GetAppControlMediaType(void) const; + AppControlSelectionMode GetAppControlSelectionMode(void) const; + +private: + FileListPresentationModel(void); + virtual ~FileListPresentationModel(void); + FileListPresentationModel(FileListPresentationModel& value); + FileListPresentationModel& operator=(FileListPresentationModel&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + result RefreshContentInfoList(Tizen::Content::ContentType contentType); + Tizen::Base::String GetFileNameFromFullPath(const Tizen::Base::String& fullPath, bool withExt) const; + Tizen::Base::String GetDirecotyNameFromFullPath(const Tizen::Base::String& fullPath)const; + bool IsContainContentInDirectory(const Tizen::Base::String& directoryPath, + Tizen::Content::ContentType contentType) const; + ThumbnailInfo* GetThumbnailInfoFromInternalBufferN(const Tizen::Content::ContentId& contentId) const; + Tizen::Graphics::Bitmap* CoverVideoOverlayedImageOnThumbnailN(Tizen::Graphics::Bitmap& thumbnail, + const ThumbnailInfo& thumbmailInfo); + result DeleteContentFile(const Tizen::Content::ContentId& contentId); + result MoveToContentFile(const Tizen::Content::ContentId& contentId, + const Tizen::Base::String& destDirectory); + Tizen::Graphics::Bitmap* GetShadedBackgroundBitmapN(Tizen::Graphics::Bitmap& bgBitmap, + const Tizen::Graphics::Bitmap& orgBitmap, const Tizen::Graphics::Rectangle& orgBitmapPosition); + Tizen::Base::Collection::IList* GetContentInfoListInDirectoryListN( + const Tizen::Base::Collection::IList& contentDirectoryList, + Tizen::Content::ContentType contentType)const; + + virtual void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg); + +private: + static FileListPresentationModel* __pPresentationModelInstance; + static ThumbnailProvider* __pThumbnailProvider; + static ThumbnailEvent* __pThumbnailEvent; + static Tizen::Base::Collection::ArrayList* __pPresentationModelListener; + static Tizen::Base::Collection::ArrayList* __pIconListViewCache; + static Tizen::Base::Collection::IList* __pDirectoryList; + static Tizen::Base::Collection::IList* __pContentInfoList; + + Tizen::Base::String __albumName; + Tizen::Content::ContentType __albumContentType; + AppControlMode __appControlMode; + AppControlMediaType __appControlMediaType; + AppControlSelectionMode __appControlSelectionMode; +}; + +#endif /* _GL_FILE_LIST_PRESENTATION_MODEL_H_ */ diff --git a/inc/GlFormFactory.h b/inc/GlFormFactory.h new file mode 100644 index 0000000..64b703a --- /dev/null +++ b/inc/GlFormFactory.h @@ -0,0 +1,38 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFormFactory.h + * @brief This is the header file for FormFactory class. + */ + +#ifndef _GL_FORM_FACTORY_H_ +#define _GL_FORM_FACTORY_H_ + +#include + +class FormFactory + : public Tizen::Ui::Scenes::IFormFactory +{ +public: + FormFactory(void); + virtual ~FormFactory(void); + + virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, + const Tizen::Ui::Scenes::SceneId& sceneId); +}; + +#endif /* _GL_FORM_FACTORY_H_ */ diff --git a/inc/GlGalleryApp.h b/inc/GlGalleryApp.h new file mode 100644 index 0000000..ac4ec70 --- /dev/null +++ b/inc/GlGalleryApp.h @@ -0,0 +1,72 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlGalleryApp.h + * @brief This is the header file for GalleryApp class. + */ + +#ifndef _GL_GALLERY_APP_H_ +#define _GL_GALLERY_APP_H_ + +#include +#include +#include +#include +#include "GlTypes.h" + +class AlbumListPresentationModel; +class FileListPresentationModel; + +class GalleryApp + : public Tizen::App::UiApp + , public Tizen::App::IAppControlProviderEventListener + , public Tizen::System::ISettingEventListener +{ +public: + static Tizen::App::UiApp* CreateInstance(void); + +public: + GalleryApp(void); + virtual ~GalleryApp(void); + + Tizen::Base::String GetAppControlOperationId(void) const; + Tizen::Base::String GetUriData(void) const; + const Tizen::Base::Collection::IMap* GetAppControlArguments(void) const; + void SendAppControlResult(Tizen::App::AppCtrlResult appControlResult, + Tizen::Base::Collection::IMap* pExtraData); + + virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry); + virtual bool OnAppInitialized(void); + virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false); + virtual void OnForeground(void); + + virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, + const Tizen::Base::String* pUriScheme, const Tizen::Base::String* pDataType, + const Tizen::Base::Collection::IMap* pArgs); + virtual void OnSettingChanged(Tizen::Base::String& key); + + void SetFrameEnabled(bool enabled); + +private: + RequestId __requestId; + Tizen::Base::String __operationId; + Tizen::Base::String __uriData; + const Tizen::Base::Collection::HashMap* __pArguments; + Tizen::App::AppCtrlResult __appControlResult; +}; + +#endif /* _GL_GALLERY_APP_H_ */ diff --git a/inc/GlImageListEditorPanel.h b/inc/GlImageListEditorPanel.h new file mode 100644 index 0000000..ba157ec --- /dev/null +++ b/inc/GlImageListEditorPanel.h @@ -0,0 +1,86 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlImageListEditorPanel.h + * @brief This is the header file for ImageListEditorPanel class. + */ + +#ifndef _GL_IMAGE_LIST_EDITOR_PANEL_H_ +#define _GL_IMAGE_LIST_EDITOR_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class ImageListEditorPanel + : public BasePanel + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + ImageListEditorPanel(void); + virtual ~ImageListEditorPanel(void); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, int index, + Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + + void OnRequestDeleteAction(void); + void OnRequestEmailAction(void); + void OnRequestMoveToAction(Tizen::Base::String& destDirectory); + void OnRequestAppExitWithMultipleSelectionAppControlResult(void); + + int GetItemCheckedCount(void) const; + +private: + Tizen::Base::Collection::IList* GetItemCheckedIndexList(void) const; + +private: + Tizen::Ui::Controls::IconListView* __pContentIconListView; + Tizen::Ui::Controls::CheckButton* __pCheckButton; + Tizen::Ui::Controls::Label* __pLabelSelectCnt; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_IMAGE_LIST_EDITOR_PANEL_H_ */ diff --git a/inc/GlImageListPanel.h b/inc/GlImageListPanel.h new file mode 100644 index 0000000..74eb8c5 --- /dev/null +++ b/inc/GlImageListPanel.h @@ -0,0 +1,71 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlImageListPanel.h + * @brief This is the header file for ImageListPanel class. + */ + +#ifndef _GL_IMAGE_LIST_PANEL_H_ +#define _GL_IMAGE_LIST_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class ImageListPanel + : public BasePanel + , public Tizen::Ui::Controls::IIconListViewItemEventListener + , public Tizen::Ui::Controls::IIconListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + ImageListPanel(); + virtual ~ImageListPanel(); + + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnIconListViewItemStateChanged (Tizen::Ui::Controls::IconListView &view, int index, + Tizen::Ui::Controls::IconListViewItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + +private: + Tizen::Ui::Controls::IconListView* __pContentIconListView; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_IMAGE_LIST_PANEL_H_ */ diff --git a/inc/GlMainFrame.h b/inc/GlMainFrame.h new file mode 100644 index 0000000..41e0b40 --- /dev/null +++ b/inc/GlMainFrame.h @@ -0,0 +1,39 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlMainFrame.h + * @brief This is the header file for MainFrame class. + */ + +#ifndef _GL_MAIN_FRAME_H_ +#define _GL_MAIN_FRAME_H_ + +#include +#include + +class MainFrame + : public Tizen::Ui::Controls::Frame +{ +public: + MainFrame(void); + virtual ~MainFrame(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); +}; + +#endif /* _GL_MAIN_FRAME_H_ */ diff --git a/inc/GlPanelFactory.h b/inc/GlPanelFactory.h new file mode 100644 index 0000000..c5c5b5d --- /dev/null +++ b/inc/GlPanelFactory.h @@ -0,0 +1,38 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlPanelFactory.h + * @brief This is the header file for PanelFactory class. + */ + +#ifndef _GL_PANEL_FACTORY_H_ +#define _GL_PANEL_FACTORY_H_ + +#include + +class PanelFactory + : public Tizen::Ui::Scenes::IPanelFactory +{ +public: + PanelFactory(void); + virtual ~PanelFactory(void); + + virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, + const Tizen::Ui::Scenes::SceneId& sceneId); +}; + +#endif /* _GL_PANEL_FACTORY_H_ */ diff --git a/inc/GlResourceManager.h b/inc/GlResourceManager.h new file mode 100644 index 0000000..c5fe036 --- /dev/null +++ b/inc/GlResourceManager.h @@ -0,0 +1,39 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlResourceManager.h + * @brief This is the header file for ResourceManager class. + */ + +#ifndef _GL_RESOURCE_MANAGER_H_ +#define _GL_RESOURCE_MANAGER_H_ + +#include +#include + +class ResourceManager +{ +public: + static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& id); + static Tizen::Base::String GetString(const Tizen::Base::String& id); + +private: + ResourceManager(void); + virtual ~ResourceManager(void); +}; + +#endif /* _GL_RESOURCE_MANAGER_H_ */ diff --git a/inc/GlSettingIntervalForm.h b/inc/GlSettingIntervalForm.h new file mode 100644 index 0000000..e7ea5d5 --- /dev/null +++ b/inc/GlSettingIntervalForm.h @@ -0,0 +1,89 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingIntervalForm.h + * @brief This is the header file for SettingIntervalForm class. + */ + +#ifndef _GL_SETTING_INTERVAL_FORM_H_ +#define _GL_SETTING_INTERVAL_FORM_H_ + +#include +#include +#include +#include + +class SettingPresentationModel; + +class SettingIntervalForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IGroupedTableViewItemProvider + , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + SettingIntervalForm(void); + virtual ~SettingIntervalForm(void); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual int GetDefaultGroupItemHeight(void); + virtual int GetDefaultItemHeight(void); + + virtual void OnGroupedTableViewContextItemActivationStateChanged( + Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +private: + result InitializeFooter(void); + int GetFontSize(void); + void ItemTypeIconAndOneLine(Tizen::Graphics::Rectangle& icon, Tizen::Graphics::Rectangle& main); + void UpdateTableViewRedioButtonState(int senderIndex = -1); + +private: + Tizen::Ui::Controls::GroupedTableView* __pTableView; + SettingPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_SETTING_INTERVAL_FORM_H_ */ diff --git a/inc/GlSettingMainForm.h b/inc/GlSettingMainForm.h new file mode 100644 index 0000000..cb51836 --- /dev/null +++ b/inc/GlSettingMainForm.h @@ -0,0 +1,91 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingMainForm.h + * @brief This is the header file for SettingMainForm class. + */ + +#ifndef _GL_SETTING_MAIN_FORM_H_ +#define _GL_SETTING_MAIN_FORM_H_ + +#include +#include +#include +#include + +class SettingPresentationModel; + +class SettingMainForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener + , public Tizen::Ui::Controls::IGroupedTableViewItemProvider + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + SettingMainForm(void); + virtual ~SettingMainForm(void); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual int GetDefaultGroupItemHeight(void); + virtual int GetDefaultItemHeight(void); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + + virtual void OnGroupedTableViewContextItemActivationStateChanged( + Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +private: + result InitializeFooter(void); + int GetFontSize(void); + void ItemTypeIconAndOneLine(Tizen::Graphics::Rectangle& icon, Tizen::Graphics::Rectangle& main); + int GetSettingInfoItemStatus(int settingIndex); + void ItemTypeTwoLine(Tizen::Graphics::Rectangle& main, Tizen::Graphics::Rectangle& sub, int fontSize); + void UpdateTableViewCheckButtonState(void); + +private: + Tizen::Ui::Controls::GroupedTableView* __pTableView; + SettingPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_SETTING_MAIN_FORM_H_ */ diff --git a/inc/GlSettingPresentationModel.h b/inc/GlSettingPresentationModel.h new file mode 100644 index 0000000..fd4451e --- /dev/null +++ b/inc/GlSettingPresentationModel.h @@ -0,0 +1,62 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingPresentationModel.h + * @brief This is the header file for SettingPresentationModel class. + */ + +#ifndef _GL_SETTING_PRESENTATION_MODEL_H_ +#define _GL_SETTING_PRESENTATION_MODEL_H_ + +#include +#include + +class SettingPresentationModel + : public Tizen::Base::Object +{ +public: + static SettingPresentationModel* GetInstance(void); + +public: + result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, + int& value) const; + result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, + Tizen::Base::String& value) const; + result SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, int value); + result SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, + const Tizen::Base::String& value); + result ResetGallerySettingsRegistry(void); + +private: + SettingPresentationModel(void); + virtual ~SettingPresentationModel(void); + SettingPresentationModel(SettingPresentationModel& value); + SettingPresentationModel& operator = (SettingPresentationModel&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + result CreateDefaultRegistry(void); + +private: + static SettingPresentationModel* __pPresentationModelInstance; + Tizen::Io::Registry* __pDefaultGalleryRegistry; + Tizen::Io::Registry* __pAppGalleryRegistry; +}; + +#endif /* _GL_SETTING_PRESENTATION_MODEL_H_ */ diff --git a/inc/GlSettingTransitionForm.h b/inc/GlSettingTransitionForm.h new file mode 100644 index 0000000..f572d36 --- /dev/null +++ b/inc/GlSettingTransitionForm.h @@ -0,0 +1,89 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingTransitionForm.h + * @brief This is the header file for SettingTransitionForm class. + */ + +#ifndef _GL_SETTING_TRANSITION_FORM_H_ +#define _GL_SETTING_TRANSITION_FORM_H_ + +#include +#include +#include +#include + +class SettingPresentationModel; + +class SettingTransitionForm + : public Tizen::Ui::Controls::Form + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IGroupedTableViewItemEventListener + , public Tizen::Ui::Controls::IGroupedTableViewItemProvider + , public Tizen::Ui::Controls::IFormBackEventListener + , public Tizen::Ui::Scenes::ISceneEventListener +{ +public: + SettingTransitionForm(void); + virtual ~SettingTransitionForm(void); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnGroupedTableViewContextItemActivationStateChanged( + Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, + Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated); + virtual void OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + virtual void OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, + int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, + Tizen::Ui::Controls::TableViewItemStatus status); + + virtual Tizen::Ui::Controls::TableViewGroupItem* CreateGroupItem(int groupIndex, int itemWidth); + virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int groupIndex, int itemIndex, int itemWidth); + virtual int GetDefaultGroupItemHeight(void); + virtual int GetDefaultItemHeight(void); + virtual bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + virtual int GetGroupCount(void); + virtual int GetItemCount(int groupIndex); + virtual void UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem); + virtual void UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); + + virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + +private: + result InitializeFooter(void); + int GetFontSize(void); + void ItemTypeIconAndOneLine(Tizen::Graphics::Rectangle& icon, Tizen::Graphics::Rectangle& main); + void UpdateTableViewRedioButtonState(int senderIndex = -1); + +private: + Tizen::Ui::Controls::GroupedTableView* __pTableView; + SettingPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_SETTING_TRANSITION_FORM_H_ */ diff --git a/inc/GlThumbnailEvent.h b/inc/GlThumbnailEvent.h new file mode 100644 index 0000000..23017a2 --- /dev/null +++ b/inc/GlThumbnailEvent.h @@ -0,0 +1,40 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailEvent.h + * @brief This is the header file for ThumbnailEvent class. + */ + +#ifndef _GL_THUMBNAIL_EVENT_H_ +#define _GL_THUMBNAIL_EVENT_H_ + +#include + +class IThumbnailEventListener; + +class ThumbnailEvent + : public Tizen::Base::Runtime::Event +{ +public: + virtual ~ThumbnailEvent(void); + +protected: + virtual void FireImpl(Tizen::Base::Runtime::IEventListener& listener, + const Tizen::Base::Runtime::IEventArg& eventArg); +}; + +#endif /* _GL_THUMBNAIL_EVENT_H_ */ diff --git a/inc/GlThumbnailEventArg.h b/inc/GlThumbnailEventArg.h new file mode 100644 index 0000000..318dcae --- /dev/null +++ b/inc/GlThumbnailEventArg.h @@ -0,0 +1,41 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailEventArg.h + * @brief This is the header file for ThumbnailEventArg class. + */ + +#ifndef _GL_THUMBNAIL_EVENT_ARG_H_ +#define _GL_THUMBNAIL_EVENT_ARG_H_ + +#include + +class ThumbnailInfo; + +class ThumbnailEventArg + : public Tizen::Base::Runtime::IEventArg +{ +public: + ThumbnailEventArg(ThumbnailInfo* pThumbnailInfo); + virtual ~ThumbnailEventArg(void); + virtual ThumbnailInfo* GetThumbnailInfoN(void); + +protected: + ThumbnailInfo* _pThumbnailInfo; +}; + +#endif /* _GL_THUMBNAIL_EVENT_ARG_H_ */ diff --git a/inc/GlThumbnailEventListener.h b/inc/GlThumbnailEventListener.h new file mode 100644 index 0000000..186656d --- /dev/null +++ b/inc/GlThumbnailEventListener.h @@ -0,0 +1,35 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailEventListener.h + * @brief This is the header file for ThumbnailEventListener class. + */ + +#ifndef _GL_THUMBNAIL_EVENT_LISTENER_H_ +#define _GL_THUMBNAIL_EVENT_LISTENER_H_ + +#include + +class IThumbnailEventListener + : public Tizen::Base::Runtime::IEventListener +{ +public: + virtual ~IThumbnailEventListener(void) {}; + virtual void OnThumbnailReceivedN(Tizen::Base::Runtime::IEventArg& eventArg) = 0; +}; + +#endif /* _GL_THUMBNAIL_EVENT_LISTENER_H_ */ diff --git a/inc/GlThumbnailInfo.h b/inc/GlThumbnailInfo.h new file mode 100644 index 0000000..3d8856e --- /dev/null +++ b/inc/GlThumbnailInfo.h @@ -0,0 +1,60 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailInfo.h + * @brief This is the header file for ThumbnailInfo class. + */ + +#ifndef _GL_THUMBNAIL_INFO_H_ +#define _GL_THUMBNAIL_INFO_H_ + +#include +#include + +class ThumbnailInfo + : public Tizen::Base::Object +{ +public: + ThumbnailInfo(void); + virtual ~ThumbnailInfo(void); + + void Construct(const Tizen::Content::ContentId& contentId, + const Tizen::Base::String& filePath, const Tizen::Graphics::Bitmap& bitmap, + const Tizen::Content::ContentType contentType, const long duration = 0); + + Tizen::Content::ContentId GetContentId(void) const; + Tizen::Base::String GetFilePath(void) const; + void SetFilePath(const Tizen::Base::String& filePath); + Tizen::Graphics::Bitmap* GetBitmapN(void) const; + void SetBitmap(const Tizen::Graphics::Bitmap& bitmap); + Tizen::Content::ContentType GetContentType(void) const; + void SetContentType(const Tizen::Content::ContentType contentType); + long GetDuration(void) const; + void SetDuration(const long duration); + +private: + Tizen::Graphics::Bitmap* CloneBitmapN(const Tizen::Graphics::Bitmap& bitmap) const; + +private : + Tizen::Content::ContentId __contentId; + Tizen::Base::String __filePath; + Tizen::Graphics::Bitmap* __pBitmap; + Tizen::Content::ContentType __contentType; + long __duration; +}; + +#endif /* _GL_THUMBNAIL_INFO_H_ */ diff --git a/inc/GlThumbnailJob.h b/inc/GlThumbnailJob.h new file mode 100644 index 0000000..7533d19 --- /dev/null +++ b/inc/GlThumbnailJob.h @@ -0,0 +1,53 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailJob.h + * @brief This is the header file for ThumbnailJob class. + */ + +#ifndef _GL_THUMBNAIL_JOB_H_ +#define _GL_THUMBNAIL_JOB_H_ + +#include + +class ThumbnailEvent; + +class ThumbnailJob + : public Tizen::Base::Object +{ +public: + ThumbnailJob(void); + virtual ~ThumbnailJob(void); + + void Construct(const Tizen::Content::ContentId& contentId, const unsigned long requestId, + const ThumbnailEvent* pRequestEvent); + + Tizen::Content::ContentId GetContentId(void) const; + unsigned long GetRequestId() const; + const ThumbnailEvent* GetEvent(void) const; + +private: + ThumbnailJob(const ThumbnailJob&); + ThumbnailJob& operator=(const ThumbnailJob&); + +private: + Tizen::Content::ContentId __contentId; + unsigned long __requestId; + const ThumbnailEvent* __pRequestEvent; +}; + +#endif /* _GL_THUMBNAIL_JOB_H_ */ diff --git a/inc/GlThumbnailProvider.h b/inc/GlThumbnailProvider.h new file mode 100644 index 0000000..88ced8e --- /dev/null +++ b/inc/GlThumbnailProvider.h @@ -0,0 +1,72 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailProvider.h + * @brief This is the header file for ThumbnailProvider class. + */ + +#ifndef _GL_THUMBNAIL_PROVIDER_H_ +#define _GL_THUMBNAIL_PROVIDER_H_ + +#include +#include +#include "GlThumbnailInfo.h" + +class ThumbnailEvent; + +class ThumbnailProvider + : public Tizen::Base::Runtime::EventDrivenThread +{ +public: + static ThumbnailProvider* GetInstance(void); + +public: + static void Release(void); + + void RequestThumbnail(const Tizen::Content::ContentId& contentId, const ThumbnailEvent* event); + void CancelThumbnailRequest(const Tizen::Content::ContentId& contentId, const ThumbnailEvent* event); + void ClearThumbnailRequests(bool appTerminating = false); + + virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs); + virtual bool OnStart(void); + virtual void OnStop(void); + +private: + ThumbnailProvider(void); + virtual ~ThumbnailProvider(void); + ThumbnailProvider(ThumbnailProvider& value); + ThumbnailProvider& operator = (ThumbnailProvider&); + + result Construct(void); + static void CreateInstance(void); + static void DestroyInstance(void); + + ThumbnailInfo* GetThumbnailInfoN(const Tizen::Content::ContentId& contentId) const; + Tizen::Graphics::Bitmap* GetThumbnailByDecodeN(const Tizen::Base::String& filePath, const Tizen::Content::ContentType contentType) const; + Tizen::Base::String GetFileNameFromFullPath(const Tizen::Base::String& fullPath, bool withExt) const; + +private: + static ThumbnailProvider* __pThumbnailProviderInstance; + static Tizen::Base::Collection::ArrayList* __pThumbnailEventListener; + + Tizen::Base::Runtime::Mutex* __pMutexCmd; + Tizen::Base::Collection::ArrayList* __pCmdQueue; + unsigned long __requestId; + bool __appTerminating; +}; + +#endif /* _GL_THUMBNAIL_PROVIDER_H_ */ diff --git a/inc/GlTypes.h b/inc/GlTypes.h new file mode 100644 index 0000000..f50feb6 --- /dev/null +++ b/inc/GlTypes.h @@ -0,0 +1,214 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlTypes.h + * @brief This is the header file for Types definition. + */ + +#ifndef _GL_TYPES_H_ +#define _GL_TYPES_H_ + +enum ACTION_ID_ +{ + ACTION_ID_BUTTON_CHECKED = 101, + ACTION_ID_BUTTON_CREATE_NAME_CANCEL = 102, + ACTION_ID_BUTTON_CREATE_NAME_DONE = 103, + ACTION_ID_BUTTON_MOVE_TO_SELECTION = 104, + ACTION_ID_BUTTON_UNCHECKED = 105, + ACTION_ID_CHECK_SELECT_OFF = 201, + ACTION_ID_CHECK_SELECT_ON = 202, + ACTION_ID_CONTEXT_MENU_EMAIL = 301, + ACTION_ID_CONTEXT_MENU_MORE_ADD_TAG = 302, + ACTION_ID_CONTEXT_MENU_MORE_EDIT = 303, + ACTION_ID_CONTEXT_MENU_MORE_MOVE = 304, + ACTION_ID_CONTEXT_MENU_MORE_SLIDE_SHOW = 305, + ACTION_ID_CONTEXT_MENU_SHARE_EMAIL = 306, + ACTION_ID_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START = 401, + ACTION_ID_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM = 600, + ACTION_ID_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START = 601, + ACTION_ID_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM = 800, + ACTION_ID_DELETE_POPUP_CANCEL = 801, + ACTION_ID_DELETE_POPUP_DEL = 802, + ACTION_ID_EDITE_FOLDER = 901, + ACTION_ID_FOOTER_CAMERA = 902, + ACTION_ID_FOOTER_CANCEL = 903, + ACTION_ID_FOOTER_CONFIRM = 904, + ACTION_ID_FOOTER_DELETE = 905, + ACTION_ID_FOOTER_EDIT = 906, + ACTION_ID_FOOTER_MORE = 907, + ACTION_ID_FOOTER_SHARE = 908, + ACTION_ID_FOOTER_SLIDESHOW = 909, + ACTION_ID_FORMAT_DURATION = 1001, + ACTION_ID_FORMAT_THUMBNAIL = 1002, + ACTION_ID_FORMAT_TITLE = 1003, + ACTION_ID_SELECTALL_CHECKED = 1001, + ACTION_ID_SELECTALL_UNCHECKED = 1002 +}; + +enum AppControlMode +{ + APP_CONTROL_MODE_MAIN, + APP_CONTROL_MODE_PICK, + APP_CONTROL_MODE_SETTING, + APP_MODE_UNKNOWN +}; + +enum AppControlParamType +{ + APPCONTROL_PARAM_TYPE_MEDIA_TYPE, + APPCONTROL_PARAM_TYPE_SELECTION_MODE, + APPCONTROL_PARAM_TYPE_UNKNOWN +}; + +enum AppControlMediaType +{ + APPCONTROL_MEDIA_TYPE_IMAGE, + APPCONTROL_MEDIA_TYPE_VIDEO, + APPCONTROL_MEDIA_TYPE_UNKNOWN +}; + +enum AppControlSelectionMode +{ + APPCONTROL_SELECTION_MODE_SINGLE, + APPCONTROL_SELECTION_MODE_MULTIPLE, + APPCONTROL_SELECTION_MODE_UNKNOWN +}; + +enum AlbumInfoType +{ + ALBUM_INFO_TYPE_BASE, + ALBUM_INFO_TYPE_FOLDER, + ALBUM_INFO_TYPE_FILE +}; + +enum AlbumNameEditorMode +{ + ALBUM_NAME_EDITOR_MODE_RENAME, + ALBUM_NAME_EDITOR_MODE_CREATE, + ALBUM_NAME_EDITOR_MODE_NONE +}; + +extern const wchar_t* IDC_FORM_ALBUM_LIST; +extern const wchar_t* IDC_FORM_ALBUM_LIST_EDITOR; +extern const wchar_t* IDC_FORM_ALBUM_NAME_EDITOR; +extern const wchar_t* IDC_FORM_FILE_LIST; +extern const wchar_t* IDC_FORM_FILE_LIST_EDITOR; +extern const wchar_t* IDC_FORM_SETTING_MAIN; +extern const wchar_t* IDC_FORM_SETTING_INTERVAL; +extern const wchar_t* IDC_FORM_SETTING_TRANSITION; + +extern const wchar_t* IDC_PANEL_BLANK; +extern const wchar_t* IDC_PANEL_ALL_LIST; +extern const wchar_t* IDC_PANEL_IMAGE_LIST; +extern const wchar_t* IDC_PANEL_VIDEO_LIST; +extern const wchar_t* IDC_PANEL_ALL_LIST_EDITOR; +extern const wchar_t* IDC_PANEL_IMAGE_LIST_EDITOR; +extern const wchar_t* IDC_PANEL_VIDEO_LIST_EDITOR; +extern const wchar_t* IDC_PANEL_ALL_LIST_SELECTION; + +extern const wchar_t* IDSCN_ALBUM_LIST; +extern const wchar_t* IDSCN_ALBUM_LIST_EDITOR; +extern const wchar_t* IDSCN_ALBUM_NAME_EDITOR; +extern const wchar_t* IDSCN_ALL_LIST; +extern const wchar_t* IDSCN_IMAGE_LIST; +extern const wchar_t* IDSCN_VIDEO_LIST; +extern const wchar_t* IDSCN_ALL_LIST_EDITOR; +extern const wchar_t* IDSCN_IMAGE_LIST_EDITOR; +extern const wchar_t* IDSCN_VIDEO_LIST_EDITOR; +extern const wchar_t* IDSCN_ALL_LIST_SELECTION; +extern const wchar_t* IDSCN_SETTING_MAIN; +extern const wchar_t* IDSCN_SETTING_INTERVAL; +extern const wchar_t* IDSCN_SETTING_TRANSITION; + +extern const wchar_t* APPCONTROL_PROVIDER_ID_CAMERA; +extern const wchar_t* APPCONTROL_PROVIDER_ID_MESSAGE; +extern const wchar_t* APPCONTROL_PROVIDER_ID_EMAIL; +extern const wchar_t* APPCONTROL_PROVIDER_ID_IMAGE; + +extern const wchar_t* APPCONTROL_OPERATION_ID_PICK; +extern const wchar_t* APPCONTROL_OPERATION_ID_VIEW; +extern const wchar_t* APPCONTROL_OPERATION_ID_CAPTURE; +extern const wchar_t* APPCONTROL_OPERATION_ID_CREATECONTENT; +extern const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE; +extern const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE; +extern const wchar_t* APPCONTROL_OPERATION_ID_MAIN; + +extern const wchar_t* APPCONTROL_KEY_TYPE; +extern const wchar_t* APPCONTROL_KEY_MEDIA_TYPE; +extern const wchar_t* APPCONTROL_KEY_PATH; +extern const wchar_t* APPCONTROL_KEY_INDEX; +extern const wchar_t* APPCONTROL_KEY_ATTACHMENTS; +extern const wchar_t* APPCONTROL_KEY_SELECTION_MODE; +extern const wchar_t* APPCONTROL_KEY_DATA_SELECTED; + +extern const wchar_t* APPCONTROL_DATA_CAMERA; +extern const wchar_t* APPCONTROL_DATA_IMAGE; +extern const wchar_t* APPCONTROL_DATA_VIDEO; +extern const wchar_t* APPCONTROL_DATA_SINGLE; +extern const wchar_t* APPCONTROL_DATA_MULTIPLE; +extern const wchar_t* APPCONTROL_DATA_SLIDE_SHOW; + +extern const wchar_t* APPCONTROL_RESULT_KEY_LEGACY_RESULT; + + +extern const Tizen::Graphics::Dimension DIMENSION_DEFAULT_THUMBNAIL; +extern const int FOLDER_BITMAP_MAX; + +extern const wchar_t* EMPTY_SPACE; +extern const wchar_t* SINGLE_SPACE; + +extern const wchar_t* DIRECTORY_SEPARATOR; +extern const wchar_t* FILE_EXT_SEPARATOR; +extern const wchar_t* MULTI_ITEM_SEPARATOR; + +extern const wchar_t* CONTENT_EXT_PNG; +extern const wchar_t* CONTENT_EXT_BMP; +extern const wchar_t* CONTENT_EXT_JPG; +extern const wchar_t* CONTENT_EXT_GIF; +extern const wchar_t* CONTENT_EXT_TIF; +extern const wchar_t* CONTENT_EXT_MP4; +extern const wchar_t* CONTENT_EXT_3GP; +extern const wchar_t* CONTENT_EXT_AVI; +extern const wchar_t* CONTENT_EXT_RM; +extern const wchar_t* CONTENT_EXT_WMV; +extern const wchar_t* CONTENT_EXT_ASF; + +extern const wchar_t* SECTION_NAME_GALLERY; +extern const wchar_t* SECTION_NAME_IMAGE_VIEWER; +extern const wchar_t* SECTION_NAME_VIDEO_PLAYER; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT; +extern const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_MUSIC; + +extern const wchar_t* FONT_SIZE_SETTING_INFO_KEY; + +extern const wchar_t* IDB_BUTTON_CIRCLE_BACKGROUND; +extern const wchar_t* IDB_BUTTON_RENAME; +extern const wchar_t* IDB_CONTROLBAR_CAMERA; +extern const wchar_t* IDB_CONTROLBAR_DELETE; +extern const wchar_t* IDB_CONTROLBAR_MORE; +extern const wchar_t* IDB_CONTROLBAR_SHARE; +extern const wchar_t* IDB_LISTVIEW_EMPTY; +extern const wchar_t* IDB_MAIN_FOLDER_BACKGROUND; +extern const wchar_t* IDB_VIDEOTHUMBNAIL_BG; +extern const wchar_t* IDB_VIDEOTHUMBNAIL_BOOKMARK; +extern const wchar_t* IDB_VIDEOTHUMBNAIL_FAVORITE; +extern const wchar_t* IDB_VIDEOTHUMBNAIL_PLAY; +extern const wchar_t* IDB_BUTTON_MOVE_SELECTION; +extern const wchar_t* IDB_NO_CONTENTS_BROKEN; + +#endif /* _GL_TYPES_H_ */ diff --git a/inc/GlVideoListEditorPanel.h b/inc/GlVideoListEditorPanel.h new file mode 100644 index 0000000..bd1c174 --- /dev/null +++ b/inc/GlVideoListEditorPanel.h @@ -0,0 +1,88 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlVideoListEditorPanel.h + * @brief This is the header file for VideoListEditorPanel class. + */ + +#ifndef _GL_VIDEO_LIST_EDITOR_PANEL_H_ +#define _GL_VIDEO_LIST_EDITOR_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class VideoListEditorPanel + : public BasePanel + , public Tizen::Ui::IActionEventListener + , public Tizen::Ui::Controls::IListViewItemEventListener + , public Tizen::Ui::Controls::IListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + VideoListEditorPanel(); + virtual ~VideoListEditorPanel(); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, + Tizen::Ui::Controls::ListItemStatus status); + virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, + Tizen::Ui::Controls::SweepDirection direction); + virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, + int elementId, Tizen::Ui::Controls::ListContextItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + + void OnRequestDeleteAction(void); + void OnRequestEmailAction(void); + void OnRequestMoveToAction(Tizen::Base::String& destDirectory); + void OnRequestAppExitWithMultipleSelectionAppControlResult(void); + int GetItemCheckedCount(void) const; + +private: + Tizen::Base::Collection::IList* GetItemCheckedIndexList(void) const; + +private: + Tizen::Ui::Controls::ListView* __pContentListView; + Tizen::Ui::Controls::CheckButton* __pCheckButton; + Tizen::Ui::Controls::Label* __pLabelSelectCnt; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_VIDEO_LIST_EDITOR_PANEL_H_ */ diff --git a/inc/GlVideoListPanel.h b/inc/GlVideoListPanel.h new file mode 100644 index 0000000..79025ac --- /dev/null +++ b/inc/GlVideoListPanel.h @@ -0,0 +1,74 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlVideoListPanel.h + * @brief This is the header file for VideoListPanel class. + */ + +#ifndef _GL_VIDEO_LIST_PANEL_H_ +#define _GL_VIDEO_LIST_PANEL_H_ + +#include +#include +#include "GlAlbumEventListener.h" +#include "GlBasePanel.h" +#include "GlThumbnailEventListener.h" + +class FileListPresentationModel; + +class VideoListPanel + : public BasePanel + , public Tizen::Ui::Controls::IListViewItemEventListener + , public Tizen::Ui::Controls::IListViewItemProvider + , public Tizen::Ui::Scenes::ISceneEventListener + , public IAlbumEventListener +{ +public: + VideoListPanel(); + virtual ~VideoListPanel(); + result Initialize(void); + + virtual result OnInitializing(void); + virtual result OnTerminating(void); + virtual void OnUpdateContentList(void); + + virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, + Tizen::Ui::Controls::ListItemStatus status); + virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, + Tizen::Ui::Controls::SweepDirection direction); + virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, + int elementId, Tizen::Ui::Controls::ListContextItemStatus status); + + virtual int GetItemCount(void); + virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth); + virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth); + + virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, + const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs); + virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, + const Tizen::Ui::Scenes::SceneId& nextSceneId); + + virtual void OnFileInfoChanged(const Tizen::Content::ContentType contentType); + virtual void OnThumbnailDecoded(const int index); + +private: + Tizen::Ui::Controls::ListView* __pContentListView; + int __itemCount; + FileListPresentationModel* __pPresentationModel; +}; + +#endif /* _GL_VIDEO_LIST_PANEL_H_ */ diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..b130478 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,91 @@ + + + ijudt7w61q + 1.0.0 + C++App + + x86 + Normal + + + 2.0 + + http://tizen.org/privilege/content.read + http://tizen.org/privilege/content.write + http://tizen.org/privilege/application.launch + + + + + + استوديو-Ref + Qalereya-Ref + Галерия-Ref + Galeria-Ref + Galerie-Ref + Galleri-Ref + Galerie-Ref + Συλλογή-Ref + Gallery-Ref + Gallery-Ref + Gallery-Ref + Galerii-Ref + Galeria-Ref + Galleria-Ref + Galerie-Ref + Galerie-Ref + Gailearaí-Ref + Galería-Ref + गैलरी-Ref + Album-Ref + Galéria-Ref + Պատկերասրահ-Ref + Gallerí-Ref + Galleria-Ref + ギャラリー-Ref + გალერეა-Ref + Галерея-Ref + 갤러리-Ref + Galerija-Ref + Galerija-Ref + Галерија-Ref + Galerij-Ref + Galleri-Ref + Galeria-Ref + Galeria-Ref + Galeria-Ref + Galerie-Ref + Галерея-Ref + Galéria-Ref + Galerija-Ref + Galería-Ref + Galería-Ref + Galerija-Ref + Galleri-Ref + Galeri-Ref + Галерея-Ref + Galereya-Ref + 图库-Ref + 媒體瀏覽器-Ref + 画廊-Ref + 媒體瀏覽器-Ref + + + mainmenu.png + + + + + + + + + + + + + + + + + diff --git a/packaging/apps.Gallery.spec b/packaging/apps.Gallery.spec new file mode 100644 index 0000000..7a6a06e --- /dev/null +++ b/packaging/apps.Gallery.spec @@ -0,0 +1,61 @@ +Name: apps.Gallery +Summary: Gallery application +Version: 1.0.0 +Release: 1 +Group: TO_BE/FILLED_IN +License: TO BE FILLED IN +Source0: %{name}-%{version}.tar.gz +BuildRequires: cmake +BuildRequires: pkgconfig(osp-appfw) +BuildRequires: pkgconfig(osp-content) +BuildRequires: pkgconfig(osp-image) +BuildRequires: pkgconfig(osp-image-core) +BuildRequires: pkgconfig(osp-locations) +BuildRequires: pkgconfig(osp-media) +BuildRequires: pkgconfig(osp-net) +BuildRequires: pkgconfig(osp-uifw) +BuildRequires: osp-appfw-internal-devel +BuildRequires: osp-image-internal-devel +BuildRequires: osp-media-internal-devel +BuildRequires: osp-net-internal-devel +BuildRequires: osp-uifw-internal-devel + +Requires: osp-installer + +%description +Verification application: Gallery + +%prep +%setup -q + +%build +MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` +%ifarch %{ix86} +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%else +CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} +%endif + +# Call make instruction with smp support +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +%post +/sbin/ldconfig +PKG_ID=ijudt7w61q +echo "/usr/etc/package-manager/backend/tpk -i /usr/apps/"${PKG_ID} +/usr/etc/package-manager/backend/tpk -i /usr/apps/${PKG_ID} +cp -f /usr/lib/osp/osp-ui-app-loader /usr/apps/${PKG_ID}/bin/Gallery + +%postun +/sbin/ldconfig +PKG_ID=ijudt7w61q +echo "/usr/etc/package-manager/backend/tpk -u "${PKG_ID} +/usr/etc/package-manager/backend/tpk -u ${PKG_ID} + +%files +%defattr(-,root,root,-) +/usr/apps/* diff --git a/res/ara-AE.xml b/res/ara-AE.xml new file mode 100644 index 0000000..6b99e80 --- /dev/null +++ b/res/ara-AE.xml @@ -0,0 +1,70 @@ + + + + تم الوصول إلى أقصى عدد من الحروف + حذف + الألبومات + %s موجود بالفعل + ملفات الكاميرا + إنشاء ألبوم + تأثير الانتقال + إلغاء + قوس قزح + موجود بالفعل. هل تريد الاستبدال؟ + بريد إلكتروني + لا يمكن المسح + تحديد الكل + الصفحة + فشل المسح + محدد + الموسيقى + التلاشي التدريجي + ثانيتان + فشلت العملية + الخلط + إلغاء + تعديل + الصور + حذف؟ + الفيديو + فاصل عرض الشرائح + عرض شرائح + التفعيل + لا يوجد اسم + اسم الألبوم مستخدم بالفعل + لا توجد عناصر + 10 ثوان + موجود مسبقا + إخفاء + تكرار + اختيار الكل + مشغل فيديو + ثوان + 3 ثوان + فشل النقل + كافة الألبومات + 20 ثانية + تم بلوغ أقصى عدد من الأحرف (%d) + زوم + استوديو + 5 ثوان + إذابة + غير قادر على تغيير الاسم. جاري استخدام الملف + فيديو + يتعذر إعادة التسمية. اسم الألبوم مستخدم بالفعل + الترجمات المصاحبة + عرض الصور + ملفات محملة + إنشاء مجلد؟ + تغييرالاسم + شرائح + نقل + الفترة + تمت + مسح؟ + تعديل + تم بلوغ أقصى عدد من الأحرف (%d) + تمت + diff --git a/res/aze-AZ.xml b/res/aze-AZ.xml new file mode 100644 index 0000000..a4d27f4 --- /dev/null +++ b/res/aze-AZ.xml @@ -0,0 +1,70 @@ + + + + Simvol sayı maksimuma çatıb + Sil + Albomlar + %s hazırda mövcuddur + Kamera çarxı + Albom yaradın + Keçid effekti + Ləğv et + Diafraqma + Artıq mövcuddur. Üzərindən yazılsın? + Elektron poçtlar + Silmək mümkün deyil + Hamsnı seç + Səhifə + Silmək mümkün olmadı + Seçilmişi + Musiqi + Tutqunlaşdır + 2 saniyə + Əməliyyat alınmadı + Təsadüfi sıralama + Ləğv et + Redaktə et + Təsvirlər + Silinsin? + Video + Slaydşou intervalı + Slyd nmyşi + Aktivləşdirmə + Ad yoxdur + Albom adı artıq ist.edilir + Elementlər yoxdur + 10 saniyə + Artıq var + Sayrışmaq + Təkrar et + Hamısını seç + Video pleyer + Saniyələr + 3 saniyə + Keçmə alınmadı + Bütün albomlar + 20 saniyə + Simvolların sayı maksimuma (%d) çatıb + Yaxınlaşdırma/uzaqlaşdırma + Qalereya + 5 saniyə + Seç + Yenidən adlandırmaq mümkün deyildir + Video + Yenidən adlandırmaq mümkün deyil. Albom adı artıq istifadə edilir + Yarımbaşlıqlar + Slayd göstərmə + Yükləmələr + Qovluq yaradılsın? + Adı dəyişdir + Slayd + Göndər + İnterval + Tamamlandı + Silinsin? + Redaktə et + Simvolların sayı maksimuma (%d) çatıb + Bitdi + diff --git a/res/bul-BG.xml b/res/bul-BG.xml new file mode 100644 index 0000000..9b2bfbf --- /dev/null +++ b/res/bul-BG.xml @@ -0,0 +1,70 @@ + + + + Достигнат максимален брой знаци + Изтриване + Албуми + %s вече съществува + Материал камера + Създаване на албум + Ефект на преход + Отказ + Ирис + Вече съществува. Презапис? + Email + Невъзможно изтриване + Изб.всички + Страница + Неуспешно изтриване + Избрани + Музика + Избледняване + 2 секунди + Операцията е неуспешна + Разбъркано + Отказ + Редактиране + Изображения + Премахване? + Видеоклипове + Интервал на слайдшоуто + Слайдшоу + Активиране + Без име + Име на албума вече се изп. + Няма елементи + 10 секунди + Вече съществува + Щори + Повтаряне + Избери всички + Видео плейър + секунди + 3 секунди + Неуспешно преместване + Всички албуми + 20 секунди + Достигнат е максималният брой знаци (%d) + Зум + Галерия + 5 секунди + Размиване + Не може да се преименува + Видеоклип + Не може да се преименува. Името на албума вече се използва + Субтитри + Слайдшоу + Изтеглени файлове + Създаване на папка? + Промяна на име + Слайд + Премести + Интервал + Завършено + Изтриване? + Редактиране + Достигнат е максималният брой знаци (%d) + Готово + diff --git a/res/cat-ES.xml b/res/cat-ES.xml new file mode 100644 index 0000000..a031be6 --- /dev/null +++ b/res/cat-ES.xml @@ -0,0 +1,70 @@ + + + + S'ha assolit el nombre màxim de caràcters + Esborrar + Àlbums + %s ja existeix + Rodet càmera + Crear àlbum + Efecte de transició + Cancel·lar + Iris + Ja existeix. Sobreescriure? + Correu electrònic + No es pot esborrar + Selec tot + Pàgina + Error en esborrar + Seleccionat + Música + Perdre intensitat + 2 segons + Operació fallida + Ordre aleatori + Cancel·lar + Editar + Imatges + Eliminar? + Vídeos + Interval de la presentació de diapositives + Diaposit + Activació + Sense nom + Nom d'àlbum ja en ús + No hi ha elements + 10 segons + Ja existeix + Persiana + Repetir + Seleccioni-ho tot + Reproductor de vídeo + segons + 3 segons + Error en moure + Tots els àlbums + 20 segons + S'ha assolit el nombre màxim de caràcters (%d) + Zoom + Galeria + 5 segons + Dissoldre + No es pot canviar nom + Vídeo + No es pot canviar el nom. El nom d'àlbum ja està en ús + Subtítols + Presentació de diapositives + Descàrregues + Crear carpeta? + Canviar nom + Diapositiva + Moure + Interval + Completat + Esborrar? + Editar + S'ha assolit el nombre màxim de caràcters (%d) + Finalit. + diff --git a/res/ces-CZ.xml b/res/ces-CZ.xml new file mode 100644 index 0000000..481fbcc --- /dev/null +++ b/res/ces-CZ.xml @@ -0,0 +1,70 @@ + + + + Bylo dosaženo maximálního počtu znaků + Odstranit + Alba + %s již existuje + Soubory z fot. + Vytvořit album + Přechodový efekt + Zrušit + Duha + Již existuje. Přepsat? + E-mail + Nelze odstranit + Vybrat vše + Stránka + Odstranění se nezdařilo + Vybráno + Hudba + Zvolna mizet + 2 sekund + Otevření se nezdařilo + Náhodně + Zrušit + Upravit + Obrázky + Odstranit? + Videa + Interval prezentace + Prezent. + Aktivace + Žádný název + Název alba je již použit + Žádné položky + 10 sekund + Již existuje + Roleta + Opakovat + Vybrat vše + Videopřeh. + sekundy + 3 sekundy + Přesunutí se nezdařilo + Všechna alba + 20 sekund + Bylo dosaženo maximálního počtu znaků (%d) + Přiblížení + Galerie + 5 sekund + Rozplynout + Nelze přejmenovat + Video + Nelze přejmenovat. Název alba je již použit + Titulky + Prezentace + Stažené položky + Chcete vytvořit složku? + Změnit název + Sklouznutí + Přesunout + Interval + Dokončeno + Odstranit? + Upravit + Bylo dosaženo maximálního počtu znaků (%d) + Hotovo + diff --git a/res/dan-DK.xml b/res/dan-DK.xml new file mode 100644 index 0000000..f6acc35 --- /dev/null +++ b/res/dan-DK.xml @@ -0,0 +1,70 @@ + + + + Det maksimale antal tegn er nået + Slet + Albums + %s eksisterer allerede + Kamerarolle + Opret album + Overgangseffekt + Annullér + Iris + Findes allerede. Vil du overskrive? + E-mail + Kunne ikke slette + Vælg alle + Side + Sletning mislykkedes + Valgte + Musik + Tone ud + 2 sekunder + Handlingen mislykkedes + Bland + Annullér + Redigér + Billeder + Fjern? + Videoklip + Interval for diasshow + Diasshow + Aktivering + Intet navn + Albumnavn allerede i brug + Ingen elementer + 10 sekunder + Findes allerede + Afblænd + Gentag + Vælg alle + Videoafspiller + sekunder + 3 sekunder + Flytning mislykkedes + Alle album + 20 sekunder + Det maksimale antal tegn (%d) er nået + Zoom + Galleri + 5 sekunder + Opløs + Kunne ikke omdøbe + Videoklip + Kan ikke omdøbe. Albumnavn allerede i brug + Undertekster + Diasshow + Downloads + Opret mappe? + Skift navn + Dias + Flyt + Interval + Udført + Slet? + Redigér + Det maksimale antal tegn (%d) er nået + Udført + diff --git a/res/deu-DE.xml b/res/deu-DE.xml new file mode 100644 index 0000000..53657d0 --- /dev/null +++ b/res/deu-DE.xml @@ -0,0 +1,70 @@ + + + + Maximal zulässige Zeichenanzahl erreicht. + Löschen + Alben + %s ist bereits vorhanden + Filmrolle + Album erstellen + Übergangseffekt + Abbrechen + Iris + Bereits vorhanden. Überschreiben? + E-Mail + Kann nicht gelöscht werden + Alle ausw. + Seite + Löschen fehlgeschlagen + Ausgewählt + Musik + Ausblenden + 2 Sekunden + Vorgang fehlgeschlagen + Zufallswiedergabe + Abbrechen + Bearbeiten + Eigene Bilder + Entfernen? + Videos + Diashowintervall + Diashow + Aktivierung + Kein Name + Albumn. wird bereits verw. + Keine Elemente + 10 Sekunden + Bereits vorhanden + Blenden + Wiederholen + Alle auswählen + Video-Player + Sekunden + 3 Sekunden + Verschieben fehlgeschlagen + Alle Alben + 20 Sekunden + Maximale Anzahl an Zeichen (%d) erreicht. + Zoom + Galerie + 5 Sekunden + Auflösen + Umbenennen nicht möglich + Video + Umbenennen nicht möglich. Albumname wird bereits verwendet + Untertitel + Diashow + Downloads + Ordner erstellen? + Name ändern + Gleiten + Verschieben + Intervall + Abgeschlossen + Löschen? + Bearbeiten + Maximale Anzahl an Zeichen (%d) erreicht. + OK + diff --git a/res/ell-GR.xml b/res/ell-GR.xml new file mode 100644 index 0000000..a38ebaa --- /dev/null +++ b/res/ell-GR.xml @@ -0,0 +1,70 @@ + + + + Ο μέγιστος αριθμός χαρακτήρων συμπληρώθηκε + Διαγραφή + Άλμπουμ + Το αρχείο %s υπάρχει ήδη + Λήψεις με κάμερα + Δημιουργία άλμπουμ + Εφέ μετάβασης + Ακύρωση + Ίριδα + Υπάρχει ήδη. Αντικατάσταση; + Email + Δεν είναι δυνατή η διαγραφή + Επιλ. όλων + Σελίδα + Αποτυχία διαγραφής + Επιλεγμένο + Μουσική + Σταδιακή εμφάνιση + 2 δευτερόλεπτα + Λειτουργία απέτυχε + Τυχαία σειρά + Ακύρωση + Επεξεργασία + Εικόνες + Αφαίρεση; + Βίντεο + Διάστημα παρουσίασης + Παρ/σίαση + Ενεργοποίηση + Κανένα όνομα + Το όνομα άλμπουμ χρησ. ήδη + Κανένα στοιχείο + 10 δευτερόλεπτα + Υπάρχει ήδη + Ρολό + Επανάληψη + Επιλογή όλων + Αναπαραγωγή Βίντεο + δευτ. + 3 δευτερόλεπτα + Αποτυχία μετακίνησης + Όλα τα άλμπουμ + 20 δευτερόλεπτα + Συμπληρώθηκε ο μέγιστος αριθμός χαρακτήρων (%d) + Ζουμ + Συλλογή + 5 δευτερόλεπτα + Αποσύνθεση + Δεν είναι δυνατή η μετονομασία + Προσθήκη βίντεο + Δεν είναι δυνατή η μετονομασία. To όνομα άλμπουμ χρησιμοποιείται ήδη + Υπότιτλοι + Παρουσίαση + Λήψεις + Δημιουργία φακέλου; + Αλλαγή ονόματος + Διαφάνεια + Μετακίνηση + Διάστημα + Ολοκληρώθηκε + Διαγραφή; + Επεξεργασία + Συμπληρώθηκε ο μέγιστος αριθμός χαρακτήρων (%d) + Ok + diff --git a/res/eng-GB.xml b/res/eng-GB.xml new file mode 100644 index 0000000..5588221 --- /dev/null +++ b/res/eng-GB.xml @@ -0,0 +1,70 @@ + + + + Maximum number of characters reached + Delete + Albums + %s already exists + Camera roll + Create album + Transition effect + Cancel + Iris + Already exists. Overwrite? + Email + Unable to delete + Select all + Page + Delete failed + Selected + Music + Fade + 2 seconds + Operation failed + Shuffle + Cancel + Edit + Images + Remove? + Videos + Slideshow interval + Slide show + Activation + No name + Album name already in use + No items + 10 seconds + Already exists + Blind + Repeat + Select all + Video Player + seconds + 3 seconds + Moving failed + All albums + 20 seconds + Maximum number of characters (%d) reached + Zoom + Gallery + 5 seconds + Dissolve + Unable to rename + Video + Unable to rename. Album name already in use + Subtitles + Slide show + Downloads + Create folder? + Change name + Slide + Move + Interval + Completed + Delete? + Edit + Maximum number of characters (%d) reached + Done + diff --git a/res/eng-PH.xml b/res/eng-PH.xml new file mode 100644 index 0000000..5588221 --- /dev/null +++ b/res/eng-PH.xml @@ -0,0 +1,70 @@ + + + + Maximum number of characters reached + Delete + Albums + %s already exists + Camera roll + Create album + Transition effect + Cancel + Iris + Already exists. Overwrite? + Email + Unable to delete + Select all + Page + Delete failed + Selected + Music + Fade + 2 seconds + Operation failed + Shuffle + Cancel + Edit + Images + Remove? + Videos + Slideshow interval + Slide show + Activation + No name + Album name already in use + No items + 10 seconds + Already exists + Blind + Repeat + Select all + Video Player + seconds + 3 seconds + Moving failed + All albums + 20 seconds + Maximum number of characters (%d) reached + Zoom + Gallery + 5 seconds + Dissolve + Unable to rename + Video + Unable to rename. Album name already in use + Subtitles + Slide show + Downloads + Create folder? + Change name + Slide + Move + Interval + Completed + Delete? + Edit + Maximum number of characters (%d) reached + Done + diff --git a/res/eng-US.xml b/res/eng-US.xml new file mode 100644 index 0000000..ee937cf --- /dev/null +++ b/res/eng-US.xml @@ -0,0 +1,70 @@ + + + + Maximum number of characters reached + Delete + Albums + %s already exists + Camera roll + Create album + Transition effect + Cancel + Iris + Already exists. Overwrite? + Email + Unable to delete + Select all + Page + Delete failed + Selected + Music + Fade + 2 seconds + Operation failed + Shuffle + Cancel + Edit + Images + Delete? + Videos + Slideshow interval + Slide show + Activation + No name + Album name already in use + No items + 10 seconds + Already exists + Blind + Repeat + Select all + Video Player + Seconds + 3 seconds + Moving failed + All albums + 20 seconds + Maximum number of characters (%d) reached + Zoom + Gallery + 5 seconds + Dissolve + Unable to rename + Video + Unable to rename. Album name already in use + Subtitles + Slide show + Downloads + Create folder? + Change name + Slide + Move + Interval + Completed + Delete? + Edit + Maximum number of characters (%d) reached + Done + diff --git a/res/est-EE.xml b/res/est-EE.xml new file mode 100644 index 0000000..8e48d4e --- /dev/null +++ b/res/est-EE.xml @@ -0,0 +1,70 @@ + + + + Lubatud arv märke on täis + Kustuta + Albumid + %s on juba olemas + Kaamera rullik + Loo album + Ülemineku efekt + Tühista + Iiris + On juba olemas. Kas kirjutada üle? + E-post + Ei saa kustutada + Vali kõik + Lehekülg + BT-peakomplekt sees + Valitud + Muusika + Hajumine + 2 sekundit + Toiming nurjus + Juhuesitus + Tühista + Muuda + Pildid + Eemaldada? + Videod + Slaidiseansi intervall + Slaidis. + Aktiveerimine + Nimi puudub + Albumi nimi juba kasutusel + Üksusi ei ole + 10 sekundit + Juba olemas + Vari + Korda + Vali kõik + Videomängija + sekundit + 3 sekundit + Teisaldamine nurjus + Kõik albumid + 20 sekundit + Maksimaalne tähemärkide arv (%d) on saavutatud + Suumi + Galerii + 5 sekundit + Lahuta + Ei saa ümber nimetada + Video + Ei saa ümber nimetada. Albumi nimi on juba kasutusel + Subtiitrid + Slaidiseanss + Allalaet. failid + Kas luua kaust? + Muuda nime + Slaid + Teisalda + Intervall + Lõpule viidud + Kustutada? + Muuda + Maksimaalne tähemärkide arv (%d) on saavutatud + Valmis + diff --git a/res/eus-ES.xml b/res/eus-ES.xml new file mode 100644 index 0000000..f4bb149 --- /dev/null +++ b/res/eus-ES.xml @@ -0,0 +1,70 @@ + + + + Gehienezko karaktere kopurura heldu zara + Ezabatu + Albumak + %s dagoeneko bada + Kamera erroilua + Albuma sortu + Trantsizio efektua + Ezeztatu + Irisa + Dagoeneko bada. Berridatzi? + Posta elektroniko mezuak + Ezin da ezabatu + Haut. den. + Orria + Akatsa ezabatzerakoan + Aukeratutakoa(k) + Musika + Koloregabetu + 2 segundo + Eragiketak huts egin du + Ausazko ordena + Ezeztatu + Editatu + Irudiak + Kendu? + Bideoak + Aurkzpen tartea + Erakusketa + Aktibazioa + Izenik gabe + Izen hori erabilia dago + Elementurik ez + 10 segundo + Dagoeneko badago + Itsua + Errepikatu + Denak aukeratu + Bideo Jogailua + segundoak + 3 segundo + Errorea mugitzerakoan + Album guztiak + 20 segundo + Gehienezko karaktere kopurura (%d) iritsi zara + Zooma + Galeria + 5 segundo + Disolbatu + Ezin da berrizendatu + Bideoa + Ezin zaio izen berria jarri. Izen hori erabilia dago + Azpitituluak + Diapositiba aurkezpena + Deskargak + Karpeta sortu? + Izena aldatu + Diapositiba + Mugitu + Tartea + Osatua + Ezabatu? + Editatu + Gehienezko karaktere kopurura (%d) iritsi zara + Amaituta + diff --git a/res/fin-FI.xml b/res/fin-FI.xml new file mode 100644 index 0000000..b272c09 --- /dev/null +++ b/res/fin-FI.xml @@ -0,0 +1,70 @@ + + + + Merkkien enimmäismäärä saavutettu + Poista + Albumit + %s on jo olemassa + Kamerarulla + Luo albumi + Siirtymätehoste + Peruuta + Iris + On jo olemassa. Päivitetäänkö? + Sähköposti + Ei voi poistaa + V. kaikki + Sivu + Poisto epäonnistui + Valittu + Musiikki + Häivytä + 2 sekuntia + Toiminto epäonnistui + Sekoitus + Peruuta + Muokkaa + Kuvat + Poistetaanko? + Videot + Kuvaesityksen aikaväli + Diaesitys + Aktivointi + Ei nimeä + Albumin nimi jo käytössä + Ei kohteita + 10 sekuntia + On jo olemassa + Kaihdin + Toista + Valitse kaikki + Videosoitin + sekuntia + 3 sekuntia + Siirto epäonnistui + Kaikki albumit + 20 sekuntia + Merkkien enimmäismäärä (%d) on saavutettu + Zoomaus + Galleria + 5 sekuntia + Ristikuva + Ei voi nimetä uudelleen + Video + Ei voi nimetä uudelleen. Albumin nimi on jo käytössä + Tekstitys + Diaesitys + Lataukset + Luodaanko kansio? + Vaihda nimi + Dia + Siirrä + Väli + Valmis + Poistetaanko? + Muokkaa + Merkkien enimmäismäärä (%d) on saavutettu + Valmis + diff --git a/res/fra-CA.xml b/res/fra-CA.xml new file mode 100644 index 0000000..f4ed3f7 --- /dev/null +++ b/res/fra-CA.xml @@ -0,0 +1,70 @@ + + + + Nb. max. de caractères atteint + Supprimer + Albums + %s existe déjà + Pellicule + Créer un album + Effet de transition + Annuler + Iris + Existe déjà. L'écraser? + Courriel + Suppression impossible + Sélectionner tout + Page + Échec de suppression + Sélectionné + Musique + Fondu + 2 secondes + Échec de l'opération + Mode aléatoire + Annuler + Modifier + Images + Retirer? + Vidéos + Intervalle du diaporama + Diaporama + Activation + Aucun nom + Nom d'album déjà utilisé + Aucun élément + 10 secondes + Existe déjà + Stores vénitiens + Répéter + Sélectionner tout + Lecteur vidéo + secondes + 3 secondes + Échec du déplacement + Tous les albums + 20 secondes + Nombre maximum de caractères (%d) atteint + Zoom + Galerie + 5 secondes + Fondu enchainé + Impossible de renommer l'élément + Vidéo + Impossible de renommer l'élément. Nom d'album déjà utilisé + Sous-titres + Diaporama + Télécharg. + Créer un dossier ? + Modifier le nom + Diapo + Déplacer + Intervalle + OK + Supprimer ? + Modifier + Nombre maximum de caractères (%d) atteint + OK + diff --git a/res/fra-FR.xml b/res/fra-FR.xml new file mode 100644 index 0000000..5435fc3 --- /dev/null +++ b/res/fra-FR.xml @@ -0,0 +1,70 @@ + + + + Nb. max. de caractères atteint + Supprimer + Albums + %s existe déjà + Pellicule + Créer un album + Effet de transition + Annuler + Iris + Existe déjà. L' écraser ? + Email + Suppression impossible + Sélect. tt + Page + Échec de suppression + Sélectionné + Musique + Fondu + 2 secondes + Échec de l'opération + Mode aléatoire + Annuler + Modifier + Images + Supprimer ? + Vidéos + Intervalle du diaporama + Diaporama + Activation + Aucun nom + Nom d'album déjà utilisé + Aucun élément + 10 secondes + Existe déjà + Stores vénitiens + Répéter + Sélect. tout + Lecteur vidéo + secondes + 3 secondes + Échec du déplacement + Tous les albums + 20 secondes + Le nombre maximum de caractères (%d) est atteint + Zoom + Galerie + 5 secondes + Fondu enchaîné + Impossible de renommer l'élément + Vidéo + Impossible de renommer l'élément. Nom d'album déjà utilisé + Sous-titres + Diaporama + Téléchargements + Créer un dossier ? + Modifier le nom + Défilement + Déplacer + Intervalle + OK + Supprimer ? + Modifier + Le nombre maximum de caractères (%d) est atteint + Effectué + diff --git a/res/gle-IE.xml b/res/gle-IE.xml new file mode 100644 index 0000000..bf5b8c8 --- /dev/null +++ b/res/gle-IE.xml @@ -0,0 +1,70 @@ + + + + Uaslíon na gcarachtar bainte amach + Scrios + Albaim + Tá %s ann cheana + Rolla ceamara + Déan albam + Maisíocht trasdula + Cuir ar ceal + Feileastram + Ann cheana. Forscríobh? + R-phost + Ní féidir scriosadh + Rogh. gach + Leathanach + Theip ar scriosadh + Roghnaithe + Ceol + Céimnigh + 2 shoicind + Theip ar oibríocht + Suaitheadh + Cuir ar ceal + Cuir in eagar + Íomhánna + Bain? + Físeáin + Eatramh taispeántais sleamhnán + Sleamhnán + Gníomhachtú + Níl ainm ann + Ainm albaim in úsáid cheana + Níl míreanna ann + 10 soicind + Ann cheana + Dallóg + Déan arís + Roghnaigh gach + Seinnteoir Físeán + soicindí + 3 shoicind + Theip ar bhogadh + Gach albam + 20 soicind + Uaslíon na gcarachtar (%d) bainte amach + Zúmáil + Gailearaí + 5 shoicind + Leáigh + Ní féidir athainmniú + Físeán + Ní féidir athainmniú. Ainm an albaim in úsáid cheana + Fotheidil + Taispeántas sleamhnán + Ioslódálacha + Déan fillteán? + Athraigh ainm + Sleamhnán + Bog + Eatramh + Curtha i gcrích + Scrios? + Cuir in eagar + Uaslíon na gcarachtar (%d) bainte amach + Déanta + diff --git a/res/glg-ES.xml b/res/glg-ES.xml new file mode 100644 index 0000000..ffbc26f --- /dev/null +++ b/res/glg-ES.xml @@ -0,0 +1,70 @@ + + + + Número máximo de caracteres alcanzado + Eliminar + Álbums + %s xa existe + Rolo de cámara + Crear álbum + Efecto de transición + Cancelar + Iris + Xa existe. Sobrescribir? + Correo electrónico + Non se pode eliminar + Selec todo + Páxina + Erro ao eliminar + Seleccionado + Música + Atenuar + 2 segundos + Fallo na operación + Orde aleatoria + Cancelar + Editar + Imaxes + Eliminar? + Vídeos + Intervalo de presentación + Diapos + Activación + Sen nome + Nome de álbum xa en uso + Sen elementos + 10 segundos + Xa existe + Persiana + Repetir + Seleccionar todo + Reprodutor de Vídeo + segundos + 3 segundos + Erro ao mover + Todos os álbums + 20 segundos + Alcanzouse o número máximo de carácteres (%d) + Zoom + Galería + 5 segundos + Fundir + Non se pode cambiar o nome + Vídeo + Non se pode cambiar o nome. Nome de álbum xa en uso + Subtítulos + Presentación de diapositivas + Descargas + Crear carpeta? + Cambiar nome + Diapositiva + Mover + Intervalo + Completada + Eliminar? + Editar + Alcanzouse o número máximo de carácteres (%d) + Finalizado + diff --git a/res/hin-IN.xml b/res/hin-IN.xml new file mode 100644 index 0000000..94545f5 --- /dev/null +++ b/res/hin-IN.xml @@ -0,0 +1,70 @@ + + + + वर्णो की संख्‍या अधिकतम पहुँची + हटाएँ + अल्बम्स + %s पहले से मौजूद है + कैमरा रोल + अल्बम बनाएँ + परिवर्तन प्रभाव + रद्द करें + आइरिस + पहले से मौजूद है। ओवरराइट करें? + ईमेल + हटाने में अक्षम + सभी चुनें + पेज + हटाना विफल + चुना गया + संगीत + फीका + 2 सेकंड + कार्रवाई विफल + शफ़ल + रद्द करें + संपादित करें + छवियाँ + हटाएँ? + विडियो + स्लाइड शो अंतराल + स्लाइड शो + सक्रियण + नाम नहीं + अल्बम नाम पहले से उपयोग में + कोई मदें नहीं + 10 सेकंड + पहले से ही मौजूद + ब्लाइंड + दोहराव + सभी चुनें + वीडियो प्‍लेयर + सेकेंड + 3 सेकंड + ले जाना विफल हुआ + सभी एलबम्‍स + 20 सेकंड + वर्णों की अधिकतम संख्या (%d) तक पहुँच गया + ज़ूम + गैलरी + 5 सेकंड + विलय + नाम बदलने में अक्षम + विडियो + पुनर्नामित करने में अक्षम. अल्बम नाम पहले से उपयोग में + उपशीर्षक + स्लाइड शो + डाउनलोड + फोल्डर बनाएं? + नाम बदलें + स्लाइड + ले जाएँ + अन्तराल + पूर्ण + हटाएँ? + संपादित करें + वर्णों की अधिकतम संख्या (%d) तक पहुँच गया + हुआ + diff --git a/res/hrv-HR.xml b/res/hrv-HR.xml new file mode 100644 index 0000000..0890a0c --- /dev/null +++ b/res/hrv-HR.xml @@ -0,0 +1,70 @@ + + + + Maks. broj znakova + Obriši + Albumi + %s već postoji + Snimke kamere + Novi album + Efekt prijelaza + Prekid + Iris + Već postoji. Piši preko? + Email + Brisanje nemoguće + Označi sve + Stranica + Brisanje neuspješno + Odabrano + Glazba + Zatamni + 2 sek + Neuspješno + Nasumično + Prekid + Uredi + Slike + Ukloniti? + Video + Interval prezentacije + Prezentacija + Uključivanje + Nema imena + Već postoji naziv albuma + Nema stavki + 10 sek + Već postoji + Roleta + Ponavljanje + Odaberi sve + Video Player + sekundi + 3 sek + Premještanje neuspješno + Svi albumi + 20 sek + Maksimalan broj znakova (%d) + Zoom + Album + 5 sek + Razrijedi + Nemoguće preimenovati + Video + Nemoguće preimenovati. Već postoji naziv albuma + Titlovi + Prezentacija + Skidanja + Nova mapa? + Promijenite ime + Listanje + Premjesti + Interval + Obavljeno + Obrisati? + Uredi + Maksimalan broj znakova (%d) + OK + diff --git a/res/hun-HU.xml b/res/hun-HU.xml new file mode 100644 index 0000000..b4e5602 --- /dev/null +++ b/res/hun-HU.xml @@ -0,0 +1,70 @@ + + + + Nincs hely több karakternek + Töröl + Albumok + Már van %s nevű fájl + Filmszalag + Album létrehozása + Áttűnés + Mégse + Írisz + Már létezik. Felülírja? + E-mail + Nem törölhető + Mind kijel. + Oldal + Törlés sikertelen + Kiválasztott + Zenék + Áttűnés + 2 másodperc + Sikertelen művelet + Véletlen sorrend + Mégse + Szerkeszt + Képek + Törli? + Videók + Diabemutató intervalluma + Diavet. + Aktivál + Nincs név + Ilyen albumnév már van + Nincs tétel + 10 másodperc + Már létezik + Rács + Ismétlés + Összes kijelölése + Videolejátszó + másodperc + 3 másodperc + Az áthelyezés sikertelen + Összes album + 20 másodperc + Elérte a karakterek maximális számát (%d) + Nagyítás + Galéria + 5 másodperc + Áttűnés + Nem lehet átnevezni + Videó + Nem lehet átnevezni. Ilyen albumnév már van + Feliratok + Diavetítés + Letöltések + Mappát hoz létre? + Név módosítása + Dia + Áthelyez + Intervallum + Kész + Törli? + Szerkeszt + Elérte a karakterek maximális számát (%d) + Kész + diff --git a/res/hye-AM.xml b/res/hye-AM.xml new file mode 100644 index 0000000..b49fbd9 --- /dev/null +++ b/res/hye-AM.xml @@ -0,0 +1,70 @@ + + + + Հասել եք նիշերի առավելագույն քանակին + Ջնջել + Ալբոմներ + %s-ն արդեն գոյություն ունի + Խցիկի հոլովակ + Ստեղծել ալբոմ + Փոխանցման էֆեկտ + Չեղարկել + Ծիածան + Արդեն գոյություն ունի: Վերագրանցե՞լ + Էլ.փոստ + Անհար է ջնջել + Ընտրել բլր + Էջ + Ջնջումը ձախողվեց + Ընտրված + Երաժշտությն + Անհետացող + 2 վայրկյան + Գործողությունը ձախողվեց + Պատահական + Չեղարկել + Խմբագրել + Պատկերներ + Հեռացնե՞լ + Տեսահոլովակներ + Սահկահանդեսի միջակայքը + Սլյդ շոու + Ակտիվացում + Անուն չկա + Ալբմի անունն արդեն գրծվմ է + Տարրեր չկան + 10 վայրկյան + Արդեն գոյություն ունի + Գալարավարագույր + Կրկնել + Ընտրել բոլորը + Տեսանվագարկիչ + վայրկյաններ + 3 վայրկյան + Տեղափոխումը ձախողվեց + Բոլոր ալբոմները + 20 վայրկյան + Հասել է նիշերի առավելագույն քանակին (%d) + Մասշտաբ + Պատկերասրահ + 5 վայրկյան + Լուծել + Հնարավոր չէ վերանվանել + Վիդեո + Անհնար է վերանվանել: Ալբոմի անունն արդեն գործածվում է + Ենթավերնագրեր + Սլայդ շոու + Բեռնումներ + Ստեղծե՞լ թղթապանակ + Փոխել անունը + Սլայդ + Տեղափոխել + Դադար + Ավարտված է + Ջնջե՞լ + Խմբագրել + Հասել է նիշերի առավելագույն քանակին (%d) + Պատրաստ + diff --git a/res/isl-IS.xml b/res/isl-IS.xml new file mode 100644 index 0000000..e060c2e --- /dev/null +++ b/res/isl-IS.xml @@ -0,0 +1,70 @@ + + + + Hámarksfjölda stafa hefur verið náð + Eyða + Möppur + %s er til fyrir + Myndarúlla + Búa til albúm + Skipting + Hætta við + Augasteinn + Er þegar til. Viltu skrifa yfir? + Tölvupóstur + Það er ekki hægt að eyða + Velja allt + Síða + Ekki tókst að eyða + Valið + Tónlist + Lækka + 2 sekúndur + Aðgerð mistókst + Stokka + Hætta við + Breyta + Myndir + Á að fjarlægja? + Myndskeið + Tími milli mynda + Skyggnur + Virkjun + Ekkert heiti + Heitið er þegar í notkun + Engin atriði + 10 sekúndur + Er þegar til + Rimlagardína + Endurtaka + Velja allt + Myndspilari + sekúndur + 3 sekúndur + Ekki tókst að flytja + Allar plötur + 20 sekúndur + Hámarkfjölda stafa (%d) hefur verið náð + Aðdráttur + Gallerí + 5 sekúndur + Leysa upp + Mistókst að breyta heiti + Myndskeið + Mistókst að endurnefna. Heitið er þegar í notkun + Texti + Glærusýning + Niðurhal + Á að búa til möppu? + Breyta heiti + Glæra + Færa + Bil + Lokið + Á að eyða? + Breyta + Hámarkfjölda stafa (%d) hefur verið náð + Lokið + diff --git a/res/ita-IT.xml b/res/ita-IT.xml new file mode 100644 index 0000000..a2853b1 --- /dev/null +++ b/res/ita-IT.xml @@ -0,0 +1,70 @@ + + + + Raggiunto numero massimo di caratteri + Elimina + Album + %s esiste già + Foto personali + Crea album + Effetto di transizione + Annulla + Iride + Già esistente. Sovrascrivere? + E-mail + Impossibile eliminare + Sel. tutto + Pagina + Eliminazione non riuscita + Selezionato + Musica + Sfumatura + 2 secondi + Operazione non eseguita + Riproduzione casuale + Annulla + Modifica + Immagini + Rimuovere? + Video + Intervallo presentazione + Present. + Attivazione + Nessun nome + Nome album già in uso + Nessun elemento + 10 secondi + Già esiste + Veneziana + Ripeti + Seleziona tutto + Lettore video + secondi + 3 secondi + Spostamento non riuscito + Tutti gli album + 20 secondi + Raggiunto numero massimo di caratteri (%d) + Zoom + Galleria + 5 secondi + Dissolvenza + Impossibile rinominare + Video + Impossibile rinominare. Nome album già in uso + Sottotitoli + Presentazione + Download + Creare cartella? + Cambia nome + Scorrimento + Sposta + Intervallo + Fatto + Eliminare? + Modifica + Raggiunto numero massimo di caratteri (%d) + Fatto + diff --git a/res/jpn-JP.xml b/res/jpn-JP.xml new file mode 100644 index 0000000..578f445 --- /dev/null +++ b/res/jpn-JP.xml @@ -0,0 +1,70 @@ + + + + 最大文字数に達しました。 + 削除 + アルバム + %sは既に存在します。 + カメラロール + アルバム​作成 + 通過効果 + キャンセル + アイリス + 同名ファイルがあります。上書きしますか? + Eメール + 削除できません。 + 全て選択 + ページ + 削除できませんでした。 + 選択済み + 音楽 + フェード + 2秒 + 操作に失敗しました。 + シャッフル + キャンセル + 編集 + 画像 + 削除しますか? + 動画 + スライドショーの間隔 + スライドショー + アクティベーション + 名前なし + アルバム名は既に使用しています。 + アイテムがありません。 + 10秒 + 既に登録されています。 + ブラインド + 繰り返し + 全て選択 + 動画 + 秒 + 3秒 + 移動に失敗しました。 + 全アルバム + 20秒 + 最大文字数(%d)に達しました。 + ズーム + ギャラリー + 5秒 + ディゾルブ + 名前を変更できません。 + 動画 + 名前​を​変更​できません。​アルバム名​は​既に​使用​されて​います + 字幕 + スライドショー + ダウンロード + フォルダを作成しますか? + 名前を変更 + スライド + 移動 + 間隔 + 完了しました。 + 削除しますか? + 編集 + 最大文字数(%d)に達しました。 + 完了 + diff --git a/res/kat-GE.xml b/res/kat-GE.xml new file mode 100644 index 0000000..de0b8ed --- /dev/null +++ b/res/kat-GE.xml @@ -0,0 +1,70 @@ + + + + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა + წაშლა + ალბომები + %s უკვე არსებობს + ვიდეოფრაგმენტი + ალბომის შექმნა + გადასვლის ეფექტი + გაუქმება + ირისი + უკვე არსებობს. გადავაწერო? + ელ-ფოსტა + წაშლა შეუძლებელია + ყველა + გვერდი + წაშლა არ მოხერხდა + შერჩეული + მუსიკა + ნელ-ნელა ჩაქრობა + 2 წამი + ოპერაცია ვერ შესრულდა + გადანაცვლება + გაუქმება + შეცვლა + გამოსახულებები + წაიშალოს? + ვიდეოები + სლაიდ–შოუს ინტერვალი + სლაიდ–შოუ + გააქტიურება + უსახელო + ალბომის სახელი უკვე არის + ელემენტები არ არის + 10 წამი + უკვე არის + დაბინდვა + გამეორება + ყველას არჩევა + ვიდეო პლეერი + წამი + 3 წამი + გადატანა ვერ შესრულდა + ყველა ალბომი + 20 წამი + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა (%d) + მასშტაბი + გალერეა + 5 წამი + თანდათან გაქრობა + სახელს ვერ შეცვლით + ვიდეო + სახელს ვერ შეცვლით. ალბომის სახელი უკვე გამოყენებულია + სუბტიტრები + სლაიდშოუ + გადმოწერილები + შექმნით საქაღალდეს? + სახელის შეცვლა + სლაიდი + გადატანა + ინტერვალი + დასრულდა + წაიშალოს? + შეცვლა + მიღწეულია სიმბოლოების მაქსიმალური რაოდენობა (%d) + შესრულდა + diff --git a/res/kaz-KZ.xml b/res/kaz-KZ.xml new file mode 100644 index 0000000..3105c79 --- /dev/null +++ b/res/kaz-KZ.xml @@ -0,0 +1,70 @@ + + + + Таңбалардың ен көп саны артты + Жою + Альбомдар + %s бар + Камера білігі + Альбом жасау + Өтпелі әсер + Тоқтату + Жыланқияқ + Бар. Қайта жазу керек пе? + Эл. пошта + Жою мүмкін емес + Барл. таң. + Бет + Жою үстінде үзіліп кетті + Таңдалды + Музыка + Тегіс пайда болу + 2 секунд + Әрекет сәтсіз аяқталды + Кездейсоқ тәртіп + Тоқтату + Өзгерту + Суреттер + Жоясыз ба? + Бейнежазбалар + Слайдшоу аралығы + Слайдшоу + Активтеу + Ондай есім жоқ + Альбом атауы пайдаланылуда + Баптар жоқ + 10 секунд + Қолданыста бар + Көрінбейді + Қайталау + Бәрін бөлектеу + Бейне ойнатқыш + секунд + 3 секунд + Орналастырылмады + Барлық альбомдар + 20 секунд + Ең көп таңбалар санына (%d) жетті + Ауқымы + Галерея + 5 секунд + Жоқ болу + Атын өзгерту мүмкін емес + Бейне + Атауын өзгерту мүмкін емес. Альбомның атауы пайдаланылуда + Субтитрлер + Слайд-шоу + Жазылған + Қалта құрасыз ба? + Атын өзгерту + Слайд + Орналастыру + Аралық + Аяқталды + Өшіресіз бе? + Өзгерту + Ең көп таңбалар санына (%d) жетті + Дайын + diff --git a/res/kor-KR.xml b/res/kor-KR.xml new file mode 100644 index 0000000..91d6ec0 --- /dev/null +++ b/res/kor-KR.xml @@ -0,0 +1,70 @@ + + + + 입력 가능한 최대 글자수를 초과하였습니다 + 삭제 + 앨범 + %s이(가) 저장되어 있습니다 + 카메라 앨범 + 앨범 추가 + 전환 효과 + 취소 + 아이리스 + 사용 중인 이름입니다. 덮어쓸까요? + 이메일 + 삭제할 수 없습니다 + 모두 선택 + 페이지 + 삭제하지 못하였습니다 + 단일 선택 + 음악 + 페이드 + 2초 + 작업을 수행하지 못하였습니다 + 셔플 + 취소 + 편집 + 이미지 + 제거할까요? + 동영상 + 슬라이드쇼 전환 간격 + 슬라이드쇼 + 실행 + 이름이 없습니다 + 사용 중인 이름입니다 + 항목이 없습니다 + 10초 + 이미 저장되어 있습니다 + 블라인드 + 반복 + 모두 선택 + 비디오 플레이어 + 초 + 3초 + 이동하지 못하였습니다 + 모든 앨범 + 20초 + 최대 글자 수(%d개)를 초과하였습니다 + 확대/축소 + 갤러리 + 5초 + 디졸브 + 이름을 변경할 수 없습니다 + 동영상 + 사용 중인 앨범 이름이므로 변경할 수 없습니다 + 자막 + 슬라이드쇼 + 다운로드 관리 + 폴더를 추가할까요? + 이름 변경 + 슬라이드 + 이동 + 간격 + 완료되었습니다 + 삭제할까요? + 편집 + 최대 글자 수(%d개)를 초과하였습니다 + 완료 + diff --git a/res/lav-LV.xml b/res/lav-LV.xml new file mode 100644 index 0000000..e77c860 --- /dev/null +++ b/res/lav-LV.xml @@ -0,0 +1,70 @@ + + + + Sasniegts maksimālais rakstzīmju skaits + Dzēst + Albumi + %s jau pastāv + Kam.fotoatt.rul. + Izveidot albumu + Pārejas efekts + Atcelt + Varavīksne + Jau pastāv. Vai pārrakstīt? + E-pasts + Nevar izdzēst + Izv. visu + Lapa + Neizdevās izdzēst + Izvēlēts + Mūzika + Izgaist + 2 sekundes + Darbība neizdevās + Jaukt + Atcelt + Rediģēt + Attēli + Vai noņemt? + Video + Slaidrādes intervāls + Slaidrāde + Aktivizēšana + Nav vārda + Alb.nosauk. jau tiek liet. + Nav vienumu + 10 sekundes + Jau pastāv + Aizēnošana + Atkārtot + Izv. visu + Video atskaņotājs + sekundes + 3 sekundes + Pārvietošana neizdevās + Visi albumi + 20 sekundes + Sasniegts maksimālais rakstzīmju skaits (%d) + Tālummaiņa + Galerija + 5 sekundes + Izšķīdināt + Nevar pārdēvēt + Video + Nevar pārdēvēt. Albuma nosaukums jau tiek lietots + Subtitri + Slaidrāde + Lejupielādes + Vai izveidot mapi? + Mainīt vārdu + Slaids + Pārvietot + Intervāls + Pabeigts + Vai dzēst? + Rediģēt + Sasniegts maksimālais rakstzīmju skaits (%d) + Gatavs + diff --git a/res/lit-LT.xml b/res/lit-LT.xml new file mode 100644 index 0000000..f6cae22 --- /dev/null +++ b/res/lit-LT.xml @@ -0,0 +1,70 @@ + + + + Pasiektas didžiausias simbolių skaičius + Trinti + Albumai + %s jau yra + Nuotr. rodymas + Sukurti albumą + Perėjimo efektas + Atšaukti + Rainelė + Jau yra. Perrašyti? + El. paštas + Ištrinti nepavyko + Rin. Viską + Puslapis + Ištrinti nepavyko + Pasirinkta + Muzika + Išblukimas + 2 sekundės + Veiksmas nepavyko + Maišyti + Atšaukti + Redaguoti + Vaizdai + Ar šalinti? + Vaizdo įrašai + Skaidrių rodymo intervalas + Skaid.rod. + Aktyvinimas + Nėra vardo + Albumo pavadinimas jau yra + Elementų nėra + 10 sekundžių + Jau yra + Žaliuzės + Kartoti + Pasirinkti viską + Vaizdo įrašų leistuvas + sekundės + 3 sekundės + Perkelti nepavyko + Visi albumai + 20 sekundžių + Pasiektas didžiausias simbolių skaičius (%d) + Mastelio keitimas + Galerija + 5 sekundės + Panaikinti + Neįmanoma pervardinti + Vaizdo įrašas + Neįmanoma pakeisti pavadinimo. Toks albumo pavadinimas jau yra + Subtitrai + Skaidrių demonstravimas + Atsisiųsti elem. + Ar kurti aplanką? + Keisti vardą + Skaidrė + Perkelti + Intervalas + Atlikta + Ar trinti? + Redaguoti + Pasiektas didžiausias simbolių skaičius (%d) + Atlikta + diff --git a/res/mkd-MK.xml b/res/mkd-MK.xml new file mode 100644 index 0000000..9a172d6 --- /dev/null +++ b/res/mkd-MK.xml @@ -0,0 +1,70 @@ + + + + Достигнат е максималниот број знаци + Избриши + Албуми + %s веќе постои + Ролна на камера + Нов албум + Премин + Откажи + Зеница + Веќе постои. Пресними? + Е-пошта + Не може да се избрише + Изб. сите + Страна + Неуспешно бришење + Избраните + Музика + Затемнување + 2 секунди + Неуспешна операција + Произволно + Откажи + Измени + Слики + Отстрани? + Видео-записи + Период на слајдовите + Слајдови + Активирање + Нема име + Името на албумот постои + Нема записи + 10 секунди + Веќе постои + Ролетна + Повторување + Избери ги сите + Видео-плеер + секунди + 3 секунди + Неуспешно преместување + Сите албуми + 20 секунди + Достигнат е максималниот број знаци (%d) + Зголемено + Галерија + 5 секунди + Растворање + Не може да се преименува + Видео-запис + Не може да се преименува. Името на албумот постои + Титли + Слајдови + Преземено + Направи нова папка? + Смени име + Слајд + Премести + Интервал + Завршено + Да се избрише? + Измени + Достигнат е максималниот број знаци (%d) + Готово + diff --git a/res/nld-NL.xml b/res/nld-NL.xml new file mode 100644 index 0000000..38cd2e2 --- /dev/null +++ b/res/nld-NL.xml @@ -0,0 +1,70 @@ + + + + Maximumaantal tekens bereikt + Wissen + Albums + %s bestaat al + Camerarol + Album maken + Overgangseffect + Annuleren + Iris + Bestaat al. Overschrijven? + E-mail + Kan niet verwijderen + Alles sel. + Pagina + Verwijderen mislukt + Geselecteerd + Muziek + Uitvloeien + 2 seconden + Bewerking is mislukt + Willekeurig + Annuleren + Bewerken + Afbeeldingen + Verwijderen? + Video's + Interval diashow + Diashow + Inschakelen + Geen naam + Albumnaam al in gebruik + Geen items + 10 seconden + Bestaat al + Jaloezie + Herhalen + Alles selecteren + Videospeler + seconden + 3 seconden + Verplaatsen is mislukt + Alle albums + 20 seconden + Maximumaantal tekens (%d) bereikt + Zoomen + Galerij + 5 seconden + Oplossen + Kan de naam niet wijzigen + Video + Kan de naam niet wijzigen. Albumnaam al in gebruik + Ondertitels + Diapresentatie + Downloads + Map maken? + Naam wijzigen + Pictogram + Verplaatsen + Interval + Voltooid + Verwijderen? + Bewerken + Maximumaantal tekens (%d) bereikt + Gereed + diff --git a/res/nob-NO.xml b/res/nob-NO.xml new file mode 100644 index 0000000..c7dfbb4 --- /dev/null +++ b/res/nob-NO.xml @@ -0,0 +1,70 @@ + + + + Nådd maksimalt antall tegn + Slett + Album + %s finnes allerede + Kamerabilder + Lag album + Overgangseffekt + Avbryt + Iris + Finnes allerede. Vil du overskrive? + E-post + Kan ikke slette + Velg alle + Side + Kunne ikke slette + Valgt + Musikk + Fade + 2 sekunder + Operasjonen mislyktes + Tilfeldig avspilling + Avbryt + Rediger + Bilder + Fjerne? + Videoklipp + Bildefremvisningsintervall + Bildevisn + Aktivering + Ingen navn + Albumnavn allerede i bruk + Ingen elementer + 10 sekunder + Finnes allerede + Persienne + Gjenta + Merk alt + Videospiller + sekunder + 3 sekunder + Flyttingen mislyktes + Alle album + 20 sekunder + Maksimalt antall tegn (%d) er nådd + Zoom + Galleri + 5 sekunder + Oppløs + Kan ikke gi nytt navn + Videoklipp + Kan ikke gi nytt navn. Albumnavnet er allerede i bruk + Undertekster + Bildefremvisning + Nedlast. + Opprette mappe? + Endre navn + Lysbilde + Flytt + Intervall + Fullført + Slette? + Rediger + Maksimalt antall tegn (%d) er nådd + Utført + diff --git a/res/pol-PL.xml b/res/pol-PL.xml new file mode 100644 index 0000000..9c07a54 --- /dev/null +++ b/res/pol-PL.xml @@ -0,0 +1,70 @@ + + + + Osiągnięto maksymalną liczbę znaków + Usuń + Albumy + %s już istnieje + Rolka aparatu + Utwórz album + Efekt przejścia menu + Anuluj + Koło + Już istnieje. Zamienić? + E-mail + Nie można usunąć + Zazn. wsz. + Strony + Błąd usuwania + Wybrany + Muzyka + Zanikanie + 2 sek. + Operacja nie powiodła się + Kolejność losowa + Anuluj + Edytuj + Obrazy + Usunąć? + Filmy + Interwał pokazu slajdów + Pok. slajd + Aktywacja + Bez nazwy + Nazwa albumu już w użyciu + Brak elementów + 10 sek. + Już istnieje + Zasłona + Powtórz + Zaznacz wszystko + Odtwarzacz wideo + s + 3 sek. + Błąd przenoszenia + Wszystkie albumy + 20 sek. + Osiągnięto maksymalną liczbę znaków (%d) + Powiększenie + Galeria + 5 sek. + Przenikanie + Nie można zmienić nazwy + Film + Nie można zmienić nazwy. Nazwa albumu już w użyciu + Napisy + Pokaz slajdów + Pobrane + Utworzyć katalog ? + Zmień nazwę + Slajd + Przenieś + Okres + Zakończono + Usunąć? + Edytuj + Osiągnięto maksymalną liczbę znaków (%d) + Gotowe + diff --git a/res/por-BR.xml b/res/por-BR.xml new file mode 100644 index 0000000..c198dbe --- /dev/null +++ b/res/por-BR.xml @@ -0,0 +1,70 @@ + + + + Número máximo de caracteres atingido + Apagar + Álbuns + %s já existente + Giro da câmera + Criar álbum + Efeito de transição + Cancelar + Iris + Já existe. Substituir? + E-mail + Impossível apagar + Sel. Tudo + Página + Erro ao apagar + Selecionado + Músicas + Desbotar + 2 segundos + Operação falhou + Modo aleatório + Cancelar + Editar + Imagens + Remover? + Vídeos + Intervalo da apresentação de slides + Ver slides + Ativação + Sem nome + Nome de álbum existente + Sem itens + 10 segundos + Já existe + Persiana + Repetir + Selecionar tudo + Video Player + segundos + 3 segundos + Erro ao mover + Todos os álbuns + 20 segundos + Número máximo de caracteres (%d) atingido + Zoom + Galeria + 5 segundos + Dissolver + Impossível renomear + Vídeo + Impossível renomear. Nome de álbum já utilizado + Legendas + Exibição de slides + Downloads + criar pasta? + Alterar nome + Transição + Mover + Intervalo + Concluído + Apagar? + Editar + Número máximo de caracteres (%d) atingido + Concluído + diff --git a/res/por-PT.xml b/res/por-PT.xml new file mode 100644 index 0000000..e275c9b --- /dev/null +++ b/res/por-PT.xml @@ -0,0 +1,70 @@ + + + + Número máximo de caracteres atingido. + Eliminar + Álbuns + %s já existente + Rolo da câmara + Criar álbum + Efeito de transição + Cancelar + Íris + Já existe. Substituir? + E-mail + Impossível apagar. + Selec. tudo + Página + Falha ao apagar + Seleccionado + Música + Saída gradual + 2 segundos + Operação falhou + Aleatório + Cancelar + Editar + Imagens + Remover? + Vídeos + Duração da apresentação + Diaporama + Activação + Sem nome + Nome de álbum já utilizado + Sem itens + 10 segundos + Já existe + Persiana + Repetir + Selec. tudo + Leitor de Vídeo + segundos + 3 segundos + Falha ao mover + Todos os álbuns + 20 segundos + Número máximo de caracteres (%d) atingido + Zoom + Galeria + 5 segundos + Dissolver + Impossível mudar nome + Vídeo + Impossível mudar o nome. Nome de álbum já utilizado + Legendas + Apresentação de slides + Transferências + Criar pasta? + Alterar nome + Slide + Mover + Intervalo + Concluída + Eliminar? + Editar + Número máximo de caracteres (%d) atingido + Concluído + diff --git a/res/ron-RO.xml b/res/ron-RO.xml new file mode 100644 index 0000000..4b545c3 --- /dev/null +++ b/res/ron-RO.xml @@ -0,0 +1,70 @@ + + + + Adăugare la marcaje + Ştergere + Albume + %s există deja + Capturi cameră + Creare album + Efect de tranziţie + Anulare + Curcubeu + Există deja. Suprascrieţi? + Email + Imposibil de şters + Sel. int. + Pagină + Ştergerea nu a reuşit + Selectat + Muzică + Estompare + 2 secunde + Operaţie nereuşită + Amestecare + Anulare + Editare + Imagini + Eliminare? + Videoclipuri + Interval expunere diapozitive + Ex. diap. + Activare + Nici un nume + Numele este deja în uz + Niciun element + 10 secunde + Există deja + Jaluzele + Repetare + Selectare toate + Player video + secunde + 3 secunde + Mutarea nu a reuşit + Toate albumele + 20 secunde + Numărul maxim de caractere (%d) a fost atins + Panoramare + Galerie + 5 secunde + Dizolvare + Imposibil de redenumit + Videoclip + Imposibil de redenumit. Numele albumului este deja în uz + Subtitrare + Expuneri diapozitive + Descărcări + Creaţi folder? + Schimbare nume + Diapozitiv + Mutare + Interval + Finalizat + Ştergeţi? + Editare + Numărul maxim de caractere (%d) a fost atins + Gata + diff --git a/res/rus-RU.xml b/res/rus-RU.xml new file mode 100644 index 0000000..f6fde71 --- /dev/null +++ b/res/rus-RU.xml @@ -0,0 +1,70 @@ + + + + Достигнуто максимальное число символов + Удалить + Альбомы + %s уже существует + Каталог фото + Создать альбом + Эффект перехода + Отмена + Радуга + Уже существует. Перезаписать? + E-mail + Невозможно удалить + Выбр. все + Страница + Сбой удаления + Выбрано + Музыка + Растворение + 2 секунды + Сбой операции + Случайный порядок + Отмена + Изменить + Картинки + Удалить? + Видео + Интервал для слайд-шоу + Слайд-шоу + Активация + Нет имени + Имя альбома используется + Нет элементов + 10 секунд + Уже существует + Жалюзи + Повторить + Выбрать все + Видеоплеер + сек. + 3 секунды + Сбой перемещения + Все альбомы + 20 секунд + Достигнуто максимальное число символов (%d) + Масштаб + Галерея + 5 секунд + Растворение + Невозможно переименовать + Видео + Невозможно переименовать. Имя альбома уже используется + Субтитры + Слайд-шоу + Загрузки + Создать папку? + Изменить имя + Слайд-шоу + Переместить + Интервал + Завершено + Удалить? + Изменить + Достигнуто максимальное число символов (%d) + Готово + diff --git a/res/screen-density-xhigh/T01_Nocontents_broken.png b/res/screen-density-xhigh/T01_Nocontents_broken.png new file mode 100644 index 0000000000000000000000000000000000000000..c200d0c6ea27c8007c7b11366d5e0f66e4de8425 GIT binary patch literal 6301 zcmbVPcQl+`w|~66O7u>UFrq|6k1|>qy^Lr<7|}%?MAVEDorEB|5haK&1R1^8=q(sT zuS3)k^-jLK?pojdzI)fY>;7@-Zojkl+0S!!)Dx&G`K{Zx001CYS5wjh06Z|Ri4zmz zb`FBfd2j=Xo0`c>03fCP)9`@wOeO%hrQ-mBJbCg0?g@YS0`A7H4uP<{dBE))oNWQX zXBMe%Z=k=$Ad6i%R@96P`k)EdqbFw9Q;Z3si|6L!AfeKTwDmaHbK`zVO4 zNbwH!&yb$Z?xj_M$HBMmxdBwf)ixY2uQ>65vj7>H2cTA>W&qD;oRk=7)y`-YVvV?= z+*V98!wU+$Tw$x5ogmZtM<>MM4du!I{$nB4Blylyr zW@gq_SAS@9DwPms@-UR65Gx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wV*KLCoP^zi@y literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_Nocontents_picture.png b/res/screen-density-xhigh/T01_Nocontents_picture.png new file mode 100644 index 0000000000000000000000000000000000000000..0f984803828306623a3394585b881bb6ce9878f1 GIT binary patch literal 7487 zcmb7ocQl+)wC^Xxj4lyU7$sUV7(|P~FuD+e(W6I?7Nd8fM2%iYMk3KiuOU%_B-$W4 z5zz)g^v;{y`^UZat@qY??~iYt@0_#GKEGYgKKtxfPc&6%DDO}L06?Rrs;C11Byi#< z4kjm#Y=@Zf5*rFPRU;1opknyOkPs5bsLf9uLpcFjqx^cux*)FDL5Yz^yPFEGt z77L*+mS?^8E4=4R_xvJEE|ikX4WI|tJmc^<=Oh7+f~2MS?zVwG0VF;nRA8X(aZZ~M zOVlOZntaw%l8~1qZRn(j>fn$YfSg}~{0BfznIr_0$)gKk$pDL9YpVs|i2z{18@xOM zgkX-c{7C?lR1QWGY!blEU=ytf*h>LrgZeQ_fT0j@!&d!^BrqWW2&oy^ssfb_K-&O4 zRW$&n286VuBklua{(!|-PEH@-WfpKldB;F{n-5370wroHt6I8=OHwJ+1T5eVGBAL# z-WyQ6$#+BC@``1)9IV4P>-K|CQMzBdeE@(>VkAntd+swpiyIgaPpGFg7g+mDetFl* zYT;sOu+&Ws0Orv_Ll^vlHFrX!$U~ej-g0k}*_%;eJr84TtLfzG0PO0N!LHjs-6-Y1 zZkn82T3noX^hMsp^1DIcg;~?p?!~I{MeshIBFb!29JNnhpx2N%*WiXlI zrPa)GqRLqV)#Vvv4+flPZB6HwI)4K=cPA9xBWf@fSr%7?LY2;Nki0GKIq z!BF38WP88>pok5HRw9}A+HdiaQs*oL-7gr>so+>vdNqq$#gq=mUs0gQqR%^@r zpsrJBDw4SKQu!?v{ux?0JCO;SgMU$bM+Y1V zddN?aV%=MHw~V^9`%a~P8R^GY`__Y1-elK9mD(u8$-L#+Em@JOh8l*N6RJh*EL@`3 zrYIyRNMCAq@ZL=+Qm^G{zI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?d00001 diff --git a/res/screen-density-xhigh/T01_button_circle_bg_normal_press.png b/res/screen-density-xhigh/T01_button_circle_bg_normal_press.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5f8b242d7203cc396533b436e8c8507fd95534 GIT binary patch literal 5141 zcmV+w6zc1VP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3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00001 diff --git a/res/screen-density-xhigh/T01_button_reveal.png b/res/screen-density-xhigh/T01_button_reveal.png new file mode 100644 index 0000000000000000000000000000000000000000..973b0eac55d5e9b8eaf635cc9603a90464df13d8 GIT binary patch literal 3108 zcmV+<4BPXGP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$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T4IFadjw&wmmW55g z9bi1POoTvQum;j8tFaD&LsN#GP{!5e_|A6#xS1Amz&B2;X0~cRxh`5Bn9T_n1J6rZ z<~)CRx|SI$+YSK#dV1o!THXk1)qI}Z0(@;Gg`8?Gw3dPzPlTEGta=A z1^J6}abIS@fwg8Sk4#ov`X=*E^jVO11i4R%BFpT$x1F^$&?;@Oov1?RK?9i-lg5)D zD88bMrM*R`ElkSDb^`jx`Fz@GM)o*0b5O^8Pp*xCc*<&`+XW=qNtig|qKi&ha?P?K-Ejlzwpa&&Q%=2WIg;IO z#n_;d+O~x5h9VLTm8;LTS{FP9{2GvTZQ1^At-7UobYm1nts)YwqOIHG^rOoaXVDp5 z8)X5DLXJ9j`(nj_*YeiEDj^quPZG+4&x>yJ?VDHUy8##qxuBl%p|gJ(_$Wit$L0C+ zp0+MlE$)Oi+eIub@hq_Rtk2g+p61Et6nX3ra6M}t?1m>p;LOmOptUcNFE;{wq o|1Vkt)_^r&4Oj#Ij{zSI0MG7amc}Jl0ssI207*qoM6N<$f?d;9TmS$7 literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_controlbar_icon_camera.png b/res/screen-density-xhigh/T01_controlbar_icon_camera.png new file mode 100644 index 0000000000000000000000000000000000000000..e243ff2d742b383bbe72ac38e282f9cb1cbde70f GIT binary patch literal 3903 zcmV-F55Vw=P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-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qoz23_;H8qTm zjxsqpnO?x5P>80cCV(h#T|^YsEnNk=R9JxDfIC3Hq9`q9vw0{K3RO6rPR7Q@(xV>s z`~4d1Fi zGVmSn{D0iq3cMyFZvuUaqAd3G^n5xyJIl(-ihf79ySp2+**vVm<^w;)0jsG9_#UVb zk((BaQCNu;gp z?Cd%%w%Ke`x&+?Y*@{5qu@|+tva&Lv3ZSa0>Y)~|tgO7MOW^hO z^+vTw$LI6iFE1}YYr>+wzCNlI{jpf=C0znw==~fiwFRRshHxLNeRjA{%1$?YlS>L1rHkBi+ zDF7^ph-+qM#tmEtW{zC*2XJ#~X{ka)*452`mQ-~p<(qhb1NeM!aBv9t0r&z~Q}?*a z)bp>izrmiH>du@8@PXS@m#kJUP{v0s2CxB~-a0mEIUJ5hM-4(cDlaeZ(a~e36TX+8 zxae$}B)tJl#La1K0pIfD_ff0{|wn7A?(NMlk>Y N002ovPDHLkV1jZVR)_!q literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_controlbar_icon_delete.png b/res/screen-density-xhigh/T01_controlbar_icon_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..2980bdc5e08ffc2a727bf4441acb3c3539d3095a GIT binary patch literal 3518 zcmV;v4MFmWP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6W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kC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0006MNklB^jzfJC5(*aak30YGBSckI;hAlNC$|6?00UqE41fXfKLftBU6fMB04@Ns z1^0Fba0XEHEh3`cFNvC^nu7ZRka*w#0U+&zoC26H?75~D0Ja^U#Q=`#eMv;OA%H$s z-`f^1CMwe6+O;bYoyG#50X!VS!~i}GfNgL(WFw=Fex!1;a#hZG#Wa9keD0Q>@|0Q@jj zKrC>x0i~3Q3L!1ouMA~gG8E2Kr*e4kW8$yx1dao+oDpIePZIF7qiw>vmJG z#o%1@g9n%gR@UHLHN5+tnzc(UGp?Jv02B&R*h&RU18UJpYo07!z_}h-6ad~_&ppEP z!L{3v5ZzfG&$soEY_{g7OSQL70(Y)*K0-AbW|YuPgf<9%eRvB@GGDCI$v3VNVywkc@k8 zr&)JP1xh%amoYSrnQ;FR-eK8yFwyp3BpSeOJOZz%OF z;aIbTi=}44CZU3hv(;QLrKoH^+FG;xpTxUFz3uB}`@ShXuT}N74}{nA>xpsu`T2P) zzwDwU__&3?o%#0LX*YAquJC>l;cGvfvN`h7OOw9G5}GpIM>ptjuig55&r?&NeowW@ zZl{Lu9gwo&Kw3j00x z-|yVNKizKr=D6y7RsY1>+x}-{UIzK;W5pZ?g@P+L`?6lTC^;HPnD~ABKJDDoqA91J z9?yI^d-m*iU%#5JzIy7!bo0q4FJx_95u&9(B}o1cm;LXnm--$`r*qnbd+Gk&_C@vs z+mEyjZ^R#LoxVna;}RS^+xq40+uU*k34_^Zdul2_|Fk)qHaTgdhVI|>x_24g@l5;6 k664{`4UMl48Gl%69$q=AHTC`kV2WYzboFyt=akR{03swSE&u=k literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_controlbar_icon_move.png b/res/screen-density-xhigh/T01_controlbar_icon_move.png new file mode 100644 index 0000000000000000000000000000000000000000..99e3cd7e567a4585107a05783beff3174461e7c8 GIT binary patch literal 3289 zcmV;~3?}o5P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHY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6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00066Nkl!~DPXNY(@7n{&njYw#JMc2|f1Hd{A{ur%LqP&*XCBpZXAAZdn+yaVO{^Ytf037jOzN7@bH`Z1}v(mofk77)zimL zW^W3NEyP2IjsN?qolMJJ%?iM>RBS@XE}Y8NuhPfT9xS&7m9LLrc}Tw5`NE7}tbgX1o@aBwOg%YmMzeGDQ2O7T{Z4XT@YAIq=SyIjGR2JI`>9 z-n+(w0{}5I7diKG1F**SaLK@X^q5m^gv6*y!HD(2|8Bb3RzL+*Km}Al1ysQMwZ8!X XBcshCA%YWI00000NkvXXu0mjfHuD$8 literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_controlbar_icon_save.png b/res/screen-density-xhigh/T01_controlbar_icon_save.png new file mode 100644 index 0000000000000000000000000000000000000000..39baa6a2ede1733000ae98098034506eca3f19c4 GIT binary patch literal 3238 zcmV;X3|aGuP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N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/res/screen-density-xhigh/T01_controlbar_icon_share02.png b/res/screen-density-xhigh/T01_controlbar_icon_share02.png new file mode 100644 index 0000000000000000000000000000000000000000..f58e87ef25406e036930470b56412f007590c1c0 GIT binary patch literal 3637 zcmV-54$AR~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uX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svCe)~`0S77Yy z*|X<&@812XVHifPgE0)lXlZGA&*t%Sv$=V&!bxqs=s~@7T(<(-_wC#FSsoO>2Y6bZ zxmq-*GF3yf*cvdMgetM3>!bsllOFW;_8tVD1?~sd+8Z0W_ALu_KR^>Gg%>*R*WOc9V& z53;QnLZMK|>-D|{JPx!7k#(s~ab_a{DfOVQukTnU(Q9pOeN$}i7Ad&uGl|};BfwTP zU7`nGulJR7dLZX_JH%Dql+5Oq3<0*%xlXFJR>0rb*!aegBS((sdVW_(0`hi8Nc-=@ z6+*&tAz~GFDTKJAeNCc?S+0IJ$rT{uAQzeg@9x;`Fi^W4ilHITMgZ6juP( zNLnnEZ4DqQF7g)vKc4j|P9993>!UFj^@1k9PXUv1P^sj?!kCluyFx}~A&3UzQZJY? zyAc}!QJM8fv1UH)lFf4pBuj^CF*a55_bDKj>F!RkQlO9oSR`n&LwIZzr76IRddt!= t0dpbB|1eP|piDrSfHDDP0_Jf1I{@8}Bkd6$9hm?C002ovPDHLkV1i%-=^+3B literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_icon_thumbnail_bookmark.png b/res/screen-density-xhigh/T01_icon_thumbnail_bookmark.png new file mode 100644 index 0000000000000000000000000000000000000000..bdb690af79494c784da628d53b8679b9588faa42 GIT binary patch literal 3807 zcmV<54j}P~P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>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DYAfq|*a%*?NVCg5c$M&|ZKZ31jSIq(+nSz}}4&zh#C zb^3aHdv5_>0`CJSfWttxWZ0626iI0VDu6eE3-$H&o?tK-P6tePclVz_8_+CaoIuVd zOpL@B4OI>_0H4;@*7mNftZ1pgw70ik2fmQgbX+R46(&xmjzB#F90g7R=exSP#&-)7 z2n5z7%)7uVz_VMXDM67h03BEbW`Idx^4PIs`Mb?EHk&QS?RMV>ZUR%l5}=6~YQ*b0 z1YiI`V9{!|F1TE-L#ZUdrlzI?z#Om)ghU(@-KhpHX9oZHygShSguciFjGf%5hB_2Blc?DzXu z8X6j|03E<(nSH-;xm@4(^z=-{^1{x}&W{0mbg}lhK>Mqzs;Z-JIypJ{_t~>&f0G~= zfpfsy(r(@Z&I9dkx4Um(VBl^vn8)M!8gKw=JRnno`dO{0s3_2NJv=ltbi1vsZOY^E z+yNGWd%!d>3#`Z;X$1-a=h)cTLS0?mba8QUVQXt^>6tTUj##Z$n=ExQywsY+1hmJK0?u>_Ix|IiTv#3_(?3P(tV{{CA;;@+$0yO3DY0C6 gmw!+syw^Vi0Q>Gvbm;C0OaK4?07*qoM6N<$f_`{u(EtDd literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_main_folder_bg.png b/res/screen-density-xhigh/T01_main_folder_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..16d1d5965e0d44e55e6c0e015be43729cfd137fc GIT binary patch literal 4436 zcmeHJS2Wy@w*CpxdyQVBMelW#(Q7bbv_uI*L<>=4jA$eBC!!lBBzl=7B8QD=0RW&gH8HRS01~Ue zgOdCYvuSte`zKKanK*_301eCEK>`#M-T(kF}E zbdn!U0yt+0vXK;L00JytNCUt}6Q~`z^UM%{$^oq2<~Vg=S{jfub?`O;-ZcSTct)Cf zfRYxFvq2_G0A$gC+kmie1dxyquo~?-_j=v13^zPQf+KnCxV+=gXl*8PCW|ssxX@ z^>pL&CYq~r-f?deLTaqzCPDYbMB^+pf7^!(Pz}BzK`H}sa2848@eC@QM#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3UepO5Z{*=K@V@kkx8dI>zf!obyQlWTX~hzg6CILt(t?msu2K11jk5HMyW2hZwEH88-!_ds^;%-g_T1Ett2I>Ck@(U5 zG^vOi#Fp|5!%E=DWs98_pNm-IP7WOG%%98pP*sC#xj*7P=DoSTAdPmW&#BH`&!rEb zo0Lg!hEkndw=>u?{Asdh;ab%-^-n%0GCgpLC4$fjoGm0(X~qy zciKSQCCmSd#Z0pzpq?B>()OxXU& z^P=pc7`V*uIXA-V#^?=CJn;cT;9e_Z=+cB6Kb0J zLkiBXJCJi6M$_*$yc$bp6>DqR$RzL#ASTI;IeR#omBrQ|z# zr;!C#S{1T3Mnc1skHce##KY|)c-zdA>7t_c&gSOki>+6N2K-DY zq*^+XUufCT;GCJM(-60}cC@j7d9dHU6Klw^NOePa86*@S?7`3E!1NO&v|xxcjBJ07 zWLP`cMmCT9M2&AltkjHfUwM+5=c=&RwAO<7%(NJ)LOgxvvI^8T%1-BSipCA-e}IH` z$FkJ3P1zP%dmcD40u#9~UxT z==QKDGFqhI_~$0NGU!?bBfho1BL$iMa}%`g@6^#W^y~LDPQ7&WsMSEhR;j6ns&E?T zNbza=q@F5t9Ct9PjmKK(l&<|QwZ#y@#V zP_PMGYi~nNXTJzAQ`)H{wVp4`+4k2uco}12w=tKbNF>(oO=Yh6U=mo=N`lgcR~<>6 zR8x}F>eau=ObEwRp)0M8bLkNke0ZJ_uCJ%}Z5CW(S@BqxK=7<;X1UL`3TAxRD>0pZ z_+fA>_d^0U{T7)AH5hYr}dM=k2i+ ZK%u2iXylP8_n)%`m>OCcVD#Od{uk7Av3mdj literal 0 HcmV?d00001 diff --git a/res/screen-density-xhigh/T01_places_thumbnail_bg.png b/res/screen-density-xhigh/T01_places_thumbnail_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..5b0fb2745ed5baa434ae4dd3678e6e28ace06e5f GIT binary patch literal 3330 zcmb7GXE5B0*Zv8?>b-M`zIu<&u3m!`D~J}B=p|~fdP|7tWrZXRAT>06G1?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RVYUpVQQpur9wE7Y{XGl(cCwYNp53#ccP~@wg5Dd{xJT-_4uI zm~f|xe-Qa&?kkDoj$>+HB!ysnV!Ty?dYW$%oNY=fS1x#J85*#r^+zj5Yqby|WvW;& zW*`Svs}_H%vZT;1+paz+?rQyI7LJ1Jdm3^mii6Se-kzV9tq8ZNg5F@R<57NlSdVEYKle1 z55F{xVqYl~9lg0Zr0bZ~@e9S0Z8F{!Nq9(HtJ0c+0ej7w z)*M>pq9eNm!i+tlANP#L^fVKA9FSX*ZO2C(EYBa>nZhNk*P0#wB%s*U7?V@b3|Qt| z#;66M<&bUmM4!>m`O8@!t7`h&o=mzXg^ zokEL(3mYe!cGE9vQ*-;PVVAntzo?63Rjfk|PGBSMOM5XhnTX@b7pQDhM5OrdWe4nA zO!%(z#M)D8pQCn~!1ZbEo77$9PUQ*P@ueP)AWm z0lLlBqYW3<)g11M-(xRUm{>XO3jK%aW^T4vQFW#3B+LgtfInMfT8Z=*yqXy6SPT}# z)peS7+MjA1YA!-o5@*$Iu9p{%mZP3_2bY{oE$iZm<6|eUGtSbfp?A~s)5j7h6Ap^+ zt0^jOsQX{-T~j)CjzxUts<&74ufp)9~lcj3Z;Pp?8w;0U|Kri@a zn{#a(@6XuqBm36B8&G~znH(?wr7OHmmSp6)kj+`WiOJzRi;S0XX&fyrzoLVPSKD{(?kl+48XPk}hkESU|E@ z0G;=85a*IGO~w79)}A$R_(vZaGTOxb^KwIn4PkZxy1&VGBBv=GO z+=~Czh~EFx{}cSL`oAX&78!E?Tkrpof{)6@D5P=NW!Dqu+Bb@9Jams*WYb;YIHFgW zY#Nh&%u)C))1xZ&?a@4ud+C2rk)xSpF literal 0 HcmV?d00001 diff --git a/res/screen-size-normal/IDL_FORM.xml b/res/screen-size-normal/IDL_FORM.xml new file mode 100644 index 0000000..ae50282 --- /dev/null +++ b/res/screen-size-normal/IDL_FORM.xml @@ -0,0 +1,27 @@ + + + + + + 720 +

+ + + + +
+ + +
+
+ + +
+ + diff --git a/res/slk-SK.xml b/res/slk-SK.xml new file mode 100644 index 0000000..f1ffc94 --- /dev/null +++ b/res/slk-SK.xml @@ -0,0 +1,70 @@ + + + + Bol dosiahnutý maximálny počet znakov + Odstrániť + Albumy + %s už existuje + Kat. fotoaparátu + Vytvoriť album + Efekt prechodu + Zrušiť + Clona + Už existuje. Prepísať? + E-mail + Nedá sa odstrániť + Vybrať vš. + Stránka + Vymazanie sa nepodarilo + Vybrané + Hudba + Stmievanie + 2 sekundy + Operácia zlyhala + Náhodné poradie + Zrušiť + Upraviť + Obrázky + Odstrániť? + Videá + Interval prezentácie + Prezent. + Aktivácia + Žiadny názov + Názov albumu sa už používa + Žiadne položky + 10 sekúnd + Už existuje + Roleta + Opakovať + Vybrať všetky + Prehrávač videí + sekundy + 3 sekundy + Presunutie sa nepodarilo + Všetky albumy + 20 sekúnd + Dosiahol sa maximálny počet znakov (%d) + Zoom + Galéria + 5 sekúnd + Prelínanie + Nedá sa premenovať + Video + Nedá sa premenovať. Názov albumu sa už používa + Titulky + Prezentácia + Stiahnuté položky + Vytvoriť priečinok? + Zmeniť názov + Vysunutie + Presunúť + Interval + Dokončené + Odstrániť? + Upraviť + Dosiahol sa maximálny počet znakov (%d) + Hotovo + diff --git a/res/slv-SI.xml b/res/slv-SI.xml new file mode 100644 index 0000000..f578ee8 --- /dev/null +++ b/res/slv-SI.xml @@ -0,0 +1,70 @@ + + + + Doseženo je največje dovoljeno število znakov + Izbriši + Albumi + %s že obstaja + Mapa s slikami + Ustvari album + Učinek prehoda + Prekliči + Mavrica + Že obstaja. Prepišem? + E-pošta + Brisanje ni mogoče + Izberi vse + Stran + Brisanje ni uspelo + Izbrano + Glasba + Zatemnitev + 2 sekundi + Postopek ni uspel + Naključno + Prekliči + Uredi + Slike + Odstranim? + Videoposnetki + Interval diaprojekcije + Diaproj. + Vklop + Brez imena + Ime albuma se že uporablja + Ni predmetov + 10 sekund + Že obstaja + Zastor + Ponovi + Izberi vse + Video predvajalnik + sekund + 3 sekunde + Premikanje ni uspelo + Vsi albumi + 20 sekund + Doseženo je največje število znakov (%d) + Povečava + Galerija + 5 sekund + Raztopi + Ni mogoče preimenovati + Video + Ni mogoče preimenovati. Ime albuma se že uporablja + Podnapisi + Diaprojekcija + Prenosi + Ustvarim mapo? + Spremeni ime + Prehod + Premakni + Interval + Končano + Izbrišem? + Uredi + Doseženo je največje število znakov (%d) + Končano + diff --git a/res/spa-ES.xml b/res/spa-ES.xml new file mode 100644 index 0000000..f09c366 --- /dev/null +++ b/res/spa-ES.xml @@ -0,0 +1,70 @@ + + + + Alcanzado el número máximo de caracteres + Eliminar + Álbumes + %s ya existe + Carrete + Crear álbum + Efecto de transición + Cancelar + Iris + Ya existe. ¿Desea reemplazarlo? + Correo electrónico + No se puede eliminar + Sele. todo + Página + Error al borrar + Seleccionado + Música + Desaparición + 2 segundos + Error de funcionamiento + Reproducción aleatoria + Cancelar + Editar + Imágenes + ¿Eliminar? + Vídeos + Intervalo de presentación de diapositivas + Pres diap + Activación + Sin nombre + Nombre de álbum ya en uso + Ningún elemento + 10 segundos + Ya existe + Efecto persiana + Repetir + Seleccionar todo + Reproductor de vídeo + segundos + 3 segundos + Error al mover + Todos los álbumes + 20 segundos + Número máximo de caracteres (%d) alcanzado + Zoom + Galería + 5 segundos + Fundir + Imposible cambiar el nombre + Vídeo + No se puede cambiar el nombre. Nombre de álbum ya en uso + Subtítulos + Presentación de diapositivas + Descargas + ¿Crear carpeta? + Cambiar nombre + Diapositiva + Mover + Intervalo + Finalizado + ¿Eliminar? + Editar + Número máximo de caracteres (%d) alcanzado + Hecho + diff --git a/res/spa-MX.xml b/res/spa-MX.xml new file mode 100644 index 0000000..ff0f491 --- /dev/null +++ b/res/spa-MX.xml @@ -0,0 +1,70 @@ + + + + Se ha alcanzado el número máximo de caracteres + Eliminar + Álbumes + %s ya existe + Carrete + Crear álbum + Efecto de transición + Cancelar + Iris + Ya existe. ¿Desea reemplazarlo? + Correo + No puede eliminar + Todo + Página + Error al eliminar + Seleccionado + Música + Aparecer + 2 segundos + Error de funcionamiento + Aleatorio + Cancelar + Editar + Imágenes + ¿Eliminar? + Videos + Intervalo de presentación de diapositivas + Pres diap + Activación + Sin nombre + Nombre de álbum ya existe + Ningún elemento + 10 segundos + Ya existe + Persiana + Repetir + Seleccionar todo + Reproductor de Video + segundos + 3 segundos + Error al mover + Todos los álbumes + 20 segundos + Número máximo de caracteres (%d) alcanzado + Zoom + Galería + 5 segundos + Fundir + No se puede renombrar + Video + No se puede renombrar. Nombre de álbum ya existe + Subtítulos + Presentación de diapositivas + Descargas + crear carpeta? + Renombrar + Deslizar + Mover + Intervalo + Completo + ¿Eliminar? + Editar + Número máximo de caracteres (%d) alcanzado + Realizado + diff --git a/res/srp-RS.xml b/res/srp-RS.xml new file mode 100644 index 0000000..977b13f --- /dev/null +++ b/res/srp-RS.xml @@ -0,0 +1,70 @@ + + + + Dostignut maksimalan broj karaktera + Obriši + Albumi + %s već postoji + Traka kamere + Kreiraj album + Efekat prelaza + Poništi + Iris + Već postoji. Prebriši? + E-pošta + Nemoguće obrisati + Izab. sve + Strana + Brisanje neuspešno + Označeno + Muzika + Izbledi + 2 sekunde + Operacija neuspešna + Nasumično + Poništi + Izmeni + Slike + Ukloni? + Video zapisi + Interval za slajd-šou + Slajd-šou + Aktivacija + Nema imena + Naziv albuma već u upotr. + Nema stavki + 10 sekundi + Već postoji + Roletna + Ponovi + Izaberi sve + Video plejer + sekunde + 3 sekunde + Premeštanje neuspešno + Svi albumi + 20 sekundi + Dostignut maksimalan broj karaktera (%d) + Zumiranje + Galerija + 5 sekundi + Rastvori + Nemoguće preimenovati + Video zapis + Nemoguće preimenovati. Naziv albuma već u upotrebi + Titlovi + Slajd-šou + Preuzimanja + Kreiraj folder? + Promeni ime + Slajd + Premesti + Interval + Završeno + Obriši? + Izmeni + Dostignut maksimalan broj karaktera (%d) + Gotovo + diff --git a/res/swe-SE.xml b/res/swe-SE.xml new file mode 100644 index 0000000..c311d98 --- /dev/null +++ b/res/swe-SE.xml @@ -0,0 +1,70 @@ + + + + Maximalt antal tecken har använts + Radera + Album + %s finns redan + Kamerarulle + Skapa album + Övergångseffekt + Avbryt + Iris + Används redan.\nSkriv över? + E-post + Kan inte radera + Välj allt + Sida + Radering misslyckades + Markerade + Musik + Tona + 2 sekunder + Åtgärden misslyckades + Blanda + Avbryt + Redigera + Bilder + Ta bort? + Videoklipp + Bildspelsintervall + Bildspel + Aktivera + Inget namn + Albumnamnet används redan + Inga objekt + 10 sekunder + Finns redan + Fördragning + Upprepa + Välj alla + Videospelare + sekunder + 3 sekunder + Det gick inte att flytta + Alla album + 20 sekunder + Högsta antal tecken (%d) har uppnåtts + Zoom + Galleri + 5 sekunder + Lös upp + Kan inte byta namn + Videoklipp + Kan inte byta namn. Albumnamnet används redan + Textning + Bildspel + Nedladdningar + Skapa mapp? + Byt namn + Bild + Flytta + Intervall + Slutförd + Radera? + Redigera + Högsta antal tecken (%d) har uppnåtts + Klar + diff --git a/res/tur-TR.xml b/res/tur-TR.xml new file mode 100644 index 0000000..b4a9497 --- /dev/null +++ b/res/tur-TR.xml @@ -0,0 +1,70 @@ + + + + Maksimum karakter sayısına ulaşıldı + Sil + Albümler + %s zaten var + Kamera klasörü + Albüm oluştur + Geçiş efekti + İptal + İris + Zaten var. Üzerine yazılsın mı? + E-posta + Silinemiyor + Tümünü seç + Sayfa + Silinemedi + Seçili + Müzik + Soldur + 2 saniye + İşlem başarısız + Karışık + İptal + Düzenle + Resimler + Kaldır? + Videolar + Slayt gösterisi aralığı + Slayt şov + Etkinleştirme + İsim yok + Albüm adı zaten kullanılıyor + Öğe yok + 10 saniye + Zaten var + Kör + Tekrarla + Hepsini seç + Video Oynatıcı + saniye + 3 saniye + Taşıma başarısız + Tüm albümler + 20 saniye + Maksimum karakter sayısına (%d) ulaşıldı + Yakınlaştır + Galeri + 5 saniye + Çöz + Yeniden adlandırılamıyor. Dosya kullanımda. + Video + Yeniden adlandırılamıyor. Albüm adı zaten kullanılıyor + Altyazılar + Slayt gösterisi + İndirilenler + Klasör oluşturulsun mu? + İsim değiştir + Slayt + Taşı + Aralık + Tamamlandı + Sil? + Düzenle + Maksimum karakter sayısına (%d) ulaşıldı + Kaydet + diff --git a/res/ukr-UA.xml b/res/ukr-UA.xml new file mode 100644 index 0000000..71cba66 --- /dev/null +++ b/res/ukr-UA.xml @@ -0,0 +1,70 @@ + + + + Досягнуто максимальної кількості символів + Видалити + Альбоми + %s вже існує + Плівка камери + Створити альбом + Ефект переходу + Скасувати + Ірісова діафрагма + Вже існує. Переписати? + Email + Неможливо видалити + Вибр. всі + Сторінка + Збій видалення + Вибране + Музика + Загасання + 2 секунди + Збій операції + Випадковий порядок + Скасувати + Редагувати + Зображення + Видалити? + Відео + Інтервал слайд-шоу + Слайд-шоу + Активація + Немає імені + Ім’я альбому вже викор. + Немає об’єктів + 10 секунд + Вже існує + Жалюзі + Повторення + Вибрати всі + Відеоплеєр + секунди + 3 секунди + Збій переміщення + Усі альбоми + 20 секунд + Досягнуто максимальної кількості символів: %d + Масштаб + Галерея + 5 секунд + Розчинення + Неможливо перейменувати + Відео + Неможливо перейменувати. Ім’я альбому вже використовується + Субтитри + Слайд-шоу + Завантаження + Створити папку? + Змінити ім'я + Слайд + Перемістити + Інтервал + Завершено + Видалити? + Редагувати + Досягнуто максимальної кількості символів: %d + Готово + diff --git a/res/uzb-UZ.xml b/res/uzb-UZ.xml new file mode 100644 index 0000000..bbdca24 --- /dev/null +++ b/res/uzb-UZ.xml @@ -0,0 +1,70 @@ + + + + Belgilar soni ruxsat etilgan maksimal miqdorga yetdi + O'chirish + Albom + %s avvaldan mavjud + Kamera roli + Albom yaratish + Almashuvchi effekt + Bekor qilish + Gulsapsar + Avvaldan mavjud. Ustidan yozilsinmi? + E-pochta + Yo‘q qilib bo‘lmaydi + Bar. tanla + Sahifa + Yo‘q qilish bajarilmadi + Tanlangan + Musiqa + Xiralashish + 2 soniya + Operatsiya bajarilmadi + Tasodifiy + Bekor qilish + Tahrirlash + Tasvirlar + Olib tashlansinmi? + Videolar + Slayd-shou intervali + Slayd-shou + Faollashtirish + Nom yo‘q + Albom nomi ishlatilmoqda + Elementlar yo‘q + 10 soniya + Avvaldan mavjud + Jalyuzi + Takrorlash + Barchasini tanlash + Video pleyer + soniya + 3 soniya + Ko‘chirib bo‘lmadi + Barcha albomlar + 20 soniya + Belgilar soni ruxsat etilgan maksimal miqdorga (%d) yetdi + Masshtabni o‘zgartirish + Galereya + 5 soniya + Erish + Nomini o‘zgartirib bo‘lmaydi + Video + Nomni o‘zgartirib bo‘lmaydi. Albom nomi avvaldan ishlatilmoqda + Tagsarlavhalar + Slayd-shou + Yuklanishlar + Jild yaratilsinmi? + Nomni o‘zgartirish + Slayd + Ko‘chirish + Interval + Yakunlandi + O'chirilsinmi? + Tahrirlash + Belgilar soni ruxsat etilgan maksimal miqdorga (%d) yetdi + Bajarildi + diff --git a/res/zho-CN.xml b/res/zho-CN.xml new file mode 100644 index 0000000..90f2706 --- /dev/null +++ b/res/zho-CN.xml @@ -0,0 +1,70 @@ + + + + 已达到最大字符限制 + 删除 + 专辑 + %s 已存在 + 滚动照相机 + 新建相册 + 转换效果 + 取消 + 彩色效果 + 已存在。覆盖? + 电子邮件 + 无法删除 + 选择全部 + 页面 + 删除失败 + 已选择 + 音乐 + 淡出 + 2 秒 + 操作失败 + 随机播放 + 取消 + 编辑 + 图片 + 移除? + 视频 + 幻灯片播放间隔 + 幻灯片 + 激活 + 无名称 + 相册名已使用 + 无项目 + 10 秒 + 已经存在 + 百叶窗 + 重复 + 全选 + 视频播放器 + 秒 + 3 秒 + 移动失败 + 所有相册 + 20 秒 + 已达到最大字符数(%d) + 缩放 + 图库 + 5 秒 + 溶解 + 无法重命名 + 录像 + 无法重命名。相册名已使用 + 字幕 + 幻灯片 + 下载列表 + 创建文件夹吗? + 更改名称 + 幻灯片 + 移动 + 间隔 + 已完成 + 删除? + 编辑 + 已达到最大字符数(%d) + 完成 + diff --git a/res/zho-HK.xml b/res/zho-HK.xml new file mode 100644 index 0000000..ecef1a1 --- /dev/null +++ b/res/zho-HK.xml @@ -0,0 +1,70 @@ + + + + 字元數目已達上限 + 刪除 + 專輯 + %s 已存在 + 相簿 + 建立相簿 + 過場效果 + 取消 + 光圈 + 已存在。要覆蓋嗎? + 電子郵件 + 無法刪除 + 選擇全部 + 頁面 + 刪除失敗 + 已選擇 + 音樂 + 褪色 + 2 秒 + 操作失敗 + 隨機播放 + 取消 + 編輯 + 圖像 + 要移除嗎? + 影片 + 投影片間隔 + 投影片放映 + 啟動 + 無名稱 + 相簿名稱已使用 + 無項目 + 10 秒 + 已存在 + 百葉窗 + 重複 + 選擇全部 + 影片播放器 + 秒 + 3 秒 + 移動失敗 + 全部專輯 + 20 秒 + 已達字元數目上限 (%d) + 縮放 + 媒體瀏覽器 + 5 秒 + 融化 + 無法重新命名 + 影片 + 無法重新命名。相簿名稱已使用 + 字幕 + 投影片播放 + 下載項目 + 要建立資料夾嗎? + 更改名稱 + 滑動 + 移動 + 間隔 + 已完成 + 刪除嗎? + 編輯 + 已達字元數目上限 (%d) + 完成 + diff --git a/res/zho-SG.xml b/res/zho-SG.xml new file mode 100644 index 0000000..957704a --- /dev/null +++ b/res/zho-SG.xml @@ -0,0 +1,70 @@ + + + + 已达最大字符数量 + 删除 + 相册 + %s 已存在 + 滚动照相机 + 新建相册 + 转换效果 + 取消 + Iris 效果 + 已存在。覆盖? + 电邮 + 无法删除 + 选择全部 + 页面 + 删除失败 + 已选定 + 音乐 + 淡出 + 2秒 + 操作失败 + 随机播放 + 取消 + 编辑 + 图像 + 移除? + 录像 + 幻灯片播放间隔 + 幻灯片 + 启动 + 无名称 + 相册名已使用 + 无项目 + 10 秒 + 已经存在 + 百叶窗 + 重复 + 全选 + 视频播放器 + 秒 + 3秒 + 移动失败 + 所有相册 + 20秒 + 已达到最大字符数(%d) + 变焦 + 画廊 + 5秒 + 溶化 + 无法重命名 + 录像 + 无法重命名。相册名已使用 + 说明字幕 + 幻灯片播放 + 下载 + 创建文件夹吗? + 更改名称 + 滑动 + 移动 + 间隔 + 已完成 + 删除? + 编辑 + 已达到最大字符数(%d) + 已完成 + diff --git a/res/zho-TW.xml b/res/zho-TW.xml new file mode 100644 index 0000000..4383a9c --- /dev/null +++ b/res/zho-TW.xml @@ -0,0 +1,70 @@ + + + + 已達字元數上限 + 刪除 + 相簿 + %s 已存在 + 相簿 + 建立專輯 + 轉換效果 + 取消 + 光圈 + 已存在。要覆寫嗎? + 電子郵件 + 無法刪除 + 選擇所有 + 頁面 + 刪除失敗 + 已選擇 + 音樂 + 淡化 + 2 秒 + 操作失敗 + 隨機播放 + 取消 + 編輯 + 圖像 + 要移除嗎? + 影片 + 投影片放映間隔 + 投影片放映 + 啟動 + 無姓名 + 相簿名稱已被使用 + 無項目 + 10 秒 + 已存在 + 百頁窗 + 重複 + 全選 + 影片播放器 + 秒 + 3 秒 + 移動失敗 + 所有相簿 + 20 秒 + 達到%個最大字元 + 縮放 + 媒體瀏覽器 + 5 秒 + 分解 + 無法重新命名 + 影片 + 無法重新命名。相簿名稱已被使用 + 字幕 + 投影片放映 + 下載 + 要建立資料夾嗎? + 變更名稱 + 投影片 + 移動 + 間隔 + 已完成 + 要刪除嗎? + 編輯 + 達到%個最大字元 + 完成 + diff --git a/shared/data/GalleryDefaultSettings.ini b/shared/data/GalleryDefaultSettings.ini new file mode 100644 index 0000000..5c13ef3 --- /dev/null +++ b/shared/data/GalleryDefaultSettings.ini @@ -0,0 +1,3 @@ +#IMAGE_VIEWER_SETTING +SLIDESHOW_INTERVAL_VALUE=3 +TRANSITION_EFFECT_VALUE=0 \ No newline at end of file diff --git a/shared/res/screen-density-xhigh/mainmenu.png b/shared/res/screen-density-xhigh/mainmenu.png new file mode 100644 index 0000000000000000000000000000000000000000..3205a576be2c961c08c4a4f733e9499c6572759c GIT binary patch literal 24178 zcmV)8K*qm`P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;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ile.dummy new file mode 100644 index 0000000..e69de29 diff --git a/src/GlAlbumInfo.cpp b/src/GlAlbumInfo.cpp new file mode 100644 index 0000000..db43812 --- /dev/null +++ b/src/GlAlbumInfo.cpp @@ -0,0 +1,474 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumInfo.cpp + * @brief This is the implementation file for AlbumInfo class. + */ + +#include "GlAlbumInfo.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; + +static const int FORMAT_BUFFER_SIZE = 256; + +AlbumInfo::AlbumInfo(void) + :__albumName(EMPTY_SPACE) + ,__pDirectoryFullPathList(null) + ,__pContentIdList(null) + ,__folderThumnailBitmapCount(0) +{ + for (int i = 0; i < FOLDER_BITMAP_MAX; ++i) + { + __pFolderThumnailBitmap[i] = null; + } +} + +AlbumInfo::~AlbumInfo(void) +{ + if (__pDirectoryFullPathList != null) + { + delete __pDirectoryFullPathList; + } + + if (__pContentIdList != null) + { + delete __pContentIdList; + } + + for (int i = 0; i < FOLDER_BITMAP_MAX; ++i) + { + if (__pFolderThumnailBitmap[i] != null) + { + delete __pFolderThumnailBitmap[i]; + } + } +} + +String +AlbumInfo::GetAlbumName(void) const +{ + String returnValue; + if ((__albumName != null) && (__albumName.GetLength() > 0)) + { + returnValue = __albumName; + } + + return returnValue; +} + +void +AlbumInfo::SetAlbumName(const String& albumName) +{ + if (&albumName == null) + { + __albumName = EMPTY_SPACE; + } + else + { + __albumName = String(albumName); + } +} + +String +AlbumInfo::GetDirectory(int index) const +{ + String fullDirPath = *(static_cast(__pDirectoryFullPathList->GetAt(index))); + return fullDirPath; +} + +IList* +AlbumInfo::GetDirectoryListN(void) const +{ + if (__pDirectoryFullPathList == null) + { + return null; + } + + IList* pDirectoryFullPathList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + IEnumerator* pEnum = __pDirectoryFullPathList->GetEnumeratorN(); + String* pItem = null; + while (pEnum->MoveNext() == E_SUCCESS) + { + pItem = new (std::nothrow) String((static_cast(pEnum->GetCurrent()))->GetPointer()); + pDirectoryFullPathList->Add(pItem); + } + delete pEnum; + pEnum = null; + + return pDirectoryFullPathList; +} + +void +AlbumInfo::ClearDirectoryList(void) +{ + if (__pDirectoryFullPathList != null) + { + delete __pDirectoryFullPathList; + } + __pDirectoryFullPathList = new (std::nothrow) ArrayList(SingleObjectDeleter); +} + +void +AlbumInfo::AppendDirectory(const String& directoryPath) +{ + if (&directoryPath == null || directoryPath == EMPTY_SPACE) + { + return; + } + + if (__pDirectoryFullPathList == null) + { + __pDirectoryFullPathList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + + __pDirectoryFullPathList->Add(new (std::nothrow) String(directoryPath)); +} + +void +AlbumInfo::AppendDirectoryList(const ICollection& directoryList) +{ + if (&directoryList == null || directoryList.GetCount() == 0) + { + return; + } + if (__pDirectoryFullPathList == null) + { + __pDirectoryFullPathList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + IEnumerator* pEnum = directoryList.GetEnumeratorN(); + String* pItem = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pItem = new (std::nothrow) String((static_cast(pEnum->GetCurrent()))->GetPointer()); + __pDirectoryFullPathList->Add(pItem); + } + delete pEnum; + pEnum = null; +} + +int +AlbumInfo::GetDirectoryCount(void) const +{ + if (__pDirectoryFullPathList == null) + { + return 0; + } + else + { + return __pDirectoryFullPathList->GetCount(); + } +} + +IList* +AlbumInfo::GetContentIdListN(void) const +{ + if (__pContentIdList == null) + { + return null; + } + + IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + IEnumerator* pEnum = __pContentIdList->GetEnumeratorN(); + ContentId* pItem; + while (pEnum->MoveNext() == E_SUCCESS) + { + pItem = new (std::nothrow) ContentId(*static_cast(pEnum->GetCurrent())); + pContentIdList->Add(pItem); + } + delete pEnum; + pEnum = null; + + return pContentIdList; +} + +ContentId +AlbumInfo::GetContentId(int index) const +{ + ContentId contentId = *(static_cast(__pContentIdList->GetAt(index))); + return contentId; +} + +result +AlbumInfo::Construct(void) +{ + __albumName = EMPTY_SPACE; + __pDirectoryFullPathList = new (std::nothrow) ArrayList(SingleObjectDeleter); + __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + result r = E_SUCCESS; + if (GetLastResult() == E_SUCCESS && __pDirectoryFullPathList != null && __pContentIdList != null) + { + r = E_SUCCESS; + } + else + { + delete __pDirectoryFullPathList; + delete __pContentIdList; + r = E_FAILURE; + } + + return r; +} + +result +AlbumInfo::Construct(const String& albumName, ContentType contentType , + const IList& directoryList, const IList& contentIdList) +{ + if (&albumName == null) + { + __albumName = EMPTY_SPACE; + } + else + { + __albumName = albumName; + } + + if (&directoryList == null) + { + ClearDirectoryList(); + } + else + { + ClearDirectoryList(); + AppendDirectoryList(directoryList); + } + + if (&contentIdList == null) + { + ClearContentIdList(); + } + else + { + AppendContentIdList(contentIdList); + } + + return E_SUCCESS; +} + +result +AlbumInfo::Construct(const AlbumInfo& albumInfo) +{ + if (&albumInfo == null) + { + __albumName = EMPTY_SPACE; + ClearDirectoryList(); + ClearContentIdList(); + return E_SUCCESS; + } + __albumName = albumInfo.GetAlbumName(); + + ClearDirectoryList(); + IList* pDirList = albumInfo.GetDirectoryListN(); + AppendDirectoryList(*pDirList); + delete pDirList; + + ClearContentIdList(); + IList* pContentIdList = albumInfo.GetContentIdListN(); + AppendContentIdList(*pContentIdList); + delete pContentIdList; + + return E_SUCCESS; +} + +void +AlbumInfo::ClearContentIdList(void) +{ + if (__pContentIdList != null) + { + delete __pContentIdList; + } + + __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); +} + +void +AlbumInfo::AppendContentId(const ContentId& contentId) +{ + if (&contentId == null) + { + return; + } + + if (__pContentIdList == null) + { + __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + ContentId* pItem = new (std::nothrow) ContentId(contentId); + __pContentIdList->Add(pItem); +} + +void +AlbumInfo::AppendContentIdList(const ICollection& contentIdList) +{ + if (&contentIdList == null || contentIdList.GetCount() == 0) + { + return; + } + + if (__pContentIdList == null) + { + __pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + + IEnumerator* pEnum = contentIdList.GetEnumeratorN(); + ContentId* pItem = null; + + while (pEnum->MoveNext() == E_SUCCESS) + { + pItem = new (std::nothrow) ContentId(*(static_cast(pEnum->GetCurrent()))); + __pContentIdList->Add(pItem); + } + delete pEnum; + pEnum = null; + + int thumnailCount = __pContentIdList->GetCount(); + if (thumnailCount >= FOLDER_BITMAP_MAX) + { + __folderThumnailBitmapCount = FOLDER_BITMAP_MAX; + } + else + { + __folderThumnailBitmapCount = thumnailCount; + } +} + +void +AlbumInfo::ClearAll(void) +{ + if (__pDirectoryFullPathList != null) + { + delete __pDirectoryFullPathList; + __pDirectoryFullPathList = null; + } + + if (__pContentIdList != null) + { + delete __pContentIdList; + __pContentIdList = null; + } +} + +int +AlbumInfo::GetContentIdCount(void) const +{ + if (__pContentIdList == null) + { + return 0; + } + else + { + return __pContentIdList->GetCount(); + } +} + +result +AlbumInfo::RemoveContentIdAt(int index) +{ + result r = E_SUCCESS; + + if (__pContentIdList != null) + { + r = __pContentIdList->RemoveAt(index, true); + } + + return r; +} + +int +AlbumInfo::GetFolderThumnailBitmapCount(void) const +{ + return __folderThumnailBitmapCount; +} + +void +AlbumInfo::AppendFolderThumnailBitmap(Bitmap* FolderThumnailBitmap, int index) +{ + if (index >= FOLDER_BITMAP_MAX) + { + return; + } + + __pFolderThumnailBitmap[index] = FolderThumnailBitmap; +} + +Bitmap* +AlbumInfo::GetFolderThumnailBitmap(int index) +{ + if (index >= FOLDER_BITMAP_MAX) + { + return null; + } + + return __pFolderThumnailBitmap[index]; +} + +int +AlbumInfo::GetEmptyBitmapIndex(void) +{ + int empty = FOLDER_BITMAP_MAX; + + for (int i = 0; i < __folderThumnailBitmapCount; ++i) + { + if (i >= FOLDER_BITMAP_MAX) + { + break; + } + + if (__pFolderThumnailBitmap[i] == null) + { + empty = i; + break; + } + } + return empty; +} + +String +AlbumInfo::GetCreateDateString(void) const +{ + return __createFileDateString; +} + +void +AlbumInfo::SetCreateDateString(String& strMinimumDate, String& strMaximumDate) +{ + String resultTime; + + if (strMinimumDate == strMaximumDate) + { + resultTime.Format(FORMAT_BUFFER_SIZE, L"%ls", strMaximumDate.GetPointer()); + } + else + { + resultTime.Format(FORMAT_BUFFER_SIZE, L"%ls - %ls", strMinimumDate.GetPointer(), + strMaximumDate.GetPointer()); + } + + __createFileDateString = resultTime; +} + +AlbumInfoType +AlbumInfo::GetAlbumInfoType(void) +{ + return ALBUM_INFO_TYPE_FOLDER; +} diff --git a/src/GlAlbumListEditorForm.cpp b/src/GlAlbumListEditorForm.cpp new file mode 100644 index 0000000..4561cec --- /dev/null +++ b/src/GlAlbumListEditorForm.cpp @@ -0,0 +1,843 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListEditorForm.cpp + * @brief This is the implementation file for AlbumListEditorForm class. + */ + +#include +#include "GlAlbumInfo.h" +#include "GlAlbumListEditorForm.h" +#include "GlAlbumListPresentationModel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Io; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const unsigned int COLOR_SELECT_COUNT_LABEL = Color32<68, 68, 68>::Value; +static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value; + +static const int W_FOLDER_SIZE = 334; +static const int H_FOLDER_SIZE = 334; + +static const int W_BUTTON_RENAME_SIZE = 64; +static const int H_BUTTON_RENAME_SIZE = 64; + +static const int GAP_W_POPUP_ITEM = 5; +static const int W_DELETE_POPUP = 600; +static const int H_DELETE_POPUP = 300; +static const int H_DELETE_LABEL = 180; +static const int Y_DELETE_BUTTON = 180; +static const int H_DELETE_BUTTON = 80; + +static const int X_POSITION_ICON_LIST_VIEW = 0; +static const int Y_POSITION_ICON_LIST_VIEW = 80; + +static const int H_CHECKBOX = 80; +static const int GAP_H_ICON_LIST_VIEW = 40; + +static const int H_SELECT_COUNT_LABEL = 48; + +static const int FORMAT_BUFFER_SIZE = 256; + +static const int X_POSITION_SHARE_CONTEXTMENU = 300; +static const int Y_POSITION_SHARE_CONTEXTMENU = 1180; + +static const Color COLOR_FOLDER_BITMAP_DIM(Color::GetColor(COLOR_ID_BLACK)); +static const int ALPHA_FOLDER_BITMAP_DIM = 70; + +AlbumListEditorForm::AlbumListEditorForm() + : __checkedCount(0) + , __pAllCheckButton(null) + , __pSelectCountLabel(null) + , __pEditorFolderIconList(null) + , __pShareContextMenu(null) + , __pDeletePopup(null) + , __pEditFolderBitmap(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AlbumListEditorForm::~AlbumListEditorForm() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListEditorForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumListEditorForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + SetRenameButtonImage(); + + __pPresentationModel = AlbumListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + r = InitializeHeader(); + if (r != E_SUCCESS) + { + AppLogDebug("[%s] Unable to InitializeHeader.", GetErrorMessage(r)); + } + + r = InitializeFooter(); + if (r != E_SUCCESS) + { + AppLogDebug("[%s] Unable to set InitializeFooter.", GetErrorMessage(r)); + } + + r = InitializeControl(); + if (r != E_SUCCESS) + { + AppLogDebug("[%s] Unable to set InitializeControl.", GetErrorMessage(r)); + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumListEditorForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + + if (__pDeletePopup != null) + { + delete __pDeletePopup; + __pDeletePopup = null; + } + + if (__pEditFolderBitmap != null) + { + delete __pEditFolderBitmap; + __pEditFolderBitmap = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumListEditorForm::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListEditorForm::SetRenameButtonImage(void) +{ + AppLogDebug("ENTER"); + Bitmap* pSrcBitmap1 = ResourceManager::GetBitmapN(IDB_BUTTON_CIRCLE_BACKGROUND); + Bitmap* pSrcBitmap2 = ResourceManager::GetBitmapN(IDB_BUTTON_RENAME); + + Bitmap* pBitmap = new (std::nothrow) Bitmap(); + BufferInfo bufferinfo; + Canvas canvas; + Dimension size(W_BUTTON_RENAME_SIZE, H_BUTTON_RENAME_SIZE); + result r = pBitmap->Construct(size, BITMAP_PIXEL_FORMAT_ARGB8888); + r = pBitmap->Lock(bufferinfo); + r = canvas.Construct(bufferinfo); + + if (pSrcBitmap1 != null) + { + canvas.DrawBitmap(Point(0, 0), *pSrcBitmap1); + delete pSrcBitmap1; + pSrcBitmap1 = null; + } + if (pSrcBitmap2 != null) + { + canvas.DrawBitmap(Point(0, 0), *pSrcBitmap2); + delete pSrcBitmap2; + pSrcBitmap2 = null; + } + + pBitmap->Unlock(); + + __pEditFolderBitmap = pBitmap; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AlbumListEditorForm::InitializeHeader(void) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + if (pHeader == null) + { + AppLogDebug("EXIT 1"); + + return E_SYSTEM; + } + + result r = pHeader->SetStyle(HEADER_STYLE_TITLE); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 2"); + + return r; + } + + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY")); + pHeader->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AlbumListEditorForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + Footer* pFooter = GetFooter(); + if (pFooter == null) + { + AppLogDebug("EXIT 1"); + + return E_SYSTEM; + } + + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + pFooter->RemoveAllItems(); + pFooter->SetBackButtonEnabled(true); + pFooter->SetBackButton(); + SetFormBackEventListener(this); + + FooterItem itemShare; + itemShare.Construct(ACTION_ID_FOOTER_SHARE); + itemShare.SetText(ResourceManager::GetString(L"EMPTY_SPACE")); + Bitmap* pBitmap2 = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE); + if (pBitmap2 != null) + { + itemShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmap2); + } + pFooter->AddItem(itemShare); + delete pBitmap2; + + FooterItem itemDelete; + itemDelete.Construct(ACTION_ID_FOOTER_DELETE); + itemDelete.SetText(ResourceManager::GetString(L"EMPTY_SPACE")); + Bitmap* pBitmap1 = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE); + if (pBitmap1 != null) + { + itemDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmap1); + } + pFooter->AddItem(itemDelete); + delete pBitmap1; + pBitmap1 = null; + + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AlbumListEditorForm::InitializeControl() +{ + AppLogDebug("ENTER"); + String tempString; + + CreateIconListView(); + __checkedCount = GetCheckedFolder(); + tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount); + + __pAllCheckButton = new (std::nothrow) CheckButton(); + __pAllCheckButton->Construct(Rectangle(0, 0, GetClientAreaBounds().width, H_CHECKBOX), + CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, false); + __pAllCheckButton->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL")); + __pAllCheckButton->SetActionId(ACTION_ID_CHECK_SELECT_ON, ACTION_ID_CHECK_SELECT_OFF); + __pAllCheckButton->SetChromaKeyColor(Color(COLOR_SELECT_COUNT_LABEL)); + __pAllCheckButton->AddActionEventListener(*this); + AddControl(*__pAllCheckButton); + + __pSelectCountLabel = new (std::nothrow) Label(); + __pSelectCountLabel->Construct(Rectangle(0, GetClientAreaBounds().height - H_SELECT_COUNT_LABEL, + GetClientAreaBounds().width, H_SELECT_COUNT_LABEL), tempString); + + __pSelectCountLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pSelectCountLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pSelectCountLabel->SetBackgroundColor(Color(COLOR_SELECT_COUNT_LABEL)); + __pSelectCountLabel->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pSelectCountLabel); + + __pShareContextMenu = new ContextMenu(); + __pShareContextMenu->Construct(Point(X_POSITION_SHARE_CONTEXTMENU, Y_POSITION_SHARE_CONTEXTMENU), + CONTEXT_MENU_STYLE_LIST); + __pShareContextMenu->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"),ACTION_ID_CONTEXT_MENU_EMAIL); + __pShareContextMenu->AddActionEventListener(*this); + + InitializePopup(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AlbumListEditorForm::InitializePopup(void) +{ + AppLogDebug("ENTER"); + if (__pDeletePopup == null) + { + __pDeletePopup = new (std::nothrow) Popup(); + __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP)); + + Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds(); + + Label* pLabel = new (std::nothrow) Label(); + pLabel->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL), + ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q")); + + Button* pDeleteButton = new (std::nothrow) Button(); + pDeleteButton->Construct( + Rectangle(0, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), + ResourceManager::GetString(L"IDS_COM_BODY_DELETE")); + pDeleteButton->SetActionId(ACTION_ID_DELETE_POPUP_DEL); + pDeleteButton->AddActionEventListener(*this); + + Button* pCancelButton = new (std::nothrow) Button(); + pCancelButton->Construct( + Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, + popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), + ResourceManager::GetString(L"IDS_COM_POP_CANCEL")); + pCancelButton->SetActionId(ACTION_ID_DELETE_POPUP_CANCEL); + pCancelButton->AddActionEventListener(*this); + + __pDeletePopup->AddControl(*pLabel); + __pDeletePopup->AddControl(*pDeleteButton); + __pDeletePopup->AddControl(*pCancelButton); + } + else + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumListEditorForm::CreateIconListView(void) +{ + AppLogDebug("ENTER"); + Dimension itemSize(W_FOLDER_SIZE, H_FOLDER_SIZE); + __pEditorFolderIconList = new (std::nothrow) IconListView(); + __pEditorFolderIconList->Construct(Rectangle(X_POSITION_ICON_LIST_VIEW, Y_POSITION_ICON_LIST_VIEW, + GetClientAreaBounds().width, GetClientAreaBounds().height - H_CHECKBOX - GAP_H_ICON_LIST_VIEW), + itemSize, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmap != null) + { + __pEditorFolderIconList->SetBitmapOfEmptyList(pBitmap); + delete pBitmap; + } + __pEditorFolderIconList->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pEditorFolderIconList->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pEditorFolderIconList->SetItemProvider(*this); + __pEditorFolderIconList->SetTouchAnimationEnabled(false); + __pEditorFolderIconList->AddIconListViewItemEventListener(*this); + AddControl(*__pEditorFolderIconList); + __pEditorFolderIconList->SetShowState(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AlbumListEditorForm::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModel->GetFolderCount(); +} + +IconListViewItem* +AlbumListEditorForm::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + Bitmap* pBitmap = null; + IconListViewItem* pIconListview = new IconListViewItem(); + + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(index)); + int emptyIndex = pAlbumInfo->GetEmptyBitmapIndex(); + + if (emptyIndex != FOLDER_BITMAP_MAX) + { + __pPresentationModel->RequestThumbnail(index, emptyIndex); + } + + pBitmap = __pPresentationModel->CreateMergeBitmapN(index); + + if (__pEditorFolderIconList->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + Color dimColor(COLOR_FOLDER_BITMAP_DIM); + dimColor.SetAlpha(ALPHA_FOLDER_BITMAP_DIM); + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pIconListview->Construct(*pBitmap, null, pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + } + else + { + pIconListview->Construct(*pBitmap); + } + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListview; +} + +void +AlbumListEditorForm::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + String tempString; + + if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED) + { + __checkedCount = GetCheckedFolder(); + tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount); + __pSelectCountLabel->SetText(tempString); + __pSelectCountLabel->RequestRedraw(); + __pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + int maxCount = __pPresentationModel->GetFolderCount(); + + if (__pAllCheckButton->IsSelected() == true) + { + __pAllCheckButton->SetSelected(false); + } + else + { + if (__checkedCount == maxCount) + { + AppLogDebug("SELECTIONTEST(%d)(%d)",__checkedCount, maxCount); + __pAllCheckButton->SetSelected(true); + } + } + } + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnIconListViewOverlayBitmapSelected (IconListView &iconListView, int index, + int overlayBitmapId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + + if (overlayBitmapId == ACTION_ID_EDITE_FOLDER) + { + ArrayList* pSelectedIndex = new (std::nothrow) ArrayList(SingleObjectDeleter); + pSelectedIndex->Construct(); + pSelectedIndex->Add(new (std::nothrow) Integer(index)); + + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR), pSelectedIndex); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +bool +AlbumListEditorForm::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +result +AlbumListEditorForm::DeleteFolder() +{ + AppLogDebug("ENTER"); + int maxCount = __pPresentationModel->GetFolderCount(); + result r = E_FAILURE; + + int checkedCount = 0; + + for (int i = 0 ; i < maxCount; ++i) + { + if (__pEditorFolderIconList->IsItemChecked(i) == true) + { + ++checkedCount; + __pPresentationModel->DeleteContentInfoInDirectory(i, CONTENT_TYPE_ALL); + if (i == 0) + { + break; + } + } + } + + if (checkedCount == 0) + { + r = E_FAILURE; + } + else + { + r = E_SUCCESS; + __pAllCheckButton->SetSelected(true); + __pAllCheckButton->RequestRedraw(true); + } + + SetAllCheckState(false); + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + __pEditorFolderIconList->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +AlbumListEditorForm::SetAllCheckState(bool state) +{ + AppLogDebug("ENTER"); + int maxCount = __pPresentationModel->GetFolderCount(); + String tempString; + + if (state == true) + { + tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), maxCount); + } + else + { + tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + } + + for (int i = 0 ; i < maxCount; ++i) + { + __pEditorFolderIconList->SetItemChecked(i, state); + __pEditorFolderIconList->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + + __pEditorFolderIconList->Draw(); + __pSelectCountLabel->SetText(tempString); + __pSelectCountLabel->RequestRedraw(); + __checkedCount = GetCheckedFolder(); + + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AlbumListEditorForm::GetCheckedFolder() +{ + AppLogDebug("ENTER"); + int maxCount = __pPresentationModel->GetFolderCount(); + int count = 0; + + for (int i = 0 ; i < maxCount; ++i) + { + if (__pEditorFolderIconList->IsItemChecked (i)) + { + count++; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return count; +} + +void +AlbumListEditorForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + switch (actionId) + { + case ACTION_ID_CHECK_SELECT_ON: + SetAllCheckState(true); + break; + case ACTION_ID_CHECK_SELECT_OFF: + SetAllCheckState(false); + break; + case ACTION_ID_FOOTER_DELETE: + if (__checkedCount > 0) + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + break; + case ACTION_ID_FOOTER_SHARE: + __pShareContextMenu->SetShowState(true); + __pShareContextMenu->Show(); + break; + case ACTION_ID_CONTEXT_MENU_EMAIL: + { + OnRequestEmailAction(); + break; + } + case ACTION_ID_DELETE_POPUP_DEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Show(); + result r = DeleteFolder(); + AppLogDebug("CHECKBUTTONSTATE : R1"); + if (r == E_SUCCESS) + { + AppLogDebug("CHECKBUTTONSTATE : R2"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST)); + } + AppLogDebug("CHECKBUTTONSTATE : R3"); + break; + } + case ACTION_ID_DELETE_POPUP_CANCEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Show(); + break; + } + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER OnSceneActivatedN"); + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + __pEditorFolderIconList->UpdateList(); + + __checkedCount = GetCheckedFolder(); + + String tempString; + tempString.Format(FORMAT_BUFFER_SIZE, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __checkedCount); + __pSelectCountLabel->SetText(tempString); + __pSelectCountLabel->RequestRedraw(); + + int maxCount = __pPresentationModel->GetFolderCount(); + if (__checkedCount != 0 && __checkedCount == maxCount) + { + __pAllCheckButton->SetSelected(true); + } + else + { + __pAllCheckButton->SetSelected(false); + } + + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + Update(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + __pEditorFolderIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListEditorForm::Update(void) +{ + AppLogDebug("ENTER"); + result r = __pEditorFolderIconList->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +AlbumListEditorForm::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + + int checkCount = GetCheckedFolder(); + + if (checkCount <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + + int maxCount = __pPresentationModel->GetFolderCount(); + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + if (maxCount <= 0) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + for (int i = 0 ; i < maxCount; ++i) + { + if (__pEditorFolderIconList->IsItemChecked (i)) + { + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(i)); + IList* pContentIdList = pAlbumInfo->GetContentIdListN(); + int loopCount = pContentIdList->GetCount(); + for (int k = 0; k < loopCount; ++k) + { + ContentId* pContentId = static_cast(pContentIdList->GetAt(k)); + ContentInfo* pContentInfo = contentManager.GetContentInfoN(*pContentId); + + if (pContentInfo == null) + { + break; + } + String path = pContentInfo->GetContentPath(); + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + + if (i == 0) + { + break; + } + } + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), + new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::SetFooterButtonsState(bool enableState) +{ + AppLogDebug("ENTER"); + Footer* pFooter = GetFooter(); + AppAssert(pFooter); + + if (enableState == true) + { + pFooter->SetItemEnabled(0, true); + pFooter->SetItemEnabled(1, true); + } + else + { + pFooter->SetItemEnabled(0, false); + pFooter->SetItemEnabled(1, false); + } + + pFooter->RequestRedraw(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListEditorForm::SetButtonState(void) +{ + AppLogDebug("ENTER"); + if (GetCheckedFolder() > 0) + { + AppLogDebug("BUTTONSTATE : Request Enable"); + SetFooterButtonsState(true); + } + else + { + AppLogDebug("BUTTONSTATE : Request disable"); + SetFooterButtonsState(false); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlAlbumListForm.cpp b/src/GlAlbumListForm.cpp new file mode 100644 index 0000000..f93b17b --- /dev/null +++ b/src/GlAlbumListForm.cpp @@ -0,0 +1,571 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListForm.cpp + * @brief This is the implementation file for AlbumListForm class. + */ + +#include +#include "GlAlbumInfo.h" +#include "GlAlbumListForm.h" +#include "GlAlbumListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlResourceManager.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int W_FOLDER_SIZE = 334; +static const int H_FOLDER_SIZE = 334; + +AlbumListForm::AlbumListForm(void) + : __pAlbumViewIconList(null) + , __pContextMenuMore(null) + , __itemCount(0) + , __pTimer(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AlbumListForm::~AlbumListForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumListForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + __pPresentationModel = AlbumListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + } + + AppLogDebug("ENTER __pPresentationModel(%x)", __pPresentationModel); + + r = InitializeHeader(); + if (r != E_SUCCESS) + { + AppLogDebug("[%s] Unable to set header.", GetErrorMessage(r)); + } + + r = InitializeFooter(); + if (r != E_SUCCESS) + { + AppLogDebug("[%s] Unable to set footer.", GetErrorMessage(r)); + } + + __itemCount = __pPresentationModel->GetFolderCount(); + CreateIconListView(); + + if (__itemCount == 0) + { + __pTimer = new (std::nothrow) Timer(); + __pTimer->Construct(*this); + __pTimer->Start(1000); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumListForm::InitializeHeader(void) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + if (pHeader == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_SYSTEM; + } + + result r = pHeader->SetStyle(HEADER_STYLE_TITLE); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return r; + } + + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY")); + pHeader->AddActionEventListener(*this); + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return E_SUCCESS; +} + +result +AlbumListForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + Footer* pFooter = GetFooter(); + if (pFooter == null) + { + AppLogDebug("EXIT 1"); + + return E_SYSTEM; + } + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + pFooter->SetBackButton(); + SetFormBackEventListener(this); + } + else + { + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + pFooter->SetBackButton(); + pFooter->RemoveAllItems(); + + FooterItem itemCamera; + itemCamera.Construct(ACTION_ID_FOOTER_CAMERA); + itemCamera.SetText(ResourceManager::GetString(L"EMPTY_SPACE")); + Bitmap* pBitmap1 = ResourceManager::GetBitmapN(IDB_CONTROLBAR_CAMERA); + if (pBitmap1 != null) + { + itemCamera.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmap1); + } + pFooter->AddItem(itemCamera); + delete pBitmap1; + pBitmap1 = null; + + ButtonItem footerMore; + footerMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE); + Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE); + if (pBitmapMore != null) + { + footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore); + } + pFooter->SetButton(BUTTON_POSITION_LEFT,footerMore); + delete pBitmapMore; + pBitmapMore = null; + + __pContextMenuMore = new (std::nothrow) ContextMenu(); + __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), ACTION_ID_FOOTER_EDIT); + __pContextMenuMore->SetShowState(false); + __pContextMenuMore->AddActionEventListener(*this); + + SetFormBackEventListener(this); + } + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumListForm::CreateIconListView(void) +{ + AppLogDebug("ENTER"); + Rectangle clientArea = this->GetClientAreaBounds(); + Dimension itemSize(W_FOLDER_SIZE, H_FOLDER_SIZE); + clientArea.x = clientArea.y = 0; + __pAlbumViewIconList = new (std::nothrow) IconListView(); + __pAlbumViewIconList->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height), + itemSize, ICON_LIST_VIEW_STYLE_NORMAL , ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmap != null) + { + __pAlbumViewIconList->SetBitmapOfEmptyList(pBitmap); + delete pBitmap; + pBitmap = null; + } + __pAlbumViewIconList->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pAlbumViewIconList->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pAlbumViewIconList->SetItemProvider(*this); + __pAlbumViewIconList->SetTouchAnimationEnabled(false); + __pAlbumViewIconList->AddIconListViewItemEventListener(*this); + AddControl(*__pAlbumViewIconList); + + __pAlbumViewIconList->SetShowState(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AlbumListForm::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +AlbumListForm::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + + Bitmap* pBitmap = null; + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + if (pAlbumInfoList != null) + { + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(index)); + if (pAlbumInfo != null) + { + int emptyIndex = pAlbumInfo->GetEmptyBitmapIndex(); + + if (emptyIndex != FOLDER_BITMAP_MAX) + { + __pPresentationModel->RequestThumbnail(index, emptyIndex); + } + AppLogDebug("index(%d), emptyIndex(%d)", index, emptyIndex); + + pBitmap = __pPresentationModel->CreateMergeBitmapN(index); + + if (pBitmap != null) + { + IconListViewItem* pIconListview = new (std::nothrow) IconListViewItem(); + pIconListview->Construct(*pBitmap); + delete pBitmap; + pBitmap = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return pIconListview; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return null; +} + +void +AlbumListForm::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == ICON_LIST_VIEW_ITEM_SELECTED) + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(index)); + AlbumInfo* pSendAlbumInfo = new (std::nothrow) AlbumInfo(); + pSendAlbumInfo->Construct(*pAlbumInfo); + + ArrayList* aList = new (std::nothrow) ArrayList(SingleObjectDeleter); + aList->Construct(); + aList->Add(pSendAlbumInfo); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), aList); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_VIDEO_LIST_EDITOR), aList); + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR), aList); + } + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST), aList); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +bool +AlbumListForm::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +result +AlbumListForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + + if (__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + if (__pTimer != null) + { + __pTimer->Cancel(); + delete __pTimer; + __pTimer = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumListForm::OnTimerExpired(Timer &timer) +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetFolderCount(); + + static int timerCount = 0; + if (__itemCount > 1) + { + __pAlbumViewIconList->UpdateList(); + } + else if (timerCount < 30) + { + __pTimer->Start(1000); + ++timerCount; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + + switch (actionId) + { + case ACTION_ID_FOOTER_CAMERA: + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_CAMERA)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, + APPCONTROL_OPERATION_ID_CAPTURE, pDataList, null); + } + break; + case ACTION_ID_FOOTER_EDIT: + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST_EDITOR)); + } + break; + case ACTION_ID_FOOTER_MORE: + { + if (__pContextMenuMore->GetShowState() == false && __pPresentationModel->GetFolderCount() != 0) + { + Rectangle rect = source.GetBounds(); + __pContextMenuMore->SetAnchorPosition(Point(rect.width/8, rect.y)); + __pContextMenuMore->SetShowState(true); + __pContextMenuMore->Show(); + } + else + { + __pContextMenuMore->SetShowState(false); + } + } + break; + default: + { + } + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + AppLogDebug("APP_CONTROL_MODE_PICK"); + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_CANCELED, null); + } + pApp->Terminate(); + } + } + else + { + AppLogDebug("APP_CONTROL_MODE_MAIN"); + UiApp* pApp = UiApp::GetInstance(); + pApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetFolderCount(); + __pAlbumViewIconList->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetFolderCount(); + __pAlbumViewIconList->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + Update(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListForm::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + __pAlbumViewIconList->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListForm::Update(void) +{ + AppLogDebug("ENTER"); + result r = __pAlbumViewIconList->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} diff --git a/src/GlAlbumListPresentationModel.cpp b/src/GlAlbumListPresentationModel.cpp new file mode 100644 index 0000000..1b35fa6 --- /dev/null +++ b/src/GlAlbumListPresentationModel.cpp @@ -0,0 +1,1348 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumListPresentationModel.cpp + * @brief This is the implementation file for AlbumListPresentationModel class. + */ + +#include +#include +#include +#include "GlAlbumInfo.h" +#include "GlAlbumListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlThumbnailEvent.h" +#include "GlThumbnailEventArg.h" +#include "GlThumbnailProvider.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; +using namespace Tizen::Ui::Controls; + +static const int ICON_CAP = 3; +static const int FOLDER_CAP = 8; +static const int ICON_SIZE = 102; +static const int FOLDER_SIZE_WIDTH = 334; +static const int FOLDER_SIZE_HEIGHT = 334; + +static const int FONT_SIZE_FOLDER_NAME = 32; +static const int FONT_SIZE_FOLDER_DATE = 25; +static const int FONT_SIZE_FOLDER_COUNT = 42; +static const int GAP_FONT = 5; + +static const int MAX_FONT_LENGTH = 15; + +static const unsigned int COLOR_BLACK = Color32<25, 25, 25>::Value; +static const unsigned int COLOR_1 = Color32<71, 128, 11>::Value; +static const unsigned int COLOR_2 = Color32<56, 78, 116>::Value; +static const unsigned int COLOR_3 = Color32<49, 125, 174>::Value; +static const unsigned int COLOR_4 = Color32<165, 53, 33>::Value; + +static const String RESERVED_MEDIA_PATH = Environment::GetMediaPath(); +static const String RESERVED_CAMERA_PATH = Environment::GetMediaPath() + L"Camera"; +static const String RESERVED_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera"; +static const String RESERVED_DOWNLOAD_PATH = Environment::GetMediaPath() + L"Downloads"; +static const String CONTENT_INFO_ORDER = L"ContentFileName"; + +static const int FORMAT_BUFFER_SIZE = 256; + +static const int MAX_RANDOM_COLOR_NUMBER = 4; +static const int COMPARE_COLOR_NUMBER_0 = 0; +static const int COMPARE_COLOR_NUMBER_1 = 1; +static const int COMPARE_COLOR_NUMBER_2 = 2; +static const int COMPARE_COLOR_NUMBER_3 = 3; + +static const int DOUBLE_NUMBER = 2; +static const int TRIPLE_NUMBER = 3; + +static const int EXCEPTION_NUMBER_0 = 0; +static const int EXCEPTION_NUMBER_1 = 1; +static const int EXCEPTION_NUMBER_2 = 2; + +static const int MAX_NUMBER_X = 3; +static const int MAX_NUMBER_Y = 3; + +static const int MAX_THUMNAIL_COUNT_IN_ALBUM = 7; + +AlbumListPresentationModel* AlbumListPresentationModel::__pPresentationModelInstance = null; +ArrayList* AlbumListPresentationModel::__pPresentationModelListener = null; +ThumbnailProvider* AlbumListPresentationModel::__pThumbnailProvider = null; +ThumbnailEvent* AlbumListPresentationModel::__pThumbnailEvent = null; +IList* AlbumListPresentationModel::__pAlbumInfoList = null; + +AlbumListPresentationModel::AlbumListPresentationModel(void) + :__pFolderBackgroundBitmap(null) + ,__appControlMode(APP_CONTROL_MODE_MAIN) + ,__appControlMediaType(APPCONTROL_MEDIA_TYPE_UNKNOWN) + ,__appControlSelectionMode(APPCONTROL_SELECTION_MODE_UNKNOWN) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AlbumListPresentationModel::~AlbumListPresentationModel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AlbumListPresentationModel* +AlbumListPresentationModel::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModelInstance == null) + { + CreateInstance(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModelInstance; +} + +result +AlbumListPresentationModel::Construct(void) +{ + AppLogDebug("ENTER"); + __pPresentationModelListener = new (std::nothrow) ArrayList(); + __pPresentationModelListener->Construct(); + + IThumbnailEventListener* pThumbnailEventListener = static_cast(this); + __pThumbnailEvent = new (std::nothrow) ThumbnailEvent(); + __pThumbnailEvent->AddListener(*pThumbnailEventListener, true); + + __pThumbnailProvider = ThumbnailProvider::GetInstance(); + AppLogDebug("ENTER1"); + GalleryApp* pApp = static_cast(GalleryApp::GetInstance()); + const IMap* pArguments = pApp->GetAppControlArguments(); + String operationId = pApp->GetAppControlOperationId(); + + if (operationId.CompareTo(APPCONTROL_OPERATION_ID_MAIN) == 0) + { + __appControlMode = APP_CONTROL_MODE_MAIN; + } + else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_PICK) == 0) + { + __appControlMode = APP_CONTROL_MODE_PICK; + + if (pArguments != null) + { + const String* selectionMode = + static_cast(pArguments->GetValue(String(APPCONTROL_KEY_SELECTION_MODE))); + const String* mediaType = + static_cast(pArguments->GetValue(String(APPCONTROL_KEY_MEDIA_TYPE))); + + if (mediaType != null && mediaType->CompareTo(APPCONTROL_DATA_VIDEO) == 0) + { + __appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO; + } + else + { + __appControlMediaType = APPCONTROL_MEDIA_TYPE_IMAGE; + } + + if (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0) + { + __appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE; + } + else + { + __appControlSelectionMode = APPCONTROL_SELECTION_MODE_SINGLE; + } + } + } + else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE) == 0) + { + __appControlMode = APP_CONTROL_MODE_SETTING; + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumListPresentationModel::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pPresentationModelInstance = new (std::nothrow) AlbumListPresentationModel; + result r = __pPresentationModelInstance->Construct(); + + if (IsFailed(r) == true) + { + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT false"); + return; + } + + std::atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListPresentationModel::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + + delete __pThumbnailEvent; + __pThumbnailEvent = null; + + if (__pAlbumInfoList != null) + { + delete __pAlbumInfoList; + __pAlbumInfoList = null; + } + + if (__pPresentationModelListener != null) + { + delete __pPresentationModelListener; + __pPresentationModelListener = null; + } + + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumListPresentationModel::AddPresentationModelListener(IAlbumEventListener* listener) +{ + AppLogDebug("ENTER"); + result r = __pPresentationModelListener->Add(listener); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumListPresentationModel::RemovePresentationModelListener(IAlbumEventListener& listner) +{ + AppLogDebug("ENTER"); + result r = __pPresentationModelListener->Remove(listner); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +AlbumListPresentationModel::CallAlbumChangedEvent(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModelListener->GetCount() > 0) + { + IEnumerator* pEnum = __pPresentationModelListener->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + IAlbumEventListener* pListener = null; + pListener = static_cast(pEnum->GetCurrent()); + pListener->OnFileInfoChanged(CONTENT_TYPE_ALL); + } + delete pEnum; + pEnum = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListPresentationModel::DrawPartialImage(Canvas& canvas, AlbumInfo* pAlbumInfo, int partialIndex, + const Rectangle& rectNew) +{ + AppLogDebug("ENTER partialIndex(%d)", partialIndex); + if (&canvas == null || __pFolderBackgroundBitmap == null || pAlbumInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + Dimension dimSet(ICON_SIZE, ICON_SIZE); + canvas.DrawBitmap(rectNew, *__pFolderBackgroundBitmap); + int startIndex = 0; + + switch (partialIndex) + { + case 0: + break; + case 1: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex); + if (pBitmap1 != null) + { + Rectangle rectFirst(ICON_CAP+FOLDER_CAP, ICON_CAP, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * TRIPLE_NUMBER, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * TRIPLE_NUMBER); + canvas.DrawBitmap(rectFirst, *pBitmap1); + } + break; + } + case 2: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap2 = pAlbumInfo->GetFolderThumnailBitmap(startIndex); + if (pBitmap1 != null && pBitmap2 != null) + { + Rectangle rectFirst(ICON_CAP+FOLDER_CAP, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * TRIPLE_NUMBER, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE * DOUBLE_NUMBER); + Rectangle rectSecond(ICON_CAP * TRIPLE_NUMBER + FOLDER_CAP + ICON_SIZE * DOUBLE_NUMBER, + ICON_CAP, ICON_SIZE, ICON_SIZE); + canvas.DrawBitmap(rectFirst, *pBitmap1); + canvas.DrawBitmap(rectSecond, *pBitmap2); + } + break; + } + case 3: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap2 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap3 = pAlbumInfo->GetFolderThumnailBitmap(startIndex); + if (pBitmap1 != null && pBitmap2 != null && pBitmap3 != null) + { + Rectangle rectFirst(ICON_CAP+FOLDER_CAP, ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, + ICON_CAP + ICON_SIZE * DOUBLE_NUMBER, ICON_CAP + ICON_SIZE * DOUBLE_NUMBER); + Rectangle rectSecond(ICON_CAP * TRIPLE_NUMBER + FOLDER_CAP + ICON_SIZE * DOUBLE_NUMBER, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, ICON_SIZE, ICON_CAP + ICON_SIZE * DOUBLE_NUMBER); + Rectangle rectThird(ICON_CAP * TRIPLE_NUMBER + FOLDER_CAP + ICON_SIZE * DOUBLE_NUMBER, ICON_CAP, + ICON_SIZE, ICON_SIZE); + canvas.DrawBitmap(rectFirst, *pBitmap1); + canvas.DrawBitmap(rectSecond, *pBitmap2); + canvas.DrawBitmap(rectThird, *pBitmap3); + } + break; + } + case 4: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap = null; + if (pBitmap1 != null) + { + Rectangle rectFirst(ICON_CAP+FOLDER_CAP, ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, + ICON_CAP + ICON_SIZE * DOUBLE_NUMBER, ICON_CAP + ICON_SIZE * DOUBLE_NUMBER); + canvas.DrawBitmap(rectFirst, *pBitmap1); + + for (int y = 0; y < MAX_NUMBER_Y; ++y) + { + for (int x = 0; x < MAX_NUMBER_X; ++x) + { + if ((y == EXCEPTION_NUMBER_0 || y == EXCEPTION_NUMBER_1 || y == EXCEPTION_NUMBER_2) + && (x == EXCEPTION_NUMBER_0 || x == EXCEPTION_NUMBER_1)) + { + continue; + } + + int xPoint = (ICON_CAP * (x + 1)) + FOLDER_CAP + (dimSet.width * x); + int yPoint = (ICON_CAP * (y + 1)) + (dimSet.height * y); + + pBitmap = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + if (pBitmap != null) + { + Rectangle rect(xPoint,yPoint,dimSet.width,dimSet.height); + canvas.DrawBitmap(rect, *pBitmap); + } + } + } + } + break; + } + case 5: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap2 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap = null; + + if (pBitmap1 != null && pBitmap2 != null) + { + Rectangle rectFirst(ICON_CAP + FOLDER_CAP, + ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, ICON_CAP + ICON_SIZE * DOUBLE_NUMBER, dimSet.height); + Rectangle rectSecond(ICON_CAP + FOLDER_CAP, ICON_CAP * TRIPLE_NUMBER + ICON_SIZE * DOUBLE_NUMBER, + ICON_CAP + ICON_SIZE * DOUBLE_NUMBER, dimSet.height); + canvas.DrawBitmap(rectFirst, *pBitmap1); + canvas.DrawBitmap(rectSecond, *pBitmap2); + + for (int y = 0; y < MAX_NUMBER_Y; ++y) + { + for (int x = 0; x < MAX_NUMBER_X; ++x) + { + if ((y == EXCEPTION_NUMBER_0 || y == EXCEPTION_NUMBER_1 || y == EXCEPTION_NUMBER_2) + && (x == EXCEPTION_NUMBER_0 || x == EXCEPTION_NUMBER_1)) + { + continue; + } + + int xPoint = (ICON_CAP * (x + 1)) + FOLDER_CAP + (dimSet.width * x); + int yPoint = (ICON_CAP * (y + 1)) + (dimSet.height * y); + + pBitmap = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + if (pBitmap != null) + { + Rectangle rect(xPoint,yPoint,dimSet.width,dimSet.height); + canvas.DrawBitmap(rect, *pBitmap); + } + } + } + } + break; + } + case 6: + { + Bitmap* pBitmap1 = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + Bitmap* pBitmap = null; + if (pBitmap1 != null) + { + Rectangle rectFirst(ICON_CAP+FOLDER_CAP, ICON_CAP * DOUBLE_NUMBER + ICON_SIZE, + ICON_CAP + ICON_SIZE * DOUBLE_NUMBER, dimSet.height); + canvas.DrawBitmap(rectFirst, *pBitmap1); + + for (int y = 0; y < MAX_NUMBER_Y; ++y) + { + for (int x = 0; x < MAX_NUMBER_X; ++x) + { + if ((y == EXCEPTION_NUMBER_0 || y == EXCEPTION_NUMBER_1) + && (x == EXCEPTION_NUMBER_0 || x == EXCEPTION_NUMBER_1)) + { + continue; + } + + int xPoint = (ICON_CAP * (x + 1)) + FOLDER_CAP + (dimSet.width * x); + int yPoint = (ICON_CAP * (y + 1)) + (dimSet.height * y); + + pBitmap = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + if (pBitmap != null) + { + Rectangle rect(xPoint,yPoint,dimSet.width,dimSet.height); + canvas.DrawBitmap(rect, *pBitmap); + } + } + } + } + break; + } + case 7: + { + Bitmap* pBitmap = null; + for (int y = 0; y < MAX_NUMBER_Y; ++y) + { + for (int x = 0; x < MAX_NUMBER_X; ++x) + { + if (y == EXCEPTION_NUMBER_0 && (x == EXCEPTION_NUMBER_0 || x == EXCEPTION_NUMBER_1)) + { + continue; + } + + int xPoint = (ICON_CAP * (x + 1)) + FOLDER_CAP + (dimSet.width * x); + int yPoint = (ICON_CAP * (y + 1)) + (dimSet.height * y); + + pBitmap = pAlbumInfo->GetFolderThumnailBitmap(startIndex++); + if (pBitmap != null) + { + Rectangle rect(xPoint,yPoint,dimSet.width,dimSet.height); + canvas.DrawBitmap(rect, *pBitmap); + } + } + } + break; + } + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListPresentationModel::DrawFontImage(Canvas& canvas, AlbumInfo* pAlbumInfo, int index) +{ + AppLogDebug("ENTER"); + if (&canvas == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String dateString; + dateString = pAlbumInfo->GetCreateDateString(); + + String strCnt; + int allContentCount = pAlbumInfo->GetContentIdCount(); + strCnt.Format(FORMAT_BUFFER_SIZE, L"%d", allContentCount); + + String strFolderName = pAlbumInfo->GetAlbumName(); + Color colorBack = COLOR_BLACK; + + if ( strFolderName == ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS") + || strFolderName == ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB") + || strFolderName == ResourceManager::GetString(L"IDS_COM_BODY_DOWNLOADS")) + { + colorBack = COLOR_BLACK; + } + else + { + if (index % MAX_RANDOM_COLOR_NUMBER == COMPARE_COLOR_NUMBER_0) + { + colorBack = COLOR_1; + } + else if (index % MAX_RANDOM_COLOR_NUMBER == COMPARE_COLOR_NUMBER_1) + { + colorBack = COLOR_2; + } + else if (index % MAX_RANDOM_COLOR_NUMBER == COMPARE_COLOR_NUMBER_2) + { + colorBack = COLOR_3; + } + else if (index % MAX_RANDOM_COLOR_NUMBER == COMPARE_COLOR_NUMBER_3) + { + colorBack = COLOR_4; + } + } + + Rectangle rectBack(ICON_CAP + FOLDER_CAP, ICON_CAP, ICON_SIZE * DOUBLE_NUMBER + ICON_CAP, ICON_SIZE); + canvas.FillRectangle(colorBack, rectBack); + + Point pointText; + + Font ftFolderName, ftDate, ftCnt; + ftFolderName.Construct(FONT_STYLE_PLAIN, FONT_SIZE_FOLDER_NAME); + ftDate.Construct(FONT_STYLE_PLAIN, FONT_SIZE_FOLDER_DATE); + ftCnt.Construct(FONT_STYLE_PLAIN, FONT_SIZE_FOLDER_COUNT); + + EnrichedText enText; + enText.Construct(Dimension(ICON_SIZE * DOUBLE_NUMBER - (ICON_CAP * DOUBLE_NUMBER), + FONT_SIZE_FOLDER_NAME + ICON_CAP * DOUBLE_NUMBER)); + enText.SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT); + + TextElement textElement; + textElement.Construct(strFolderName); + textElement.SetFont(ftFolderName); + textElement.SetTextColor(Color::GetColor(COLOR_ID_WHITE)); + enText.SetTextAbbreviationEnabled(true); + enText.Add(textElement); + + pointText = Point(ICON_CAP + FOLDER_CAP, ICON_CAP + FONT_SIZE_FOLDER_NAME); + canvas.SetFont(ftDate); + canvas.SetForegroundColor(Color::GetColor(COLOR_ID_GREY)); + canvas.DrawText(pointText, dateString, MAX_FONT_LENGTH); + + pointText = Point((ICON_SIZE * DOUBLE_NUMBER + ICON_CAP) - ((FONT_SIZE_FOLDER_COUNT / DOUBLE_NUMBER) * strCnt.GetLength() + GAP_FONT), + ICON_CAP + FONT_SIZE_FOLDER_NAME + FONT_SIZE_FOLDER_DATE); + canvas.SetFont(ftCnt); + canvas.SetForegroundColor(Color::GetColor(COLOR_ID_WHITE)); + canvas.DrawText(pointText, strCnt, MAX_FONT_LENGTH); + + pointText = Point(ICON_CAP + FOLDER_CAP, ICON_CAP); + canvas.SetForegroundColor(Color::GetColor(COLOR_ID_WHITE)); + canvas.DrawText(pointText, enText); + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +Bitmap* +AlbumListPresentationModel::CreateMergeBitmapN(int index) +{ + AppLogDebug("ENTER index(%d)", index); + if (__pAlbumInfoList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(index)); + int paticalCount = 0; + if (pAlbumInfo != null) + { + paticalCount = pAlbumInfo->GetFolderThumnailBitmapCount(); + } + + if (paticalCount == 0) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + Bitmap* pBitmapNew = new (std::nothrow) Bitmap(); + BufferInfo bufferinfo; + Canvas canvas; + Rectangle rectNew(0, 0, FOLDER_SIZE_WIDTH, FOLDER_SIZE_HEIGHT); + Dimension size(FOLDER_SIZE_WIDTH, FOLDER_SIZE_HEIGHT); + + result r = pBitmapNew->Construct(size, BITMAP_PIXEL_FORMAT_ARGB8888); + if (r != E_SUCCESS) + { + delete pBitmapNew; + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + pBitmapNew->Lock(bufferinfo); + r = canvas.Construct(bufferinfo); + if (r != E_SUCCESS) + { + delete pBitmapNew; + AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + DrawPartialImage(canvas, pAlbumInfo, paticalCount, rectNew); + DrawFontImage(canvas, pAlbumInfo, index); + + + pBitmapNew->Unlock(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pBitmapNew; +} + +bool +AlbumListPresentationModel::GetMinMaxDateTimeString(IList* pContentIdList, String& MinimumTime, String& MaximumTime) +{ + AppLogDebug("ENTER"); + int fileCount = pContentIdList->GetCount(); + + if (fileCount == 0) + { + MinimumTime = EMPTY_SPACE; + MaximumTime = EMPTY_SPACE; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return false; + } + + DateTime dateMin, dateMax; + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + for (int count = 0; count < fileCount; ++count) + { + ContentId* pContentId = static_cast(pContentIdList->GetAt(count)); + ContentInfo* pContentInfo = contentManager.GetContentInfoN(*pContentId); + + if (pContentInfo == null) + { + MinimumTime = EMPTY_SPACE; + MaximumTime = EMPTY_SPACE; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return false; + } + + DateTime dateFileTime = pContentInfo->GetDateTime(); + + if (count == 0) + { + dateMin = dateFileTime; + dateMax = dateFileTime; + continue; + } + + if (DateTime::Compare(dateMax, dateFileTime) > 0) + { + dateMax = dateFileTime; + } + + if (DateTime::Compare(dateMin, dateFileTime) < 0) + { + dateMin = dateFileTime; + } + } + MinimumTime.Format(FORMAT_BUFFER_SIZE, L"%04d.%d", dateMin.GetYear(), dateMin.GetMonth()); + MaximumTime.Format(FORMAT_BUFFER_SIZE, L"%04d.%d", dateMax.GetYear(), dateMax.GetMonth()); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +result +AlbumListPresentationModel::StartAppControl( const String& providerId, const String& operationId, + const IMap* pDataList, IAppControlResponseListener* pListener) +{ + AppLogDebug("ENTER"); + AppLogDebug("FindAppControlN(%ls, %ls)", providerId.GetPointer(), operationId.GetPointer()); + if (pDataList != null) + { + IList* pKeyList = pDataList->GetKeysN(); + if (pKeyList != null) + { + int keyCount = pKeyList->GetCount(); + for (int i = 0; i < keyCount; ++i) + { + String* pKey = const_cast(static_cast(pKeyList->GetAt(i))); + String* pValue = const_cast(static_cast(pDataList->GetValue(*pKey))); + + AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); + } + } + } + + AppControl* pAc = AppManager::FindAppControlN(providerId, operationId); + if (pAc == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + result r = pAc->Start(null, null, pDataList, pListener); + + if (r == E_SUCCESS) + { + GalleryApp* pGalleryApp = static_cast(GalleryApp::GetInstance()); + pGalleryApp->SetFrameEnabled(false); + } + + delete pAc; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +String +AlbumListPresentationModel::GetDirectoryName(String& directoryPath) +{ + AppLogDebug("ENTER"); + String directoryName; + int lastIndex = -1 ; + + directoryPath.LastIndexOf(DIRECTORY_SEPARATOR, directoryPath.GetLength() - 1, lastIndex); + directoryPath.SubString(lastIndex + 1, directoryName); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return directoryName; +} + +int +AlbumListPresentationModel::GetFolderCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pAlbumInfoList->GetCount(); +} + +void +AlbumListPresentationModel::InitializeAlbumInfoList(const ContentType& contentType) +{ + AppLogDebug("ENTER"); + + if (__pFolderBackgroundBitmap == null) + { + __pFolderBackgroundBitmap = ResourceManager::GetBitmapN(IDB_MAIN_FOLDER_BACKGROUND); + } + + if (__pAlbumInfoList != null) + { + delete __pAlbumInfoList; + } + __pAlbumInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + ContentDirectory directory; + + if (contentType == CONTENT_TYPE_ALL) + { + IListT< ContentType >* pListT = new (std::nothrow) ArrayListT(); + TryReturnVoid(pListT != null, "Unable to Create ArrayListT"); + pListT->Add(CONTENT_TYPE_IMAGE); + pListT->Add(CONTENT_TYPE_VIDEO); + + result r = directory.Construct(*pListT); + if (r != E_SUCCESS) + { + delete __pAlbumInfoList; + __pAlbumInfoList = null; + delete pListT; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(r)); + return; + } + } + else + { + result r = directory.Construct(contentType); + if (r != E_SUCCESS) + { + delete __pAlbumInfoList; + __pAlbumInfoList = null; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(r)); + return; + } + } + IList* pContentDirectoryPathList = directory.GetContentDirectoryPathListN(SORT_ORDER_ASCENDING); + String* pDirPath = null; + AlbumInfo* pAlbumInfo = null; + AlbumInfo* pAllAlbumInfo = new (std::nothrow) AlbumInfo(); + result r = pAllAlbumInfo->Construct(); + if (r != E_SUCCESS) + { + delete pContentDirectoryPathList; + delete pAllAlbumInfo; + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + pAllAlbumInfo->SetAlbumName(ResourceManager::GetString(L"IDS_MEDIABR_BODY_ALL_ALBUMS")); + AlbumInfo* pCameraAlbumInfo = new (std::nothrow) AlbumInfo(); + r = pCameraAlbumInfo->Construct(); + if (r != E_SUCCESS) + { + delete pContentDirectoryPathList; + delete pAllAlbumInfo; + delete pCameraAlbumInfo; + AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + pCameraAlbumInfo->SetAlbumName(ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB")); + AlbumInfo* pDownloadAlbumInfo = new (std::nothrow) AlbumInfo(); + r = pDownloadAlbumInfo->Construct(); + if (r != E_SUCCESS) + { + delete pContentDirectoryPathList; + delete pAllAlbumInfo; + delete pCameraAlbumInfo; + delete pDownloadAlbumInfo; + AppLogDebug("EXIT 5(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + pDownloadAlbumInfo->SetAlbumName(ResourceManager::GetString(L"IDS_COM_BODY_DOWNLOADS")); + AlbumInfo* pNoNameAlbumInfo = new (std::nothrow) AlbumInfo(); + r = pNoNameAlbumInfo->Construct(); + if (r != E_SUCCESS) + { + delete pContentDirectoryPathList; + delete pAllAlbumInfo; + delete pCameraAlbumInfo; + delete pDownloadAlbumInfo; + delete pNoNameAlbumInfo; + AppLogDebug("EXIT 6(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + pNoNameAlbumInfo->SetAlbumName(ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME")); + if ((pContentDirectoryPathList != null) && (pContentDirectoryPathList->GetCount() > 0)) + { + IEnumerator* pEnum = pContentDirectoryPathList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + pDirPath = static_cast(pEnum->GetCurrent()); + if (pDirPath == null) + { + continue; + } + + if ((*pDirPath == RESERVED_CAMERA_PATH) + ||(*pDirPath == RESERVED_CAMERA_PATH_EXT)) + { + IList* pContentIdList = GetContentIdListInDirectoryN(*pDirPath, contentType); + + if (pContentIdList != null) + { + pCameraAlbumInfo->AppendDirectory(*pDirPath); + pCameraAlbumInfo->AppendContentIdList(*pContentIdList); + + pAllAlbumInfo->AppendDirectory(*pDirPath); + pAllAlbumInfo->AppendContentIdList(*pContentIdList); + delete pContentIdList; + } + } + else if (*pDirPath == RESERVED_DOWNLOAD_PATH) + { + IList* pContentIdList = GetContentIdListInDirectoryN(*pDirPath, contentType); + + if (pContentIdList != null) + { + pDownloadAlbumInfo->AppendDirectory(*pDirPath); + pDownloadAlbumInfo->AppendContentIdList(*pContentIdList); + + pAllAlbumInfo->AppendDirectory(*pDirPath); + pAllAlbumInfo->AppendContentIdList(*pContentIdList); + delete pContentIdList; + } + } + else if (*pDirPath == RESERVED_MEDIA_PATH) + { + IList* pContentIdList = GetContentIdListInDirectoryN(*pDirPath, contentType); + + if (pContentIdList != null) + { + pNoNameAlbumInfo->AppendDirectory(*pDirPath); + pNoNameAlbumInfo->AppendContentIdList(*pContentIdList); + + pAllAlbumInfo->AppendDirectory(*pDirPath); + pAllAlbumInfo->AppendContentIdList(*pContentIdList); + delete pContentIdList; + } + } + else + { + IList* pContentIdList = GetContentIdListInDirectoryN(*pDirPath, contentType); + + if (pContentIdList != null) + { + if (pContentIdList->GetCount() > 0) + { + pAlbumInfo = new (std::nothrow) AlbumInfo(); + IList* pSubDirList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + pSubDirList->Add(new (std::nothrow) String(*pDirPath)); + + pAlbumInfo->Construct(GetDirectoryNameFromFullPath(*pDirPath), contentType, *pSubDirList, + *pContentIdList); + + pAllAlbumInfo->AppendDirectory(*pDirPath); + pAllAlbumInfo->AppendContentIdList(*pContentIdList); + delete pSubDirList; + } + delete pContentIdList; + } + } + + if (pAlbumInfo != null && pAlbumInfo->GetContentIdCount() > 0) + { + String strMaximumDate; + String strMinimumDate; + GetMinMaxDateTimeString(pAlbumInfo->GetContentIdListN(), strMinimumDate, strMaximumDate); + pAlbumInfo->SetCreateDateString(strMinimumDate, strMaximumDate); + __pAlbumInfoList->Add(pAlbumInfo); + pAlbumInfo = null; + } + else + { + delete pAlbumInfo; + pAlbumInfo = null; + } + } + + int insertIndex = 0; + if (pAllAlbumInfo->GetContentIdCount() > 0) + { + String strMaximumDate; + String strMinimumDate; + GetMinMaxDateTimeString(pAllAlbumInfo->GetContentIdListN(), strMinimumDate, strMaximumDate); + pAllAlbumInfo->SetCreateDateString(strMinimumDate, strMaximumDate); + __pAlbumInfoList->InsertAt((Object&)*pAllAlbumInfo, insertIndex++); + pAllAlbumInfo = null; + } + else + { + delete pAllAlbumInfo; + pAllAlbumInfo = null; + } + + if (pCameraAlbumInfo->GetContentIdCount() > 0) + { + String strMaximumDate; + String strMinimumDate; + GetMinMaxDateTimeString(pCameraAlbumInfo->GetContentIdListN(), strMinimumDate, strMaximumDate); + pCameraAlbumInfo->SetCreateDateString(strMinimumDate, strMaximumDate); + __pAlbumInfoList->InsertAt((Object&)*pCameraAlbumInfo, insertIndex++); + } + else + { + delete pCameraAlbumInfo; + pCameraAlbumInfo = null; + } + + if (pDownloadAlbumInfo->GetContentIdCount() > 0) + { + String strMaximumDate; + String strMinimumDate; + String dateString; + GetMinMaxDateTimeString(pDownloadAlbumInfo->GetContentIdListN(), strMinimumDate, strMaximumDate); + pDownloadAlbumInfo->SetCreateDateString(strMinimumDate, strMaximumDate); + __pAlbumInfoList->InsertAt((Object&)*pDownloadAlbumInfo, insertIndex++); + } + else + { + delete pDownloadAlbumInfo; + pDownloadAlbumInfo = null; + } + + if (pNoNameAlbumInfo->GetContentIdCount() > 0) + { + String strMaximumDate; + String strMinimumDate; + String dateString; + GetMinMaxDateTimeString(pNoNameAlbumInfo->GetContentIdListN(), strMinimumDate, strMaximumDate); + pNoNameAlbumInfo->SetCreateDateString(strMinimumDate, strMaximumDate); + __pAlbumInfoList->InsertAt((Object&)*pNoNameAlbumInfo, insertIndex++); + } + else + { + delete pNoNameAlbumInfo; + pNoNameAlbumInfo = null; + } + + delete pEnum; + } + else + { + delete pAllAlbumInfo; + delete pCameraAlbumInfo; + delete pDownloadAlbumInfo; + delete pNoNameAlbumInfo; + } + + if (pContentDirectoryPathList != null) + { + delete pContentDirectoryPathList; + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +String +AlbumListPresentationModel::GetDirectoryNameFromFullPath(const String& fullPath)const +{ + AppLogDebug("ENTER"); + if (fullPath == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + String delim(DIRECTORY_SEPARATOR); + StringTokenizer st(fullPath,delim); + String token; + while (st.HasMoreTokens()) + { + st.GetNextToken(token); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return token; +} + +IList* +AlbumListPresentationModel::GetContentIdListInDirectoryN(const String& directoryPath, ContentType contentType)const +{ + AppLogDebug("ENTER"); + + if (&directoryPath == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return null; + } + + ContentDirectory directory; + const String contentDirectoryPath = directoryPath; + if (contentType == CONTENT_TYPE_ALL) + { + IListT< ContentType >* pListT = new (std::nothrow) ArrayListT(); + pListT->Add(CONTENT_TYPE_IMAGE); + pListT->Add(CONTENT_TYPE_VIDEO); + result r = directory.Construct(*pListT); + delete pListT; + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + return null; + } + } + else + { + result r = directory.Construct(contentType); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + return null; + } + } + + int pageNo = 1; + int countPerPage = directory.GetContentDirectoryItemCount(contentDirectoryPath); + IList* pContentInfoList = directory.GetContentDirectoryItemListN(contentDirectoryPath, pageNo, countPerPage, + CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING); + IList* pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + if ((pContentInfoList != null) && (pContentInfoList->GetCount() > 0)) + { + IEnumerator* pEnum = pContentInfoList->GetEnumeratorN(); + ContentId* pItem; + while (pEnum->MoveNext() == E_SUCCESS) + { + ContentInfo* pContentInfo = static_cast(pEnum->GetCurrent()); + pItem = new (std::nothrow) ContentId(pContentInfo->GetContentId()); + pContentIdList->Add(pItem); + } + delete pEnum; + } + delete pContentInfoList; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pContentIdList; +} + +result +AlbumListPresentationModel::DeleteContentInfoInDirectory(int index, ContentType contentType) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + if (__pAlbumInfoList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return r; + } + + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(index)); + + int loopCount = pAlbumInfo->GetDirectoryCount(); + for (int i = 0; i < loopCount; ++i) + { + ContentDirectory directory; + const String contentDirectoryPath = pAlbumInfo->GetDirectory(i); + + if (contentType == CONTENT_TYPE_ALL) + { + IListT< ContentType >* pListT = new (std::nothrow) ArrayListT(); + pListT->Add(CONTENT_TYPE_IMAGE); + pListT->Add(CONTENT_TYPE_VIDEO); + r = directory.Construct(*pListT); + delete pListT; + pListT = null; + } + else + { + r = directory.Construct(contentType); + } + if (r != E_SUCCESS) + { + continue; + } + + int pageNo = 1; + int countPerPage = directory.GetContentDirectoryItemCount(contentDirectoryPath); + IList* pContentInfoList = directory.GetContentDirectoryItemListN(contentDirectoryPath, pageNo, + countPerPage, CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING); + ContentManager contentManager; + r = contentManager.Construct(); + if (r != E_SUCCESS) + { + delete pContentInfoList; + continue; + } + + if ((pContentInfoList != null) && (pContentInfoList->GetCount() > 0)) + { + IEnumerator* pEnum = pContentInfoList->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS || r == E_SUCCESS) + { + ContentInfo* pContentInfo = static_cast(pEnum->GetCurrent()); + ContentId contentId = pContentInfo->GetContentId(); + r = contentManager.DeleteContent(contentId); + } + delete pEnum; + pEnum = null; + } + + delete pContentInfoList; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +AppControlMode +AlbumListPresentationModel::GetAppControlMode(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + return __appControlMode; +} + +AppControlMediaType +AlbumListPresentationModel::GetAppControlMediaType(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + return __appControlMediaType; +} + +AppControlSelectionMode +AlbumListPresentationModel::GetAppControlSelectionMode(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + return __appControlSelectionMode; +} + +IList* +AlbumListPresentationModel::GetAlbumInfoList(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pAlbumInfoList; +} + +void +AlbumListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg) +{ + AppLogDebug("ENTER"); + if (&eventArg != null) + { + ThumbnailEventArg* pThumbnailEventArg = static_cast(&eventArg); + if (pThumbnailEventArg == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + ThumbnailInfo* pThumbnailInfo = pThumbnailEventArg->GetThumbnailInfoN(); + if (pThumbnailInfo == null) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + ContentId contentId = pThumbnailInfo->GetContentId(); + ArrayList* pUpdateFolderIndex = new (std::nothrow) ArrayList(SingleObjectDeleter); + + if (__pAlbumInfoList != null) + { + int outterLoopCount = __pAlbumInfoList->GetCount(); + for (int x = 0; x < outterLoopCount; ++x) + { + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(x)); + int innerLoopCount = pAlbumInfo->GetContentIdCount(); + for (int i = 0; i < innerLoopCount; ++i) + { + if (i >= FOLDER_BITMAP_MAX) + { + break; + } + + if (contentId == pAlbumInfo->GetContentId(i)) + { + if (pAlbumInfo->GetFolderThumnailBitmap(i) == null) + { + pAlbumInfo->AppendFolderThumnailBitmap(pThumbnailInfo->GetBitmapN(), i); + pUpdateFolderIndex->Add(new (std::nothrow) Integer(x)); + } + } + } + } + } + + if (__pPresentationModelListener->GetCount() > 0) + { + IEnumerator* pEnum = __pPresentationModelListener->GetEnumeratorN(); + while (pEnum->MoveNext() == E_SUCCESS) + { + IAlbumEventListener* pListener = null; + pListener = static_cast(pEnum->GetCurrent()); + + int loopCount = pUpdateFolderIndex->GetCount(); + for (int k = 0; k < loopCount; ++k) + { + Integer *index = (Integer*)pUpdateFolderIndex->GetAt(k); + int folderIndex = index->ToInt(); + + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(folderIndex)); + int emptyIndex = pAlbumInfo->GetEmptyBitmapIndex(); + if (emptyIndex == FOLDER_BITMAP_MAX) + { + pListener->OnThumbnailDecoded(folderIndex); + } + else + { + RequestThumbnail(folderIndex, emptyIndex); + } + } + } + delete pEnum; + pEnum = null; + } + + delete pUpdateFolderIndex; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumListPresentationModel::RequestThumbnail(const int folderIndex, int pathIndex) +{ + AppLogDebug("ENTER : folderIndex(%d), pathIndex(%d)", folderIndex, pathIndex); + + ContentId contentId; + if (__pAlbumInfoList != null) + { + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(folderIndex)); + contentId = pAlbumInfo->GetContentId(pathIndex); + } + + __pThumbnailProvider->RequestThumbnail(contentId, __pThumbnailEvent); + AppLogDebug("EXIT"); +} + +void +AlbumListPresentationModel::CancelThumbnailRequest(const int folderIndex) +{ + AppLogDebug("ENTER : folderIndex(%d)", folderIndex); + if (__pAlbumInfoList != null) + { + AlbumInfo* pAlbumInfo = static_cast(__pAlbumInfoList->GetAt(folderIndex)); + if (pAlbumInfo != null) + { + int loopCount = pAlbumInfo->GetFolderThumnailBitmapCount(); + ContentId contentId; + if (loopCount > MAX_THUMNAIL_COUNT_IN_ALBUM) + { + loopCount = MAX_THUMNAIL_COUNT_IN_ALBUM; + } + + __pThumbnailProvider->CancelThumbnailRequest(contentId, __pThumbnailEvent); + + for (int i = 0; i < loopCount ; ++i) + { + contentId = pAlbumInfo->GetContentId(i); + __pThumbnailProvider->CancelThumbnailRequest(contentId, __pThumbnailEvent); + } + } + } + AppLogDebug("EXIT"); +} + +void +AlbumListPresentationModel::ClearThumbnailRequests(bool appTerminating) +{ + AppLogDebug("ENTER"); + if (__pThumbnailProvider != null) + { + __pThumbnailProvider->ClearThumbnailRequests(appTerminating); + } + AppLogDebug("EXIT"); +} diff --git a/src/GlAlbumNameEditorForm.cpp b/src/GlAlbumNameEditorForm.cpp new file mode 100644 index 0000000..63df8d4 --- /dev/null +++ b/src/GlAlbumNameEditorForm.cpp @@ -0,0 +1,395 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAlbumNameEditorForm.cpp + * @brief This is the implementation file for AlbumNameEditorForm class. + */ + +#include +#include "GlAlbumInfo.h" +#include "GlAlbumNameEditorForm.h" +#include "GlAlbumListPresentationModel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Io; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const Rectangle RECT_NAME_EDIT_FIELD (0, 0, 720, 100); +static const unsigned int COLOR_NAME_EDIT_FIELD = Color32<255, 255, 255>::Value; +static const int ALBUM_MAX_LENGTH = 255; + +AlbumNameEditorForm::AlbumNameEditorForm() + : __pNameEditField(null) + , __folderIndex(0) + , __albumNameEditorMode(ALBUM_NAME_EDITOR_MODE_RENAME) + , __pMessageBox(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AlbumNameEditorForm::~AlbumNameEditorForm() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumNameEditorForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_HEADER | FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AlbumNameEditorForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + SetOrientation(ORIENTATION_PORTRAIT); + AddOrientationEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumNameEditorForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus) +{ + AppLogDebug("ENTER"); + __pNameEditField->SetBounds(RECT_NAME_EDIT_FIELD); + __pNameEditField->SetFocus(); + Draw(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumNameEditorForm::OnTextValueChanged(const Control& source) +{ + AppLogDebug("ENTER"); + String inputString = __pNameEditField->GetText(); + + ByteBuffer* buffer = StringUtil::StringToUtf8N(inputString); + int remaining = 0; + if (buffer != null) + { + remaining = buffer->GetRemaining(); + } + + if (remaining >= ALBUM_MAX_LENGTH) + { + if (__pMessageBox == null) + { + __pMessageBox = new (std::nothrow) MessageBox(); + __pMessageBox->Construct(L"", + ResourceManager::GetString(L"IDS_COM_POP_MAXIMUM_NUMBER_OF_CHARACTERS_REACHED"), + MSGBOX_STYLE_NONE, 3000); + int modalResult = 0; + __pMessageBox->ShowAndWait(modalResult); + delete __pMessageBox; + __pMessageBox = null; + } + + __pNameEditField->SetText(__nameEditFieldTempText); + __pNameEditField->SetFocus(); + + return; + } + __nameEditFieldTempText = inputString; + + inputString.Trim(); + + Header* header = GetHeader(); + HeaderItemStatus itemStatus; + header->GetItemStatus(0, itemStatus); + if (inputString.GetLength() == 0) + { + if (itemStatus != HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, false); + header->RequestRedraw(true); + } + } + else + { + if (itemStatus == HEADER_ITEM_STATUS_DISABLED) + { + header->SetItemEnabled(0, true); + header->RequestRedraw(true); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumNameEditorForm::OnTextValueChangeCanceled(const Control& source) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AlbumNameEditorForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AlbumNameEditorForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + + String pPath; + String strOri; + __nameEditFieldText = __pNameEditField->GetText(); + + if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_RENAME) + { + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(__folderIndex)); + pPath = pAlbumInfo->GetDirectory(0); + strOri = pPath; + } + + switch (actionId) + { + case ACTION_ID_BUTTON_CREATE_NAME_DONE: + { + __pNameEditField->HideKeypad(); + __pNameEditField->RequestRedraw(); + pPath.Append(Tizen::System::Environment::GetMediaPath()); + pPath.Append(__nameEditFieldText); + + if (__previousSceneId != IDSCN_ALL_LIST_EDITOR && __previousSceneId != IDSCN_ALL_LIST_SELECTION) + { + Directory::Create( pPath, true); + } + + __nameEditFieldPreText = __nameEditFieldText; + ArrayList argsList; + argsList.Construct(); + argsList.Add(new (std::nothrow) String(pPath)); + + pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId), &argsList); + break; + } + case ACTION_ID_BUTTON_CREATE_NAME_CANCEL: + { + __pNameEditField->SetText(__nameEditFieldPreText); + __pNameEditField->HideKeypad(); + __pNameEditField->Draw(); + pSceneManager->GoBackward(BackwardSceneTransition(__callerSceneId)); + break; + } + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumNameEditorForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE) + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(__callerSceneId)); + } + else + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST_EDITOR)); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumNameEditorForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = AlbumListPresentationModel::GetInstance(); + __previousSceneId = previousSceneId; + + if (previousSceneId == IDSCN_ALBUM_LIST_EDITOR) + { + if (pArgs != null) + { + IEnumerator* pEnum = pArgs->GetEnumeratorN(); + if (pEnum->MoveNext() == E_SUCCESS) + { + Integer *index = static_cast(pEnum->GetCurrent()); + if (index != null) + { + __folderIndex = index->ToInt(); + } + } + delete pEnum; + delete pArgs; + } + } + + if (previousSceneId == IDSCN_ALL_LIST_EDITOR + || previousSceneId == IDSCN_IMAGE_LIST_EDITOR + || previousSceneId == IDSCN_VIDEO_LIST_EDITOR + || previousSceneId == IDSCN_ALL_LIST_SELECTION) + { + if (previousSceneId == IDSCN_ALL_LIST_EDITOR) + { + AppLogDebug("[MOVE] previousSceneId = IDSCN_ALL_LIST_EDITOR"); + } + else if (previousSceneId == IDSCN_ALL_LIST_SELECTION) + { + AppLogDebug("[MOVE] previousSceneId = IDSCN_ALL_LIST_SELECTION"); + } + + __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_CREATE; + __callerSceneId = previousSceneId; + } + else + { + __albumNameEditorMode = ALBUM_NAME_EDITOR_MODE_RENAME; + __callerSceneId = EMPTY_SPACE; + } + + if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE) + { + Header* pHeader = GetHeader(); + AppAssert(pHeader); + pHeader->SetStyle(HEADER_STYLE_BUTTON); + + HeaderItem doneItem; + HeaderItem cancelItem; + doneItem.Construct(ACTION_ID_BUTTON_CREATE_NAME_DONE); + doneItem.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE")); + cancelItem.Construct(ACTION_ID_BUTTON_CREATE_NAME_CANCEL); + cancelItem.SetText(ResourceManager::GetString(L"IDS_COM_POP_CANCEL")); + + pHeader->SetStyle(HEADER_STYLE_BUTTON); + pHeader->AddItem(doneItem); + pHeader->AddItem(cancelItem); + pHeader->AddActionEventListener(*this); + pHeader->SetItemEnabled(0, false); + + __pNameEditField = new (std::nothrow) EditField(); + __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY, + false, ALBUM_MAX_LENGTH); + __pNameEditField->AddTextEventListener(*this); + __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD); + + AddControl(*__pNameEditField); + __pNameEditField->AddActionEventListener(*this); + + __nameEditFieldText = EMPTY_SPACE; + __nameEditFieldPreText = EMPTY_SPACE; + __pNameEditField->SetText(__nameEditFieldText); + __nameEditFieldTempText = __nameEditFieldText; + + __pNameEditField->SetOverlayKeypadCommandButtonVisible(false); + __pNameEditField->SetFocus(); + + } + else + { + Header* pHeader = GetHeader(); + AppAssert(pHeader); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_CHANGE_NAME")); + pHeader->SetStyle(HEADER_STYLE_BUTTON); + + HeaderItem doneItem; + HeaderItem cancelItem; + doneItem.Construct(ACTION_ID_BUTTON_CREATE_NAME_DONE); + doneItem.SetText(ResourceManager::GetString(L"IDS_COM_SK_DONE")); + cancelItem.Construct(ACTION_ID_BUTTON_CREATE_NAME_CANCEL); + cancelItem.SetText(ResourceManager::GetString(L"IDS_COM_POP_CANCEL")); + + pHeader->SetStyle(HEADER_STYLE_BUTTON); + pHeader->AddItem(doneItem); + pHeader->AddItem(cancelItem); + pHeader->AddActionEventListener(*this); + + __pNameEditField = new (std::nothrow) EditField(); + __pNameEditField->Construct(RECT_NAME_EDIT_FIELD, + EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_OVERLAY); + __pNameEditField->AddTextEventListener(*this); + __pNameEditField->SetColor(EDIT_STATUS_NORMAL, COLOR_NAME_EDIT_FIELD); + + AddControl(*__pNameEditField); + __pNameEditField->AddActionEventListener(*this); + String strName; + + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(__folderIndex)); + + strName = pAlbumInfo->GetAlbumName(); + __nameEditFieldText = strName; + __nameEditFieldPreText = strName; + __pNameEditField->SetText(__nameEditFieldText); + + __pNameEditField->SetOverlayKeypadCommandButtonVisible(false); + __pNameEditField->SetFocus(); + } + + if (__albumNameEditorMode == ALBUM_NAME_EDITOR_MODE_CREATE) + { + __nameEditFieldText = EMPTY_SPACE; + __nameEditFieldPreText = EMPTY_SPACE; + __pNameEditField->SetText(__nameEditFieldText); + } + else + { + IList* pAlbumInfoList = __pPresentationModel->GetAlbumInfoList(); + AlbumInfo* pAlbumInfo = static_cast(pAlbumInfoList->GetAt(__folderIndex)); + if (pAlbumInfo != null) + { + String strName; + strName = pAlbumInfo->GetAlbumName(); + + __nameEditFieldText = strName; + __nameEditFieldPreText = strName; + __pNameEditField->SetText(__nameEditFieldText); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AlbumNameEditorForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlAllListEditorPanel.cpp b/src/GlAllListEditorPanel.cpp new file mode 100644 index 0000000..bdf466e --- /dev/null +++ b/src/GlAllListEditorPanel.cpp @@ -0,0 +1,788 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListEditorPanel.cpp + * @brief This is the implementation file for AllListEditorPanel class. + */ + +#include +#include +#include "GlAllListEditorPanel.h" +#include "GlCommonUtil.h" +#include "GlFileListEditorForm.h" +#include "GlFileListPresentationModel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int H_SELECTALL_REGION = 112; +static const int H_COUNT_LABEL = 48; +static const int H_COUNT_LABEL_BUTTON = 42; +static const int W_COUNT_LABEL_BUTTON = 42; +static const int H_CONTENT_MARGIN = 24; +static const int W_CONTENT_MARGIN = 14; +static const int W_CONTENT_SPACE = 20; +static const int H_CONTENT_SPACE = 24; +static const int LENGTH_COUNT_LABEL = 256; +static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value; +static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value; +static const unsigned int COLOR_COUNT_LABEL_BUTTON = Color32<120, 120, 120>::Value; +static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value; +static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK)); +static const int ALPHA_THUMBNAIL_DIM = 70; + +static const Rectangle RECT_INITIAL (0, 0, 10, 10); + +AllListEditorPanel::AllListEditorPanel(void) + : __pContentIconListView(null) + , __pCheckButton(null) + , __pLabelSelectCnt(null) + , __pButtonSelectRegion(null) + , __itemCount(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AllListEditorPanel::~AllListEditorPanel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AllListEditorPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AllListEditorPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + result r = SetBounds(clientAreaBounds); + + Panel* pCheckPanel = new (std::nothrow) Panel(); + pCheckPanel->Construct(Rectangle(0, 0, clientAreaBounds.width, H_SELECTALL_REGION)); + pCheckPanel->SetBackgroundColor(COLOR_SELECTALL_REGION); + __pCheckButton = new (std::nothrow) CheckButton(); + __pCheckButton->Construct(pCheckPanel->GetBounds(), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, false, + ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL")); + __pCheckButton->SetActionId(ACTION_ID_BUTTON_CHECKED, ACTION_ID_BUTTON_UNCHECKED); + __pCheckButton->AddActionEventListener(*this); + pCheckPanel->AddControl(*__pCheckButton); + AddControl(*pCheckPanel); + + __pContentIconListView = new (std::nothrow) IconListView(); + __pContentIconListView->Construct(Rectangle(0, H_SELECTALL_REGION, clientAreaBounds.width, + clientAreaBounds.height - H_COUNT_LABEL - H_SELECTALL_REGION), DIMENSION_DEFAULT_THUMBNAIL, + ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN); + __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + + __pLabelSelectCnt = new (std::nothrow) Label(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt->Construct( + Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), strTmp); + __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL); + __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pLabelSelectCnt); + __pLabelSelectCnt->Invalidate(true); + + __pButtonSelectRegion = new (std::nothrow) Button(); + __pButtonSelectRegion->Construct(Rectangle(clientAreaBounds.width - W_COUNT_LABEL_BUTTON - 10, + clientAreaBounds.height - H_COUNT_LABEL_BUTTON - 4, W_COUNT_LABEL_BUTTON, H_COUNT_LABEL_BUTTON), + EMPTY_SPACE); + __pButtonSelectRegion->SetActionId(ACTION_ID_BUTTON_MOVE_TO_SELECTION); + __pButtonSelectRegion->SetColor(BUTTON_STATUS_NORMAL, COLOR_COUNT_LABEL_BUTTON); + Bitmap* pSelectionBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_MOVE_SELECTION); + if (pSelectionBitmap != null) + { + Rectangle buttonRegionRect = __pButtonSelectRegion->GetBounds(); + pSelectionBitmap->Scale(Dimension(buttonRegionRect.width, buttonRegionRect.height)); + __pButtonSelectRegion->SetNormalBitmap(Point(buttonRegionRect.width, buttonRegionRect.height), + *pSelectionBitmap); + } + AddControl(*__pButtonSelectRegion); + + if (pSelectionBitmap != null) + { + delete pSelectionBitmap; + pSelectionBitmap = null; + } + __pButtonSelectRegion->AddActionEventListener(*this); + + __itemCount=0; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AllListEditorPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AllListEditorPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + switch (actionId) + { + case ACTION_ID_BUTTON_CHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i=0 ; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i) == false) + { + __pContentIconListView->SetItemChecked(i,true); + __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + SetButtonState(); + break; + } + case ACTION_ID_BUTTON_UNCHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i) == true) + { + __pContentIconListView->SetItemChecked(i,false); + } + } + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pContentIconListView->UpdateList(); + SetButtonState(); + break; + } + case ACTION_ID_BUTTON_MOVE_TO_SELECTION: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + IList* pList = GetItemCheckedIndexListN(); + if (pList == null) + { + pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_SELECTION), pList); + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_SELECTION)); + } + break; + } + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AllListEditorPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +AllListEditorPanel::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + IconListViewItem* pIconListviewItem; + Bitmap* pBitmap=null; + String* pItemText=null; + result r = __pPresentationModel->GetThumbnailInSyncCacheN(index, pItemText, pBitmap); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE")) + { + delete pItemText; + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + if (__pContentIconListView->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + Color dimColor(COLOR_THUMBNAIL_DIM); + dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM); + + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pIconListviewItem = new (std::nothrow) IconListViewItem(); + pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + else + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return null; + } + } + else + { + pIconListviewItem = new (std::nothrow) IconListViewItem(); + pIconListviewItem->Construct(*pBitmap, pItemText); + } + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + if (pItemText != null) + { + delete pItemText; + pItemText = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListviewItem; +} + +bool +AllListEditorPanel::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +AllListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED) + { + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + if (__pCheckButton->IsSelected() == true) + { + __pCheckButton->SetSelected(false); + } + else + { + if (checkedCount != 0 && checkedCount == __pPresentationModel->GetCurrentAlbumContentInfoCount()) + { + __pCheckButton->SetSelected(true); + } + } + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_ALL + || contentType == CONTENT_TYPE_IMAGE + || contentType == CONTENT_TYPE_VIDEO) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + if (previousSceneId == IDSCN_ALBUM_NAME_EDITOR) + { + if (pArgs != null && pArgs->GetCount() > 0) + { + String* pDirectory = static_cast(pArgs->GetAt(0)); + OnRequestMoveToAction(*pDirectory); + } + } + else if (previousSceneId == IDSCN_ALL_LIST_SELECTION) + { + ResetSelection(); + } + else if (previousSceneId == IDSCN_ALL_LIST) + { + ResetSelection(); + } + + SetButtonState(); + + FileListEditorForm* pFileListEditorForm = + dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.", + GetErrorMessage(GetLastResult())); + + pFileListEditorForm->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT")); + if (pArgs != null && pArgs->GetCount() > 0) + { + String* pDirectory = static_cast(pArgs->GetAt(0)); + if (pDirectory != null && pDirectory->GetLength() > 0) + { + pFileListEditorForm->MoveToAlbum(*pDirectory); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AllListEditorPanel::GetItemCheckedCount(void) const +{ + AppLogDebug("ENTER"); + int count = 0; + if (__pContentIconListView != null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i)) + { + ++count; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return count; +} + +IList* +AllListEditorPanel::GetItemCheckedIndexListN(void) const +{ + AppLogDebug("ENTER"); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + Integer* pIndex = null; + + if (__pContentIconListView!=null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i) == true) + { + pIndex = new (std::nothrow) Integer(i); + pList->Add(pIndex); + AppLogDebug("checked index(%d)", i); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pList; +} + +result +AllListEditorPanel::OnRequestDeleteAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList->GetCount() <= 0) + { + delete pIndexList; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + result r = __pPresentationModel->DeleteContentFileList(*pIndexList); + if (r != E_SUCCESS) + { + delete pIndexList; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + __pCheckButton->SetSelected(false); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListEditorPanel::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + String combineText; + String path; + Integer* pIndex = null; + int checkedIndex; + + int loopCount = pIndexList->GetCount(); + AppLogDebug("pIndexList->GetCount(%d)", loopCount); + for (int i = 0; i < loopCount; ++i) + { + pIndex = static_cast(pIndexList->GetAt(i)); + if (pIndex != null) + { + checkedIndex = pIndex->ToInt(); + path = __pPresentationModel->GetContentFilePath(checkedIndex); + } + + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListEditorPanel::OnRequestMoveToAction(String& destDirectory) +{ + AppLogDebug("ENTER"); + if (&destDirectory == null || destDirectory.IsEmpty()) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + IList* pCollisionList = __pPresentationModel->GetCollisionIndexListN(*pIndexList, destDirectory); + + if (pCollisionList != null) + { + int loopCount = pCollisionList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + String* pCollisionString = const_cast(static_cast(pCollisionList->GetAt(i))); + String tmpString; + if (pCollisionString != null) + { + tmpString = (*pCollisionString); + } + + String delim(MULTI_ITEM_SEPARATOR); + StringTokenizer st(tmpString, delim); + String token; + + int collisionIndex; + String fileNmae; + + if (st.HasMoreTokens() == true) + { + st.GetNextToken(token); + Integer::Parse(token, collisionIndex); + + if (st.HasMoreTokens() == true) + { + st.GetNextToken(fileNmae); + } + + MessageBox messageBox; + messageBox.Construct(L"", fileNmae + ResourceManager::GetString(L"IDS_MEDIABR_POP_ALREADY_EXISTS_OVERWRITE_Q"), MSGBOX_STYLE_YESNO, 0); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + if (modalResult == MSGBOX_RESULT_NO) + { + int innerLoopCount = pIndexList->GetCount(); + for (int j = 0; j < innerLoopCount; ++j) + { + if(collisionIndex == (const_cast(static_cast(pIndexList->GetAt(j))))->ToInt()) + { + pIndexList->RemoveAt(j, true); + --j; + --innerLoopCount; + } + } + } + } + } + delete pCollisionList; + } + result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory); + delete pIndexList; + TryReturn(r == E_SUCCESS, E_FAILURE, "Failed on OnRequestDeleteAction"); + + + ResetSelection(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListEditorPanel::OnRequestSlideShowAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + result r = pDataList->Construct(); + if (r != E_SUCCESS) + { + delete pDataList; + pDataList = null; + delete pIndexList; + pIndexList = null; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW)); + + Integer* pRealIndex = null; + int realIndex = -1; + String combineText; + String path; + + int loopCount = pIndexList->GetCount(); + if (loopCount > 0) + { + for (int i = 0; i < loopCount; ++i) + { + pRealIndex = static_cast(pIndexList->GetAt(i)); + if (pRealIndex != null) + { + realIndex = pRealIndex->ToInt(); + } + + path = __pPresentationModel->GetContentFilePath(realIndex); + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText)); + } + + delete pIndexList; + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AllListEditorPanel::ResetSelection(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pCheckButton->SetSelected(false); + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListEditorPanel::SetButtonState(void) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + FileListEditorForm* pFileListEditorForm = + dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.", + GetErrorMessage(GetLastResult())); + + if (GetItemCheckedCount() > 0) + { + AppLogDebug("BUTTONSTATE : Request Enable"); + pFileListEditorForm->SetFooterButtonsState(true); + __pButtonSelectRegion->SetShowState(true); + } + else + { + AppLogDebug("BUTTONSTATE : Request disable"); + pFileListEditorForm->SetFooterButtonsState(false); + __pButtonSelectRegion->SetShowState(false); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlAllListPanel.cpp b/src/GlAllListPanel.cpp new file mode 100644 index 0000000..78ba548 --- /dev/null +++ b/src/GlAllListPanel.cpp @@ -0,0 +1,359 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListPanel.cpp + * @brief This is the implementation file for AllListPanel class. + */ + +#include +#include +#include "GlAlbumInfo.h" +#include "GlAllListPanel.h" +#include "GlCommonUtil.h" +#include "GlFileListForm.h" +#include "GlFileListPresentationModel.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const Rectangle RECT_INITIAL (0, 0, 10, 10); +static const int W_CLIENT = 720; +static const int H_CONTENT_MARGIN = 24; +static const int W_CONTENT_MARGIN = 14; +static const int W_CONTENT_SPACE = 20; +static const int H_CONTENT_SPACE = 24; + +AllListPanel::AllListPanel() + : __pContentIconListView(null) + , __itemCount(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AllListPanel::~AllListPanel() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::Refresh(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AllListPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AllListPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + AppAssert(pForm); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + SetBounds(clientAreaBounds); + + __pContentIconListView = new (std::nothrow) IconListView(); + __pContentIconListView->Construct(Rectangle(0, 0, W_CLIENT, clientAreaBounds.height), + DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_NORMAL, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN); + __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + result r = AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + + __itemCount=0; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +AllListPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +int +AllListPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +AllListPanel::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + Bitmap* pBitmap=null; + String* pItemText=null; + result r = __pPresentationModel->GetThumbnailInSyncCacheN(index, pItemText, pBitmap); + if (r != E_SUCCESS) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return null; + } + + IconListViewItem* pIconListviewItem = new (std::nothrow) IconListViewItem(); + + if (pBitmap == null) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE")) + { + delete pItemText; + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + if (pItemText != null) + { + pIconListviewItem->Construct(*pBitmap, pItemText); + } + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + if (pItemText != null) + { + delete pItemText; + pItemText = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListviewItem; +} + +bool +AllListPanel::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER : index(%d)", index); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +AllListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == ICON_LIST_VIEW_ITEM_SELECTED) + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_IMAGE)); + + if (__pPresentationModel->GetCurrentAlbumContentInfoCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + String path; + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0 ; i < loopCount; ++i) + { + path = __pPresentationModel->GetContentFilePath(i); + + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + + String listIndex; + listIndex.Format(10, L"%d", index); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(combineText)); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_ALL + || contentType == CONTENT_TYPE_IMAGE + || contentType == CONTENT_TYPE_VIDEO) + { + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + if (currentSceneId == IDSCN_ALL_LIST) + { + if (previousSceneId == IDSCN_ALBUM_LIST) + { + AlbumInfo* pAlbumInfo = static_cast(pArgs->GetAt(0)); + if (pAlbumInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + IList* pDirectoryList = pAlbumInfo->GetDirectoryListN(); + __pPresentationModel->SetCurrentAlbumInfo(pAlbumInfo->GetAlbumName(), *pDirectoryList); + if (pDirectoryList != null) + { + delete pDirectoryList; + } + + delete pArgs; + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + } + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST) + { + FileListForm* pFileListForm = dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + if (pFileListForm != null) + { + pFileListForm->SetTitleText(__pPresentationModel->GetCurrentAlbumName()); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + Refresh(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlAllListSelectionPanel.cpp b/src/GlAllListSelectionPanel.cpp new file mode 100644 index 0000000..beecfcd --- /dev/null +++ b/src/GlAllListSelectionPanel.cpp @@ -0,0 +1,731 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlAllListSelectionPanel.cpp + * @brief This is the implementation file for AllListSelectionPanel class. + */ + +#include +#include +#include "GlAllListSelectionPanel.h" +#include "GlCommonUtil.h" +#include "GlFileListEditorForm.h" +#include "GlFileListPresentationModel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int LENGTH_COUNT_LABEL = 256; +static const int H_CONTENT_MARGIN = 24; +static const int W_CONTENT_MARGIN = 14; +static const int W_CONTENT_SPACE = 20; +static const int H_CONTENT_SPACE = 24; +static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK)); +static const int ALPHA_THUMBNAIL_DIM = 70; + +static const Rectangle RECT_INITIAL (0, 0, 10, 10); + +AllListSelectionPanel::AllListSelectionPanel(void) + : __pContentIconListView(null) + , __pSeletedIndexList(null) + , __itemCount(0) + , __pPresentationModel(0) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +AllListSelectionPanel::~AllListSelectionPanel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AllListSelectionPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return Construct(RECT_INITIAL); // Should be set proper area at OnInitializing() +} + +result +AllListSelectionPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + result r = SetBounds(clientAreaBounds); + + __pContentIconListView = new (std::nothrow) IconListView(); + __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height), + DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN); + __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + + __itemCount=0; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +AllListSelectionPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +AllListSelectionPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + __pPresentationModel->RemovePresentationModelListener(*this); + if (__pSeletedIndexList != null) + { + delete __pSeletedIndexList; + __pSeletedIndexList = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +int +AllListSelectionPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +AllListSelectionPanel::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + IconListViewItem* pIconListviewItem; + Bitmap* pBitmap = null; + String* pItemText = null; + + int realIndex = GetRealindexFromVirtualIndex(index); + result r = __pPresentationModel->GetThumbnailInSyncCacheN(realIndex, pItemText, pBitmap); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(realIndex); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE")) + { + delete pItemText; + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + if (__pContentIconListView->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + + Color dimColor(COLOR_THUMBNAIL_DIM); + dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM); + + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pIconListviewItem = new (std::nothrow) IconListViewItem(); + pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + else + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return null; + } + + } + else + { + pIconListviewItem = new (std::nothrow) IconListViewItem(); + pIconListviewItem->Construct(*pBitmap, pItemText); + } + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + if (pItemText != null) + { + delete pItemText; + pItemText = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListviewItem; +} + +bool +AllListSelectionPanel::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +AllListSelectionPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED) + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + FileListEditorForm* pFileListEditorForm = + dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", + GetErrorMessage(GetLastResult())); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), GetItemCheckedCount()); + pFileListEditorForm->SetTitleText(strTmp); + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListSelectionPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListSelectionPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + int virtualIndex = -1; + int loopCount = __pSeletedIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + virtualIndex = GetVirtualIndexFromRealIndex(index); + if (virtualIndex >= 0) + { + __pContentIconListView->RefreshList(virtualIndex, LIST_REFRESH_TYPE_ITEM_MODIFY); + break; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListSelectionPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + if (previousSceneId == IDSCN_ALBUM_NAME_EDITOR) + { + if (pArgs != null && pArgs->GetCount() > 0) + { + String* pDirectory = static_cast(pArgs->GetAt(0)); + OnRequestMoveToAction(*pDirectory); + } + } + else if (previousSceneId == IDSCN_ALL_LIST_EDITOR) + { + if (pArgs != null) + { + __pSeletedIndexList = pArgs; + pArgs = null; + } + ResetSelection(); + int loopCount = __pSeletedIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + __pContentIconListView->SetItemChecked(i, true); + __pContentIconListView->RequestRedraw(true); + } + } + SetButtonState(); + FileListEditorForm* pFileListEditorForm = + dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", + GetErrorMessage(GetLastResult())); + + if (pArgs != null && pArgs->GetCount() > 0) + { + String* pDirectory = static_cast(pArgs->GetAt(0)); + if (pDirectory != null && pDirectory->GetLength() > 0) + { + pFileListEditorForm->MoveToAlbum(*pDirectory); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListSelectionPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +AllListSelectionPanel::GetItemCheckedCount(void) const +{ + AppLogDebug("ENTER"); + int count = 0; + if (__pContentIconListView != null && __pSeletedIndexList != null) + { + int loopCount = __pSeletedIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i)) + { + ++count; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return count; +} + +IList* +AllListSelectionPanel::GetItemCheckedIndexListN(void) +{ + AppLogDebug("ENTER"); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + Integer* pIndex=null; + + if (__pContentIconListView!=null) + { + int realIndex = -1; + int loopCount = __pSeletedIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i)) + { + realIndex = GetRealindexFromVirtualIndex(i); + pIndex = new (std::nothrow) Integer(realIndex); + pList->Add(pIndex); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pList; +} + +int +AllListSelectionPanel::GetRealindexFromVirtualIndex(int virtualIndex) +{ + if (__pSeletedIndexList == null || __pSeletedIndexList->GetCount() == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return -1; + } + + Integer* pRealIndex = static_cast(__pSeletedIndexList->GetAt(virtualIndex)); + int realIndex = -1; + if (pRealIndex != null) + { + realIndex = pRealIndex->ToInt(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return realIndex; +} + +int +AllListSelectionPanel::GetVirtualIndexFromRealIndex(int realIndex) +{ + int returnValue = -1; + int loopCount = __pSeletedIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + Integer* pRealIndex = static_cast(__pSeletedIndexList->GetAt(i)); + int index = -1; + if (pRealIndex != null) + { + index = pRealIndex->ToInt(); + } + + if (index == realIndex) + { + returnValue = i; + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return returnValue; +} + +result +AllListSelectionPanel::OnRequestDeleteAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + result r = __pPresentationModel->DeleteContentFileList(*pIndexList); + if (r != E_SUCCESS) + { + delete pIndexList; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturn(pSceneManager != null, E_FAILURE, "[%s] fail to get SceneManager.", + GetErrorMessage(GetLastResult())); + + FileListEditorForm* pFileListEditorForm = + dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturn(pFileListEditorForm != null, E_FAILURE, "[%s] fail to get FileListEditorForm.", + GetErrorMessage(GetLastResult())); + + String strTmp; + String selectString = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED"); + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", selectString.GetPointer(), 0); + pFileListEditorForm->SetTitleText(strTmp); + + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListSelectionPanel::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + String combineText; + String path; + Integer* pIndex = null; + int checkedIndex; + + int loopCount = pIndexList->GetCount(); + AppLogDebug("pIndexList->GetCount(%d)", loopCount); + for (int i = 0; i < loopCount; ++i) + { + pIndex = static_cast(pIndexList->GetAt(i)); + if (pIndex != null) + { + checkedIndex = pIndex->ToInt(); + path = __pPresentationModel->GetContentFilePath(checkedIndex); + } + + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListSelectionPanel::OnRequestMoveToAction(String& destDirectory) +{ + AppLogDebug("ENTER"); + if (&destDirectory == null || destDirectory.IsEmpty()) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + IList* pCollisionList = __pPresentationModel->GetCollisionIndexListN(*pIndexList, destDirectory); + + if (pCollisionList != null) + { + int loopCount = pCollisionList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + String* pCollisionString = const_cast(static_cast(pCollisionList->GetAt(i))); + String tmpString; + if (pCollisionString != null) + { + tmpString = (*pCollisionString); + } + + String delim(MULTI_ITEM_SEPARATOR); + StringTokenizer st(tmpString, delim); + String token; + + int collisionIndex; + String fileNmae; + + if (st.HasMoreTokens() == true) + { + st.GetNextToken(token); + Integer::Parse(token, collisionIndex); + + if (st.HasMoreTokens() == true) + { + st.GetNextToken(fileNmae); + } + + MessageBox messageBox; + messageBox.Construct(L"", fileNmae + ResourceManager::GetString(L"IDS_MEDIABR_POP_ALREADY_EXISTS_OVERWRITE_Q"), MSGBOX_STYLE_YESNO, 0); + int modalResult = 0; + messageBox.ShowAndWait(modalResult); + if (modalResult == MSGBOX_RESULT_NO) + { + int innerLoopCount = pIndexList->GetCount(); + for (int j = 0; j < innerLoopCount; ++j) + { + if(collisionIndex == (const_cast(static_cast(pIndexList->GetAt(j))))->ToInt()) + { + pIndexList->RemoveAt(j, true); + --j; + --innerLoopCount; + } + } + } + } + } + delete pCollisionList; + } + result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory); + delete pIndexList; + pIndexList = null; + TryReturn(r == E_SUCCESS, E_FAILURE, "Failed on OnRequestDeleteAction"); + + __pSeletedIndexList->RemoveAll(true); + ResetSelection(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +AllListSelectionPanel::OnRequestSlideShowAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexListN(); + if (pIndexList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + result r = pDataList->Construct(); + if (r != E_SUCCESS) + { + delete pDataList; + pDataList = null; + delete pIndexList; + pIndexList = null; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW)); + + Integer* pRealIndex = null; + int realIndex = -1; + String combineText; + String path; + + int loopCount = pIndexList->GetCount(); + if (loopCount > 0) + { + for (int i = 0; i < loopCount; ++i) + { + pRealIndex = static_cast(pIndexList->GetAt(i)); + if (pRealIndex != null) + { + realIndex = pRealIndex->ToInt(); + } + + path = __pPresentationModel->GetContentFilePath(realIndex); + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(combineText)); + } + + delete pIndexList; + pIndexList = null; + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +AllListSelectionPanel::ResetSelection(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + if (__pSeletedIndexList == null) + { + __itemCount = 0; + } + else + { + __itemCount = __pSeletedIndexList->GetCount(); + } + + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + FileListEditorForm* pFileListEditorForm = dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult())); + + String strTmp; + String bodyText = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED"); + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", bodyText.GetPointer(), __itemCount); + pFileListEditorForm->SetTitleText(strTmp); + if (__pContentIconListView != null) + { + __pContentIconListView->UpdateList(); + } + SetButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +AllListSelectionPanel::SetButtonState(void) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + FileListEditorForm* pFileListEditorForm = dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult())); + + if (GetItemCheckedCount() > 0) + { + AppLogDebug("BUTTONSTATE : Request Enable"); + pFileListEditorForm->SetFooterButtonsState(true); + } + else + { + AppLogDebug("BUTTONSTATE : Request disable"); + pFileListEditorForm->SetFooterButtonsState(false); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlCommonUtil.cpp b/src/GlCommonUtil.cpp new file mode 100644 index 0000000..5dad1e6 --- /dev/null +++ b/src/GlCommonUtil.cpp @@ -0,0 +1,57 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlCommonUtil.cpp + * @brief This is the implementation file for CommonUtil class. + */ + +#include "GlCommonUtil.h" + +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +static const int W_DEFAULT_THUMBNAIL = 158; +static const int H_DEFAULT_THUMBNAIL = 158; +static const int BASE_STANDARD = 1000; +static const int FORMAT_TIME = 10; +static const String DATETIME_FORMAT = L"%02d:%02d"; + +Bitmap* +CommonUtil::GetEmptyThumbnailN(void) +{ + Rectangle mainRect(0, 0, W_DEFAULT_THUMBNAIL, H_DEFAULT_THUMBNAIL); + Bitmap* pBitmap = new (std::nothrow) Bitmap(); + pBitmap->Construct(mainRect); + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + Canvas mainCanvas; + mainCanvas.Construct(bufferInfo); + mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_WHITE), mainCanvas.GetBounds()); + mainCanvas.DrawBitmap(mainRect, *pBitmap); + return pBitmap; +} + +String +CommonUtil::DurationToTimeString(long duration) +{ + String strTime; + DateTime dateTime; + dateTime.AddSeconds( duration / BASE_STANDARD); + strTime.Format(FORMAT_TIME, DATETIME_FORMAT.GetPointer(), dateTime.GetMinute(), dateTime.GetSecond()); + return strTime; +} diff --git a/src/GlFileListEditorForm.cpp b/src/GlFileListEditorForm.cpp new file mode 100644 index 0000000..b1d2e2f --- /dev/null +++ b/src/GlFileListEditorForm.cpp @@ -0,0 +1,869 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListEditorForm.cpp + * @brief This is the implementation file for FileListEditorForm class. + */ + +#include "GlAllListEditorPanel.h" +#include "GlAllListSelectionPanel.h" +#include "GlFileListEditorForm.h" +#include "GlFileListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlImageListEditorPanel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" +#include "GlVideoListEditorPanel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::Base::Utility; + +static const int GAP_W_POPUP_ITEM = 5; +static const int W_DELETE_POPUP = 600; +static const int H_DELETE_POPUP = 300; +static const int H_DELETE_LABEL = 180; +static const int Y_DELETE_BUTTON = 180; +static const int H_DELETE_BUTTON = 80; + +FileListEditorForm::FileListEditorForm(void) + : __pContextMenuMore(null) + , __pContextMenuShare(null) + , __pContextEditorMenuMove(null) + , __pContextSelectionMenuMove(null) + , __pDeletePopup(null) + , __morePosition(Point(0, 0)) + , __pContentDirectoryList(null) + , __pContentDirectoryNameList(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FileListEditorForm::~FileListEditorForm(void) +{ + AppLogDebug("ENTER"); + if (__pContentDirectoryList != null) + { + delete __pContentDirectoryList; + } + if (__pContentDirectoryNameList != null) + { + delete __pContentDirectoryNameList; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +FileListEditorForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} +result +FileListEditorForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the header.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_EDIT")); + pHeader->AddActionEventListener(*this); + + InitializeFooter(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +FileListEditorForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + Footer* pFooter = GetFooter(); + TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult())); + pFooter->RemoveAllItems(); + + result r = E_SUCCESS; + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT); + + FooterItem footerConfirm; + r = footerConfirm.Construct(ACTION_ID_FOOTER_CONFIRM); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r)); + footerConfirm.SetText(ResourceManager::GetString(L"IDS_COM_POP_DONE")); + r = pFooter->AddItem(footerConfirm); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r)); + + pFooter->SetBackButton(); + SetFormBackEventListener(this); + } + else + { + pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT); + + pFooter->SetBackButton(); + SetFormBackEventListener(this); + } + } + else + { + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON_TEXT); + + ButtonItem footerMore; + footerMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE); + Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE); + if (pBitmapMore != null) + { + footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore); + } + pFooter->SetButton(BUTTON_POSITION_LEFT,footerMore); + + FooterItem footerShare; + r = footerShare.Construct(ACTION_ID_FOOTER_SHARE); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r)); + Bitmap* pBitmapShare = ResourceManager::GetBitmapN(IDB_CONTROLBAR_SHARE); + if (pBitmapShare != null) + { + r = footerShare.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapShare); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to set text", GetErrorMessage(r)); + } + r = pFooter->AddItem(footerShare); + delete pBitmapShare; + pBitmapShare = null; + TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r)); + + FooterItem footerDelete; + r = footerDelete.Construct(ACTION_ID_FOOTER_DELETE); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to construct footer item", GetErrorMessage(r)); + Bitmap* pBitmapDelete = ResourceManager::GetBitmapN(IDB_CONTROLBAR_DELETE); + if (pBitmapDelete != null) + { + r = footerDelete.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapDelete); + TryReturn(r == E_SUCCESS, r, "[%s] Unable to set text", GetErrorMessage(r)); + } + r = pFooter->AddItem(footerDelete); + delete pBitmapDelete; + pBitmapDelete = null; + TryReturn(r == E_SUCCESS, r, "[%s] Unable to add item", GetErrorMessage(r)); + + pFooter->SetBackButton(); + SetFormBackEventListener(this); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + int checkedCount = 0; + + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + checkedCount = pEditorPanel->GetItemCheckedCount(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + checkedCount = pSelectionPanel->GetItemCheckedCount(); + } + } + + AppLogDebug("GetItemCheckedCount(%d)", checkedCount); + + if(__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + __pContextMenuMore = new (std::nothrow) ContextMenu(); + __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_MOVE"), ACTION_ID_CONTEXT_MENU_MORE_MOVE); + + if (checkedCount > 1) + { + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_BUTTON_SLIDE_SHOW"), ACTION_ID_CONTEXT_MENU_MORE_SLIDE_SHOW); + } + + __pContextMenuMore->SetShowState(false); + __pContextMenuMore->AddActionEventListener(*this); + + __pContextMenuShare = new (std::nothrow) ContextMenu(); + __pContextMenuShare->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + __pContextMenuShare->AddItem(ResourceManager::GetString(L"IDS_COM_BODY_EMAIL"), ACTION_ID_CONTEXT_MENU_SHARE_EMAIL); + __pContextMenuShare->SetShowState(false); + __pContextMenuShare->AddActionEventListener(*this); + + __pContextEditorMenuMove = new (std::nothrow) ContextMenu(); + __pContextEditorMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + __pContextEditorMenuMove->AddActionEventListener(*this); + + __pContextSelectionMenuMove = new (std::nothrow) ContextMenu(); + __pContextSelectionMenuMove->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + __pContextSelectionMenuMove->AddActionEventListener(*this); + + if (__pContentDirectoryNameList != null) + { + delete __pContentDirectoryNameList; + __pContentDirectoryNameList = null; + } + + SetUpPopup(); + } + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +String +FileListEditorForm::GetDirecotyNameFromFullPath(const String& fullPath)const +{ + AppLogDebug("ENTER"); + if (fullPath == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + String delim(DIRECTORY_SEPARATOR); + StringTokenizer st(fullPath,delim); + String token; + while (st.HasMoreTokens()) + { + st.GetNextToken(token); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return token; +} + +result +FileListEditorForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + + if (__pContextMenuMore != null) + { + __pContextMenuMore->RemoveActionEventListener(*this); + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + if (__pContextMenuShare != null) + { + __pContextMenuShare->RemoveActionEventListener(*this); + delete __pContextMenuShare; + __pContextMenuShare = null; + } + + if (__pContextEditorMenuMove != null) + { + __pContextEditorMenuMove->RemoveActionEventListener(*this); + delete __pContextEditorMenuMove; + __pContextEditorMenuMove = null; + } + + if (__pContextSelectionMenuMove != null) + { + __pContextSelectionMenuMove->RemoveActionEventListener(*this); + delete __pContextSelectionMenuMove; + __pContextSelectionMenuMove = null; + } + + if (__pDeletePopup != null) + { + delete __pDeletePopup; + __pDeletePopup = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +FileListEditorForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER(actionId=%d)", actionId); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + switch (actionId) + { + case ACTION_ID_FOOTER_MORE: + { + + InitializeFooter(); + + if (__pContextMenuMore->GetShowState() == false) + { + Rectangle rect = source.GetBounds(); + __morePosition = Point(rect.width/8,rect.y); + __pContextMenuMore->SetAnchorPosition(Point(rect.width/8,rect.y)); + __pContextMenuMore->SetShowState(true); + __pContextMenuMore->Show(); + } + else + { + __pContextMenuMore->SetShowState(false); + } + break; + } + case ACTION_ID_FOOTER_SHARE: + { + if (__pContextMenuShare->GetShowState() == false) + { + Rectangle rect = source.GetBounds(); + __pContextMenuShare->SetAnchorPosition(Point(rect.width/8*3 ,rect.y)); + __pContextMenuShare->SetShowState(true); + __pContextMenuShare->Show(); + } + else + { + __pContextMenuShare->SetShowState(false); + } + break; + } + case ACTION_ID_FOOTER_DELETE: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0) + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + ImageListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0) + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + VideoListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null && pEditorPanel->GetItemCheckedCount() > 0) + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + } + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null && pSelectionPanel->GetItemCheckedCount() > 0) + { + __pDeletePopup->SetShowState(true); + __pDeletePopup->Show(); + } + } + break; + } + case ACTION_ID_CONTEXT_MENU_MORE_EDIT: + { + break; + } + case ACTION_ID_CONTEXT_MENU_MORE_ADD_TAG: + { + break; + } + case ACTION_ID_CONTEXT_MENU_MORE_MOVE: + { + RefreshFolderList(); + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + if (__pContextEditorMenuMove->GetShowState() == false) + { + __pContextEditorMenuMove->SetAnchorPosition(__morePosition); + __pContextEditorMenuMove->SetShowState(true); + __pContextEditorMenuMove->Show(); + } + else + { + __pContextEditorMenuMove->SetShowState(false); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + if (__pContextSelectionMenuMove->GetShowState() == false) + { + __pContextSelectionMenuMove->SetAnchorPosition(__morePosition); + __pContextSelectionMenuMove->SetShowState(true); + __pContextSelectionMenuMove->Show(); + } + else + { + __pContextSelectionMenuMove->SetShowState(false); + } + } + + break; + } + case ACTION_ID_CONTEXT_MENU_MORE_SLIDE_SHOW: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestSlideShowAction(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + pSelectionPanel->OnRequestSlideShowAction(); + } + } + + break; + } + case ACTION_ID_CONTEXT_MENU_SHARE_EMAIL: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestEmailAction(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + ImageListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestEmailAction(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + VideoListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestEmailAction(); + } + + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + pSelectionPanel->OnRequestEmailAction(); + } + } + + break; + } + case ACTION_ID_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR)); + } + break; + } + case ACTION_ID_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_NAME_EDITOR)); + } + break; + } + case ACTION_ID_DELETE_POPUP_DEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Invalidate(true); + + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + result r = pEditorPanel->OnRequestDeleteAction(); + if (r == E_SUCCESS) + { + if (pEditorPanel->GetItemCount() > 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST)); + } + } + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + ImageListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestDeleteAction(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + VideoListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestDeleteAction(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + result r = pSelectionPanel->OnRequestDeleteAction(); + if (r == E_SUCCESS) + { + if (pSelectionPanel->GetItemCount() > 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST)); + } + } + } + } + + break; + } + case ACTION_ID_DELETE_POPUP_CANCEL: + { + __pDeletePopup->SetShowState(false); + __pDeletePopup->Invalidate(true); + break; + } + case ACTION_ID_FOOTER_CONFIRM: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + ImageListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult(); + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + VideoListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + pEditorPanel->OnRequestAppExitWithMultipleSelectionAppControlResult(); + } + } + break; + } + default: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + if ((ACTION_ID_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START <= actionId) && (actionId <= ACTION_ID_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM + 1000)) + { + if (__pContentDirectoryList == null) + { + + return; + } + if (__pContentDirectoryList->GetCount() > actionId - ACTION_ID_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START) + { + String* pDirectory = static_cast(__pContentDirectoryList->GetAt(actionId - ACTION_ID_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START)); + + AllListEditorPanel* pEditorPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pEditorPanel != null) + { + result r = pEditorPanel->OnRequestMoveToAction(*pDirectory); + if (r == E_SUCCESS) + { + MoveToAlbum(*pDirectory); + } + } + } + } + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + if ((ACTION_ID_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START <= actionId) && (actionId <= ACTION_ID_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM + 1000)) + { + if (__pContentDirectoryList == null) + { + + return; + } + if (__pContentDirectoryList->GetCount() > actionId - ACTION_ID_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START) + { + String* pDirectory = static_cast(__pContentDirectoryList->GetAt(actionId - ACTION_ID_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START)); + + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + result r = pSelectionPanel->OnRequestMoveToAction(*pDirectory); + if (r == E_SUCCESS) + { + MoveToAlbum(*pDirectory); + } + } + } + } + } + + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListEditorForm::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +FileListEditorForm::SetUpPopup(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + if (__pDeletePopup != null) + { + delete __pDeletePopup; + __pDeletePopup = null; + } + + __pDeletePopup = new (std::nothrow) Popup(); + __pDeletePopup->Construct(false, Dimension(W_DELETE_POPUP, H_DELETE_POPUP)); + + Rectangle popupClientBounds = __pDeletePopup->GetClientAreaBounds(); + + Label* pLabelText = new (std::nothrow) Label(); + pLabelText->Construct(Rectangle(0, 0, popupClientBounds.width, H_DELETE_LABEL), ResourceManager::GetString(L"IDS_COM_POP_DELETE_Q")); + pLabelText->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pDeletePopup->AddControl(*pLabelText); + + Button* pButtonDel = new (std::nothrow) Button(); + pButtonDel->Construct(Rectangle(0, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_COM_BODY_DELETE")); + pButtonDel->SetActionId(ACTION_ID_DELETE_POPUP_DEL); + pButtonDel->AddActionEventListener(*this); + __pDeletePopup->AddControl(*pButtonDel); + + Button* pButtonCancel = new (std::nothrow) Button(); + pButtonCancel->Construct(Rectangle(popupClientBounds.width / 2 + GAP_W_POPUP_ITEM, Y_DELETE_BUTTON, popupClientBounds.width / 2 - GAP_W_POPUP_ITEM, H_DELETE_BUTTON), ResourceManager::GetString(L"IDS_COM_POP_CANCEL")); + pButtonCancel->SetActionId(ACTION_ID_DELETE_POPUP_CANCEL); + pButtonCancel->AddActionEventListener(*this); + __pDeletePopup->AddControl(*pButtonCancel); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +FileListEditorForm::SetTitleText(const String& titleText) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + TryReturnVoid(pHeader != null, "[%s] fail to get the header.", GetErrorMessage(GetLastResult())); + pHeader->SetTitleText(titleText); + pHeader->Invalidate(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListEditorForm::RefreshFolderList(void) +{ + AppLogDebug("ENTER"); + ContentDirectory contentDirectory; + IListT* pContentTypeList = new (std::nothrow) ArrayListT(); + pContentTypeList->Add(CONTENT_TYPE_IMAGE); + pContentTypeList->Add(CONTENT_TYPE_VIDEO); + contentDirectory.Construct(*pContentTypeList); + delete pContentTypeList; + pContentTypeList = null; + + if (__pContentDirectoryList != null) + { + delete __pContentDirectoryList; + __pContentDirectoryList = null; + } + __pContentDirectoryList = contentDirectory.GetContentDirectoryPathListN(SORT_ORDER_NONE); + __pContentDirectoryNameList = new (std::nothrow) ArrayList(SingleObjectDeleter); + String* pDirPath = null; + String* pDirName = null; + + int loopCount = __pContentDirectoryList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pDirPath = static_cast(__pContentDirectoryList->GetAt(i)); + pDirName = new (std::nothrow) String(GetDirecotyNameFromFullPath(*pDirPath)); + __pContentDirectoryNameList->Add(pDirName); + } + __pContextEditorMenuMove->RemoveAllItems(); + __pContextEditorMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"), ACTION_ID_CONTEXTMENU_EDITOR_MOVE_CREATE_ALBUM); + __pContextSelectionMenuMove->RemoveAllItems(); + __pContextSelectionMenuMove->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_OPT_CREATE_ALBUM"), ACTION_ID_CONTEXTMENU_SELECTION_MOVE_CREATE_ALBUM); + + loopCount = __pContentDirectoryNameList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pDirName = static_cast(__pContentDirectoryNameList->GetAt(i)); + __pContextEditorMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)), ACTION_ID_CONTEXTMENU_EDITOR_MOVE_ALBUM_ARRAY_START + i); + __pContextSelectionMenuMove->AddItem(*(new (std::nothrow) String(*pDirName)), ACTION_ID_CONTEXTMENU_SELECTION_MOVE_ALBUM_ARRAY_START + i); + } + __pContextEditorMenuMove->SetShowState(false); + __pContextSelectionMenuMove->SetShowState(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListEditorForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST)); + } + } + else + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_EDITOR) + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST_EDITOR) + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_IMAGE_LIST)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST_EDITOR) + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_VIDEO_LIST)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pSelectionPanel = dynamic_cast(pSceneManager->GetCurrentScene()->GetPanel()); + if (pSelectionPanel != null) + { + IList* pList = pSelectionPanel->GetItemCheckedIndexListN(); + if (pList == null) + { + pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + } + + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST_EDITOR), pList); + } + } + else + { + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALL_LIST)); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListEditorForm::SetFooterButtonsState(bool enableState) +{ + AppLogDebug("ENTER"); + Footer* pFooter = GetFooter(); + TryReturnVoid(pFooter != null, "[%s] fail to get the footer.", GetErrorMessage(GetLastResult())); + + if (enableState == true) + { + pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, true); + pFooter->SetItemEnabled(0, true); + pFooter->SetItemEnabled(1, true); + } + else + { + pFooter->SetButtonEnabled(BUTTON_POSITION_LEFT, false); + pFooter->SetItemEnabled(0, false); + pFooter->SetItemEnabled(1, false); + } + + pFooter->RequestRedraw(true); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +FileListEditorForm::MoveToAlbum(String& destDirectory) +{ + AppLogDebug("ENTER"); + result r = E_FAILURE; + String albumName = __pPresentationModel->ConvertToAlbumName(destDirectory); + if (albumName != EMPTY_SPACE) + { + IList* pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter); + pDirectoryList->Add(new (std::nothrow) String(destDirectory)); + __pPresentationModel->SetCurrentAlbumInfo(albumName, *pDirectoryList); + __pPresentationModel->SetCurrentAlbumContentType(CONTENT_TYPE_ALL); + delete pDirectoryList; + + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST)); + r = E_SUCCESS; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} diff --git a/src/GlFileListForm.cpp b/src/GlFileListForm.cpp new file mode 100644 index 0000000..c2628bc --- /dev/null +++ b/src/GlFileListForm.cpp @@ -0,0 +1,285 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListForm.cpp + * @brief This is the implementation file for FileListForm class. + */ + +#include "GlAlbumInfo.h" +#include "GlAllListPanel.h" +#include "GlFileListForm.h" +#include "GlFileListPresentationModel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Graphics; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; +using namespace Tizen::Content; + +static const String DEFAULT_TITLE = L"File View"; + +FileListForm::FileListForm(void) + : __pContextMenuMore(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FileListForm::~FileListForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +FileListForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} +result +FileListForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + TryReturn(pHeader != null, E_FAILURE, "[%s] fail to get the Header.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(DEFAULT_TITLE); + + InitializeFooter(); + SetFormBackEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +FileListForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + if (__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +FileListForm::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + static_cast(pSceneManager->GetCurrentScene()->GetPanel())->Refresh(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult())); + + switch (actionId) + { + case ACTION_ID_FOOTER_MORE: + { + AppLogDebug("ITEMCOUNT(%d)", __pPresentationModel->GetCurrentAlbumContentInfoCount()); + + InitializeFooter(); + + if (__pContextMenuMore->GetShowState() == false) + { + Rectangle rect = source.GetBounds(); + __pContextMenuMore->SetAnchorPosition(Point(rect.width/8, rect.y)); + __pContextMenuMore->SetShowState(true); + __pContextMenuMore->Show(); + } + else + { + __pContextMenuMore->SetShowState(false); + } + break; + } + case ACTION_ID_FOOTER_EDIT: + { + if (pSceneManager->GetCurrentSceneId() == IDSCN_ALL_LIST) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST_EDITOR)); + } + else if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_VIDEO_LIST_EDITOR)); + } + else + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST_EDITOR)); + } + break; + } + case ACTION_ID_FOOTER_SLIDESHOW: + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW)); + + if (__pPresentationModel->GetCurrentAlbumContentInfoCount() <= 0) + { + break; + } + String combineText; + String path; + + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + path = __pPresentationModel->GetContentFilePath(i); + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + break; + } + case ACTION_ID_FOOTER_CAMERA: + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_CAMERA)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_CAMERA, + APPCONTROL_OPERATION_ID_CAPTURE, pDataList, null); + break; + } + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager", GetErrorMessage(GetLastResult())); + + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_ALBUM_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +FileListForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + Footer* pFooter = GetFooter(); + TryReturn(pFooter != null, E_FAILURE, "[%s] fail to get the Footer.", GetErrorMessage(GetLastResult())); + + pFooter->RemoveAllItems(); + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + + ButtonItem footerMore; + footerMore.Construct(BUTTON_ITEM_STYLE_ICON, ACTION_ID_FOOTER_MORE); + Bitmap* pBitmapMore = ResourceManager::GetBitmapN(IDB_CONTROLBAR_MORE); + if (pBitmapMore != null) + { + footerMore.SetIcon(BUTTON_ITEM_STATUS_NORMAL, pBitmapMore); + } + pFooter->SetButton(BUTTON_POSITION_LEFT,footerMore); + + FooterItem itemCamera; + itemCamera.Construct(ACTION_ID_FOOTER_CAMERA); + Bitmap* pBitmapCamera = ResourceManager::GetBitmapN(IDB_CONTROLBAR_CAMERA); + if (pBitmapCamera != null) + { + itemCamera.SetIcon(FOOTER_ITEM_STATUS_NORMAL, pBitmapCamera); + } + pFooter->AddItem(itemCamera); + + if (__pContextMenuMore != null) + { + delete __pContextMenuMore; + __pContextMenuMore = null; + } + + __pContextMenuMore = new (std::nothrow) ContextMenu(); + __pContextMenuMore->Construct(Point(0, 0), CONTEXT_MENU_STYLE_LIST); + + if (__pPresentationModel->GetCurrentAlbumContentInfoCount() > 1) + { + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_MEDIABR_BUTTON_SLIDE_SHOW"), ACTION_ID_FOOTER_SLIDESHOW); + } + + if (__pPresentationModel->GetCurrentAlbumContentInfoCount() == 0) + { + __pContextMenuMore->SetEnabled(false); + } + else + { + __pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_COM_HEADER_EDIT"), ACTION_ID_FOOTER_EDIT); + __pContextMenuMore->SetShowState(false); + __pContextMenuMore->AddActionEventListener(*this); + } + + pFooter->SetBackButton(); + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +FileListForm::SetTitleText(const String& titleText) +{ + AppLogDebug("ENTER"); + Header* pHeader = GetHeader(); + TryReturnVoid(pHeader != null, "[%s] fail to get the Header.", GetErrorMessage(GetLastResult())); + pHeader->SetTitleText(titleText); + pHeader->Show(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlFileListPresentationModel.cpp b/src/GlFileListPresentationModel.cpp new file mode 100644 index 0000000..7ae73b0 --- /dev/null +++ b/src/GlFileListPresentationModel.cpp @@ -0,0 +1,1497 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFileListPresentationModel.cpp + * @brief This is the implementation file for FileListPresentationModel class. + */ + +#include +#include +#include +#include "GlCommonUtil.h" +#include "GlFileListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlThumbnailEvent.h" +#include "GlThumbnailEventArg.h" +#include "GlThumbnailProvider.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Io; +using namespace Tizen::Media; +using namespace Tizen::System; + +static const String CONTENT_INFO_ORDER = L"ContentFileName"; + +static const int SIZE_PAGE_NO = 1; +static const int SIZE_CONUNT_PER_PAGE = 3000; +static const int SIZE_ICON_LIST_CACHE = 50; +static const int W_DURATION_TEXT = 44; +static const int H_DURATION_TEXT = 4; +static const int W_DURATION = 158; +static const int H_DURATION = 38; +static const int W_DEFAULT_THUMBNAIL = 158; +static const int H_DEFAULT_THUMBNAIL = 158; +static const int W_WIDE_THUMBNAIL = 172; +static const int H_WIDE_THUMBNAIL = 128; +static const int W_PLAY_FG = 64; +static const int H_PLAY_FG = 64; +static const int GAP_W_PLAY_FG = 47; +static const int GAP_H_PLAY_FG = 27; +static const int GAP_H_DURATION = 27+64+28; +static const int ALPHA_DURATION = 70; +static const int FONT_SIZE_DURATION = 28; +static const Dimension DIMENSION_REAL_ICON (162,164); +static const Rectangle RECTANGLE_THUMBNAIL_OFFSET_POSION (1, 1, 156, 158); +static const Rectangle RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION (1, 1, 168, 124); +static const Color COLOR_DURATION_BG (Color::GetColor(COLOR_ID_BLACK)); +static const Color COLOR_TEXT_OUTLINE (Color::GetColor(COLOR_ID_WHITE)); + +static const String RESERVED_CAMERA_PATH = Environment::GetMediaPath() + L"Camera"; +static const String RESERVED_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera"; +static const String RESERVED_DOWNLOAD_PATH = Environment::GetMediaPath() + L"Downloads"; + +FileListPresentationModel* FileListPresentationModel::__pPresentationModelInstance = null; +ThumbnailProvider* FileListPresentationModel::__pThumbnailProvider = null; +ThumbnailEvent* FileListPresentationModel::__pThumbnailEvent = null; +ArrayList* FileListPresentationModel::__pPresentationModelListener = null; +ArrayList* FileListPresentationModel::__pIconListViewCache = null; +IList* FileListPresentationModel::__pDirectoryList = null; +IList* FileListPresentationModel::__pContentInfoList = null; + +FileListPresentationModel::FileListPresentationModel(void) + :__albumContentType(CONTENT_TYPE_ALL) + ,__appControlMode(APP_CONTROL_MODE_MAIN) + ,__appControlMediaType(APPCONTROL_MEDIA_TYPE_UNKNOWN) + ,__appControlSelectionMode(APPCONTROL_SELECTION_MODE_UNKNOWN) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FileListPresentationModel::~FileListPresentationModel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FileListPresentationModel* +FileListPresentationModel::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModelInstance == null) + { + CreateInstance(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModelInstance; +} + +result +FileListPresentationModel::Construct(void) +{ + AppLogDebug("ENTER"); + + IThumbnailEventListener* pThumbnailEventListener = static_cast(this); + __pThumbnailEvent = new (std::nothrow) ThumbnailEvent(); + __pThumbnailEvent->AddListener(*pThumbnailEventListener, true); + + if (__pIconListViewCache != null) + { + delete __pIconListViewCache; + } + __pIconListViewCache = new (std::nothrow) ArrayList(SingleObjectDeleter); + __pIconListViewCache->Construct(SIZE_ICON_LIST_CACHE); + + if (__pDirectoryList != null) + { + delete __pDirectoryList; + } + __pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + if (__pContentInfoList != null) + { + delete __pContentInfoList; + } + __pContentInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + __pPresentationModelListener = new (std::nothrow) ArrayList(); + __pPresentationModelListener->Construct(); + + __pThumbnailProvider = ThumbnailProvider::GetInstance(); + + GalleryApp* pApp = static_cast(GalleryApp::GetInstance()); + const IMap* pArguments = pApp->GetAppControlArguments(); + String operationId = pApp->GetAppControlOperationId(); + + if (operationId.CompareTo(APPCONTROL_OPERATION_ID_MAIN) == 0) + { + __appControlMode = APP_CONTROL_MODE_MAIN; + } + else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_PICK) == 0) + { + __appControlMode = APP_CONTROL_MODE_PICK; + + if (pArguments != null) + { + const String* selectionMode = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_SELECTION_MODE))); + const String* mediaType = static_cast(pArguments->GetValue(String(APPCONTROL_KEY_MEDIA_TYPE))); + + if (mediaType != null && mediaType->CompareTo(APPCONTROL_DATA_VIDEO) == 0) + { + __appControlMediaType = APPCONTROL_MEDIA_TYPE_VIDEO; + } + else + { + __appControlMediaType = APPCONTROL_MEDIA_TYPE_IMAGE; + } + + if (selectionMode != null && selectionMode->CompareTo(APPCONTROL_DATA_MULTIPLE) == 0) + { + __appControlSelectionMode = APPCONTROL_SELECTION_MODE_MULTIPLE; + } + else + { + __appControlSelectionMode = APPCONTROL_SELECTION_MODE_SINGLE; + } + } + } + else if (operationId.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE) == 0) + { + __appControlMode = APP_CONTROL_MODE_SETTING; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +FileListPresentationModel::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pPresentationModelInstance = new (std::nothrow) FileListPresentationModel(); + result r = __pPresentationModelInstance->Construct(); + if (IsFailed(r) == true) + { + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + std::atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListPresentationModel::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + + delete __pThumbnailEvent; + __pIconListViewCache = null; + + if (__pIconListViewCache != null) + { + delete __pIconListViewCache; + __pIconListViewCache = null; + } + + if (__pDirectoryList != null) + { + delete __pDirectoryList; + __pDirectoryList = null; + } + + if (__pContentInfoList != null) + { + delete __pContentInfoList; + __pContentInfoList = null; + } + + if (__pPresentationModelListener != null) + { + delete __pPresentationModelListener; + __pPresentationModelListener = null; + } + + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +String +FileListPresentationModel::GetFileNameFromFullPath(const String& fullPath, bool withExt) const +{ + AppLogDebug("ENTER"); + if (fullPath.CompareTo(EMPTY_SPACE) == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return EMPTY_SPACE; + } + + String delim(DIRECTORY_SEPARATOR); + StringTokenizer st(fullPath,delim); + String token; + while (st.HasMoreTokens()) + { + st.GetNextToken(token); + } + + if (withExt == true) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return token; + } + else + { + String subDelim(FILE_EXT_SEPARATOR); + StringTokenizer subSt(token, subDelim); + String subToken; + subSt.GetNextToken(subToken); + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + + return subToken; + } +} + +String +FileListPresentationModel::GetDirecotyNameFromFullPath(const String& fullPath)const +{ + AppLogDebug("ENTER"); + if (fullPath == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + String delim(DIRECTORY_SEPARATOR); + StringTokenizer st(fullPath,delim); + String token; + while (st.HasMoreTokens()) + { + st.GetNextToken(token); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return token; +} + +bool +FileListPresentationModel::IsContainContentInDirectory(const String& directoryPath, ContentType contentType) const +{ + AppLogDebug("ENTER"); + IListT* pContentTypeList = new (std::nothrow) ArrayListT(); + if (&directoryPath == null || pContentTypeList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return false; + } + + if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_ALL) + { + pContentTypeList->Add(CONTENT_TYPE_IMAGE); + } + if (contentType == CONTENT_TYPE_VIDEO || contentType == CONTENT_TYPE_ALL) + { + pContentTypeList->Add(CONTENT_TYPE_VIDEO); + } + + ContentDirectory contentDirectory; + result r = contentDirectory.Construct(*pContentTypeList); + if (pContentTypeList != null) + { + delete pContentTypeList; + pContentTypeList = null; + } + TryReturn(r == E_SUCCESS, false, "[%s] Unable to construct ContentDirectory", GetErrorMessage(r)); + + bool returnValue = false; + int pageNo = SIZE_PAGE_NO; + int countPerPage = SIZE_CONUNT_PER_PAGE; + + IList* pContentList = contentDirectory.GetContentDirectoryItemListN(directoryPath, pageNo, countPerPage, CONTENT_INFO_ORDER, SORT_ORDER_ASCENDING); + + if (pContentList == null || pContentList->GetCount() <= 0) + { + returnValue = false; + } + else + { + returnValue = true; + } + + if (pContentList != null) + { + delete pContentList; + pContentList = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return returnValue; +} + +result +FileListPresentationModel::GetThumbnailInSyncCacheN(const int index, String*& pName, Bitmap*& pThumbnail) +{ + AppLogDebug("ENTER : index(%d)", index); + Bitmap* pOrgBitmap = null; + Bitmap* pDstBitmap = null; + ContentInfo* pContentInfo = null; + + if (__pContentInfoList != null && index < __pContentInfoList->GetCount()) + { + pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + if (pContentInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + } + else + { + AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index); + return E_FAILURE; + } + + ThumbnailInfo* pThumbnailInfo = GetThumbnailInfoFromInternalBufferN(pContentInfo->GetContentId()); + if (pThumbnailInfo != null) + { + pName = new (std::nothrow) String(pThumbnailInfo->GetFilePath()); + pOrgBitmap = pThumbnailInfo->GetBitmapN(); + } + + if ((pThumbnailInfo != null)&&(pThumbnailInfo->GetContentType() == CONTENT_TYPE_VIDEO)) + { + if (pOrgBitmap != null) + { + pDstBitmap = CoverVideoOverlayedImageOnThumbnailN(*pOrgBitmap, *pThumbnailInfo); + delete pOrgBitmap; + pOrgBitmap = null; + } + } + else + { + pDstBitmap = pOrgBitmap; + } + + if (pDstBitmap != null) + { + Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG); + Rectangle thumbnailRect(RECTANGLE_THUMBNAIL_OFFSET_POSION); + pDstBitmap->Scale(Dimension(RECTANGLE_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_THUMBNAIL_OFFSET_POSION.x + , RECTANGLE_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_THUMBNAIL_OFFSET_POSION.y)); + if (pThumbnailBgBitmap != null) + { + pThumbnailBgBitmap->Scale(DIMENSION_REAL_ICON); + pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pDstBitmap, thumbnailRect); + delete pThumbnailBgBitmap; + pThumbnailBgBitmap = null; + delete pDstBitmap; + pDstBitmap = null; + } + else + { + pThumbnail = pDstBitmap; + } + } + else + { + pThumbnail = null; + } + + if (pThumbnailInfo != null) + { + delete pThumbnailInfo; + pThumbnailInfo = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +FileListPresentationModel::GetThumbnailVideoInSyncCacheN(const int index, String*& pName, Bitmap*& pThumbnail, String*& pDuration) +{ + AppLogDebug("ENTER : index(%d)", index); + ContentInfo* pContentInfo = null; + Bitmap* pOrgBitmap = null; + + if (__pContentInfoList != null && index < __pContentInfoList->GetCount()) + { + pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + if (pContentInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return E_FAILURE; + } + } + else + { + AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index); + return E_FAILURE; + } + + ThumbnailInfo* pThumbnailInfo = GetThumbnailInfoFromInternalBufferN(pContentInfo->GetContentId()); + if (pThumbnailInfo != null) + { + pName = new (std::nothrow) String(pThumbnailInfo->GetFilePath()); + pOrgBitmap = pThumbnailInfo->GetBitmapN(); + pDuration = new (std::nothrow) String(CommonUtil::DurationToTimeString(pThumbnailInfo->GetDuration())); + } + else + { + pName = new (std::nothrow) String(EMPTY_SPACE); + pDuration = new (std::nothrow) String(CommonUtil::DurationToTimeString(0)); + } + + if (pOrgBitmap != null) + { + Bitmap* pThumbnailBgBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_BG); + Rectangle thumbnailRect(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION); + pOrgBitmap->Scale(Dimension(RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.width - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.x + , RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.height - RECTANGLE_VIDEO_THUMBNAIL_OFFSET_POSION.y)); + if (pThumbnailBgBitmap != null) + { + pThumbnailBgBitmap->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL)); + pThumbnail = GetShadedBackgroundBitmapN(*pThumbnailBgBitmap, *pOrgBitmap, thumbnailRect); + delete pThumbnailBgBitmap; + pThumbnailBgBitmap = null; + } + delete pOrgBitmap; + pOrgBitmap = null; + } + else + { + pThumbnail = null; + } + + if (pThumbnail != null) + { + pThumbnail->Scale(Dimension(W_WIDE_THUMBNAIL, H_WIDE_THUMBNAIL)); + } + + if (pThumbnailInfo != null) + { + delete pThumbnailInfo; + pThumbnailInfo = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +FileListPresentationModel::RequestThumbnail(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + ContentInfo* pContentInfo = null; + + if (__pContentInfoList != null && index < __pContentInfoList->GetCount()) + { + pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + if (pContentInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + } + else + { + AppLogDebug("EXIT 2 __pContentInfoList(%x) index(%d)", __pContentInfoList, index); + + return; + } + + __pThumbnailProvider->RequestThumbnail(pContentInfo->GetContentId(), __pThumbnailEvent); + AppLogDebug("EXIT"); +} + +void +FileListPresentationModel::CancelThumbnailRequest(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + ContentInfo* pContentInfo = null; + + if (__pContentInfoList != null && index < __pContentInfoList->GetCount()) + { + pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + if (pContentInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + __pThumbnailProvider->CancelThumbnailRequest(pContentInfo->GetContentId(), __pThumbnailEvent); + } + AppLogDebug("EXIT"); +} + +void +FileListPresentationModel::ClearThumbnailRequests(bool appTerminating) +{ + AppLogDebug("ENTER"); + + if (__pThumbnailProvider != null) + { + __pThumbnailProvider->ClearThumbnailRequests(appTerminating); + } + + AppLogDebug("EXIT"); +} + +void +FileListPresentationModel::OnThumbnailReceivedN(IEventArg& eventArg) +{ + AppLogDebug("ENTER"); + + if (&eventArg != null) + { + ThumbnailEventArg* pThumbnailEventArg = static_cast(&eventArg); + if (pThumbnailEventArg == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + ThumbnailInfo* pThumbnailInfo = pThumbnailEventArg->GetThumbnailInfoN(); + if (pThumbnailInfo == null) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + bool isMatch = false; + ContentId contentId = pThumbnailInfo->GetContentId(); + + if (__pIconListViewCache != null) + { + IEnumerator* pEnum = __pIconListViewCache->GetEnumeratorN(); + Bitmap* pBitmap = null; + while (pEnum->MoveNext() == E_SUCCESS) + { + ThumbnailInfo* pTempThumbnailInfo = static_cast(pEnum->GetCurrent()); + + if (contentId == pTempThumbnailInfo->GetContentId()) + { + AppLogDebug("[CHASEFIRE] PM receive (%ls)", pThumbnailInfo->GetFilePath().GetPointer()); + pBitmap = pThumbnailInfo->GetBitmapN(); + pTempThumbnailInfo->SetBitmap(*pBitmap); + delete pBitmap; + + pTempThumbnailInfo->SetContentType(pThumbnailInfo->GetContentType()); + pTempThumbnailInfo->SetDuration(pThumbnailInfo->GetDuration()); + delete pThumbnailInfo; + pThumbnailInfo = null; + isMatch = true; + break; + } + } + + if (isMatch == false) + { + if (SIZE_ICON_LIST_CACHE <= __pIconListViewCache->GetCount()) + { + __pIconListViewCache->RemoveAt(0, true); + } + AppLogDebug("[CHASEFIRE] (all:%d) Add Thumbail(%ls)",__pIconListViewCache->GetCount(), pThumbnailInfo->GetFilePath().GetPointer()); + __pIconListViewCache->Add(pThumbnailInfo); + } + } + + int index = -1; + int loopCount = __pContentInfoList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + if (contentId == (static_cast(__pContentInfoList->GetAt(i)))->GetContentId()) + { + index = i; + break; + } + } + + IAlbumEventListener* pInterface = null; + IEnumerator* pEventEnum = __pPresentationModelListener->GetEnumeratorN(); + while (pEventEnum->MoveNext() == E_SUCCESS) + { + pInterface = static_cast(pEventEnum->GetCurrent()); + pInterface->OnThumbnailDecoded(index); + } + delete pEventEnum; + pEventEnum = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListPresentationModel::AddPresentationModelListener(const IAlbumEventListener* listener) +{ + AppLogDebug("ENTER"); + __pPresentationModelListener->Add((Object*)listener); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +FileListPresentationModel::RemovePresentationModelListener(const IAlbumEventListener& listener) +{ + AppLogDebug("ENTER"); + __pPresentationModelListener->Remove(listener); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ThumbnailInfo* +FileListPresentationModel::GetThumbnailInfoFromInternalBufferN(const ContentId& contentId) const +{ + AppLogDebug("ENTER"); + ThumbnailInfo* pThumbnailInfo = null; + ThumbnailInfo* pTempThumbnailInfo = null; + if (__pIconListViewCache != null) + { + int loopCount = __pIconListViewCache->GetCount(); + for (int i = 0 ; i < loopCount; ++i) + { + pTempThumbnailInfo = static_cast(__pIconListViewCache->GetAt(i)); + if (contentId == pTempThumbnailInfo->GetContentId()) + { + + pThumbnailInfo = new (std::nothrow) ThumbnailInfo(); + Bitmap* pBitmap = pTempThumbnailInfo->GetBitmapN(); + pThumbnailInfo->Construct(pTempThumbnailInfo->GetContentId(), + pTempThumbnailInfo->GetFilePath(), *pBitmap, + pTempThumbnailInfo->GetContentType(), pTempThumbnailInfo->GetDuration()); + delete pBitmap; + break; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pThumbnailInfo; +} + +result +FileListPresentationModel::DeleteContentFileList(const IList& contentIndexList) +{ + AppLogDebug("ENTER"); + if (&contentIndexList == null || contentIndexList.GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + } + + IList * pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + int loopCount = contentIndexList.GetCount(); + for (int i = 0; i < loopCount; ++i) + { + const Integer* pIndex = static_cast(contentIndexList.GetAt(i)); + + if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt()) + { + pContentIdList->Add(new (std::nothrow) ContentId((static_cast(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId())); + } + } + + loopCount = pContentIdList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + ContentId* pContentId = static_cast(pContentIdList->GetAt(i)); + if (pContentId != null) + { + DeleteContentFile(*pContentId); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +IList* +FileListPresentationModel::GetCollisionIndexListN(const IList& contentIndexList, const String& destDirectory) +{ + AppLogDebug("ENTER"); + if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null || destDirectory.IsEmpty() == true) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + if (File::IsFileExist(destDirectory) == false) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + IList * pCollisionInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter); + ContentInfo* pContentInfo = null; + int loopCount = contentIndexList.GetCount(); + for (int i = 0; i < loopCount; ++i) + { + const Integer* pIndex = static_cast(contentIndexList.GetAt(i)); + + if ((pIndex != null) && (pIndex->ToInt()) >= 0 && __pContentInfoList->GetCount() > pIndex->ToInt()) + { + pContentInfo = const_cast(static_cast(__pContentInfoList->GetAt(pIndex->ToInt()))); + String filePath = pContentInfo->GetContentPath(); + String fileName = GetFileNameFromFullPath(filePath, true); + + String destPath; + if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true) + { + destPath.Append(destDirectory); + destPath.Append(fileName); + } + else + { + destPath.Append(destDirectory); + destPath.Append(DIRECTORY_SEPARATOR); + destPath.Append(fileName); + } + + if (File::IsFileExist(destPath) == true) + { + pCollisionInfoList->Add(*(new (std::nothrow) String(pIndex->ToString() + MULTI_ITEM_SEPARATOR + fileName))); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pCollisionInfoList; +} + +result +FileListPresentationModel::MoveToContentFileList(const IList& contentIndexList, const String& destDirectory) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + if (&contentIndexList == null || contentIndexList.GetCount() <= 0 || &destDirectory == null || destDirectory.IsEmpty() == true) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return r; + } + + if (File::IsFileExist(destDirectory) == false) + { + Directory::Create(destDirectory, true); + } + + IList * pContentIdList = new (std::nothrow) ArrayList(SingleObjectDeleter); + int loopCount = contentIndexList.GetCount(); + for (int i = 0; i < loopCount; ++i) + { + const Integer* pIndex = static_cast(contentIndexList.GetAt(i)); + + if ((pIndex != null) && (pIndex->ToInt())>=0 && __pContentInfoList->GetCount() > pIndex->ToInt()) + { + pContentIdList->Add(new (std::nothrow) ContentId((static_cast(__pContentInfoList->GetAt(pIndex->ToInt())))->GetContentId())); + } + } + + loopCount = pContentIdList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + ContentId* pContentId = static_cast(pContentIdList->GetAt(i)); + if (pContentId != null) + { + MoveToContentFile(*pContentId, destDirectory); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +FileListPresentationModel::DeleteContentFile(const ContentId& contentId) +{ + AppLogDebug("ENTER"); + if (&contentId == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + } + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + r = contentManager.DeleteContent(contentId); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +FileListPresentationModel::MoveToContentFile(const ContentId& contentId, const String& destDirectory) +{ + AppLogDebug("ENTER"); + if (contentId.ToString().IsEmpty() == true || destDirectory.IsEmpty() == true) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return E_FAILURE; + } + + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentId); + if (pContentInfo == null) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + return E_FAILURE; + } + + String filePath = pContentInfo->GetContentPath(); + if (filePath.GetLength() < 4) + { + AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + } + + String destPath; + if (destDirectory.EndsWith(DIRECTORY_SEPARATOR) == true) + { + destPath.Append(destDirectory); + destPath.Append(GetFileNameFromFullPath(filePath, true)); + } + else + { + destPath.Append(destDirectory); + destPath.Append(DIRECTORY_SEPARATOR); + destPath.Append(GetFileNameFromFullPath(filePath, true)); + } + + if (destPath.CompareTo(filePath) == 0) + { + AppLogDebug("EXIT 4(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + } + + if (File::IsFileExist(destPath) == true) + { + File::Remove(destPath); + } + + result r = E_SUCCESS; + + if (pContentInfo->GetContentType() == CONTENT_TYPE_IMAGE) + { + + r = File::Copy(filePath, destPath, false); + if (r == E_SUCCESS) + { + ContentManager cntManager; + result rt = cntManager.Construct(); + if (rt == E_SUCCESS) + { + ImageContentInfo contentInfo; + rt = contentInfo.Construct(&destPath); + if (rt == E_SUCCESS) + { + cntManager.CreateContent(contentInfo); + cntManager.DeleteContent(contentId); + } + } + } + } + else if (pContentInfo->GetContentType() == CONTENT_TYPE_VIDEO) + { + r = File::Copy(filePath, destPath, false); + + if (r == E_SUCCESS) + { + ContentManager cntManager; + result rt = cntManager.Construct(); + if (rt == E_SUCCESS) + { + VideoContentInfo contentInfo; + rt = contentInfo.Construct(&destPath); + { + cntManager.CreateContent(contentInfo); + cntManager.DeleteContent(contentId); + } + } + } + } + delete pContentInfo; + pContentInfo = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +FileListPresentationModel::StartAppControl( const String& providerId, const String& operationId, + const IMap* pDataList, IAppControlResponseListener* pListener) +{ + AppLogDebug("ENTER"); + AppLogDebug("FindAppControlN(%ls, %ls)", providerId.GetPointer(), operationId.GetPointer()); + if (pDataList != null) + { + IList* pKeyList = pDataList->GetKeysN(); + if (pKeyList != null) + { + int keyCount = pKeyList->GetCount(); + for (int i = 0 ; i < keyCount ; ++i) + { + String* pKey = const_cast(static_cast(pKeyList->GetAt(i))); + String* pValue = const_cast(static_cast(pDataList->GetValue(*pKey))); + + AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); + } + } + } + AppControl* pAc = AppManager::FindAppControlN(providerId, operationId); + if (pAc == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + result r = pAc->Start(null, null, pDataList, pListener); + + if (r == E_SUCCESS) + { + GalleryApp* pGalleryApp = static_cast(GalleryApp::GetInstance()); + pGalleryApp->SetFrameEnabled(false); + } + + delete pAc; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +FileListPresentationModel::SetCurrentAlbumInfo(const String& albumName, const IList& directoryList) +{ + AppLogDebug("ENTER"); + + if (&directoryList != null) + { + if (__pDirectoryList != null && __pDirectoryList->GetCount() > 0) + { + bool isMatched = false; + int outterLoopCount = __pDirectoryList->GetCount(); + int innerLoopCount = 0; + for (int i = 0; i < outterLoopCount ; ++i) + { + isMatched = false; + innerLoopCount = directoryList.GetCount(); + for (int j = 0; j < innerLoopCount; ++j) + { + if (static_cast(__pDirectoryList->GetAt(i))->CompareTo( + *(const_cast(static_cast(directoryList.GetAt(j))))) == 0) + { + isMatched = true; + break; + } + } + } + + outterLoopCount = directoryList.GetCount(); + for (int i = 0; i < outterLoopCount; ++i) + { + isMatched = false; + innerLoopCount = __pDirectoryList->GetCount(); + for (int j = 0; j < innerLoopCount; ++j) + { + if (const_cast(static_cast(directoryList.GetAt(i)))->CompareTo( + *(static_cast(__pDirectoryList->GetAt(j)))) == 0) + { + isMatched = true; + break; + } + } + } + } + } + + __albumName = albumName; + + if (__pDirectoryList != null) + { + delete __pDirectoryList; + } + __pDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + int loopCount = directoryList.GetCount(); + for (int i = 0; i < loopCount; ++i) + { + __pDirectoryList->Add(new (std::nothrow) String(*(const_cast(static_cast(directoryList.GetAt(i)))))); + } + + if (__pContentInfoList != null) + { + delete __pContentInfoList; + __pContentInfoList = null; + } + + if (GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + AppControlMediaType appControlMediaType = GetAppControlMediaType(); + if (appControlMediaType == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __albumContentType = CONTENT_TYPE_IMAGE; + } + else if (appControlMediaType == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __albumContentType = CONTENT_TYPE_VIDEO; + } + } + __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +FileListPresentationModel::RefreshCurrentAlbumContentInfoList(ContentType contentType) +{ + AppLogDebug("ENTER"); + result r = RefreshContentInfoList(contentType); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +FileListPresentationModel::RefreshContentInfoList(ContentType contentType) +{ + AppLogDebug("ENTER"); + if ((contentType != CONTENT_TYPE_ALL) && (contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO)) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; + } + + if ((__pDirectoryList == null) || (__pDirectoryList->GetCount() <= 0)) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; + } + + __albumContentType = contentType; + + if (__pContentInfoList != null) + { + delete __pContentInfoList; + } + __pContentInfoList = GetContentInfoListInDirectoryListN(*__pDirectoryList, __albumContentType); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +String +FileListPresentationModel::GetCurrentAlbumName(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __albumName; +} + +void +FileListPresentationModel::SetCurrentAlbumName(String& albumName) +{ + AppLogDebug("ENTER"); + if (&albumName == null) + { + __albumName = EMPTY_SPACE; + } + else + { + __albumName = albumName; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ContentType +FileListPresentationModel::GetCurrentAlbumContentType(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __albumContentType; +} + +void +FileListPresentationModel::SetCurrentAlbumContentType(ContentType contentType) +{ + AppLogDebug("ENTER"); + __albumContentType = contentType; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +IList* +FileListPresentationModel::GetAlbumDirectoryListN(void) +{ + AppLogDebug("ENTER"); + IList* pAlbumDirectoryList = new (std::nothrow) ArrayList(SingleObjectDeleter); + if (__pDirectoryList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return pAlbumDirectoryList; + } + + String* pDirectory = null; + int loopCount = __pDirectoryList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pDirectory = static_cast(__pDirectoryList->GetAt(i)); + pAlbumDirectoryList->Add(new (std::nothrow) String(*pDirectory)); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pAlbumDirectoryList; +} + +IList* +FileListPresentationModel::GetAlbumContentInfoList(void) +{ + AppLogDebug("ENTER"); + IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter); + if (__pContentInfoList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return pContentList; + } + + ContentInfo* pContentInfo = null; + int loopCount = __pContentInfoList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pContentInfo = static_cast(__pContentInfoList->GetAt(i)); + pContentList->Add(pContentInfo); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pContentList; +} + +ContentInfo* +FileListPresentationModel::GetContentInfo(int index) +{ + AppLogDebug("ENTER"); + if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + if (index < 0 || index >= __pContentInfoList->GetCount()) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + ContentInfo* pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pContentInfo; +} + +int +FileListPresentationModel::GetCurrentAlbumContentInfoCount(void) +{ + AppLogDebug("ENTER"); + if (__pContentInfoList == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return 0; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pContentInfoList->GetCount(); +} + +ContentId +FileListPresentationModel::GetContentInfoIndex(int index) +{ + AppLogDebug("ENTER"); + if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return 0; + } + + if (index < 0 || index >= __pContentInfoList->GetCount()) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return 0; + } + ContentInfo* pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + ContentId contentId = pContentInfo->GetContentId(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return contentId; +} + +String +FileListPresentationModel::GetContentFilePath(int index) +{ + AppLogDebug("ENTER index(%d)", index); + if (__pContentInfoList == null || __pContentInfoList->GetCount() == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return EMPTY_SPACE; + } + + if (index < 0 || index >= __pContentInfoList->GetCount()) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return EMPTY_SPACE; + } + + ContentInfo* pContentInfo = static_cast(__pContentInfoList->GetAt(index)); + String contentPath = pContentInfo->GetContentPath(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return contentPath; +} + +Bitmap* +FileListPresentationModel::CoverVideoOverlayedImageOnThumbnailN(Bitmap& thumbnail, + const ThumbnailInfo& thumbmailInfo) +{ + AppLogDebug("ENTER"); + Bitmap* overlayedImage = null; + + if (&thumbmailInfo != null) + { + long duration = thumbmailInfo.GetDuration(); + + Canvas mainCanvas; + if (&thumbnail != null) + { + BufferInfo bufferInfo; + thumbnail.Lock(bufferInfo, INFINITE); + thumbnail.Unlock(); + mainCanvas.Construct(bufferInfo); + } + else + { + Rectangle mainRect(0, 0, W_DEFAULT_THUMBNAIL, H_DEFAULT_THUMBNAIL); + mainCanvas.Construct(mainRect); + mainCanvas.FillRectangle(Color::GetColor(COLOR_ID_BLACK), mainRect); + } + + Rectangle playRect(GAP_W_PLAY_FG, GAP_H_PLAY_FG, W_PLAY_FG, H_PLAY_FG); + Bitmap* playBitmap = ResourceManager::GetBitmapN(IDB_VIDEOTHUMBNAIL_PLAY); + if (playBitmap != null) + { + mainCanvas.DrawBitmap(playRect, *playBitmap); + delete playBitmap; + playBitmap = null; + } + + Canvas durCanvas; + Rectangle durSize(0, 0, W_DURATION, H_DURATION); + Rectangle durRect(0, GAP_H_DURATION, W_DURATION, H_DURATION); + Color durColor(COLOR_DURATION_BG); + durColor.SetAlpha(ALPHA_DURATION); + durCanvas.Construct(durSize); + durCanvas.FillRectangle(durColor, durSize); + Font durFont; + durFont.Construct(FONT_STYLE_PLAIN, FONT_SIZE_DURATION); + durCanvas.SetFont(durFont); + durCanvas.DrawText(Point(W_DURATION_TEXT, H_DURATION_TEXT), CommonUtil::DurationToTimeString(duration), COLOR_TEXT_OUTLINE); + Bitmap durBitmap; + durBitmap.Construct(durCanvas,durCanvas.GetBounds()); + mainCanvas.DrawBitmap(durRect,durBitmap); + + overlayedImage = new (std::nothrow) Bitmap(); + overlayedImage->Construct(mainCanvas,mainCanvas.GetBounds()); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return overlayedImage; +} + +Bitmap* +FileListPresentationModel::GetShadedBackgroundBitmapN(Bitmap& bgBitmap, + const Bitmap& orgBitmap, + const Rectangle& orgBitmapPosition) +{ + AppLogDebug("ENTER"); + if (&orgBitmap == null || &orgBitmap == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + BufferInfo bufferInfo; + bgBitmap.Lock(bufferInfo, INFINITE); + bgBitmap.Unlock(); + Canvas mainCanvas; + mainCanvas.Construct(bufferInfo); + mainCanvas.Clear(); + mainCanvas.DrawBitmap(orgBitmapPosition, orgBitmap); + + Bitmap* pMainImage = new (std::nothrow) Bitmap(); + pMainImage->Construct(mainCanvas,mainCanvas.GetBounds()); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pMainImage; +} + +IList* +FileListPresentationModel::GetContentInfoListInDirectoryListN(const IList& contentDirectoryList, + ContentType contentType)const +{ + AppLogDebug("ENTER"); + IList* pContentList = new (std::nothrow) ArrayList(SingleObjectDeleter); + + if ((&contentDirectoryList == null) || (contentDirectoryList.GetCount() == 0) + || ((contentType != CONTENT_TYPE_IMAGE) && (contentType != CONTENT_TYPE_VIDEO) && (contentType != CONTENT_TYPE_ALL))) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return pContentList; + } + + ContentDirectory contentDirectory; + IListT* pContentTypeList = new (std::nothrow) ArrayListT(); + if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_ALL) + { + pContentTypeList->Add(CONTENT_TYPE_IMAGE); + } + if (contentType == CONTENT_TYPE_VIDEO || contentType == CONTENT_TYPE_ALL) + { + pContentTypeList->Add(CONTENT_TYPE_VIDEO); + } + result r = contentDirectory.Construct(*pContentTypeList); + delete pContentTypeList; + + if (r == E_SUCCESS) + { + int pageNo = SIZE_PAGE_NO; + int countPerPage = SIZE_CONUNT_PER_PAGE; + String* pContentDirectory = null; + + int loopCount = contentDirectoryList.GetCount(); + for (int i = 0; i < loopCount; ++i) + { + IList* pIList = null; + pContentDirectory = const_cast(static_cast(contentDirectoryList.GetAt(i))); + if (pContentDirectory != null) + { + pIList = contentDirectory.GetContentDirectoryItemListN(*pContentDirectory, pageNo, countPerPage, + CONTENT_INFO_ORDER, SORT_ORDER_NONE); + + if (pIList != null) + { + pContentList->AddItems(*pIList); + } + else + { + delete pIList; + } + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pContentList; +} + +String +FileListPresentationModel::ConvertToAlbumName(const String& targetPath)const +{ + AppLogDebug("ENTER"); + String albumName; + if (&targetPath == null || targetPath.GetLength() == 0) + { + return albumName; + } + + if (targetPath == RESERVED_CAMERA_PATH || targetPath == RESERVED_CAMERA_PATH_EXT) + { + albumName = ResourceManager::GetString(L"IDS_MEDIABR_BODY_CAMERA_ROLL_ABB"); + } + else if (targetPath == RESERVED_DOWNLOAD_PATH) + { + albumName = ResourceManager::GetString(L"IDS_COM_BODY_DOWNLOADS"); + } + else + { + String directoryName = GetDirecotyNameFromFullPath(targetPath); + albumName = directoryName; + } + + return albumName; +} + +AppControlMode +FileListPresentationModel::GetAppControlMode(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + + return __appControlMode; +} + +AppControlMediaType +FileListPresentationModel::GetAppControlMediaType(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + + return __appControlMediaType; +} + +AppControlSelectionMode +FileListPresentationModel::GetAppControlSelectionMode(void) const +{ + AppLogDebug("Enter"); + AppLogDebug("Exit"); + + return __appControlSelectionMode; +} diff --git a/src/GlFormFactory.cpp b/src/GlFormFactory.cpp new file mode 100644 index 0000000..a70f321 --- /dev/null +++ b/src/GlFormFactory.cpp @@ -0,0 +1,115 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlFormFactory.cpp + * @brief This is the implementation file for FormFactory class. + */ + +#include "GlAlbumListEditorForm.h" +#include "GlAlbumListForm.h" +#include "GlAlbumNameEditorForm.h" +#include "GlFileListEditorForm.h" +#include "GlFileListForm.h" +#include "GlFormFactory.h" +#include "GlSettingIntervalForm.h" +#include "GlSettingMainForm.h" +#include "GlSettingTransitionForm.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +FormFactory::FormFactory(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +FormFactory::~FormFactory(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +Form* +FormFactory::CreateFormN(const String& formId, const SceneId& sceneId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + Form* pNewForm = null; + + if (formId == IDC_FORM_ALBUM_LIST) + { + AlbumListForm* pForm = new (std::nothrow) AlbumListForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == IDC_FORM_ALBUM_LIST_EDITOR) + { + AlbumListEditorForm* pForm = new (std::nothrow) AlbumListEditorForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == IDC_FORM_ALBUM_NAME_EDITOR) + { + AlbumNameEditorForm* pForm = new (std::nothrow) AlbumNameEditorForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == IDC_FORM_FILE_LIST) + { + FileListForm* pForm = new (std::nothrow) FileListForm(); + pForm->Initialize(); + pNewForm = pForm; + } + else if (formId == IDC_FORM_FILE_LIST_EDITOR) + { + FileListEditorForm* pForm = new (std::nothrow) FileListEditorForm(); + pForm->Initialize(); + pNewForm = pForm; + } + else if (formId == IDC_FORM_SETTING_MAIN) + { + SettingMainForm* pForm = new (std::nothrow) SettingMainForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == IDC_FORM_SETTING_INTERVAL) + { + SettingIntervalForm* pForm = new (std::nothrow) SettingIntervalForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + else if (formId == IDC_FORM_SETTING_TRANSITION) + { + SettingTransitionForm* pForm = new (std::nothrow) SettingTransitionForm(); + pForm->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pForm); + pNewForm = pForm; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pNewForm; +} diff --git a/src/GlGalleryApp.cpp b/src/GlGalleryApp.cpp new file mode 100644 index 0000000..b8da117 --- /dev/null +++ b/src/GlGalleryApp.cpp @@ -0,0 +1,245 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlGalleryApp.cpp + * @brief This is the implementation file for GalleryApp class. + */ + +#include "GlAlbumListPresentationModel.h" +#include "GlBaseForm.h" +#include "GlBasePanel.h" +#include "GlFileListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlMainFrame.h" +#include "GlSettingPresentationModel.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const wchar_t* PARAM_LANGUAGE = L"http://tizen.org/setting/locale.language"; +static const wchar_t* PARAM_LOCALE = L"http://tizen.org/setting/locale.country"; + +GalleryApp::GalleryApp(void) + :__requestId(0) + ,__pArguments(null) + ,__appControlResult(APP_CTRL_RESULT_SUCCEEDED) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +GalleryApp::~GalleryApp(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +UiApp* +GalleryApp::CreateInstance(void) +{ + AppLogDebug("ENTER"); + UiApp* pUiApp = new (std::nothrow) GalleryApp(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pUiApp; +} + +String +GalleryApp::GetAppControlOperationId(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __operationId; +} + +String +GalleryApp::GetUriData(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + return __uriData; +} + +const IMap* +GalleryApp::GetAppControlArguments(void) const +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pArguments; +} + +void +GalleryApp::SendAppControlResult(AppCtrlResult appControlResult, IMap* pExtraData) +{ + AppLogDebug("ENTER"); + AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance(); + pAppManager->SendAppControlResult(__requestId, appControlResult, pExtraData); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +bool +GalleryApp::OnAppInitializing(AppRegistry& appRegistry) +{ + AppLogDebug("ENTER"); + AppControlProviderManager::GetInstance()->SetAppControlProviderEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +GalleryApp::OnAppInitialized(void) +{ + AppLogDebug("ENTER"); + MainFrame* pMainFrame = new (std::nothrow) MainFrame(); + pMainFrame->Construct(); + AddFrame(*pMainFrame); + + SettingInfo::AddSettingEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +GalleryApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination) +{ + AppLogDebug("ENTER"); + AlbumListPresentationModel* pAlbumListPresentationModel = AlbumListPresentationModel::GetInstance(); + if (pAlbumListPresentationModel != null) + { + pAlbumListPresentationModel->ClearThumbnailRequests(true); + } + FileListPresentationModel* pFileListPresentationModel = FileListPresentationModel::GetInstance(); + if (pFileListPresentationModel != null) + { + pFileListPresentationModel->ClearThumbnailRequests(true); + } + + Thread::Sleep(1000); + + delete __pArguments; + __pArguments = null; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +GalleryApp::OnForeground(void) +{ + AppLogDebug("ENTER"); + static bool bFirst = true; + if (bFirst) + { + bFirst = false; + return; + } + + MainFrame* pMainFrame = dynamic_cast(GetFrameAt(0)); + pMainFrame->SetEnabled(true); + pMainFrame->Invalidate(true); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + Scene* pScene = pSceneManager->GetCurrentScene(); + AppAssert(pSceneManager); + + BasePanel* pBasePanel = dynamic_cast(pScene->GetPanel()); + BaseForm* pBaseForm = dynamic_cast(pScene->GetForm()); + if(pBasePanel != null) + { + pBasePanel->OnUpdateContentList(); + } + else + { + if (pBaseForm != null) + { + pBaseForm->OnUpdateContentList(); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +GalleryApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, + const String* pUriData, const String* pMimeType, const IMap* pExtraData) +{ + AppLogDebug("ENTER"); + __requestId = reqId; + __operationId = operationId; + + if (pUriData != null) + { + __uriData = *pUriData; + } + if (pExtraData != null) + { + HashMap* pArguments = new (std::nothrow) HashMap(SingleObjectDeleter); + pArguments->Construct(); + + const String* pKey = null; + const String* pValue = null; + IList* pKeyList = pExtraData->GetKeysN(); + + int loopCount = pKeyList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pKey = static_cast(pKeyList->GetAt(i)); + pValue = static_cast(pExtraData->GetValue(*pKey)); + + if (pValue != null && pKey->CompareTo(APPCONTROL_RESULT_KEY_LEGACY_RESULT) != 0) + { + AppLogDebug("(%ls:%ls)", pKey == null ? L"(null)" : pKey->GetPointer(), pValue == null ? L"(null)" : pValue->GetPointer()); + pArguments->Add(new (std::nothrow) String(*pKey), new (std::nothrow) String(*pValue)); + } + } + __pArguments = pArguments; + delete pKeyList; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +GalleryApp::OnSettingChanged(String& key) +{ + AppLogDebug("ENTER"); + if (key.CompareTo(PARAM_LANGUAGE) == 0 || key.CompareTo(PARAM_LOCALE) == 0) + { + UiApp::GetInstance()->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +GalleryApp::SetFrameEnabled(bool enabled) +{ + MainFrame* pMainFrame = dynamic_cast(GetFrameAt(0)); + pMainFrame->SetEnabled(enabled); +} diff --git a/src/GlGalleryEntry.cpp b/src/GlGalleryEntry.cpp new file mode 100644 index 0000000..87d3cd6 --- /dev/null +++ b/src/GlGalleryEntry.cpp @@ -0,0 +1,56 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlGalleryEntry.cpp + * @brief This is the implementation file for GalleryEntry class. + */ + +#include "GlGalleryApp.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + +// +// The entry function of Tizen application called by the operating system. +// +_EXPORT_ int +OspMain(int argc, char *pArgv[]) +{ + AppLogDebug("ENTER"); + AppLogDebug("Application started."); + ArrayList args(SingleObjectDeleter); + args.Construct(); + for (int i = 0; i < argc; i++) + { + args.Add(new (std::nothrow) String(pArgv[i])); + } + + result r = Tizen::App::UiApp::Execute(GalleryApp::CreateInstance, &args); + TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r)); + AppLogDebug("Application finished."); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return static_cast(r); +} +#ifdef __cplusplus +} +#endif // __cplusplus diff --git a/src/GlImageListEditorPanel.cpp b/src/GlImageListEditorPanel.cpp new file mode 100644 index 0000000..3311669 --- /dev/null +++ b/src/GlImageListEditorPanel.cpp @@ -0,0 +1,698 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlImageListEditorPanel.cpp + * @brief This is the implementation file for ImageListEditorPanel class. + */ + +#include +#include +#include "GlAlbumInfo.h" +#include "GlCommonUtil.h" +#include "GlFileListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlImageListEditorPanel.h" +#include "GlResourceManager.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int H_SELECTALL_REGION = 112; +static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value; +static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value; +static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value; +static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK)); +static const int H_COUNT_LABEL = 48; +static const int LENGTH_COUNT_LABEL = 256; +static const int ALPHA_THUMBNAIL_DIM = 70; +static const Rectangle RECT_INITIAL (0, 0, 10, 10); + +ImageListEditorPanel::ImageListEditorPanel(void) + : __pContentIconListView(null) + , __pCheckButton(null) + , __pLabelSelectCnt(null) + , __itemCount(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageListEditorPanel::~ImageListEditorPanel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageListEditorPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageListEditorPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + __itemCount = 0; + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + SetBounds(clientAreaBounds); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + __pContentIconListView = new (std::nothrow) IconListView(); + + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height), + DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK, + ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt = new (std::nothrow) Label(); + __pLabelSelectCnt->Construct(Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, + clientAreaBounds.width, H_COUNT_LABEL), strTmp); + __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL); + __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pLabelSelectCnt); + } + else + { + __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height), + DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_NORMAL, + ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + } + } + else + { + Panel* pCheckPanel = new (std::nothrow) Panel(); + pCheckPanel->Construct(Rectangle(0, 0, clientAreaBounds.width, H_SELECTALL_REGION)); + pCheckPanel->SetBackgroundColor(COLOR_SELECTALL_REGION); + __pCheckButton = new (std::nothrow) CheckButton(); + __pCheckButton->Construct(pCheckPanel->GetBounds(), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, + false, ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL")); + __pCheckButton->SetActionId(ACTION_ID_SELECTALL_CHECKED, ACTION_ID_SELECTALL_UNCHECKED); + __pCheckButton->AddActionEventListener(*this); + pCheckPanel->AddControl(*__pCheckButton); + AddControl(*pCheckPanel); + + __pContentIconListView = new (std::nothrow) IconListView(); + __pContentIconListView->Construct(Rectangle(0, H_SELECTALL_REGION, clientAreaBounds.width, + clientAreaBounds.height - H_SELECTALL_REGION), DIMENSION_DEFAULT_THUMBNAIL, + ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt = new (std::nothrow) Label(); + __pLabelSelectCnt->Construct( + Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), + strTmp); + __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL); + __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pLabelSelectCnt); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageListEditorPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageListEditorPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + switch (actionId) + { + case ACTION_ID_SELECTALL_CHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i) == false) + { + __pContentIconListView->SetItemChecked(i,true); + __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + break; + } + case ACTION_ID_SELECTALL_UNCHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i) == true) + { + __pContentIconListView->SetItemChecked(i,false); + } + } + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pContentIconListView->UpdateList(); + break; + } + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +ImageListEditorPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +ImageListEditorPanel::CreateItem(int index) +{ + AppLogDebug("ENTER : index(%d)", index); + IconListViewItem* pIconListviewItem = new (std::nothrow) IconListViewItem(); + Bitmap* pBitmap=null; + String* pItemText=null; + + result r = __pPresentationModel->GetThumbnailInSyncCacheN(index, pItemText, pBitmap); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE")) + { + delete pItemText; + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + if (__pContentIconListView->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + Color dimColor(COLOR_THUMBNAIL_DIM); + dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM); + + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + else + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + } + else + { + pIconListviewItem->Construct(*pBitmap, pItemText); + } + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + if (pItemText != null) + { + delete pItemText; + pItemText = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListviewItem; +} + +bool +ImageListEditorPanel::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageListEditorPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + + if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED) + { + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + else + { + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + if (__pCheckButton->IsSelected()) + { + __pCheckButton->SetSelected(false); + } + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + + if ( __pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK + && __pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_SINGLE) + { + if (status == ICON_LIST_VIEW_ITEM_SELECTED) + { + HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter); + result r = map->Construct(); + if (r == E_SUCCESS) + { + map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index))); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index))); + + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map); + pApp->Terminate(); + } + else + { + delete map; + map = null; + } + } + else + { + delete map; + map = null; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_IMAGE) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_IMAGE); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)",index); + if (index >= 0) + { + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (currentSceneId == IDSCN_IMAGE_LIST_EDITOR) + { + if (previousSceneId == IDSCN_ALBUM_LIST) + { + AlbumInfo* pAlbumInfo = static_cast(pArgs->GetAt(0)); + if (pAlbumInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + IList* pDirectoryList = pAlbumInfo->GetDirectoryListN(); + __pPresentationModel->SetCurrentAlbumInfo(pAlbumInfo->GetAlbumName(), *pDirectoryList); + + if (pDirectoryList != null) + { + delete pDirectoryList; + } + delete pArgs; + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + } + } + else + { + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->RequestRedraw(true); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +ImageListEditorPanel::GetItemCheckedCount(void) const +{ + AppLogDebug("ENTER"); + int count = 0; + if (__pContentIconListView != null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i)) + { + ++count; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return count; +} + +IList* +ImageListEditorPanel::GetItemCheckedIndexList(void) const +{ + AppLogDebug("ENTER"); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + Integer* pIndex=null; + + if (__pContentIconListView != null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentIconListView->IsItemChecked(i)) + { + pIndex = new (std::nothrow) Integer(i); + pList->Add(pIndex); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pList; +} + +void +ImageListEditorPanel::OnRequestDeleteAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + + if (pIndexList == null || pIndexList->GetCount() <= 0 || __pPresentationModel == null) + { + delete pIndexList; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + __pPresentationModel->DeleteContentFileList(*pIndexList); + delete pIndexList; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + if (pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + String path; + int loopCount = pIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + path = __pPresentationModel->GetContentFilePath(i); + + if (path.EndsWith(CONTENT_EXT_PNG) + || path.EndsWith(CONTENT_EXT_BMP) + || path.EndsWith(CONTENT_EXT_JPG) + || path.EndsWith(CONTENT_EXT_GIF) + || path.EndsWith(CONTENT_EXT_TIF) + || path.EndsWith(CONTENT_EXT_MP4) + || path.EndsWith(CONTENT_EXT_3GP) + || path.EndsWith(CONTENT_EXT_AVI) + || path.EndsWith(CONTENT_EXT_RM) + || path.EndsWith(CONTENT_EXT_WMV) + || path.EndsWith(CONTENT_EXT_ASF) + ) + { + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), + new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnRequestMoveToAction(String& destDirectory) +{ + AppLogDebug("ENTER"); + if (&destDirectory == null || destDirectory.IsEmpty()) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + IList* pIndexList = GetItemCheckedIndexList(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return; + } + result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory); + delete pIndexList; + pIndexList = null; + TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction"); + + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + + if (pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + + int loopCount = pIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + combineText.Append(__pPresentationModel->GetContentFilePath(i)); + combineText.Append(L";"); + } + + HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter); + map->Construct(); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(combineText)); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), + new (std::nothrow) String(combineText)); + + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map); + pApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlImageListPanel.cpp b/src/GlImageListPanel.cpp new file mode 100644 index 0000000..fc1f3e6 --- /dev/null +++ b/src/GlImageListPanel.cpp @@ -0,0 +1,298 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlImageListPanel.cpp + * @brief This is the implementation file for ImageListPanel class. + */ + +#include +#include +#include "GlAlbumInfo.h" +#include "GlCommonUtil.h" +#include "GlFileListForm.h" +#include "GlFileListPresentationModel.h" +#include "GlImageListPanel.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const Rectangle RECT_INITIAL (0, 0, 10, 10); +static const int W_CLIENT = 720; +static const int H_CONTENT_MARGIN = 24; +static const int W_CONTENT_MARGIN = 14; +static const int W_CONTENT_SPACE = 20; +static const int H_CONTENT_SPACE = 24; + +ImageListPanel::ImageListPanel() + : __pContentIconListView(null) + , __itemCount(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ImageListPanel::~ImageListPanel() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +ImageListPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +ImageListPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + SetBounds(clientAreaBounds); + __pContentIconListView = new (std::nothrow) IconListView(); + __pContentIconListView->Construct(Rectangle(0, 0, W_CLIENT, clientAreaBounds.height), + DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_NORMAL, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN); + __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN); + __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE); + __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE); + __pContentIconListView->SetItemProvider(*this); + __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_RIGHT); + __pContentIconListView->AddIconListViewItemEventListener(*this); + __pContentIconListView->SetTouchAnimationEnabled(false); + AddControl(*__pContentIconListView); + __pContentIconListView->SetShowState(true); + __itemCount = 0; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +ImageListPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +ImageListPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +ImageListPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +IconListViewItem* +ImageListPanel::CreateItem(int index) +{ + AppLogDebug("ENTER"); + IconListViewItem* pIconListviewItem = new (std::nothrow) IconListViewItem(); + Bitmap* pBitmap=null; + String* pItemText=null; + result r = __pPresentationModel->GetThumbnailInSyncCacheN(index, pItemText, pBitmap); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE")) + { + delete pItemText; + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + pIconListviewItem->Construct(*pBitmap, pItemText); + + if (pBitmap != null) + { + delete pBitmap; + pBitmap = null; + } + if (pItemText != null) + { + delete pItemText; + pItemText = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pIconListviewItem; +} + +bool +ImageListPanel::DeleteItem(int index, IconListViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ImageListPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == ICON_LIST_VIEW_ITEM_SELECTED) + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_IMAGE)); + + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i))); + } + String listIndex; + listIndex.Format(10, L"%d", index); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), + new (std::nothrow) String(listIndex)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_IMAGE) + { + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + if (currentSceneId == IDSCN_IMAGE_LIST) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_IMAGE); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentIconListView->UpdateList(); + } + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + if (pSceneManager->GetCurrentSceneId() == IDSCN_IMAGE_LIST) + { + FileListForm* pFileListForm = dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + if (pFileListForm != null) + { + pFileListForm->SetTitleText(__pPresentationModel->GetCurrentAlbumName()); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ImageListPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlMainFrame.cpp b/src/GlMainFrame.cpp new file mode 100644 index 0000000..6977063 --- /dev/null +++ b/src/GlMainFrame.cpp @@ -0,0 +1,111 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlMainFrame.cpp + * @brief This is the implementation file for MainFrame class. + */ + +#include +#include "GlGalleryApp.h" +#include "GlFormFactory.h" +#include "GlMainFrame.h" +#include "GlPanelFactory.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +MainFrame::MainFrame(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +MainFrame::~MainFrame(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +MainFrame::OnInitializing(void) +{ + AppLogDebug("ENTER"); + static FormFactory formFactory; + static PanelFactory panelFactory; + + SceneManager* pSceneManager = SceneManager::GetInstance(); + + pSceneManager->RegisterFormFactory(formFactory); + pSceneManager->RegisterPanelFactory(panelFactory); + + pSceneManager->RegisterScene(IDSCN_ALBUM_LIST, IDC_FORM_ALBUM_LIST, IDC_PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_ALBUM_LIST_EDITOR, IDC_FORM_ALBUM_LIST_EDITOR, IDC_PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_ALBUM_NAME_EDITOR, IDC_FORM_ALBUM_NAME_EDITOR, IDC_PANEL_BLANK); + + pSceneManager->RegisterScene(IDSCN_ALL_LIST, IDC_FORM_FILE_LIST, IDC_PANEL_ALL_LIST); + pSceneManager->RegisterScene(IDSCN_IMAGE_LIST, IDC_FORM_FILE_LIST, IDC_PANEL_IMAGE_LIST); + pSceneManager->RegisterScene(IDSCN_VIDEO_LIST, IDC_FORM_FILE_LIST, IDC_PANEL_VIDEO_LIST); + + pSceneManager->RegisterScene(IDSCN_ALL_LIST_EDITOR, IDC_FORM_FILE_LIST_EDITOR, IDC_PANEL_ALL_LIST_EDITOR); + pSceneManager->RegisterScene(IDSCN_IMAGE_LIST_EDITOR, IDC_FORM_FILE_LIST_EDITOR, IDC_PANEL_IMAGE_LIST_EDITOR); + pSceneManager->RegisterScene(IDSCN_VIDEO_LIST_EDITOR, IDC_FORM_FILE_LIST_EDITOR, IDC_PANEL_VIDEO_LIST_EDITOR); + + pSceneManager->RegisterScene(IDSCN_ALL_LIST_SELECTION, IDC_FORM_FILE_LIST_EDITOR, + IDC_PANEL_ALL_LIST_SELECTION); + + pSceneManager->RegisterScene(IDSCN_SETTING_MAIN, IDC_FORM_SETTING_MAIN, IDC_PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_SETTING_INTERVAL, IDC_FORM_SETTING_INTERVAL, IDC_PANEL_BLANK); + pSceneManager->RegisterScene(IDSCN_SETTING_TRANSITION, IDC_FORM_SETTING_TRANSITION, IDC_PANEL_BLANK); + + SceneId sceneId; + GalleryApp* pGalleryApp = static_cast(GalleryApp::GetInstance()); + + String operationID = pGalleryApp->GetAppControlOperationId(); + + if (operationID.CompareTo(APPCONTROL_OPERATION_ID_MAIN) == 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST), null); + } + else if (operationID.CompareTo(APPCONTROL_OPERATION_ID_PICK) == 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST), null); + } + else if (operationID.CompareTo(APPCONTROL_OPERATION_ID_CONFIGURE) == 0) + { + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_MAIN), null); + } + else + { + pGalleryApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +MainFrame::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} diff --git a/src/GlPanelFactory.cpp b/src/GlPanelFactory.cpp new file mode 100644 index 0000000..4ae85cf --- /dev/null +++ b/src/GlPanelFactory.cpp @@ -0,0 +1,108 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlPanelFactory.cpp + * @brief This is the implementation file for PanelFactory class. + */ + +#include "GlAllListEditorPanel.h" +#include "GlAllListPanel.h" +#include "GlAllListSelectionPanel.h" +#include "GlImageListEditorPanel.h" +#include "GlImageListPanel.h" +#include "GlPanelFactory.h" +#include "GlVideoListEditorPanel.h" +#include "GlVideoListPanel.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +PanelFactory::PanelFactory() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +PanelFactory::~PanelFactory() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +Panel* +PanelFactory::CreatePanelN(const String& panelId, const SceneId& sceneId) +{ + AppLogDebug("ENTER"); + Panel* pNewPanel = null; + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + if (panelId == IDC_PANEL_ALL_LIST) + { + AllListPanel* pPanel = new (std::nothrow) AllListPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_IMAGE_LIST) + { + ImageListPanel* pPanel = new (std::nothrow) ImageListPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_VIDEO_LIST) + { + VideoListPanel* pPanel = new (std::nothrow) VideoListPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_ALL_LIST_EDITOR) + { + AllListEditorPanel* pPanel = new (std::nothrow) AllListEditorPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_IMAGE_LIST_EDITOR) + { + ImageListEditorPanel* pPanel = new (std::nothrow) ImageListEditorPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_VIDEO_LIST_EDITOR) + { + VideoListEditorPanel* pPanel = new (std::nothrow) VideoListEditorPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + else if (panelId == IDC_PANEL_ALL_LIST_SELECTION) + { + AllListSelectionPanel* pPanel = new (std::nothrow) AllListSelectionPanel(); + pPanel->Initialize(); + pSceneManager->AddSceneEventListener(sceneId, *pPanel); + pNewPanel = pPanel; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pNewPanel; +} diff --git a/src/GlResourceManager.cpp b/src/GlResourceManager.cpp new file mode 100644 index 0000000..f694a85 --- /dev/null +++ b/src/GlResourceManager.cpp @@ -0,0 +1,56 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlResourceManager.cpp + * @brief This is the implementation file for ResourceManager class. + */ + +#include +#include "GlResourceManager.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Graphics; + +Bitmap* +ResourceManager::GetBitmapN(const String& id) +{ + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + if (pAppResource == null) + { + + return null; + } + + return pAppResource->GetBitmapN(id); +} + +String +ResourceManager::GetString(const String& id) +{ + AppResource* pAppResource = Application::GetInstance()->GetAppResource(); + if (pAppResource == null) + { + + return null; + } + + String str; + pAppResource->GetString(id, str); + + return str; +} diff --git a/src/GlSettingIntervalForm.cpp b/src/GlSettingIntervalForm.cpp new file mode 100644 index 0000000..b7297ec --- /dev/null +++ b/src/GlSettingIntervalForm.cpp @@ -0,0 +1,677 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingIntervalForm.cpp + * @brief This is the implementation file for SettingIntervalForm class. + */ + +#include "GlGalleryApp.h" +#include "GlResourceManager.h" +#include "GlSettingIntervalForm.h" +#include "GlSettingPresentationModel.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int FONT_MAIN_TEXT_SIZE_GIANT = 100; +static const int FONT_MAIN_TEXT_SIZE_HUGE = 70; +static const int FONT_MAIN_TEXT_SIZE_LARGE = 55; +static const int FONT_MAIN_TEXT_SIZE_NORMAL = 44; +static const int FONT_MAIN_TEXT_SIZE_SMALL = 32; + +static const int X_GROUP_DEFAULT = 16; +static const int Y_GROUP_DEFAULT = 0; +static const int GAP_WIDTH = 2; + +static const int H_GROUP_ITEM_DEFAULT_LABEL = 114; +static const int X_GROUP_ITEM_DEFAULT_LABEL = 16; + +static const int H_GROUP_INDEX_DEFAULT = 82; +static const int H_GROUP_INDEX_TITLE_TEXT = 36; + +static const int X_ITEM_TYPE_3_ICON = 26; +static const int Y_ITEM_TYPE_3_ICON = 21; +static const int W_ITEM_TYPE_3_ICON = 0; +static const int H_ITEM_TYPE_3_ICON = 74; + +static const int H_GROUP_ITEM_DEFAULT = 114; +static const int W_GROUP_ITEM_DEFAULT = 720; + +static const int X_ITEM_TYPE_1_LABEL = 16; +static const int W_ITEM_TYPE_1_LABEL = (720 - X_ITEM_TYPE_1_LABEL); +static const int H_ITEM_TYPE_1_LABEL = 114; + +static const int W_ITEM_TYPE_2_LABEL_MAIN = W_ITEM_TYPE_1_LABEL; + +static const int X_ITEM_TYPE_3_LABEL = (X_ITEM_TYPE_3_ICON + W_ITEM_TYPE_3_ICON); +static const int Y_ITEM_TYPE_3_LABEL = 0; +static const int W_ITEM_TYPE_3_LABEL = (W_ITEM_TYPE_2_LABEL_MAIN - X_ITEM_TYPE_3_LABEL); +static const int H_ITEM_TYPE_3_LABEL = H_ITEM_TYPE_1_LABEL; + +static const unsigned int COLOR_MAIN_TEXT = Color32<0, 0, 0>::Value; +static const unsigned int COLOR_GROUP_TITLE_TEXT = Color32<93, 110, 141>::Value; +static const unsigned int COLOR_BG_GROUP_INDEX_DEFAULT = Color32<249, 249, 249>::Value; +static const unsigned int COLOR_BG_GROUP_ITEM_DEFAULT = Color32<236, 240, 242>::Value; + +static const int FONT_SIZE_GROUP_TITLE_TEXT = 32; + +static const int H_GROUP_INDEX_NO_TITLE_DEFAULT = 40; + +static const wchar_t* FONT_SIZE_SETTING_TYPE_GIANT = L"giant"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_HUGE = L"huge"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_LARGE = L"large"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_MEDIUM = L"medium"; + +static const int GROUP_TIMEINTERVAL = 0; + +static const int GROUP_COUNT = 1; +static const int GROUP_INDEX_1 = 0; + +static const int TIMEINTERVAL_ITEM_COUNT = 5; + +static const int ITEM_SLIDESHOW_INTERVAL_SEC_2 = 0; +static const int ITEM_SLIDESHOW_INTERVAL_SEC_3 = 1; +static const int ITEM_SLIDESHOW_INTERVAL_SEC_5 = 2; +static const int ITEM_SLIDESHOW_INTERVAL_SEC_10 = 3; +static const int ITEM_SLIDESHOW_INTERVAL_SEC_20 = 4; + +SettingIntervalForm::SettingIntervalForm(void) + : __pTableView(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingIntervalForm::~SettingIntervalForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingIntervalForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} +result +SettingIntervalForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel = SettingPresentationModel::GetInstance(); + + Header* pHeader = GetHeader(); + AppAssert(pHeader); + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY")); + + Rectangle bounds = GetClientAreaBounds(); + bounds.x = X_GROUP_DEFAULT; + bounds.y = Y_GROUP_DEFAULT; + bounds.width -= (bounds.x * GAP_WIDTH); + + __pTableView = new (std::nothrow) GroupedTableView(); + + __pTableView->Construct(bounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_NONE); + __pTableView->SetItemProvider(this); + + AddControl(*__pTableView); + __pTableView->SetGroupedLookEnabled(true); + __pTableView->AddGroupedTableViewItemEventListener(*this); + + InitializeFooter(); + SetFormBackEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +SettingIntervalForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +SettingIntervalForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + switch (actionId) + { + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_SETTING_MAIN)); + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingIntervalForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + Footer* pFooter = GetFooter(); + AppAssert(pFooter); + pFooter->RemoveAllItems(); + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + + pFooter->SetBackButton(); + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +SettingIntervalForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pTableView->UpdateTableView(); + UpdateTableViewRedioButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +TableViewGroupItem* +SettingIntervalForm::CreateGroupItem(int groupIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + + int itemHeight = H_GROUP_INDEX_DEFAULT; + LabelTextStyle style = LABEL_TEXT_STYLE_BOLD; + Rectangle itemRectangle; + String groupText = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME"); + Label* pLabel = null; + + switch (groupIndex) + { + case GROUP_TIMEINTERVAL: + { + groupText = ResourceManager::GetString(L"IDS_IV_BODY_INTERVAL"); + } + break; + + default: + break; + } + + TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem(); + + itemRectangle.x = X_GROUP_ITEM_DEFAULT_LABEL; + itemRectangle.y = H_GROUP_INDEX_TITLE_TEXT; + itemRectangle.width = itemWidth; + itemRectangle.height = (itemHeight - H_GROUP_INDEX_TITLE_TEXT); + + pItem->Construct(Dimension(itemWidth, itemHeight)); + pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT); + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectangle, groupText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP); + pLabel->SetTextConfig(FONT_SIZE_GROUP_TITLE_TEXT, style); + pLabel->SetTextColor(COLOR_GROUP_TITLE_TEXT); + + pItem->AddControl(*pLabel); + pItem->SetEnabled(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +TableViewItem* +SettingIntervalForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + AppLogDebug("group[%d] item[%d]", groupIndex, itemIndex); + + int fontSize = GetFontSize(); + + unsigned int itemHeight = 0; + bool isDrawBitmapIcon = true; + + Rectangle itemRectIcon; + Rectangle itemRectLabel; + Rectangle itemRectSecondLabel; + String itemText(L""); + String itemTextTwoLine(L""); + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + Bitmap* pBitmap = null; + Label* pLabel = null; + + itemHeight = H_GROUP_ITEM_DEFAULT_LABEL; + ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel); + + switch (groupIndex) + { + case GROUP_TIMEINTERVAL: + { + switch (itemIndex) + { + case ITEM_SLIDESHOW_INTERVAL_SEC_2: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_OPT_2_SECONDS"); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_3: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_OPT_3_SECONDS"); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_5: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_5_SECONDS"); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_10: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_10_SECONDS"); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_20: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_20_SECONDS"); + } + break; + + default: + { + } + break; + } + } + break; + + default: + break; + } + + TableViewItem* pItem = new (std::nothrow) TableViewItem(); + + if (pItem) + { + pItem->Construct(Dimension(W_GROUP_ITEM_DEFAULT, itemHeight), style); + pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT); + + if (isDrawBitmapIcon) + { + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectIcon, L""); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetBackgroundBitmap(*pBitmap); + + pItem->AddControl(*pLabel); + } + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectLabel, itemText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + pLabel->SetTextColor(COLOR_MAIN_TEXT); + + pItem->AddControl(*pLabel); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +int +SettingIntervalForm::GetDefaultGroupItemHeight(void) +{ + return H_GROUP_INDEX_NO_TITLE_DEFAULT; +} + +int +SettingIntervalForm::GetDefaultItemHeight(void) +{ + return H_GROUP_ITEM_DEFAULT; +} + +bool +SettingIntervalForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + pItem = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +SettingIntervalForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +int +SettingIntervalForm::GetGroupCount(void) +{ + AppLogDebug("ENTER groupItemCount(%d)", GROUP_COUNT); + int groupItemCount = GROUP_COUNT; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return groupItemCount; +} + +int +SettingIntervalForm::GetItemCount(int groupIndex) +{ + AppLogDebug("ENTER"); + + int itemCount = 0; + + switch (groupIndex) + { + case GROUP_INDEX_1: + { + itemCount = TIMEINTERVAL_ITEM_COUNT ; + } + break; + + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return itemCount; +} + +void +SettingIntervalForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, + int itemIndex, TableViewItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + AppLogDebug("Group(%d) index(%d)", groupIndex, itemIndex); + + switch (groupIndex) + { + case GROUP_TIMEINTERVAL: + { + switch (itemIndex) + { + case ITEM_SLIDESHOW_INTERVAL_SEC_2: + { + int inputValue = 2; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_3: + { + int inputValue = 3; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_5: + { + int inputValue = 5; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_10: + { + int inputValue = 10; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_INTERVAL_SEC_20: + { + int inputValue = 20; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + default: + { + } + break; + } + UpdateTableViewRedioButtonState(itemIndex); + } + break; + + default: + { + } + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, + int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, + TableViewGroupItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +SettingIntervalForm::GetFontSize(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + int fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + String fontSizeValue(L""); + + if ((r = SettingInfo::GetValue(FONT_SIZE_SETTING_INFO_KEY, fontSizeValue)) == E_SUCCESS) + { + AppLogDebug("GetValue Fail [%s]", GetErrorMessage(r)); + + if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_GIANT, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_GIANT; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_HUGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_HUGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_LARGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_LARGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_MEDIUM, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + } + else + { + fontSize = FONT_MAIN_TEXT_SIZE_SMALL; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return fontSize; +} + +void +SettingIntervalForm::ItemTypeIconAndOneLine(Rectangle& icon, Rectangle& main) +{ + AppLogDebug("ENTER"); + icon.x = X_ITEM_TYPE_3_ICON; + icon.y = Y_ITEM_TYPE_3_ICON; + icon.width = W_ITEM_TYPE_3_ICON; + icon.height = H_ITEM_TYPE_3_ICON; + + main.x = X_ITEM_TYPE_3_LABEL; + main.y = Y_ITEM_TYPE_3_LABEL; + main.width = W_ITEM_TYPE_3_LABEL; + main.height = H_ITEM_TYPE_3_LABEL; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingIntervalForm::UpdateTableViewRedioButtonState(int senderIndex) +{ + AppLogDebug("ENTER senderIndex(%d)", senderIndex); + + int selectedIndex = 0; + int realValue = 0; + __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, + realValue); + switch (realValue) + { + case 2: + { + selectedIndex = 0; + break; + } + case 3: + { + selectedIndex = 1; + break; + } + case 5: + { + selectedIndex = 2; + break; + } + case 10: + { + selectedIndex = 3; + break; + } + case 20: + { + selectedIndex = 4; + break; + } + default: + { + selectedIndex = 0; + break; + } + } + AppLogDebug("selectedIndex(%d)", selectedIndex); + + for (int i = 0; i < TIMEINTERVAL_ITEM_COUNT; ++i) + { + if (senderIndex != i) + { + if (selectedIndex == i) + { + __pTableView->SetItemChecked(GROUP_TIMEINTERVAL, i, true); + } + else + { + __pTableView->SetItemChecked(GROUP_TIMEINTERVAL, i, false); + } + __pTableView->RefreshItem(GROUP_TIMEINTERVAL, i, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlSettingMainForm.cpp b/src/GlSettingMainForm.cpp new file mode 100644 index 0000000..4772fc1 --- /dev/null +++ b/src/GlSettingMainForm.cpp @@ -0,0 +1,816 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingMainForm.cpp + * @brief This is the implementation file for SettingMainForm class. + */ + +#include "GlGalleryApp.h" +#include "GlResourceManager.h" +#include "GlSettingMainForm.h" +#include "GlSettingPresentationModel.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int FONT_MAIN_TEXT_SIZE_GIANT = 100; +static const int FONT_MAIN_TEXT_SIZE_HUGE = 70; +static const int FONT_MAIN_TEXT_SIZE_LARGE = 55; +static const int FONT_MAIN_TEXT_SIZE_NORMAL = 44; +static const int FONT_MAIN_TEXT_SIZE_SMALL = 32; + +static const int X_GROUP_DEFAULT = 16; +static const int Y_GROUP_DEFAULT = 0; +static const int GAP_WIDTH = 2; + +static const int H_GROUP_ITEM_DEFAULT_LABEL = 114; +static const int X_GROUP_ITEM_DEFAULT_LABEL = 16; + +static const int H_GROUP_INDEX_DEFAULT = 82; +static const int H_GROUP_INDEX_TITLE_TEXT = 36; + +static const int X_ITEM_TYPE_3_ICON = 26; +static const int Y_ITEM_TYPE_3_ICON = 21; +static const int W_ITEM_TYPE_3_ICON = 0; +static const int H_ITEM_TYPE_3_ICON = 74; + +static const int H_GROUP_ITEM_DEFAULT = 114; +static const int W_GROUP_ITEM_DEFAULT = 720; + +static const int X_ITEM_TYPE_1_LABEL = 16; +static const int Y_ITEM_TYPE_1_LABEL = 0; +static const int W_ITEM_TYPE_1_LABEL = (720 - X_ITEM_TYPE_1_LABEL); +static const int H_ITEM_TYPE_1_LABEL = 114; + +static const int X_ITEM_TYPE_2_LABEL_MAIN = X_ITEM_TYPE_1_LABEL; +static const int Y_ITEM_TYPE_2_LABEL_MAIN = Y_ITEM_TYPE_1_LABEL; +static const int W_ITEM_TYPE_2_LABEL_MAIN = W_ITEM_TYPE_1_LABEL; +static const int H_ITEM_TYPE_2_LABEL_MAIN = 70; + +static const int X_ITEM_TYPE_2_LABEL_SUB = X_ITEM_TYPE_1_LABEL; +static const int Y_ITEM_TYPE_2_LABEL_SUB = H_ITEM_TYPE_2_LABEL_MAIN; +static const int H_ITEM_TYPE_2_LABEL_SUB = 48; + +static const int X_ITEM_TYPE_3_LABEL = (X_ITEM_TYPE_3_ICON + W_ITEM_TYPE_3_ICON); +static const int Y_ITEM_TYPE_3_LABEL = 0; +static const int W_ITEM_TYPE_3_LABEL = (W_ITEM_TYPE_2_LABEL_MAIN - X_ITEM_TYPE_3_LABEL); +static const int H_ITEM_TYPE_3_LABEL = H_ITEM_TYPE_1_LABEL; + +static const unsigned int COLOR_MAIN_TEXT = Color32<0, 0, 0>::Value; +static const unsigned int COLOR_SUB_TEXT = Color32<42, 137, 194>::Value; +static const unsigned int COLOR_GROUP_TITLE_TEXT = Color32<93, 110, 141>::Value; +static const unsigned int COLOR_BG_GROUP_INDEX_DEFAULT = Color32<249, 249, 249>::Value; +static const unsigned int COLOR_BG_GROUP_ITEM_DEFAULT = Color32<236, 240, 242>::Value; + +static const int FONT_SIZE_SUB_TEXT = 32; +static const int FONT_SIZE_GROUP_TITLE_TEXT = 32; + +static const int H_GROUP_INDEX_NO_TITLE_DEFAULT = 40; + +static const wchar_t* FONT_SIZE_SETTING_TYPE_GIANT = L"giant"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_HUGE = L"huge"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_LARGE = L"large"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_MEDIUM = L"medium"; + +static const int GROUP_SLIDESHOW = 0; +static const int GROUP_SUBTITLES = 1; +static const int GROUP_COUNT = 1; +static const int GROUP_INDEX_1 = 0; +static const int GROUP_INDEX_2 = 1; + +static const int SLIDESHOW_ITEM_COUNT = 2; +static const int SUBTITLES_ITEM_COUNT = 0; + +static const int ITEM_SLIDESHOW_INTERVAL = 0; +static const int ITEM_SLIDESHOW_TRANSITION = 1; + +static const int SETTING_INFO_KEY_INDEX_SLIDESHOW_INTERVAL = 0; +static const int SETTING_INFO_KEY_INDEX_SLIDESHOW_TRANSITION = 1; + +const int GAP_TWO_LINE_ITEM_WIDTH = 80; + +SettingMainForm::SettingMainForm(void) + : __pTableView(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingMainForm::~SettingMainForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingMainForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} +result +SettingMainForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel = SettingPresentationModel::GetInstance(); + + Header* pHeader = GetHeader(); + AppAssert(pHeader); + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY")); + + Rectangle bounds = GetClientAreaBounds(); + bounds.x = X_GROUP_DEFAULT; + bounds.y = Y_GROUP_DEFAULT; + bounds.width -= (bounds.x * GAP_WIDTH); + + __pTableView = new (std::nothrow) GroupedTableView(); + __pTableView->Construct(bounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_NONE); + __pTableView->SetItemProvider(this); + AddControl(*__pTableView); + __pTableView->SetGroupedLookEnabled(true); + __pTableView->AddGroupedTableViewItemEventListener(*this); + + InitializeFooter(); + SetFormBackEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +SettingMainForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +SettingMainForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + switch (actionId) + { + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + if (pApp->GetAppControlOperationId() == APPCONTROL_OPERATION_ID_CONFIGURE) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_TERMINATED, null); + } + pApp->Terminate(); + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingMainForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + Footer* pFooter = GetFooter(); + AppAssert(pFooter); + pFooter->RemoveAllItems(); + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + + pFooter->SetBackButton(); + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +SettingMainForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pTableView->UpdateTableView(); + UpdateTableViewCheckButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +TableViewGroupItem* +SettingMainForm::CreateGroupItem(int groupIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + + int itemHeight = H_GROUP_INDEX_DEFAULT; + LabelTextStyle style = LABEL_TEXT_STYLE_BOLD; + Rectangle itemRectangle; + String groupText = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME"); + + Label* pLabel = null; + + switch (groupIndex) + { + case GROUP_SLIDESHOW: + { + groupText = ResourceManager::GetString(L"IDS_MEDIABR_BUTTON_SLIDE_SHOW"); + } + break; + + default: + break; + } + + TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem(); + + itemRectangle.x = X_GROUP_ITEM_DEFAULT_LABEL; + itemRectangle.y = H_GROUP_INDEX_TITLE_TEXT; + itemRectangle.width = itemWidth; + itemRectangle.height = (itemHeight - H_GROUP_INDEX_TITLE_TEXT); + + pItem->Construct(Dimension(itemWidth, itemHeight)); + pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT); + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectangle, groupText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP); + pLabel->SetTextConfig(FONT_SIZE_GROUP_TITLE_TEXT, style); + pLabel->SetTextColor(COLOR_GROUP_TITLE_TEXT); + + pItem->AddControl(*pLabel); + pItem->SetEnabled(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +TableViewItem* +SettingMainForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + AppLogDebug("group[%d] item[%d]", groupIndex, itemIndex); + int fontSize = GetFontSize(); + unsigned int itemHeight = 0; + bool isTwoLineItemText = false; + bool isDrawBitmapIcon = true; + + Rectangle itemRectIcon; + Rectangle itemRectLabel; + Rectangle itemRectSecondLabel; + String itemText(L""); + String itemTextTwoLine(L""); + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + Bitmap* pBitmap = null; + Label* pLabel = null; + + itemHeight = H_GROUP_ITEM_DEFAULT_LABEL; + ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel); + + switch (groupIndex) + { + case GROUP_SLIDESHOW: + { + switch (itemIndex) + { + case ITEM_SLIDESHOW_INTERVAL: + { + isTwoLineItemText = true; + isDrawBitmapIcon = false; + ItemTypeTwoLine(itemRectLabel, itemRectSecondLabel, fontSize); + itemHeight = (itemRectLabel.height + itemRectSecondLabel.height); + + int returnValue = 0; + result r = __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, returnValue); + + AppLogDebug("interval(%d)", returnValue); + if (r == E_SUCCESS) + { + switch (returnValue) + { + case 2: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_OPT_2_SECONDS"); + } + break; + + case 3: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_OPT_3_SECONDS"); + } + break; + + case 5: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_BODY_5_SECONDS"); + } + break; + + case 10: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_BODY_10_SECONDS"); + } + break; + + case 20: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_BODY_20_SECONDS"); + } + break; + + default: + { + + } + break; + } + } + itemText = ResourceManager::GetString(L"IDS_IV_BODY_INTERVAL"); + } + break; + case ITEM_SLIDESHOW_TRANSITION: + { + isTwoLineItemText = true; + isDrawBitmapIcon = false; + ItemTypeTwoLine(itemRectLabel, itemRectSecondLabel, fontSize); + itemHeight = (itemRectLabel.height + itemRectSecondLabel.height); + + int returnValue = 0; + result r = __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, returnValue); + + if (r == E_SUCCESS) + { + switch (returnValue) + { + case 0: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDE"); + } + break; + case 1: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_EBOOK_BODY_PAGE"); + } + break; + + case 2: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_MEDIABR_BODY_DISSOLVE"); + } + break; + + case 3: + { + itemTextTwoLine = ResourceManager::GetString(L"IDS_IV_OPT_ZOOM"); + } + break; + + default: + { + } + break; + } + } + + itemText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_TRANSITION_EFFECT"); + } + break; + + default: + { + } + break; + } + } + break; + + case GROUP_SUBTITLES: + { + switch (itemIndex) + { + default: + { + } + break; + } + } + break; + + default: + break; + } + + TableViewItem* pItem = new (std::nothrow) TableViewItem(); + + if (pItem) + { + pItem->Construct(Dimension(W_GROUP_ITEM_DEFAULT, itemHeight), style); + pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT); + + if (isDrawBitmapIcon) + { + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectIcon, L""); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetBackgroundBitmap(*pBitmap); + + pItem->AddControl(*pLabel); + } + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectLabel, itemText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + pLabel->SetTextColor(COLOR_MAIN_TEXT); + + pItem->AddControl(*pLabel); + + if (isTwoLineItemText) + { + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectSecondLabel, itemTextTwoLine); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL); + pLabel->SetTextColor(COLOR_SUB_TEXT); + + pItem->AddControl(*pLabel); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +int +SettingMainForm::GetDefaultGroupItemHeight(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return H_GROUP_INDEX_NO_TITLE_DEFAULT; +} + +int +SettingMainForm::GetDefaultItemHeight(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return H_GROUP_ITEM_DEFAULT; +} + +bool +SettingMainForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + pItem = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +SettingMainForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +int +SettingMainForm::GetGroupCount(void) +{ + AppLogDebug("ENTER"); + int groupItemCount = GROUP_COUNT; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return groupItemCount; +} + +int +SettingMainForm::GetItemCount(int groupIndex) +{ + AppLogDebug("ENTER"); + + int itemCount = 0; + + switch (groupIndex) + { + case GROUP_INDEX_1: + { + itemCount = SLIDESHOW_ITEM_COUNT ; + } + break; + + case GROUP_INDEX_2: + { + itemCount = SUBTITLES_ITEM_COUNT ; + } + break; + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return itemCount; +} + +void +SettingMainForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, int itemIndex, + TableViewItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + AppLogDebug("Group(%d) index(%d)", groupIndex, itemIndex); + + switch (groupIndex) + { + case GROUP_SLIDESHOW: + { + + switch (itemIndex) + { + case ITEM_SLIDESHOW_INTERVAL: + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_INTERVAL)); + + break; + } + case ITEM_SLIDESHOW_TRANSITION: + { + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SETTING_TRANSITION)); + + break; + } + default: + { + + break; + } + } + } + break; + + case GROUP_SUBTITLES: + { + } + break; + + default: + { + } + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, int groupIndex, + int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingMainForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, + TableViewGroupItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +SettingMainForm::GetFontSize(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + int fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + String fontSizeValue(L""); + + if ((r = SettingInfo::GetValue(FONT_SIZE_SETTING_INFO_KEY, fontSizeValue)) == E_SUCCESS) + { + AppLogDebug("GetValue Fail [%s]", GetErrorMessage(r)); + + if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_GIANT, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_GIANT; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_HUGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_HUGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_LARGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_LARGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_MEDIUM, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + } + else + { + fontSize = FONT_MAIN_TEXT_SIZE_SMALL; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return fontSize; +} + +void +SettingMainForm::ItemTypeIconAndOneLine(Rectangle& icon, Rectangle& main) +{ + AppLogDebug("ENTER"); + icon.x = X_ITEM_TYPE_3_ICON; + icon.y = Y_ITEM_TYPE_3_ICON; + icon.width = W_ITEM_TYPE_3_ICON; + icon.height = H_ITEM_TYPE_3_ICON; + + main.x = X_ITEM_TYPE_3_LABEL; + main.y = Y_ITEM_TYPE_3_LABEL; + main.width = W_ITEM_TYPE_3_LABEL; + main.height = H_ITEM_TYPE_3_LABEL; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +SettingMainForm::GetSettingInfoItemStatus(int settingIndex) +{ + AppLogDebug("ENTER"); + int returnValue = 0; + + switch (settingIndex) + { + case SETTING_INFO_KEY_INDEX_SLIDESHOW_INTERVAL: + { + int realValue = 0; + __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL, + realValue); + switch (realValue) + { + case 2: + { + returnValue = 0; + break; + } + case 3: + { + returnValue = 1; + break; + } + case 5: + { + returnValue = 2; + break; + } + case 10: + { + returnValue = 3; + break; + } + case 20: + { + returnValue = 4; + break; + } + default: + { + returnValue = 0; + break; + } + } + + AppLogDebug("SETTINGS : interval (%d)", returnValue); + + break; + } + case SETTING_INFO_KEY_INDEX_SLIDESHOW_TRANSITION: + { + __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, SETTING_INFO_KEY_INDEX_SLIDESHOW_TRANSITION, + returnValue); + + AppLogDebug("SETTINGS : transition(%d)", returnValue); + + break; + } + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return returnValue; +} + +void +SettingMainForm::ItemTypeTwoLine(Rectangle& main, Rectangle& sub, int fontSize) +{ + Rectangle clientRect = GetClientAreaBounds(); + + if (fontSize > FONT_MAIN_TEXT_SIZE_LARGE) + { + main.x = X_ITEM_TYPE_2_LABEL_MAIN; + main.y = Y_ITEM_TYPE_2_LABEL_MAIN; + main.width = (clientRect.width - GAP_TWO_LINE_ITEM_WIDTH); + main.height = H_ITEM_TYPE_1_LABEL; + + sub.x = X_ITEM_TYPE_2_LABEL_SUB; + sub.y = H_ITEM_TYPE_1_LABEL; + sub.width = (clientRect.width - GAP_TWO_LINE_ITEM_WIDTH); + sub.height = H_ITEM_TYPE_2_LABEL_SUB; + } + else + { + main.x = X_ITEM_TYPE_2_LABEL_MAIN; + main.y = Y_ITEM_TYPE_2_LABEL_MAIN; + main.width = (clientRect.width - GAP_TWO_LINE_ITEM_WIDTH); + main.height = H_ITEM_TYPE_2_LABEL_MAIN; + + sub.x = X_ITEM_TYPE_2_LABEL_SUB; + sub.y = Y_ITEM_TYPE_2_LABEL_SUB; + sub.width = (clientRect.width - GAP_TWO_LINE_ITEM_WIDTH); + sub.height = H_ITEM_TYPE_2_LABEL_SUB; + } +} + +void +SettingMainForm::UpdateTableViewCheckButtonState(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlSettingPresentationModel.cpp b/src/GlSettingPresentationModel.cpp new file mode 100644 index 0000000..0230200 --- /dev/null +++ b/src/GlSettingPresentationModel.cpp @@ -0,0 +1,303 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingPresentationModel.cpp + * @brief This is the implementation file for SettingPresentationModel class. + */ + +#include +#include "GlSettingPresentationModel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Io; +using namespace std; + +static const int DEFAULT_VALUE_EFFECT_SLIDE = 0; +static const int DEFAULT_VALUE_INTERVAL = 3; + +const wchar_t* GALLERY_APP_ID = L"ijudt7w61q.Gallery"; + +const wchar_t* PATH_DATA_DIRECTORY = L"data/"; +const wchar_t* PATH_GALLERY_DEFAULT_SETTINGS = L"GalleryDefaultSettings.ini"; +const wchar_t* PATH_GALLERY_SETTINGS = L"GalleryUserSettings.ini"; + +const wchar_t* SECTION_GALLERY = L"GALLRY_SETTING"; +const wchar_t* SECTION_IMAGE_VIEWER = L"IMAGE_VIEWER_SETTING"; +const wchar_t* SECTION_VIDEO_PLAYER = L"VIDEO_PLAYER_SETTING"; + +const wchar_t* SLIDESHOW_INTERVAL_VALUE = L"SLIDESHOW_INTERVAL_VALUE"; +const wchar_t* TRANSITION_EFFECT_VALUE = L"TRANSITION_EFFECT_VALUE"; + +SettingPresentationModel* SettingPresentationModel::__pPresentationModelInstance = null; + +SettingPresentationModel::SettingPresentationModel(void) + :__pDefaultGalleryRegistry(null) + ,__pAppGalleryRegistry(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingPresentationModel::~SettingPresentationModel(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingPresentationModel* +SettingPresentationModel::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pPresentationModelInstance == null) + { + CreateInstance(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pPresentationModelInstance; +} + +result +SettingPresentationModel::Construct(void) +{ + AppLogDebug("ENTER"); + int valueRegistryNumber = 0; + String valueRegistryString = L""; + AppManager* pAppManager = AppManager::GetInstance(); + TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager"); + String pathGallerySetting = + pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_SETTINGS; + AppLogDebug("pathGallerySetting(%ls)", pathGallerySetting.GetPointer()); + + __pDefaultGalleryRegistry = new (std::nothrow) Registry(); + __pAppGalleryRegistry = new (std::nothrow) Registry(); + + result r = CreateDefaultRegistry(); + TryCatch(r == E_SUCCESS, , "CreateDefaultRegistry() failed[%s]", GetErrorMessage(r)); + + if (File::IsFileExist(pathGallerySetting) == true) + { + AppLogDebug("Already exist camcorder settings file"); + + __pAppGalleryRegistry->Construct(pathGallerySetting, "r+"); + } + else + { + __pAppGalleryRegistry->Construct(pathGallerySetting, "w+"); + r = __pAppGalleryRegistry->AddSection(SECTION_IMAGE_VIEWER); + TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r)); + + r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, SLIDESHOW_INTERVAL_VALUE, + valueRegistryNumber); + TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r)); + r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, SLIDESHOW_INTERVAL_VALUE, valueRegistryNumber); + TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r)); + + r = __pDefaultGalleryRegistry->GetValue(SECTION_IMAGE_VIEWER, TRANSITION_EFFECT_VALUE, + valueRegistryString); + TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r)); + r = __pAppGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, TRANSITION_EFFECT_VALUE, valueRegistryString); + TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r)); + + r = __pAppGalleryRegistry->Flush(); + TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r)); + r = __pDefaultGalleryRegistry->Flush(); + TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r)); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + delete __pDefaultGalleryRegistry; + __pDefaultGalleryRegistry = null; + + delete __pAppGalleryRegistry; + __pAppGalleryRegistry = null; + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +SettingPresentationModel::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pPresentationModelInstance = new (std::nothrow) SettingPresentationModel; + result r = __pPresentationModelInstance->Construct(); + + if (IsFailed(r) == true) + { + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + std::atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingPresentationModel::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + delete __pPresentationModelInstance; + __pPresentationModelInstance = null; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, int& value) const +{ + AppLogDebug("ENTER"); + result r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value); + TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::GetValue(const String& strSectionName, const String& entryName, String& value) const +{ + AppLogDebug("ENTER"); + result r = __pAppGalleryRegistry->GetValue(strSectionName, entryName, value); + TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::SetValue(const String& strSectionName, const String& entryName, const int value) +{ + AppLogDebug("ENTER"); + result r= __pAppGalleryRegistry->SetValue(strSectionName, entryName, value); + TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r)); + r = __pAppGalleryRegistry->Flush(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::SetValue(const String& strSectionName, const String& entryName, const String& value) +{ + AppLogDebug("ENTER"); + result r = __pAppGalleryRegistry->SetValue(strSectionName, entryName, value); + TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r)); + r = __pAppGalleryRegistry->Flush(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::CreateDefaultRegistry(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + AppManager* pAppManager = AppManager::GetInstance(); + TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager"); + String pathGalleryDefaultSetting = + pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_DEFAULT_SETTINGS; + AppLogDebug("pathGalleryDefaultSetting(%ls)", pathGalleryDefaultSetting.GetPointer()); + + if (File::IsFileExist(pathGalleryDefaultSetting)) + { + AppLogDebug("Already exist default settings file"); + + __pDefaultGalleryRegistry->Construct(pathGalleryDefaultSetting, "r+"); + } + else + { + AppLogDebug("Creating default settings file"); + + __pDefaultGalleryRegistry->Construct(pathGalleryDefaultSetting, "w+"); + r = __pDefaultGalleryRegistry->AddSection(SECTION_IMAGE_VIEWER); + TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r)); + + r = __pDefaultGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, SLIDESHOW_INTERVAL_VALUE, + DEFAULT_VALUE_INTERVAL); + TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r)); + + r = __pDefaultGalleryRegistry->AddValue(SECTION_IMAGE_VIEWER, TRANSITION_EFFECT_VALUE, + DEFAULT_VALUE_EFFECT_SLIDE); + TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r)); + + r = __pDefaultGalleryRegistry->Flush(); + TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r)); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +SettingPresentationModel::ResetGallerySettingsRegistry(void) +{ + AppLogDebug("ENTER"); + AppManager* pAppManager = AppManager::GetInstance(); + TryReturn(pAppManager != null, E_FAILURE, "Failed to get AppManager"); + String pathGallerySetting = + pAppManager->GetAppSharedPath(GALLERY_APP_ID) + PATH_DATA_DIRECTORY + PATH_GALLERY_SETTINGS; + + if (File::IsFileExist(pathGallerySetting)) + { + File::Remove(pathGallerySetting); + } + + result r = Construct(); + TryCatch(r == E_SUCCESS, , "CameraSettingsPresentationModel::Construct() failed[%s]", GetErrorMessage(r)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; + +CATCH: + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return r; +} diff --git a/src/GlSettingTransitionForm.cpp b/src/GlSettingTransitionForm.cpp new file mode 100644 index 0000000..6526abe --- /dev/null +++ b/src/GlSettingTransitionForm.cpp @@ -0,0 +1,618 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlSettingTransitionForm.cpp + * @brief This is the implementation file for SettingTransitionForm class. + */ + +#include "GlGalleryApp.h" +#include "GlResourceManager.h" +#include "GlSettingPresentationModel.h" +#include "GlSettingTransitionForm.h" +#include "GlTypes.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::System; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int FONT_MAIN_TEXT_SIZE_GIANT = 100; +static const int FONT_MAIN_TEXT_SIZE_HUGE = 70; +static const int FONT_MAIN_TEXT_SIZE_LARGE = 55; +static const int FONT_MAIN_TEXT_SIZE_NORMAL = 44; +static const int FONT_MAIN_TEXT_SIZE_SMALL = 32; + +static const int X_GROUP_DEFAULT = 16; +static const int Y_GROUP_DEFAULT = 0; +static const int GAP_WIDTH = 2; + +static const int H_GROUP_ITEM_DEFAULT_LABEL = 114; +static const int X_GROUP_ITEM_DEFAULT_LABEL = 16; + +static const int H_GROUP_INDEX_DEFAULT = 82; +static const int H_GROUP_INDEX_TITLE_TEXT = 36; + +static const int X_ITEM_TYPE_3_ICON = 26; +static const int Y_ITEM_TYPE_3_ICON = 21; +static const int W_ITEM_TYPE_3_ICON = 0; +static const int H_ITEM_TYPE_3_ICON = 74; + +static const int H_GROUP_ITEM_DEFAULT = 114; +static const int W_GROUP_ITEM_DEFAULT = 720; + +static const int X_ITEM_TYPE_1_LABEL = 16; +static const int W_ITEM_TYPE_1_LABEL = (720 - X_ITEM_TYPE_1_LABEL); +static const int H_ITEM_TYPE_1_LABEL = 114; + +static const int W_ITEM_TYPE_2_LABEL_MAIN = W_ITEM_TYPE_1_LABEL; + +static const int X_ITEM_TYPE_3_LABEL = (X_ITEM_TYPE_3_ICON + W_ITEM_TYPE_3_ICON); +static const int Y_ITEM_TYPE_3_LABEL = 0; +static const int W_ITEM_TYPE_3_LABEL = (W_ITEM_TYPE_2_LABEL_MAIN - X_ITEM_TYPE_3_LABEL); +static const int H_ITEM_TYPE_3_LABEL = H_ITEM_TYPE_1_LABEL; + +static const unsigned int COLOR_MAIN_TEXT = Color32<0, 0, 0>::Value; +static const unsigned int COLOR_GROUP_TITLE_TEXT = Color32<93, 110, 141>::Value; +static const unsigned int COLOR_BG_GROUP_INDEX_DEFAULT = Color32<249, 249, 249>::Value; +static const unsigned int COLOR_BG_GROUP_ITEM_DEFAULT = Color32<236, 240, 242>::Value; +static const int FONT_SIZE_GROUP_TITLE_TEXT = 32; + +static const int H_GROUP_INDEX_NO_TITLE_DEFAULT = 40; + +static const wchar_t* FONT_SIZE_SETTING_TYPE_GIANT = L"giant"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_HUGE = L"huge"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_LARGE = L"large"; +static const wchar_t* FONT_SIZE_SETTING_TYPE_MEDIUM = L"medium"; + +static const int GROUP_TRANSITION = 0; + +static const int GROUP_COUNT = 1; +static const int GROUP_INDEX_1 = 0; + +static const int TRANSITION_ITEM_COUNT = 4; + +static const int ITEM_SLIDESHOW_TRANSITION_EFFECT_SLIDE = 0; +static const int ITEM_SLIDESHOW_TRANSITION_EFFECT_PAGE = 1; +static const int ITEM_SLIDESHOW_TRANSITION_EFFECT_DISSOLVE = 2; +static const int ITEM_SLIDESHOW_TRANSITION_EFFECT_ZOOM = 3; + +SettingTransitionForm::SettingTransitionForm(void) + : __pTableView(null) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +SettingTransitionForm::~SettingTransitionForm(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingTransitionForm::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} +result +SettingTransitionForm::OnInitializing(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel = SettingPresentationModel::GetInstance(); + + Header* pHeader = GetHeader(); + AppAssert(pHeader); + pHeader->SetStyle(HEADER_STYLE_TITLE); + pHeader->SetTitleText(ResourceManager::GetString(L"IDS_COM_BODY_GALLERY")); + + Rectangle bounds = GetClientAreaBounds(); + bounds.x = X_GROUP_DEFAULT; + bounds.y = Y_GROUP_DEFAULT; + bounds.width -= (bounds.x * GAP_WIDTH); + + __pTableView = new (std::nothrow) GroupedTableView(); + + __pTableView->Construct(bounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_NONE); + __pTableView->SetItemProvider(this); + + AddControl(*__pTableView); + __pTableView->SetGroupedLookEnabled(true); + __pTableView->AddGroupedTableViewItemEventListener(*this); + + InitializeFooter(); + SetFormBackEventListener(this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +SettingTransitionForm::OnTerminating(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +SettingTransitionForm::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + switch (actionId) + { + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::OnFormBackRequested(Form& source) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_SETTING_MAIN)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +SettingTransitionForm::InitializeFooter(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + Footer* pFooter = GetFooter(); + AppAssert(pFooter); + pFooter->RemoveAllItems(); + pFooter->SetStyle(FOOTER_STYLE_BUTTON_ICON); + + pFooter->SetBackButton(); + + pFooter->AddActionEventListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +void +SettingTransitionForm::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pTableView->UpdateTableView(); + UpdateTableViewRedioButtonState(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +TableViewGroupItem* +SettingTransitionForm::CreateGroupItem(int groupIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + + int itemHeight = H_GROUP_INDEX_DEFAULT; + LabelTextStyle style = LABEL_TEXT_STYLE_BOLD; + Rectangle itemRectangle; + String groupText = ResourceManager::GetString(L"IDS_MEDIABR_POP_NO_NAME"); + Label* pLabel = null; + + switch (groupIndex) + { + case GROUP_TRANSITION: + { + groupText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_TRANSITION_EFFECT"); + } + break; + + default: + break; + } + + TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem(); + + itemRectangle.x = X_GROUP_ITEM_DEFAULT_LABEL; + itemRectangle.y = H_GROUP_INDEX_TITLE_TEXT; + itemRectangle.width = itemWidth; + itemRectangle.height = (itemHeight - H_GROUP_INDEX_TITLE_TEXT); + + pItem->Construct(Dimension(itemWidth, itemHeight)); + pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT); + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectangle, groupText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP); + pLabel->SetTextConfig(FONT_SIZE_GROUP_TITLE_TEXT, style); + pLabel->SetTextColor(COLOR_GROUP_TITLE_TEXT); + + pItem->AddControl(*pLabel); + pItem->SetEnabled(false); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +TableViewItem* +SettingTransitionForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) +{ + AppLogDebug("ENTER"); + AppLogDebug("group[%d] item[%d]", groupIndex, itemIndex); + + int fontSize = GetFontSize(); + + unsigned int itemHeight = 0; + bool isDrawBitmapIcon = true; + + Rectangle itemRectIcon; + Rectangle itemRectLabel; + Rectangle itemRectSecondLabel; + String itemText(L""); + String itemTextTwoLine(L""); + TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL; + Bitmap* pBitmap = null; + Label* pLabel = null; + + itemHeight = H_GROUP_ITEM_DEFAULT_LABEL; + ItemTypeIconAndOneLine(itemRectIcon, itemRectLabel); + + switch (groupIndex) + { + case GROUP_TRANSITION: + { + switch (itemIndex) + { + case ITEM_SLIDESHOW_TRANSITION_EFFECT_SLIDE: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_OPT_SLIDE"); + } + break; + case ITEM_SLIDESHOW_TRANSITION_EFFECT_PAGE: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_EBOOK_BODY_PAGE"); + } + break; + + case ITEM_SLIDESHOW_TRANSITION_EFFECT_DISSOLVE: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_MEDIABR_BODY_DISSOLVE"); + } + break; + + case ITEM_SLIDESHOW_TRANSITION_EFFECT_ZOOM: + { + style = TABLE_VIEW_ANNEX_STYLE_RADIO; + itemText = ResourceManager::GetString(L"IDS_IV_OPT_ZOOM"); + } + break; + + default: + { + } + break; + } + } + break; + + default: + break; + } + + TableViewItem* pItem = new (std::nothrow) TableViewItem(); + + if (pItem) + { + pItem->Construct(Dimension(W_GROUP_ITEM_DEFAULT, itemHeight), style); + pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT); + + if (isDrawBitmapIcon) + { + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectIcon, L""); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + pLabel->SetBackgroundBitmap(*pBitmap); + + pItem->AddControl(*pLabel); + } + + pLabel = new (std::nothrow) Label(); + pLabel->Construct(itemRectLabel, itemText); + pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL); + pLabel->SetTextColor(COLOR_MAIN_TEXT); + + pItem->AddControl(*pLabel); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +int +SettingTransitionForm::GetDefaultGroupItemHeight(void) +{ + return H_GROUP_INDEX_NO_TITLE_DEFAULT; +} + +int +SettingTransitionForm::GetDefaultItemHeight(void) +{ + return H_GROUP_ITEM_DEFAULT; +} + +bool +SettingTransitionForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + + delete pItem; + pItem = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +bool +SettingTransitionForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +int +SettingTransitionForm::GetGroupCount(void) +{ + int groupItemCount = GROUP_COUNT; + + return groupItemCount; +} + +int +SettingTransitionForm::GetItemCount(int groupIndex) +{ + AppLogDebug("ENTER"); + + int itemCount = 0; + + switch (groupIndex) + { + case GROUP_INDEX_1: + { + itemCount = TRANSITION_ITEM_COUNT ; + } + break; + + default: + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return itemCount; +} + +void +SettingTransitionForm::OnGroupedTableViewItemStateChanged(GroupedTableView& tableView, int groupIndex, + int itemIndex, TableViewItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + + AppLogDebug("Group(%d) index(%d)", groupIndex, itemIndex); + + switch (groupIndex) + { + case GROUP_TRANSITION: + { + switch (itemIndex) + { + case ITEM_SLIDESHOW_TRANSITION_EFFECT_SLIDE: + { + int inputValue = ITEM_SLIDESHOW_TRANSITION_EFFECT_SLIDE; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + case ITEM_SLIDESHOW_TRANSITION_EFFECT_PAGE: + { + int inputValue = ITEM_SLIDESHOW_TRANSITION_EFFECT_PAGE; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_TRANSITION_EFFECT_DISSOLVE: + { + int inputValue = ITEM_SLIDESHOW_TRANSITION_EFFECT_DISSOLVE; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + case ITEM_SLIDESHOW_TRANSITION_EFFECT_ZOOM: + { + int inputValue = ITEM_SLIDESHOW_TRANSITION_EFFECT_ZOOM; + __pPresentationModel->SetValue(SECTION_NAME_IMAGE_VIEWER, + ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, inputValue); + __pTableView->SetItemChecked(groupIndex, itemIndex, true); + AppLogDebug("SETTINGS : setvalue interval(%d)", inputValue); + } + break; + + default: + { + } + break; + } + UpdateTableViewRedioButtonState(itemIndex); + } + break; + + default: + { + } + break; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::UpdateGroupItem(int groupIndex, TableViewGroupItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::UpdateItem(int groupIndex, int itemIndex, TableViewItem* pItem) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::OnGroupedTableViewContextItemActivationStateChanged(GroupedTableView& tableView, + int groupIndex, int itemIndex, TableViewContextItem* pContextItem, bool activated) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::OnGroupedTableViewGroupItemStateChanged(GroupedTableView& tableView, int groupIndex, + TableViewGroupItem* pItem, TableViewItemStatus status) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +SettingTransitionForm::GetFontSize(void) +{ + AppLogDebug("ENTER"); + result r = E_SUCCESS; + + int fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + String fontSizeValue(L""); + + if ((r = SettingInfo::GetValue(FONT_SIZE_SETTING_INFO_KEY, fontSizeValue)) == E_SUCCESS) + { + AppLogDebug("GetValue Fail [%s]", GetErrorMessage(r)); + + if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_GIANT, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_GIANT; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_HUGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_HUGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_LARGE, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_LARGE; + } + else if (fontSizeValue.Equals(FONT_SIZE_SETTING_TYPE_MEDIUM, false)) + { + fontSize = FONT_MAIN_TEXT_SIZE_NORMAL; + } + else + { + fontSize = FONT_MAIN_TEXT_SIZE_SMALL; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return fontSize; +} + +void +SettingTransitionForm::ItemTypeIconAndOneLine(Rectangle& icon, Rectangle& main) +{ + AppLogDebug("ENTER"); + icon.x = X_ITEM_TYPE_3_ICON; + icon.y = Y_ITEM_TYPE_3_ICON; + icon.width = W_ITEM_TYPE_3_ICON; + icon.height = H_ITEM_TYPE_3_ICON; + + main.x = X_ITEM_TYPE_3_LABEL; + main.y = Y_ITEM_TYPE_3_LABEL; + main.width = W_ITEM_TYPE_3_LABEL; + main.height = H_ITEM_TYPE_3_LABEL; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +SettingTransitionForm::UpdateTableViewRedioButtonState(int senderIndex) +{ + AppLogDebug("ENTER senderIndex(%d)", senderIndex); + int selectedIndex = 0; + __pPresentationModel->GetValue(SECTION_NAME_IMAGE_VIEWER, ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT, + selectedIndex); + AppLogDebug("selectedIndex(%d)", selectedIndex); + + for (int i = 0; i < TRANSITION_ITEM_COUNT; ++i) + { + if (senderIndex != i) + { + if (selectedIndex == i) + { + __pTableView->SetItemChecked(GROUP_TRANSITION, i, true); + } + else + { + __pTableView->SetItemChecked(GROUP_TRANSITION, i, false); + } + __pTableView->RefreshItem(GROUP_TRANSITION, i, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlThumbnailEvent.cpp b/src/GlThumbnailEvent.cpp new file mode 100644 index 0000000..c1e7a2c --- /dev/null +++ b/src/GlThumbnailEvent.cpp @@ -0,0 +1,40 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailEvent.cpp + * @brief This is the implementation file for ThumbnailEvent class. + */ + +#include +#include "GlThumbnailEvent.h" +#include "GlThumbnailEventListener.h" + +using namespace Tizen::Base::Runtime; + +ThumbnailEvent::~ThumbnailEvent(void) +{ +} + +void +ThumbnailEvent::FireImpl(IEventListener& listener, const IEventArg& eventArg) +{ + IThumbnailEventListener* plistener = static_cast (&listener); + if (plistener != null) + { + plistener->OnThumbnailReceivedN(*(const_cast(&eventArg))); + } +} diff --git a/src/GlThumbnailEventArg.cpp b/src/GlThumbnailEventArg.cpp new file mode 100644 index 0000000..b0af791 --- /dev/null +++ b/src/GlThumbnailEventArg.cpp @@ -0,0 +1,58 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailEventArg.cpp + * @brief This is the implementation file for ThumbnailEventArg class. + */ + +#include +#include "GlThumbnailEventArg.h" +#include "GlThumbnailInfo.h" + +using namespace std; +using namespace Tizen::Graphics; + +ThumbnailEventArg::ThumbnailEventArg(ThumbnailInfo* pThumbnailInfo) + : _pThumbnailInfo(pThumbnailInfo) +{ +} + +ThumbnailEventArg::~ThumbnailEventArg(void) +{ + if (_pThumbnailInfo != null) + { + delete _pThumbnailInfo; + } +} + +ThumbnailInfo* +ThumbnailEventArg::GetThumbnailInfoN(void) +{ + if (_pThumbnailInfo == null) + { + return null; + } + + Bitmap* pBitmap = _pThumbnailInfo->GetBitmapN(); + ThumbnailInfo* pThumbnailInfo = new (std::nothrow) ThumbnailInfo(); + pThumbnailInfo->Construct(_pThumbnailInfo->GetContentId(), _pThumbnailInfo->GetFilePath(), + *pBitmap, _pThumbnailInfo->GetContentType(), _pThumbnailInfo->GetDuration()); + + delete pBitmap; + + return pThumbnailInfo; +} diff --git a/src/GlThumbnailInfo.cpp b/src/GlThumbnailInfo.cpp new file mode 100644 index 0000000..bee758c --- /dev/null +++ b/src/GlThumbnailInfo.cpp @@ -0,0 +1,127 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailInfo.cpp + * @brief This is the implementation file for ThumbnailInfo class. + */ + +#include +#include "GlThumbnailInfo.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Content; +using namespace Tizen::Graphics; + +ThumbnailInfo::ThumbnailInfo(void) + : __pBitmap(null) + , __contentType(CONTENT_TYPE_IMAGE) + , __duration(0) +{ +} + +ThumbnailInfo::~ThumbnailInfo(void) +{ +} + +void +ThumbnailInfo::Construct(const ContentId& contentId, const String& filePath, + const Bitmap& bitmap, const ContentType contentType, const long duration) +{ + __contentId = contentId; + __filePath = filePath; + __pBitmap = CloneBitmapN(bitmap); + __contentType = contentType; + __duration = duration; +} + +ContentId +ThumbnailInfo::GetContentId(void) const +{ + return __contentId; +} + +String +ThumbnailInfo::GetFilePath(void) const +{ + return __filePath; +} + +void +ThumbnailInfo::SetFilePath(const String& filePath) +{ + if (&filePath == null) + { + __filePath = EMPTY_SPACE; + } + else + { + __filePath = filePath; + } +} + +Bitmap* +ThumbnailInfo::GetBitmapN(void) const +{ + return CloneBitmapN(*__pBitmap); +} + +void +ThumbnailInfo::SetBitmap(const Bitmap& bitmap) +{ + __pBitmap = CloneBitmapN(bitmap); +} + +ContentType +ThumbnailInfo::GetContentType(void) const +{ + return __contentType; +} + +void +ThumbnailInfo::SetContentType(ContentType contentType) +{ + __contentType = contentType; +} + +long +ThumbnailInfo::GetDuration(void) const +{ + return __duration; +} + +void +ThumbnailInfo::SetDuration(long duration) +{ + __duration = duration; +} + +Bitmap* +ThumbnailInfo::CloneBitmapN(const Bitmap& bitmap) const +{ + Bitmap* pResultBitmap = null; + if (&bitmap != null) + { + Rectangle mainRect(0, 0, bitmap.GetWidth(), bitmap.GetHeight()); + Canvas mainCanvas; + mainCanvas.Construct(mainRect); + mainCanvas.DrawBitmap(mainRect, bitmap); + pResultBitmap = new (std::nothrow) Bitmap(); + pResultBitmap->Construct(mainCanvas,mainRect); + } + return pResultBitmap; +} diff --git a/src/GlThumbnailJob.cpp b/src/GlThumbnailJob.cpp new file mode 100644 index 0000000..5185898 --- /dev/null +++ b/src/GlThumbnailJob.cpp @@ -0,0 +1,64 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailJob.cpp + * @brief This is the implementation file for ThumbnailJob class. + */ + +#include +#include "GlThumbnailEvent.h" +#include "GlThumbnailJob.h" + +using namespace Tizen::Base::Runtime; +using namespace Tizen::Content; + +ThumbnailJob::ThumbnailJob(void) + : __requestId(0) + , __pRequestEvent(null) +{ +} + +ThumbnailJob::~ThumbnailJob(void) +{ +} + +void +ThumbnailJob::Construct(const ContentId& contentId, const unsigned long requestId, + const ThumbnailEvent* pRequestEvent) +{ + __contentId = contentId; + __requestId = requestId; + __pRequestEvent = pRequestEvent; +} + +ContentId +ThumbnailJob::GetContentId(void) const +{ + return __contentId; +} + +unsigned long +ThumbnailJob::GetRequestId() const +{ + return __requestId; +} + +const ThumbnailEvent* +ThumbnailJob::GetEvent(void) const +{ + return __pRequestEvent; +} diff --git a/src/GlThumbnailProvider.cpp b/src/GlThumbnailProvider.cpp new file mode 100644 index 0000000..b37e987 --- /dev/null +++ b/src/GlThumbnailProvider.cpp @@ -0,0 +1,480 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlThumbnailProvider.cpp + * @brief This is the implementation file for ThumbnailProvider class. + */ + +#include +#include +#include +#include "GlResourceManager.h" +#include "GlThumbnailEvent.h" +#include "GlThumbnailEventArg.h" +#include "GlThumbnailJob.h" +#include "GlThumbnailProvider.h" +#include "GlTypes.h" + +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Base::Runtime; +using namespace Tizen::Base::Utility; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; + +ThumbnailProvider* ThumbnailProvider::__pThumbnailProviderInstance = null; +ArrayList* ThumbnailProvider::__pThumbnailEventListener = null; + +ThumbnailProvider::ThumbnailProvider(void) + : __pMutexCmd(null) + , __pCmdQueue(null) + , __requestId(0) + , __appTerminating(false) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ThumbnailProvider::~ThumbnailProvider(void) +{ + AppLogDebug("ENTER"); + if (__pThumbnailProviderInstance != null) + { + __pThumbnailProviderInstance->Stop(); + __pThumbnailProviderInstance->Join(); + } + + if (__pThumbnailEventListener != null) + { + delete __pThumbnailEventListener; + } + + if (__pMutexCmd != null) + { + delete __pMutexCmd; + } + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ThumbnailProvider* +ThumbnailProvider::GetInstance(void) +{ + AppLogDebug("ENTER"); + if (__pThumbnailProviderInstance == null) + { + CreateInstance(); + __pThumbnailProviderInstance->Start(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __pThumbnailProviderInstance; +} + +result +ThumbnailProvider::Construct(void) +{ + AppLogDebug("ENTER"); + + __pThumbnailEventListener = new (std::nothrow) ArrayList(SingleObjectDeleter); + result r = __pThumbnailEventListener->Construct(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to set event listener", GetErrorMessage(r)); + + __pMutexCmd = new (std::nothrow) Mutex(); + r = __pMutexCmd->Create(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to create mutex", GetErrorMessage(r)); + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + } + __pCmdQueue = new (std::nothrow) ArrayList(SingleObjectDeleter); + r = __pCmdQueue->Construct(); + TryCatch(r == E_SUCCESS, , "[%s] Unable to construct queue", GetErrorMessage(r)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return EventDrivenThread::Construct(); + +CATCH: + if (__pThumbnailEventListener != null) + { + delete __pThumbnailEventListener; + __pThumbnailEventListener = null; + } + + if (__pMutexCmd != null) + { + delete __pMutexCmd; + __pMutexCmd = null; + } + + if (__pCmdQueue != null) + { + delete __pCmdQueue; + __pCmdQueue = null; + } + AppLogDebug("EXIT with exception(%s)", GetErrorMessage(GetLastResult())); + + return E_FAILURE; +} + +void +ThumbnailProvider::CreateInstance(void) +{ + AppLogDebug("ENTER"); + __pThumbnailProviderInstance = new (std::nothrow) ThumbnailProvider(); + result r = __pThumbnailProviderInstance->Construct(); + + if (IsFailed(r) == true) + { + delete __pThumbnailProviderInstance; + __pThumbnailProviderInstance = null; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + std::atexit(DestroyInstance); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::DestroyInstance(void) +{ + AppLogDebug("ENTER"); + delete __pThumbnailProviderInstance; + __pThumbnailProviderInstance = null; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::Release(void) +{ + AppLogDebug("ENTER"); + if (__pThumbnailProviderInstance != null) + { + delete __pThumbnailProviderInstance; + __pThumbnailProviderInstance = null; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::RequestThumbnail(const ContentId& contentId, const ThumbnailEvent* event) +{ + AppLogDebug("ENTER"); + AppLogDebug("[THREAD] Request Job - (MainThread)"); + + if (contentId.ToString().IsEmpty() == true || event == null + || __pMutexCmd == null || __pCmdQueue == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + + __pMutexCmd->Acquire(); + + ThumbnailJob* pThumbnailJob = new (std::nothrow) ThumbnailJob(); + pThumbnailJob->Construct(contentId, ++__requestId, event); + __pCmdQueue->Add(pThumbnailJob); + + __pMutexCmd->Release(); + + SendUserEvent(null, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::CancelThumbnailRequest(const ContentId& contentId, const ThumbnailEvent* event) +{ + AppLogDebug("ENTER"); + ThumbnailJob* pThumbnailJob = null; + + if (__pMutexCmd == null || __pCmdQueue == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + return; + } + + __pMutexCmd->Acquire(); + + int loopCount = __pCmdQueue->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + pThumbnailJob = static_cast(__pCmdQueue->GetAt(i)); + + if (pThumbnailJob != null + && pThumbnailJob->GetContentId() == contentId + && pThumbnailJob->GetEvent() == event) + { + AppLogDebug("ENTER i(%d) event(%x)", i, event); + __pCmdQueue->RemoveAt(i, true); + break; + } + } + __pMutexCmd->Release(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::ClearThumbnailRequests(bool appTerminating) +{ + AppLogDebug("ENTER"); + if (__pMutexCmd != null) + { + __pMutexCmd->Acquire(); + if (__pCmdQueue != null && __pCmdQueue->GetCount() > 0) + { + __pCmdQueue->RemoveAll(true); + } + + if (appTerminating == true) + { + __appTerminating = true; + } + __pMutexCmd->Release(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +bool +ThumbnailProvider::OnStart(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +ThumbnailProvider::OnStop(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +ThumbnailProvider::OnUserEventReceivedN(RequestId requestId, IList* pArgs) +{ + AppLogDebug("ENTER"); + AppLogDebug("[THREAD] Receive Job Message - (SubThread)"); + ThumbnailJob* pThumbnailJob = null; + ThumbnailInfo* pThumbnailInfo = null; + ContentId contentId; + + if (__pMutexCmd == null || __pCmdQueue == null) + { + delete pArgs; + AppLogDebug("EXIT1(%s)", GetErrorMessage(GetLastResult())); + return; + } + + __pMutexCmd->Acquire(); + if (__pCmdQueue->GetCount() > 0) + { + pThumbnailJob = static_cast(__pCmdQueue->GetAt(0)); + if (pThumbnailJob == null) + { + __pCmdQueue->RemoveAt(0); + __pMutexCmd->Release(); + return; + } + + unsigned long requestId = pThumbnailJob->GetRequestId(); + ContentId contentId = pThumbnailJob->GetContentId(); + __pMutexCmd->Release(); + + pThumbnailInfo = GetThumbnailInfoN(contentId); + + __pMutexCmd->Acquire(); + pThumbnailJob = static_cast(__pCmdQueue->GetAt(0)); + + if (pThumbnailJob != null && pThumbnailInfo != null && requestId == pThumbnailJob->GetRequestId()) + { + ContentType contentType = pThumbnailInfo->GetContentType(); + if (contentType == CONTENT_TYPE_IMAGE || contentType == CONTENT_TYPE_VIDEO) + { + ThumbnailEvent* pThumbnailEvent = const_cast(pThumbnailJob->GetEvent()); + if (pThumbnailEvent != null) + { + if (__appTerminating != true) + { + ThumbnailEventArg* pSendingArg = new (std::nothrow)ThumbnailEventArg(pThumbnailInfo); + pThumbnailEvent->Fire(*pSendingArg); + } + } + } + else + { + delete pThumbnailInfo; + } + __pCmdQueue->RemoveAt(0, true); + } + else + { + delete pThumbnailInfo; + } + } + __pMutexCmd->Release(); + + delete pArgs; + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +ThumbnailInfo* +ThumbnailProvider::GetThumbnailInfoN(const ContentId& contentId) const +{ + AppLogDebug("ENTER"); + ThumbnailInfo* pNewThumbnailInfo = null; + + ContentManager contentManager; + result r = contentManager.Construct(); + if (r == E_SUCCESS) + { + Bitmap* pBitmap = null; + long duration = 0; + + ContentInfo* pContentInfo = contentManager.GetContentInfoN(contentId); + + if (pContentInfo != null && GetLastResult() == E_SUCCESS) + { + pBitmap = pContentInfo->GetThumbnailN(); + + if (GetLastResult() != E_SUCCESS) + { + delete pContentInfo; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + if (pBitmap == null) + { + pBitmap = GetThumbnailByDecodeN(pContentInfo->GetContentPath(), pContentInfo->GetContentType()); + if (pBitmap == null) + { + pBitmap = ResourceManager::GetBitmapN(IDB_NO_CONTENTS_BROKEN); + } + } + pBitmap->Scale(DIMENSION_DEFAULT_THUMBNAIL); + } + else + { + delete pContentInfo; + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + + ContentType contentType = pContentInfo->GetContentType(); + if (contentType == CONTENT_TYPE_VIDEO) + { + VideoContentInfo* pVideoContentInfo = static_cast(pContentInfo); + duration = pVideoContentInfo->GetDuration(); + } + pNewThumbnailInfo = new (std::nothrow) ThumbnailInfo(); + pNewThumbnailInfo->Construct(contentId, pContentInfo->GetContentPath(), *pBitmap, contentType, duration); + delete pBitmap; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pNewThumbnailInfo; +} + +Bitmap* +ThumbnailProvider::GetThumbnailByDecodeN(const String& filePath, const ContentType contentType) const +{ + AppLogDebug("ENTER"); + Bitmap* pBitmap = null; + if (&filePath == null || filePath.GetLength() <= 0) + { + pBitmap = new (std::nothrow) Bitmap(); + pBitmap->Construct(DIMENSION_DEFAULT_THUMBNAIL, BITMAP_PIXEL_FORMAT_RGB565); + } + else + { + if (contentType == CONTENT_TYPE_IMAGE) + { + ImageBuffer pImageBuffer; + result r = pImageBuffer.Construct(filePath); + if (r == E_SUCCESS) + { + pBitmap = pImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_AUTO); + } + } + else if (contentType == CONTENT_TYPE_VIDEO) + { + VideoFrameExtractor extractor; + result r = extractor.Construct(filePath, MEDIA_PIXEL_FORMAT_RGB565LE); + if (r == E_SUCCESS) + { + ImageBuffer* pImageBuffer = extractor.GetFrameN(0); + if (pImageBuffer != null) + { + pBitmap = pImageBuffer->GetBitmapN(BITMAP_PIXEL_FORMAT_RGB565, BUFFER_SCALING_AUTO); + delete pImageBuffer; + } + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pBitmap; +} + +String +ThumbnailProvider::GetFileNameFromFullPath(const String& fullPath, bool withExt) const +{ + AppLogDebug("ENTER"); + if (fullPath.CompareTo(EMPTY_SPACE) == 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return EMPTY_SPACE; + } + + String delim(DIRECTORY_SEPARATOR); + StringTokenizer st(fullPath,delim); + String token; + while (st.HasMoreTokens()) + { + st.GetNextToken(token); + } + + if (withExt == true) + { + AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult())); + + return token; + } + else + { + String subDelim(FILE_EXT_SEPARATOR); + StringTokenizer subSt(token, subDelim); + String subToken; + subSt.GetNextToken(subToken); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return subToken; + } +} diff --git a/src/GlTypes.cpp b/src/GlTypes.cpp new file mode 100644 index 0000000..f71e463 --- /dev/null +++ b/src/GlTypes.cpp @@ -0,0 +1,133 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlTypes.cpp + * @brief This is the implementation file for Types definition + */ + +#include +#include "GlTypes.h" + +using namespace Tizen::Graphics; + +const wchar_t* IDC_FORM_ALBUM_LIST = L"AlbumListForm"; +const wchar_t* IDC_FORM_ALBUM_LIST_EDITOR = L"AlbumListEditorForm"; +const wchar_t* IDC_FORM_ALBUM_NAME_EDITOR = L"AlbumNameEditorForm"; +const wchar_t* IDC_FORM_FILE_LIST = L"FileListForm"; +const wchar_t* IDC_FORM_FILE_LIST_EDITOR = L"FileListEditorForm"; +const wchar_t* IDC_FORM_SETTING_MAIN = L"SettingMainForm"; +const wchar_t* IDC_FORM_SETTING_INTERVAL = L"SettingIntervalForm"; +const wchar_t* IDC_FORM_SETTING_TRANSITION = L"SettingTransitionForm"; + +const wchar_t* IDC_PANEL_BLANK = L""; +const wchar_t* IDC_PANEL_ALL_LIST = L"AllListPanel"; +const wchar_t* IDC_PANEL_IMAGE_LIST = L"ImageListPanel"; +const wchar_t* IDC_PANEL_VIDEO_LIST = L"VideoListPanel"; +const wchar_t* IDC_PANEL_ALL_LIST_EDITOR = L"AllListEditorPanel"; +const wchar_t* IDC_PANEL_IMAGE_LIST_EDITOR = L"ImageListEditorPanel"; +const wchar_t* IDC_PANEL_VIDEO_LIST_EDITOR = L"VideoListEditorPanel"; +const wchar_t* IDC_PANEL_ALL_LIST_SELECTION = L"AllListSelectionPanel"; + +const wchar_t* IDSCN_ALBUM_LIST = L"SceneAlbumList"; +const wchar_t* IDSCN_ALBUM_LIST_EDITOR = L"SceneAlbumListEditor"; +const wchar_t* IDSCN_ALBUM_NAME_EDITOR = L"SceneAlbumNameEditor"; +const wchar_t* IDSCN_ALL_LIST = L"SceneFileAllList"; +const wchar_t* IDSCN_IMAGE_LIST = L"SceneFileImageList"; +const wchar_t* IDSCN_VIDEO_LIST = L"SceneFileVideoList"; +const wchar_t* IDSCN_ALL_LIST_EDITOR = L"SceneFileAllListEditor"; +const wchar_t* IDSCN_IMAGE_LIST_EDITOR = L"SceneFileImageListEditor"; +const wchar_t* IDSCN_VIDEO_LIST_EDITOR = L"SceneFileVideoListEditor"; +const wchar_t* IDSCN_ALL_LIST_SELECTION = L"SceneFileAllListSelection"; +const wchar_t* IDSCN_SETTING_MAIN = L"SceneMainSetting"; +const wchar_t* IDSCN_SETTING_INTERVAL = L"SceneInvervalSetting"; +const wchar_t* IDSCN_SETTING_TRANSITION = L"SceneTransitionSetting"; + +const wchar_t* APPCONTROL_PROVIDER_ID_CAMERA = L"tizen.camera"; +const wchar_t* APPCONTROL_PROVIDER_ID_MESSAGE = L"tizen.messages"; +const wchar_t* APPCONTROL_PROVIDER_ID_EMAIL = L"tizen.email"; +const wchar_t* APPCONTROL_PROVIDER_ID_IMAGE = L"tizen.imageviewer"; + +const wchar_t* APPCONTROL_OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/pick"; +const wchar_t* APPCONTROL_OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/view"; +const wchar_t* APPCONTROL_OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture"; +const wchar_t* APPCONTROL_OPERATION_ID_CREATECONTENT = L"http://tizen.org/appcontrol/operation/createcontent"; +const wchar_t* APPCONTROL_OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose"; +const wchar_t* APPCONTROL_OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure"; +const wchar_t* APPCONTROL_OPERATION_ID_MAIN = L"http://tizen.org/appcontrol/operation/main"; + +const wchar_t* APPCONTROL_KEY_TYPE = L"type"; +const wchar_t* APPCONTROL_KEY_MEDIA_TYPE = L"mediaType"; +const wchar_t* APPCONTROL_KEY_PATH = L"path"; +const wchar_t* APPCONTROL_KEY_INDEX = L"index"; +const wchar_t* APPCONTROL_KEY_ATTACHMENTS = L"attachments"; +const wchar_t* APPCONTROL_KEY_SELECTION_MODE = L"selectionMode"; +const wchar_t* APPCONTROL_KEY_DATA_SELECTED = L"http://tizen.org/appcontrol/data/selected"; + +const wchar_t* APPCONTROL_DATA_CAMERA = L"camera"; +const wchar_t* APPCONTROL_DATA_IMAGE = L"image"; +const wchar_t* APPCONTROL_DATA_VIDEO = L"video"; +const wchar_t* APPCONTROL_DATA_SINGLE = L"single"; +const wchar_t* APPCONTROL_DATA_MULTIPLE = L"multiple"; +const wchar_t* APPCONTROL_DATA_SLIDE_SHOW = L"slideshow"; + +const wchar_t* APPCONTROL_RESULT_KEY_LEGACY_RESULT = L"http://tizen.org/appcontrol/data/legacyresult"; + +const Dimension DIMENSION_DEFAULT_THUMBNAIL = Dimension(158,158); +const int FOLDER_BITMAP_MAX = 7; + +const wchar_t* EMPTY_SPACE = L""; +const wchar_t* SINGLE_SPACE = L" "; + +const wchar_t* DIRECTORY_SEPARATOR = L"/"; +const wchar_t* FILE_EXT_SEPARATOR = L"."; +const wchar_t* MULTI_ITEM_SEPARATOR = L";"; + +const wchar_t* CONTENT_EXT_PNG = L".png"; +const wchar_t* CONTENT_EXT_BMP = L".bmp"; +const wchar_t* CONTENT_EXT_JPG = L".jpg"; +const wchar_t* CONTENT_EXT_GIF = L".gif"; +const wchar_t* CONTENT_EXT_TIF = L".tif"; +const wchar_t* CONTENT_EXT_MP4 = L".mp4"; +const wchar_t* CONTENT_EXT_3GP = L".3gp"; +const wchar_t* CONTENT_EXT_AVI = L".avi"; +const wchar_t* CONTENT_EXT_RM = L".rm"; +const wchar_t* CONTENT_EXT_WMV = L".wmv"; +const wchar_t* CONTENT_EXT_ASF = L".asf"; + +const wchar_t* SECTION_NAME_GALLERY = L"GALLRY_SETTING"; +const wchar_t* SECTION_NAME_IMAGE_VIEWER = L"IMAGE_VIEWER_SETTING"; +const wchar_t* SECTION_NAME_VIDEO_PLAYER = L"VIDEO_PLAYER_SETTING"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_INTERVAL = L"SLIDESHOW_INTERVAL_VALUE"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_TRANSITION_EFFECT = L"TRANSITION_EFFECT_VALUE"; +const wchar_t* ENTRY_NAME_IMAGE_VIEWER_SLIDESHOW_MUSIC = L"MUSIC_VALUE"; + +const wchar_t* FONT_SIZE_SETTING_INFO_KEY = L"http://tizen.org/setting/font.size"; + +const wchar_t* IDB_BUTTON_CIRCLE_BACKGROUND = L"T01_button_circle_bg_normal.png"; +const wchar_t* IDB_BUTTON_RENAME = L"T01_button_rename.png"; +const wchar_t* IDB_CONTROLBAR_CAMERA = L"T01_controlbar_icon_camera.png"; +const wchar_t* IDB_CONTROLBAR_DELETE = L"T01_controlbar_icon_delete.png"; +const wchar_t* IDB_CONTROLBAR_MORE = L"T01_controlbar_icon_more.png"; +const wchar_t* IDB_CONTROLBAR_SHARE = L"T01_controlbar_icon_share02.png"; +const wchar_t* IDB_LISTVIEW_EMPTY = L"T01_Nocontents_picture.png"; +const wchar_t* IDB_MAIN_FOLDER_BACKGROUND = L"T01_main_folder_bg.png"; +const wchar_t* IDB_VIDEOTHUMBNAIL_BG = L"T01_places_thumbnail_bg.png"; +const wchar_t* IDB_VIDEOTHUMBNAIL_BOOKMARK = L"T01_icon_thumbnail_bookmark.png"; +const wchar_t* IDB_VIDEOTHUMBNAIL_FAVORITE = L"T01_icon_thumbnail_favorite.png"; +const wchar_t* IDB_VIDEOTHUMBNAIL_PLAY = L"T01_btn_play.png"; +const wchar_t* IDB_BUTTON_MOVE_SELECTION = L"T01_button_reveal.png"; +const wchar_t* IDB_NO_CONTENTS_BROKEN = L"T01_Nocontents_broken.png"; diff --git a/src/GlVideoListEditorPanel.cpp b/src/GlVideoListEditorPanel.cpp new file mode 100644 index 0000000..5ed5ebd --- /dev/null +++ b/src/GlVideoListEditorPanel.cpp @@ -0,0 +1,832 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlVideoListEditorPanel.cpp + * @brief This is the implementation file for VideoListEditorPanel class. + */ + +#include +#include +#include "GlAlbumInfo.h" +#include "GlCommonUtil.h" +#include "GlFileListPresentationModel.h" +#include "GlGalleryApp.h" +#include "GlResourceManager.h" +#include "GlTypes.h" +#include "GlVideoListEditorPanel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value; +static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value; +static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value; +static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK)); +static const Rectangle RECT_VIDEO_THUMBNAIL(16, 16, 172, 128); +static const Rectangle RECT_INITIAL(0, 0, 10, 10); + +static const int H_SELECTALL_REGION = 112; +static const int ALPHA_THUMBNAIL_DIM = 70; +static const int H_COUNT_LABEL = 48; +static const int LENGTH_COUNT_LABEL = 256; +static const int W_CLIENT_REGION = 720; +static const int H_VIDEO_ITEM = 160; +static const int GAP_W_VIDEO_TITLE = 16+172+16; +static const int GAP_H_VIDEO_TITLE = 22; +static const int W_VIDEO_TITLE = (16+172+16)+(16+64+16); +static const int H_VIDEO_TITLE = 64; +static const int FONT_SIZE_TITLE = 36; +static const int GAP_W_VIDEO_DURATION = 16+172+16; +static const int GAP_H_VIDEO_DURATION = 22+64; +static const int W_VIDEO_DURATION = (16+172+16)+(16+64+16); +static const int H_VIDEO_DURATION = 48; +static const int FONT_SIZE_DURATION = 32; + +VideoListEditorPanel::VideoListEditorPanel() + : __pContentListView(null) + , __pCheckButton(null) + , __pLabelSelectCnt(null) + , __itemCount(0) + , __pPresentationModel(null) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +VideoListEditorPanel::~VideoListEditorPanel() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +VideoListEditorPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +VideoListEditorPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + __itemCount = 0; + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + SetBounds(clientAreaBounds); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + __pContentListView = new (std::nothrow) ListView(); + + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + __pContentListView->Construct(Rectangle(0, 0, W_CLIENT_REGION, clientAreaBounds.height), true, false); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentListView->SetItemProvider(*this); + __pContentListView->AddListViewItemEventListener(*this); + AddControl(*__pContentListView); + __pContentListView->SetShowState(true); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt = new (std::nothrow) Label(); + __pLabelSelectCnt->Construct( + Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), + strTmp); + __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL); + __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pLabelSelectCnt); + } + else + { + __pContentListView->Construct(Rectangle(0, 0, W_CLIENT_REGION, clientAreaBounds.height),true, false); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentListView->SetItemProvider(*this); + __pContentListView->AddListViewItemEventListener(*this); + AddControl(*__pContentListView); + __pContentListView->SetShowState(true); + } + } + else + { + Panel* pCheckPanel = new (std::nothrow) Panel(); + pCheckPanel->Construct(Rectangle(0, 0, clientAreaBounds.width, H_SELECTALL_REGION)); + pCheckPanel->SetBackgroundColor(COLOR_SELECTALL_REGION); + __pCheckButton = new (std::nothrow) CheckButton(); + __pCheckButton->Construct(pCheckPanel->GetBounds(), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT, + false, ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL")); + __pCheckButton->SetActionId(ACTION_ID_SELECTALL_CHECKED, ACTION_ID_SELECTALL_UNCHECKED); + __pCheckButton->AddActionEventListener(*this); + pCheckPanel->AddControl(*__pCheckButton); + AddControl(*pCheckPanel); + + __pContentListView = new (std::nothrow) ListView(); + __pContentListView->Construct( + Rectangle(0, H_SELECTALL_REGION, W_CLIENT_REGION, clientAreaBounds.height-H_SELECTALL_REGION), + true, false); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentListView->SetItemProvider(*this); + __pContentListView->AddListViewItemEventListener(*this); + AddControl(*__pContentListView); + __pContentListView->SetShowState(true); + + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0); + __pLabelSelectCnt = new (std::nothrow) Label(); + __pLabelSelectCnt->Construct( + Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL), + strTmp); + __pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER); + __pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL); + __pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT)); + AddControl(*__pLabelSelectCnt); + + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +VideoListEditorPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +VideoListEditorPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + pSceneManager->GoForward(ForwardSceneTransition(IDSCN_VIDEO_LIST)); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnActionPerformed(const Control& source, int actionId) +{ + AppLogDebug("ENTER"); + SceneManager* pSceneManager = SceneManager::GetInstance(); + TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult())); + + switch (actionId) + { + case ACTION_ID_SELECTALL_CHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentListView->IsItemChecked(i) == false) + { + __pContentListView->SetItemChecked(i,true); + __pContentListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + break; + } + case ACTION_ID_SELECTALL_UNCHECKED: + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentListView->IsItemChecked(i) == true) + { + __pContentListView->SetItemChecked(i,false); + } + } + + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pContentListView->UpdateList(); + break; + } + default: + { + break; + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +VideoListEditorPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +ListItemBase* +VideoListEditorPanel::CreateItem(int index, int itemWidth) +{ + AppLogDebug("ENTER : index(%d)", index); + CustomItem* pItem = new (std::nothrow) CustomItem(); + + Bitmap* pBitmap = null; + String* pItemText = null; + String* pTitle = null; + String* pDuration = null; + + result r = __pPresentationModel->GetThumbnailVideoInSyncCacheN(index, pItemText, pBitmap, pDuration); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + if (pItemText == null) + { + pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + pTitle = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + + if (pDuration == null) + { + pDuration = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE")); + } + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK); + + if (__pContentListView->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + + Color dimColor(COLOR_THUMBNAIL_DIM); + dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM); + + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap, + pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + else + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return null; + } + } + else + { + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap); + } + + if (pTitle == null) + { + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + else if (pTitle->IsEmpty() == true) + { + delete pTitle; + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + + Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE); + pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE, + Color::GetColor(COLOR_ID_BLACK),null,null,false); + + Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION, + H_VIDEO_DURATION); + pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION, + Color::GetColor(COLOR_ID_GREY),null,null,false); + } + else + { + pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_NORMAL); + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap); + + if (pTitle == null) + { + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + else if (pTitle->IsEmpty() == true) + { + delete pTitle; + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + + Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE); + pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE, + Color::GetColor(COLOR_ID_BLACK),null,null,false); + + Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION, + H_VIDEO_DURATION); + pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION, + Color::GetColor(COLOR_ID_GREY),null,null,false); + } + } + else + { + pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_MARK); + if (__pContentListView->IsItemChecked(index) == true) + { + if (pBitmap != null) + { + BufferInfo bufferInfo; + pBitmap->Lock(bufferInfo, INFINITE); + pBitmap->Unlock(); + Color dimColor(COLOR_THUMBNAIL_DIM); + dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM); + + Canvas canvas; + canvas.Construct(bufferInfo); + canvas.FillRectangle(dimColor, canvas.GetBounds()); + + Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap(); + pSelectedBitmap->Construct(canvas, canvas.GetBounds()); + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap, pSelectedBitmap); + delete pSelectedBitmap; + pSelectedBitmap = null; + } + else + { + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap); + } + } + else + { + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap); + } + + if (pTitle == null) + { + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + else if (pTitle->IsEmpty() == true) + { + delete pTitle; + pTitle = new (std::nothrow) String(SINGLE_SPACE); + } + + Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE); + pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE, + Color::GetColor(COLOR_ID_BLACK),null,null,false); + + Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth - W_VIDEO_DURATION, + H_VIDEO_DURATION); + pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION, + Color::GetColor(COLOR_ID_GREY),null,null,false); + } + + if (pBitmap != null) + { + delete pBitmap; + } + if (pItemText != null) + { + delete pItemText; + } + if (pTitle != null) + { + delete pTitle; + } + if (pDuration != null) + { + delete pDuration; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +bool +VideoListEditorPanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +VideoListEditorPanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId, + ListItemStatus status) +{ + AppLogDebug("ENTER"); + + if (status == LIST_ITEM_STATUS_CHECKED || status == LIST_ITEM_STATUS_UNCHECKED) + { + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE) + { + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + else + { + int checkedCount = GetItemCheckedCount(); + String strTmp; + strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", + ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount); + __pLabelSelectCnt->SetText(strTmp); + __pLabelSelectCnt->RequestRedraw(true); + if (__pCheckButton->IsSelected()) + { + __pCheckButton->SetSelected(false); + } + __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + } + + if ( __pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK + && __pPresentationModel->GetAppControlSelectionMode() != APPCONTROL_SELECTION_MODE_MULTIPLE) + { + if (status == LIST_ITEM_STATUS_SELECTED) + { + HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter); + result r = map->Construct(); + if (r == E_SUCCESS) + { + map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index))); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index))); + + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map); + pApp->Terminate(); + } + else + { + delete map; + } + } + else + { + delete map; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId, + ListContextItemStatus status) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_VIDEO) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (currentSceneId == IDSCN_VIDEO_LIST_EDITOR) + { + if (previousSceneId == IDSCN_ALBUM_LIST) + { + AlbumInfo* pAlbumInfo = static_cast(pArgs->GetAt(0)); + if (pAlbumInfo == null) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + IList* pDirectoryList = pAlbumInfo->GetDirectoryListN(); + __pPresentationModel->SetCurrentAlbumInfo(pAlbumInfo->GetAlbumName(), *pDirectoryList); + + if (pDirectoryList != null) + { + delete pDirectoryList; + } + delete pArgs; + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + } + } + } + else + { + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->RequestRedraw(true); + } + + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +VideoListEditorPanel::GetItemCheckedCount(void) const +{ + AppLogDebug("ENTER"); + int count = 0; + if (__pContentListView != null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentListView->IsItemChecked(i)) + { + ++count; + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return count; +} + +IList* +VideoListEditorPanel::GetItemCheckedIndexList(void) const +{ + AppLogDebug("ENTER"); + IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter); + Integer* pIndex=null; + + if (__pContentListView != null) + { + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + if (__pContentListView->IsItemChecked(i)) + { + pIndex = new (std::nothrow) Integer(i); + pList->Add(pIndex); + } + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pList; +} + +void +VideoListEditorPanel::OnRequestDeleteAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + + if (pIndexList == null || pIndexList->GetCount() <= 0 || __pPresentationModel == null) + { + delete pIndexList; + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + __pPresentationModel->DeleteContentFileList(*pIndexList); + delete pIndexList; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnRequestEmailAction(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + if (pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + String path; + + int loopCount = pIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + path = __pPresentationModel->GetContentFilePath(i); + + if ( path.EndsWith(CONTENT_EXT_PNG) + || path.EndsWith(CONTENT_EXT_BMP) + || path.EndsWith(CONTENT_EXT_JPG) + || path.EndsWith(CONTENT_EXT_GIF) + || path.EndsWith(CONTENT_EXT_TIF) + || path.EndsWith(CONTENT_EXT_MP4) + || path.EndsWith(CONTENT_EXT_3GP) + || path.EndsWith(CONTENT_EXT_AVI) + || path.EndsWith(CONTENT_EXT_RM) + || path.EndsWith(CONTENT_EXT_WMV) + || path.EndsWith(CONTENT_EXT_ASF) + ) + { + if (combineText.CompareTo(EMPTY_SPACE) != 0) + { + combineText.Append(L";"); + } + combineText.Append(path); + } + } + + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), + new (std::nothrow) String(combineText)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, + APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnRequestMoveToAction(String& destDirectory) +{ + AppLogDebug("ENTER"); + if (&destDirectory == null || destDirectory.IsEmpty()) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + IList* pIndexList = GetItemCheckedIndexList(); + if (pIndexList == null || pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory); + delete pIndexList; + pIndexList = null; + TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction"); + + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void) +{ + AppLogDebug("ENTER"); + IList* pIndexList = GetItemCheckedIndexList(); + + if (pIndexList->GetCount() <= 0) + { + AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult())); + + return; + } + + String combineText; + + int loopCount = pIndexList->GetCount(); + for (int i = 0; i < loopCount; ++i) + { + combineText.Append(__pPresentationModel->GetContentFilePath(i)); + combineText.Append(L";"); + } + + HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter); + map->Construct(); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(combineText)); + map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), + new (std::nothrow) String(combineText)); + + GalleryApp* pApp = dynamic_cast(UiApp::GetInstance()); + if (pApp != null) + { + pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map); + pApp->Terminate(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} diff --git a/src/GlVideoListPanel.cpp b/src/GlVideoListPanel.cpp new file mode 100644 index 0000000..bf281c4 --- /dev/null +++ b/src/GlVideoListPanel.cpp @@ -0,0 +1,322 @@ +// +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Flora License, Version 1.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://floralicense.org/license/ +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file GlVideoListPanel.cpp + * @brief This is the implementation file for VideoListPanel class. + */ + +#include +#include +#include "GlAlbumInfo.h" +#include "GlCommonUtil.h" +#include "GlFileListForm.h" +#include "GlFileListPresentationModel.h" +#include "GlTypes.h" +#include "GlVideoListPanel.h" + +using namespace Tizen::App; +using namespace Tizen::Base; +using namespace Tizen::Base::Collection; +using namespace Tizen::Content; +using namespace Tizen::Graphics; +using namespace Tizen::Media; +using namespace Tizen::Ui; +using namespace Tizen::Ui::Controls; +using namespace Tizen::Ui::Scenes; + +static const int H_VIDEO_ITEM = 160; +static const int GAP_W_VIDEO_TITLE = 16+172+16; +static const int GAP_H_VIDEO_TITLE = 22; +static const int W_VIDEO_TITLE = (16+172+16)+(16+64+16); +static const int H_VIDEO_TITLE = 64; +static const int FONT_SIZE_TITLE = 36; +static const int GAP_W_VIDEO_DURATION = 16+172+16; +static const int GAP_H_VIDEO_DURATION = 22+64; +static const int W_VIDEO_DURATION = (16+172+16)+(16+64+16); +static const int H_VIDEO_DURATION = 48; +static const int FONT_SIZE_DURATION = 32; +static const int W_CLIENT_REGION = 720; +static const Rectangle RECT_INITIAL (0, 0, 10, 10); +static const Rectangle RECT_VIDEO_THUMBNAIL (16, 16, 172, 128); + +VideoListPanel::VideoListPanel() + : __pContentListView(null) + , __itemCount(0) + , __pPresentationModel(0) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +VideoListPanel::~VideoListPanel() +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +result +VideoListPanel::Initialize(void) +{ + AppLogDebug("ENTER"); + result r = Construct(RECT_INITIAL); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return r; +} + +result +VideoListPanel::OnInitializing(void) +{ + AppLogDebug("ENTER"); + const Form* pForm = dynamic_cast(GetParent()); + TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult())); + + __pPresentationModel = FileListPresentationModel::GetInstance(); + __pPresentationModel->ClearThumbnailRequests(); + __pPresentationModel->AddPresentationModelListener(this); + + Rectangle clientAreaBounds = pForm->GetClientAreaBounds(); + clientAreaBounds.x = clientAreaBounds.y = 0; + SetBounds(clientAreaBounds); + __pContentListView = new (std::nothrow) ListView(); + __pContentListView->Construct(Rectangle(0, 0, W_CLIENT_REGION, clientAreaBounds.height), true, false); + Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY); + if (pBitmapEmpty != null) + { + __pContentListView->SetBitmapOfEmptyList(pBitmapEmpty); + delete pBitmapEmpty; + pBitmapEmpty = null; + } + __pContentListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS")); + __pContentListView->SetItemProvider(*this); + __pContentListView->AddListViewItemEventListener(*this); + AddControl(*__pContentListView); + __pContentListView->SetShowState(true); + __itemCount = 0; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +result +VideoListPanel::OnTerminating(void) +{ + AppLogDebug("ENTER"); + __pPresentationModel->RemovePresentationModelListener(*this); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return E_SUCCESS; +} + +void +VideoListPanel::OnUpdateContentList() +{ + AppLogDebug("ENTER"); + if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK) + { + if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_IMAGE); + } + else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + } + } + else + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL); + } + + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +int +VideoListPanel::GetItemCount(void) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return __itemCount; +} + +ListItemBase* +VideoListPanel::CreateItem(int index, int itemWidth) +{ + AppLogDebug("ENTER : index(%d)", index); + CustomItem* pItem = new (std::nothrow) CustomItem(); + pItem->Construct(Dimension(itemWidth, H_VIDEO_ITEM), LIST_ANNEX_STYLE_NORMAL); + + Bitmap* pBitmap = null; + String* pItemText = null; + String* pTitle = null; + String* pDuration = null; + + result r = __pPresentationModel->GetThumbnailVideoInSyncCacheN(index, pItemText, pBitmap, pDuration); + if (pBitmap == null || r == E_FAILURE) + { + __pPresentationModel->RequestThumbnail(index); + pBitmap = CommonUtil::GetEmptyThumbnailN(); + } + + pItem->AddElement(RECT_VIDEO_THUMBNAIL, ACTION_ID_FORMAT_THUMBNAIL, *pBitmap); + pTitle = new (std::nothrow) String(SINGLE_SPACE); + Rectangle titleRect(GAP_W_VIDEO_TITLE, GAP_H_VIDEO_TITLE, itemWidth-W_VIDEO_TITLE, H_VIDEO_TITLE); + pItem->AddElement(titleRect, ACTION_ID_FORMAT_TITLE, *pTitle, FONT_SIZE_TITLE, + Color::GetColor(COLOR_ID_BLACK), null, null, false); + + Rectangle durationRect(GAP_W_VIDEO_DURATION, GAP_H_VIDEO_DURATION, itemWidth-W_VIDEO_DURATION, + H_VIDEO_DURATION); + pItem->AddElement(durationRect, ACTION_ID_FORMAT_DURATION, *pDuration, FONT_SIZE_DURATION, + Color::GetColor(COLOR_ID_GREY),null,null,false); + + if (pBitmap != null) + { + delete pBitmap; + } + if (pItemText != null) + { + delete pItemText; + } + if (pTitle != null) + { + delete pTitle; + } + if (pDuration != null) + { + delete pDuration; + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return pItem; +} + +bool +VideoListPanel::DeleteItem(int index, ListItemBase* pItem, int itemWidth) +{ + AppLogDebug("ENTER"); + delete pItem; + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); + + return true; +} + +void +VideoListPanel::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status) +{ + AppLogDebug("ENTER"); + if (status == LIST_ITEM_STATUS_SELECTED) + { + HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter); + pDataList->Construct(); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), + new (std::nothrow) String(APPCONTROL_DATA_IMAGE)); + + int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + for (int i = 0; i < loopCount; ++i) + { + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), + new (std::nothrow) String(__pPresentationModel->GetContentFilePath(i))); + } + String listIndex; + listIndex.Format(10, L"d", index); + pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), + new (std::nothrow) String(listIndex)); + + __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, + APPCONTROL_OPERATION_ID_VIEW, pDataList, null); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId, ListContextItemStatus status) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnFileInfoChanged(const ContentType contentType) +{ + AppLogDebug("ENTER"); + if (contentType == CONTENT_TYPE_VIDEO) + { + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnThumbnailDecoded(const int index) +{ + AppLogDebug("ENTER : index(%d)", index); + if (index >= 0) + { + __pContentListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY); + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnSceneActivatedN(const SceneId& previousSceneId, + const SceneId& currentSceneId, IList* pArgs) +{ + AppLogDebug("ENTER"); + __pPresentationModel = FileListPresentationModel::GetInstance(); + + if (currentSceneId == IDSCN_VIDEO_LIST) + { + __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_VIDEO); + __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount(); + __pContentListView->UpdateList(); + } + + SceneManager* pSceneManager = SceneManager::GetInstance(); + AppAssert(pSceneManager); + if (pSceneManager->GetCurrentSceneId() == IDSCN_VIDEO_LIST) + { + FileListForm* pFileListForm = dynamic_cast(pSceneManager->GetCurrentScene()->GetForm()); + if (pFileListForm != null) + { + pFileListForm->SetTitleText(__pPresentationModel->GetCurrentAlbumName()); + } + } + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} + +void +VideoListPanel::OnSceneDeactivated(const SceneId& currentSceneId, + const SceneId& nextSceneId) +{ + AppLogDebug("ENTER"); + AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult())); +} -- 2.7.4