--- /dev/null
+# Target name and PKGID
+## TODO : set application name and ID
+SET(this_target Camera)
+SET(PKGID hdufar9ycj)
+
+# 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-content osp-image osp-telephony 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})
--- /dev/null
+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.
+
--- /dev/null
+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
--- /dev/null
+//
+// 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 CmCamcorderForm.h
+ * @brief This is the header file for CamcorderForm class.
+ */
+
+#ifndef _CM_CAMCORDER_FORM_H_
+#define _CM_CAMCORDER_FORM_H_
+
+#include <FAppIAppControlEventListener.h>
+#include <FGraphics.h>
+#include <FIo.h>
+#include <FMedia.h>
+#include <FSysBattery.h>
+#include <FTelephony.h>
+#include <FUi.h>
+#include <FUiWindow.h>
+#include "CmCameraInfoPanel.h"
+#include "CmCameraResourceManager.h"
+#include "CmCameraScenesList.h"
+#include "CmICameraEventListener.h"
+#include "CmCameraThumbnailPanel.h"
+
+enum CamcorderSubMenuContent
+{
+ CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE = 0,
+ CAMCORDER_SUB_MENU_CONTENT_WB_MODE,
+ CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE,
+ CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE,
+ CAMCORDER_SUB_MENU_CONTENT_RESET_MODE,
+ CAMCORDER_SUB_MENU_CONTENT_MAX
+};
+
+class CameraPresentationModel;
+
+class CamcorderForm
+ : public ICameraEventListner
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Base::Runtime::IEventListener
+ , public Tizen::Ui::Controls::ISliderEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IAdjustmentEventListener
+ , public Tizen::Ui::ITouchEventListener
+ , public Tizen::Ui::IKeyEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+{
+public:
+ CamcorderForm(void);
+ virtual ~CamcorderForm(void);
+
+ result Initialize(void);
+ void OnCameraActionPerformed(CameraActionEvent event);
+ bool IsDisplayResolutionWvga(void);
+
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+ virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+ virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+
+ 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 OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ 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 OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value);
+ virtual void OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment);
+
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+ virtual void OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList);
+
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+ enum ScreenMode
+ {
+ SCREEN_MODE_NORMAL = 0,
+ SCREEN_MODE_FULL,
+ };
+
+ enum DisplayResolution
+ {
+ DISPLAY_RESOLUTION_WVGA = 0,
+ DISPLAY_RESOLUTION_HVGA,
+ };
+
+ void Update(void);
+ void InitAppTimer(void);
+ void InitSettingTimer(void);
+ void StartInitAppTimer(void);
+ void StopInitAppTimer(void);
+ result InitSettingMenuPanel(void);
+ result InitActionMenuPanel(void);
+ void InitMakerFocusTimer(void);
+
+ result UpdateUiIndicatorStorage(Tizen::Graphics::Canvas* pCanvas, const Tizen::Base::String& str);
+
+ void MakeSettingPopup(void);
+
+ int GetSettingMainMenuCount(void) const;
+ void SetSettingMainMenuCount(int count);
+
+ int GetSettingSubMenuCount(void) const;
+ void SetSettingSubMenuCount(int count);
+
+ CamcorderSubMenuContent GetSettingSubMenuMode(void) const;
+ void SetSettingSubMenuMode(const CamcorderSubMenuContent mode);
+
+ void SetSubMenuListviewState(const int menuCount, const CamcorderSubMenuContent mode);
+ result SetMenuTitle(Tizen::Graphics::Canvas* pCanvas, const Tizen::Base::String& str, const int fntSize);
+
+ void SetGuideLine(int guideLineEnable);
+ void SetStorageType(int storageType);
+ result RestoreDefaultSetting(void);
+ result SettingTimerRecord(int timerInterval);
+ void SetRecordMode(int timerInterval);
+
+ result DrawMarker(bool useGuidline);
+ result DrawFocus(int focusMode);
+ void ToggleCameraDirection(int direction);
+ result SetSliderAdjustValue(const Tizen::Graphics::Point& currentPosition, const Tizen::Graphics::Rectangle& movableValidRect, const Tizen::Base::String& entryName, const int maxEntryValue);
+ result ProcessMainListPopup(int index);
+ result ProcessFlashListPopup(int index);
+ result ProcessSubListPopup(int index);
+ void SetFlashPopop(void);
+ result DrawTimerPopup(void);
+
+ result StartRecordTimer(void);
+ void EndRecordTimer(void);
+ result StartPopupTimer(void);
+ result EndPopupTimer(void);
+
+ void SetRecordButton(bool start);
+ void SetContinuousAutoFocusButton(void);
+ void SetThumbNailButton(void);
+ void SetSelfModeButton(void);
+
+ void SetCamcoderSettingsDevice(void);
+
+ Tizen::Graphics::Bitmap* RotationImageN(Tizen::Graphics::Bitmap* pSrcBitmap, Tizen::Media::ImageRotationType rotationType);
+ Tizen::Graphics::Bitmap* ThumbnailRotationImageN(Tizen::Graphics::Bitmap* pSrcBitmap, Tizen::Media::ImageRotationType rotationType);
+ result CreateExposureSlider(void);
+ result DrawExposureSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode);
+ result DrawExposureSlider(void);
+ result CreateZoomSlider(void);
+ result DrawZoomSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode);
+ result DrawZoomSlider(void);
+
+ result UpdateUiPanelIcon(void);
+ result UpdateUiActionPanelIcon(void);
+
+ void ShowMessageBox(const Tizen::Base::String& title, Tizen::Ui::Controls::MessageBoxStyle style, const Tizen::Base::String& text);
+ void HidePopup(void);
+ void HidePanel(bool isWideMode, bool isInvalidated);
+ void HideUiPanel(bool state);
+ void HideUiModeChangedButton(void);
+ void CheckStorageInfo(void);
+
+ result LaunchAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pDataType, const Tizen::Base::Collection::IMap* extraData);
+
+ void IncreaseDecreaseZoom(Tizen::Ui::KeyCode keyCode);
+ void SetZoomButtonPoint(const Tizen::Graphics::Point& pt);
+ Tizen::Graphics::Point GetZoomButtonPoint(void) const;
+ result SetScreenMode(const ScreenMode mode, bool destory);
+ void InDrawFocus(void);
+ void StartRecord(void);
+ void StopRecord(void);
+ void SetRecordEndReached(void);
+ void SetRecordErrorOccurred(void);
+ void HideUiAction(void);
+ void DrawTouchAutoFocus(const Tizen::Graphics::Point& currentPosition);
+ void LaunchImageview(void);
+ void GetCameraToForeground(void);
+ void SendCameraToBackground(void);
+ void DrawThumbnail(void);
+ void ShowUnlaunchPopup(void);
+ Tizen::Telephony::CallStatus GetCurrentCallStatus(void);
+ Tizen::Telephony::CallType GetCurrentCallType(void);
+ void CheckLowBatteryStatus(void);
+ result MakeMenuString(void);
+ bool SendAppControlResult(RequestId requestId);
+
+private:
+ CameraPresentationModel* __pCamcorderPresentationModel;
+ ScreenMode __screenMode;
+ Tizen::Ui::Controls::OverlayPanel* __pOverlayPanel;
+ Tizen::Base::Runtime::Timer* __pAppTimer;
+ Tizen::Base::Runtime::Timer* __pSettingTimer;
+ Tizen::Base::Runtime::Timer* __pRecordTimer;
+ Tizen::Base::Runtime::Timer* __pPopupTimer;
+ Tizen::Base::Runtime::Timer* __pExposureCloseTimer;
+ Tizen::Base::Runtime::Timer* __pZoomCloseTimer;
+ Tizen::Base::Runtime::Timer* __pMakerFocusTimer;
+ Tizen::Ui::Controls::ListView* __pListViewMainMenu;
+ Tizen::Ui::Controls::ListView* __pListFlashMainMenu;
+ Tizen::Ui::Controls::ListView* __pListViewSubMenu;
+ int __mainMenuCount;
+ int __subMenuCount;
+ CamcorderSubMenuContent __settingMode;
+ int __settingIsoIndex;
+ int __settingWhiteBalance;
+ int __currentZoomLevel;
+ int __maxZoomLevel;
+ int __settingExposure;
+ int __timeCount;
+ int __recordTimeCount;
+ int __closeTimerValue;
+ bool __isRecording;
+ int __previewResolutionWidth;
+ int __previewResolutionHeight;
+ bool __lowMemoryCapacity;
+ bool __isMemoryFull;
+ bool __isLockScreenMode;
+ bool __isOrientationChanged;
+ DisplayResolution __displayResolution;
+ Tizen::Ui::Controls::Panel* __pSettingPanel;
+ Tizen::Ui::Controls::Panel* __pActionPanel;
+ Tizen::Ui::OrientationStatus __dir;
+ Tizen::Ui::Controls::Button* __pFlashButton;
+ Tizen::Ui::Controls::Button* __pSelfShotButton;
+ Tizen::Ui::Controls::Button* __pSettingButton;
+ Tizen::Ui::Controls::Label* __pCameraIconLabel;
+ Tizen::Ui::Controls::Label* __pCamcoderIconLabel;
+ Tizen::Ui::Controls::Button* __pSwButton;
+ Tizen::Ui::Controls::Button* __pRecordButton;
+ Tizen::Ui::Controls::Button* __pBackButton;
+ Tizen::Graphics::Point __pButtonPoint;
+ CameraThumbnailPanel* __pThumbnailPanel;
+ CameraInfoPanel* __pCameraInfoPanel;
+ CamraInfoSubPanel* __pCamraInfoSubPanel;
+ CamraInfoSubIndicatorPanel* __pCamraInfoSubIndicatorPanel;
+ Tizen::Base::String** __pSettingMenuString;
+};
+
+#endif // _CM_CAMCORDER_FORM_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCamera.h
+ * @brief This is the header file for CameraApp class.
+ */
+
+#ifndef _CM_CAMERA_APP_H_
+#define _CM_CAMERA_APP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FIo.h>
+#include <FSystem.h>
+#include <FUi.h>
+
+class CameraPresentationModel;
+class CameraSettingsPresentationModel;
+
+class CameraApp
+ : public Tizen::App::UiApp
+ , public Tizen::App::IAppControlProviderEventListener
+ , public Tizen::System::IChargingEventListener
+ , public Tizen::System::ISettingEventListener
+{
+public:
+ CameraApp(void);
+ virtual ~CameraApp(void);
+ static Tizen::App::UiApp* CreateInstance(void);
+
+ bool IsAppControl(void);
+ void SetAppControlType(int type);
+ RequestId GetRequestId(void);
+
+ //UiApp
+ bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+ bool OnAppInitialized(void);
+ bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+
+ //IAppControlProviderEventListener
+ 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);
+
+ virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
+
+ virtual void OnChargingStateChanged(bool charging);
+
+private:
+ enum AppControlType
+ {
+ APP_CONTROL_TYPE_STANDARD,
+ APP_CONTROL_TYPE_REQUESET,
+ APP_CONTROL_TYPE_UNKNOWN
+ };
+
+ RequestId __requestId;
+ AppControlType __appControlType;
+};
+
+#endif // _CM_CAMERA_APP_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraForm.h
+ * @brief This is the header file for CameraForm class.
+ */
+
+#ifndef _CM_CAMERA_FORM_H_
+#define _CM_CAMERA_FORM_H_
+
+#include <FAppIAppControlEventListener.h>
+#include <FBase.h>
+#include <FContent.h>
+#include <FGraphics.h>
+#include <FIo.h>
+#include <FLocations.h>
+#include <FMedia.h>
+#include <FSysBattery.h>
+#include <FTelephony.h>
+#include <FUi.h>
+#include <FUiWindow.h>
+#include "CmCameraInfoPanel.h"
+#include "CmCameraResourceManager.h"
+#include "CmCameraScenesList.h"
+#include "CmCameraThumbnailPanel.h"
+#include "CmICameraEventListener.h"
+#include "CmTypes.h"
+
+enum CameraSubMenuContent
+{
+ CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE = 0,
+ CAMERA_SUB_MENU_CONTENT_TIMER_MODE,
+ CAMERA_SUB_MENU_CONTENT_ISO_MODE,
+ CAMERA_SUB_MENU_CONTENT_WB_MODE,
+ CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE,
+ CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE,
+ CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE,
+ CAMERA_SUB_MENU_CONTENT_RESET_MODE,
+ CAMERA_SUB_MENU_CONTENT_MAX
+};
+
+class CameraPresentationModel;
+
+class CameraForm
+ : public ICameraEventListner
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Base::Runtime::IEventListener
+ , public Tizen::Ui::Controls::ISliderEventListener
+ , public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IAdjustmentEventListener
+ , public Tizen::Ui::ITouchEventListener
+ , public Tizen::Ui::IKeyEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Ui::Scenes::ISceneEventListener
+{
+public:
+ CameraForm(void);
+ virtual ~CameraForm(void);
+
+ result Initialize(void);
+
+ void OnCameraActionPerformed(CameraActionEvent event);
+ bool IsDisplayResolutionWvga(void);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ 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 OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo & touchInfo);
+ virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ 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 Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+ virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+ virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
+
+ virtual void OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value);
+ virtual void OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment);
+
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+ virtual void OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList);
+
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+private:
+ enum ScreenMode
+ {
+ SCREEN_MODE_NORMAL = 0,
+ SCREEN_MODE_FULL,
+ };
+
+ enum DisplayResolution
+ {
+ DISPLAY_RESOLUTION_WVGA = 0,
+ DISPLAY_RESOLUTION_HVGA,
+ };
+
+ void Update(void);
+ void CaptureMode(int mode);
+ void CaptureModeChanged(int mode);
+ result SettingTimerCapture(int settingTimeValue);
+ void InitSettingTimer(void);
+ void InitCaptureStartTimer(void);
+ void InitTouchAutoFocusStartTimer(void);
+ void InitAppTimer(void);
+ result InitSettingMenuPanel(void);
+ result InitActionMenuPanel(void);
+ void MakeSettingPopup(void);
+ result ToggleCameraDirection(int direction);
+ result SetSliderAdjustValue(const Tizen::Graphics::Point& currentPosition, const Tizen::Graphics::Rectangle& movableValidRect, const Tizen::Base::String& entryName, const int maxEntryValue);
+
+ int GetSettingMainMenuCount(void) const;
+ void SetSettingMainMenuCount(int count);
+
+ int GetSettingSubMenuCount(void) const;
+ void SetSettingSubMenuCount(int count);
+
+ CameraSubMenuContent GetSettingSubMenuMode(void) const;
+ void SetSettingSubMenuMode(const CameraSubMenuContent mode);
+
+ void SetSubMenuListviewState(const int menuCount, const CameraSubMenuContent mode);
+ result SetMenuTitle(Tizen::Graphics::Canvas* pCanvas, const Tizen::Base::String& str, const int fntSize);
+ int GetShootTimerValue(void) const;
+ void SetGuideLine(int guideLineEnable);
+ void SetStorageType(int storageType);
+
+ result RestoreDefaultSetting(void);
+ result RestoreResolutionDefault(void);
+
+ void ShowMessageBox(const Tizen::Base::String& title, Tizen::Ui::Controls::MessageBoxStyle style, const Tizen::Base::String& text);
+ void HidePopup(void);
+ void CheckStorageInfo(void);
+
+ result DrawMarker(bool useGuidline);
+ result DrawFocus(int focusMode);
+ result DrawTimerPopup(void);
+ void SetFlashPopop(void);
+ result ProcessMainListPopup(int index);
+ result ProcessFlashListPopup(int index);
+ result ProcessSubListPopup(int index);
+
+ result StartPopupTimer(void);
+ result EndPopupTimer(void);
+
+ Tizen::Graphics::Bitmap* RotationImageN(Tizen::Graphics::Bitmap* pSrcBitmap, Tizen::Media::ImageRotationType rotationType);
+ Tizen::Graphics::Bitmap* ThumbnailRotationImageN(Tizen::Graphics::Bitmap* pSrcBitmap, Tizen::Media::ImageRotationType rotationType);
+ result CreateExposureSlider(void);
+ result DrawExposureSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode);
+ result DrawExposureSlider(void);
+ result CreateZoomSlider(void);
+ result DrawZoomSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode);
+ result DrawZoomSlider(void);
+
+ result UpdateUiPanelIcon(void);
+ result UpdateUiActionPanelIcon(void);
+ void HideUiModeChangedButton(void);
+ void HideUiPanel(bool state);
+
+ void SetCameraSettingsDevice(void);
+
+ result LaunchAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pDataType, const Tizen::Base::Collection::IMap* extraData);
+
+ void IncreaseDecreaseZoom(Tizen::Ui::KeyCode keyCode);
+ void SetZoomButtonPoint(const Tizen::Graphics::Point& pt);
+ Tizen::Graphics::Point GetZoomButtonPoint(void) const;
+ void SetCameraMode(bool isWideMode);
+ void SetNormalOverlayPanel(bool destory);
+ void SetWideOverlayPanel(bool destory);
+ void HidePanel(bool isWideMode, bool isInvalidated);
+ result SetScreenMode(const ScreenMode mode, bool destory);
+ result SetThumbNailButton(void);
+ void MakePreviewResolutionList(bool remakeList);
+ void MakeCaptrueResolutionList(bool remakeList);
+ void MakeIsoList(bool remakeList);
+ void DrawTouchAutoFocus(const Tizen::Graphics::Point& currentPosition);
+ void DoCapture(void);
+ void LaunchImageview(void);
+ void InDrawFocus(void);
+ void GetCameraToForeground(void);
+ void SendCameraToBackground(void);
+ void DrawThumbnail(void);
+ void SetCameraErrorOccurred(void);
+ void ShowUnlaunchPopup(void);
+ Tizen::Telephony::CallStatus GetCurrentCallStatus(void);
+ Tizen::Telephony::CallType GetCurrentCallType(void);
+ void CheckLowBatteryStatus(void);
+ result MakeMenuString(void);
+ void DeleteTimer(void);
+ bool SendAppControlResult(RequestId requestId);
+
+private:
+ CameraPresentationModel* __pCameraPresentationModel;
+ Tizen::Ui::Controls::OverlayPanel* __pOverlayPanel;
+ ScreenMode __screenMode;
+ Tizen::Base::Runtime::Timer* __pAppTimer;
+ Tizen::Base::Runtime::Timer* __pSettingTimer;
+ Tizen::Base::Runtime::Timer* __pCaptureStartTimer;
+ Tizen::Base::Runtime::Timer* __pPopupTimer;
+ Tizen::Base::Runtime::Timer* __pExposureCloseTimer;
+ Tizen::Base::Runtime::Timer* __pZoomCloseTimer;
+ Tizen::Base::Runtime::Timer* __pTouchAutoFocusTimer;
+ Tizen::Ui::Controls::ListView* __pListViewMainMenu;
+ Tizen::Ui::Controls::ListView* __pListFlashMainMenu;
+ Tizen::Ui::Controls::ListView* __pListViewSubMenu;
+ int __mainMenuCount;
+ int __subMenuCount;
+ CameraSubMenuContent __settingMode;
+ int __settingWhiteBalance;
+ int __settingIsoIndex;
+ int __settingTimeInterval;
+ int __currentZoomLevel;
+ int __maxZoomLevel;
+ int __settingExposure;
+ int __primaryCurrentResolutionIndex;
+ int __secondaryCurrentResolutionIndex;
+ int __timeCount;
+ bool __isTimerRunning;
+ int __closeTimerValue;
+ bool __isUsedTimerCaptured;
+ int __previewResolutionWidth;
+ int __previewResolutionHeight;
+ int __captureResolutionWidth;
+ int __captureResolutionHeight;
+ bool __lowMemoryCapacity;
+ bool __isMemoryFull;
+ bool __isLockScreenMode;
+ bool __resolutionChange;
+ bool __isToggleCameraDirection;
+ bool __isOrientationChanged;
+ bool __isProhibitionTouchEvent;
+ DisplayResolution __displayResolution;
+ Tizen::Ui::Controls::Panel* __pSettingPanel;
+ Tizen::Ui::Controls::Panel* __pActionPanel;
+ Tizen::Ui::OrientationStatus __dir;
+ int __deviceOrientation;
+ Tizen::Ui::Controls::Button* __pFlashButton;
+ Tizen::Ui::Controls::Button* __pSelfShotButton;
+ Tizen::Ui::Controls::Button* __pSettingButton;
+ Tizen::Ui::Controls::Label* __pCameraIconLabel;
+ Tizen::Ui::Controls::Label* __pCamcoderIconLabel;
+ Tizen::Ui::Controls::Button* __pSwButton;
+ Tizen::Ui::Controls::Button* __pShutterButton;
+ Tizen::Ui::Controls::Button* __pBackButton;
+ Tizen::Graphics::Point __pButtonPoint;
+ Tizen::Base::Collection::ArrayList* __pPreviewResolutionList;
+ Tizen::Base::Collection::ArrayList* __pCaptureResolutionList;
+ Tizen::Base::Collection::ArrayList* __pIsoList;
+ CameraThumbnailPanel* __pThumbnailPanel;
+ CameraInfoPanel* __pCameraInfoPanel;
+ CamraInfoSubPanel* __pCamraInfoSubPanel;
+ Tizen::Base::String** __pSettingMenuString;
+};
+
+#endif // _CM_CAMERA_FORM_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraInfoPanel.h
+ * @brief This is the header file for Camera Information Panel class.
+ */
+
+#ifndef _CM_CAMERA_INFO_PANEL_H_
+#define _CM_CAMERA_INFO_PANEL_H_
+
+#include <new>
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FSysDeviceManager.h>
+#include <FUi.h>
+#include "CmCameraResourceManager.h"
+#include "CmTypes.h"
+
+class CamraInfoSubPanel;
+class CamraInfoSubIndicatorPanel;
+
+class CameraInfoPanel
+ : public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::Controls::Panel
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ CameraInfoPanel(void);
+ virtual ~CameraInfoPanel(void);
+
+ result Initialize(Tizen::Graphics::Rectangle rect);
+
+ bool GetDrawExposure(void) const;
+ int GetRemainedPhoto(void) const;
+ bool GetDrawPopupTimer(void) const;
+ bool GetDrawZoom(void) const;
+ void SetCurrentMode(int mode);
+ void SetButtonPoint(const Tizen::Graphics::Point& pt);
+ void SetCurrentPoint(Tizen::Graphics::Point currentPosition);
+ void SetDrawExposure(bool status);
+ void SetDrawFlashMenuBackground(bool status);
+ void SetDrawIndicator(bool status);
+ void SetDrawIndicatorStroageInfo(bool status);
+ void SetStorageTitle(Tizen::Base::String& title);
+ void SetDrawMarkerFocus(bool status);
+ void SetDrawMarkerFocusType(int type);
+ void SetDrawMarkerGuideline(bool status);
+ void SetPreviewResolutionSize(int size);
+ void SetRemainedPhoto(int cnt);
+ void SetDrawPopupTimer(bool status);
+ void SetDrawPopupTimerUpdate(bool status);
+ void SetDrawPopupTimerCount(int cnt);
+ void SetDrawSettingMenuBackground(bool status);
+ void SetDrawRecordTimer(bool status);
+ void SetDrawZoom(bool status);
+ void SetStorageType(int type);
+ void SetOverlayPanelMode(int mode);
+ void SetTimeCount(int cnt);
+ void StartCheckStorageInfoTimer(void);
+ result EndCheckStorageInfoTimer(void);
+ void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual result OnDraw(void);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ result DrawExposure(Tizen::Graphics::Canvas* pCanvas);
+ result DrawIndicator(Tizen::Graphics::Canvas* pCanvas);
+ result DrawMarkerFocus(Tizen::Graphics::Canvas* pCanvas);
+ result DrawMarkerGuideline(Tizen::Graphics::Canvas* pCanvas);
+ result DrawPopupTimer(Tizen::Graphics::Canvas* pCanvas);
+ result DrawPopupTimerUpdate(Tizen::Graphics::Canvas* pCanvas);
+ result DrawSettingMenuBackground(Tizen::Graphics::Canvas* pCanvas);
+ result DrawFlashMenuBackground(Tizen::Graphics::Canvas* pCanvas);
+ result DrawRecordTimer(Tizen::Graphics::Canvas* pCanvas);
+ result DrawZoom(Tizen::Graphics::Canvas* pCanvas);
+ result UpdateBatteryStatus(Tizen::Graphics::Canvas* pCanvas);
+ result UpdateStorageIcon(Tizen::Graphics::Canvas* pCanvas);
+ result UpdateUiIndicatorStorage(Tizen::Graphics::Canvas* pCanvas);
+ void StartCheckStorageInfo(void);
+
+private:
+ enum OverlayPanelMode
+ {
+ OVERLAY_PANEL_MODE_NORMAL = 0,
+ OVERLAY_PANEL_MODE_FULL,
+ };
+
+ int __currentMode;
+ bool __drawExposure;
+ bool __drawIndicator;
+ bool __drawIndicatorStorageInfo;
+ bool __drawMarkerFocus;
+ int __drawMarkerFocusType;
+ bool __drawMarkerGuideline;
+ int __previewResolutionSize;
+ int __remainedNumber;
+ bool __drawPopuptimer;
+ bool __drawPopuptimerUpdate;
+ int __drawPopuptimerCount;
+ bool __drawSettingMenu;
+ bool __drawSettingSubMenu;
+ bool __drawFlashMenu;
+ bool __drawRecordTimer;
+ bool __drawZoom;
+ int __storageType;
+ int __recordTimeCount;
+ int __OverlayPanelMode;
+ char __frameRate;
+ Tizen::Graphics::Point __currentPosition;
+ Tizen::Graphics::Canvas* __pCanvas;
+ Tizen::Graphics::Point __buttonPoint;
+ Tizen::Ui::OrientationStatus __dir;
+ Tizen::Base::Runtime::Timer* __pStorageInfoTimer;
+ Tizen::Base::String __storateTitle;
+ Tizen::Graphics::Bitmap* __pStorageTypeBitmap;
+};
+
+class CamraInfoSubPanel
+ : public Tizen::Ui::Controls::Panel
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ CamraInfoSubPanel(void);
+ virtual ~CamraInfoSubPanel(void);
+ result Initialize(Tizen::Graphics::Rectangle rect);
+
+ void SetMenuTitle(Tizen::Base::String& title);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual result OnDraw(void);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ result DrawSettingSubMenuBackground(Tizen::Graphics::Canvas* pCanvas);
+ result DrawSubMenuTile(Tizen::Graphics::Canvas* pCanvas);
+
+private:
+ bool __drawSubMenuBG;
+ Tizen::Base::String __subMenuTitle;
+};
+
+class CamraInfoSubIndicatorPanel
+ : public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::Controls::Panel
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ CamraInfoSubIndicatorPanel(void);
+ virtual ~CamraInfoSubIndicatorPanel(void);
+ result Initialize(Tizen::Graphics::Rectangle rect);
+
+ bool GetDrawRecordTimer(void) const;
+ int GetRemainedPhoto(void) const;
+
+ void SetPreviewResolutionSize(int size);
+ void SetRemainedPhoto(int cnt);
+ void SetStorageTitle(Tizen::Base::String& title);
+ void StartCheckStorageInfoTimer(void);
+ result EndCheckStorageInfoTimer(void);
+ void SetCurrentPoint(Tizen::Graphics::Point currentPosition);
+ void SetDrawIndicator(bool status);
+ void SetOverlayPanelMode(int mode);
+ void SetStorageType(int type);
+ void SetTimeCount(int cnt);
+ void SetDrawRecordTimer(bool status);
+ void StartDrawRecordTimer(void);
+ result StopDrawRecordTimer(void);
+ void SetCurrentMode(int mode);
+ void SetDrawIndicatorStroageInfo(bool status);
+ result UpdateUiIndicatorStorage(Tizen::Graphics::Canvas* pCanvas);
+
+ void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual result OnDraw(void);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ result DrawIndicator(Tizen::Graphics::Canvas* pCanvas);
+ result UpdateBatteryStatus(Tizen::Graphics::Canvas* pCanvas);
+ result UpdateStorageIcon(Tizen::Graphics::Canvas* pCanvas);
+ result DrawRecordTimer(Tizen::Graphics::Canvas* pCanvas);
+ void StartCheckStorageInfo(void);
+
+private:
+ enum OverlayPanelMode
+ {
+ OVERLAY_PANEL_MODE_NORMAL = 0,
+ OVERLAY_PANEL_MODE_FULL,
+ };
+
+ int __currentMode;
+ Tizen::Graphics::Point __currentPosition;
+ Tizen::Ui::OrientationStatus __dir;
+ bool __drawIndicator;
+ bool __drawIndicatorStorageInfo;
+ bool __drawRecordTimer;
+ char __frameRate;
+ int __OverlayPanelMode;
+ Tizen::Graphics::Canvas* __pCanvas;
+ Tizen::Base::Runtime::Timer* __pRecordTimer;
+ Tizen::Graphics::Bitmap* __pStorageTypeBitmap;
+ int __storageType;
+ Tizen::Base::String __storateTitle;
+ Tizen::Base::Runtime::Timer* __pStorageInfoTimer;
+ int __previewResolutionSize;
+ int __recordTimeCount;
+ int __remainedNumber;
+};
+
+#endif // _CM_CAMERA_INFO_PANEL_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraPresentationModel.h
+ * @brief This is the header file for CameraPresentationModel class.
+ */
+
+#ifndef _CM_CAMERA_PRESENTATION_MODEL_H_
+#define _CM_CAMERA_PRESENTATION_MODEL_H_
+
+#include <new>
+#include <FApp.h>
+#include <FBase.h>
+#include <FContent.h>
+#include <FIo.h>
+#include <FLocales.h>
+#include <FMedia.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include "CmICameraEventListener.h"
+#include "CmTypes.h"
+
+class CameraSettingsPresentationModel;
+
+class CameraPresentationModel
+ : public Tizen::Media::ICameraEventListener
+ , public Tizen::Media::IVideoRecorderEventListener
+ , public Tizen::System::IDeviceEventListener
+{
+public:
+ enum CameraMode
+ {
+ CAMERA_MODE_SNAPSHOT = 0,
+ CAMERA_MODE_RECORD,
+ };
+
+ enum CameraDirection
+ {
+ CAMERA_DIRECTION_BACK = 0,
+ CAMERA_DIRECTION_FRONT,
+ };
+
+ enum CamSelfPortraitMode
+ {
+ CAM_SELF_PORTRAIT_MODE_PRIMARY,
+ CAM_SELF_PORTRAIT_MODE_SECONDARY,
+ };
+
+ enum AppControlRequestType
+ {
+ APP_CONTROL_REQUEST_TYPE_CANCELED = 0,
+ APP_CONTROL_REQUEST_TYPE_SUCCEEDED,
+ APP_CONTROL_REQUEST_TYPE_FAILED
+ };
+
+ enum StorageCardState
+ {
+ STORAGE_CARD_STATE_UNMOUNT = 0,
+ STORAGE_CARD_STATE_MOUNT,
+ };
+
+ enum StorageCardChageState
+ {
+ STORAGE_CARD_CHAGE_STATE_UNKNOWN = 0,
+ STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT,
+ STORAGE_CARD_CHAGE_STATE_UNMOUNT_TO_MOUNT,
+ };
+
+ static CameraPresentationModel* GetInstance(void);
+ result Construct(void);
+ void Terminate(int mode);
+ void InitializeCamcorder(void);
+ void InitializeCamera(void);
+ void ToggleCameraCamcorder(int mode);
+ void ToggleCameraDirection(int direction);
+ void SetMode(int mode);
+
+ int GetContentCount(void);
+ Tizen::Base::String GetContentFilePath(int currentCameraMode);
+ Tizen::Graphics::Bitmap* GetLatestThumbnail(void);
+ result GetLatestContentName(int currentCameraMode, Tizen::Base::String& latestContentName);
+ Tizen::Graphics::Dimension GetPreviewResolution(void) const;
+ result SetPreviewResolution(Tizen::Graphics::Dimension previewResolution);
+ Tizen::Graphics::Dimension GetCaptureResolution(void) const;
+ result SetCaptureResolution(Tizen::Graphics::Dimension captureResolution);
+ Tizen::Base::Collection::IList* GetCaptureResolutionList(void);
+ Tizen::Base::Collection::IList* GetPreviewResolutionList(void);
+
+ bool IsPreviewState(void);
+ bool IsCameraInstance(void);
+ bool IsCameraPoweredOn(void);
+ bool IsStorageCardMounted(void) const;
+ bool IsCharging(void);
+ void StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo);
+ void StopPreview(void);
+ void StopCamera(void);
+ void Capture(void);
+ void StartRecord(void);
+ void StopRecord(void);
+ void CancelRecord(void);
+ void SetFocusMode(Tizen::Media::CameraFocusMode mode);
+ void SetContinuousAutoFocus(void);
+ void SetAutoFocusPoint(const Tizen::Graphics::Point& currentPosition);
+
+ int GetExposure(void) const;
+ void SetExposure(int exposureValue);
+ int GetBrightness(void) const;
+ void SetBrightness(int brightnessValue);
+ Tizen::Media::CameraWhiteBalance GetWhiteBalance(void) const;
+ void SetWhiteBalance(Tizen::Media::CameraWhiteBalance whitebalanceValue);
+ Tizen::Base::Collection::IList* GetIsoList(void);
+ Tizen::Media::CameraIsoLevel GetIsoLevel(void) const;
+ void SetIsoLevel(Tizen::Media::CameraIsoLevel isoValue);
+ int GetMaxZoomLevel(void) const;
+ int GetZoomLevel(void) const;
+ void SetZoomValue(int zoomValue);
+ Tizen::Media::CameraFlashMode GetFlashMode(void) const;
+ void SetFlashMode(Tizen::Media::CameraFlashMode mode);
+ Tizen::Ui::OrientationStatus GetOrientation(void) const;
+ void SetOrientation(Tizen::Ui::OrientationStatus dir);
+ int GetAppControlRequestType(void) const;
+ void SetAppControlRequestType(int requestType);
+ Tizen::Base::String GetErrorResult(void) const;
+ void SetErrorResult(const Tizen::Base::String& string);
+
+ int GetStorageCardState(void) const;
+ void SetStorageCardState(int storageCardState);
+ int GetStorageCardChageState(void) const;
+ void SetStorageCardChageState(int storageCardChageState);
+ void UpdateThumbnail(int currentCameraMode);
+
+ Tizen::System::BatteryLevel GetBatteryLevel(void) const;
+ Tizen::Media::CameraState GetCameraState(void) const;
+ Tizen::Media::RecorderState GetRecorderState(void) const;
+ long long GetAvailableStorageSpace(void) const;
+ void ZoomIn(void);
+ void ZoomOut(void);
+ void SetExifOrientation(int orientation);
+ void KeepScreenOnState(bool keepOn, bool dimming);
+
+ void SetPresentationChangedEventListener(ICameraEventListner* pObserverListener);
+ void CallOnPresentationModeChanged(CameraActionEvent event);
+
+ bool GetOnVideoRecorderStopped(void);
+ void SetOnVideoRecorderStopped(bool isCompleted);
+
+ result ResetCameraSettingsRegistry(void);
+ result SetDefaultValueItems(void);
+ result GetValue(const Tizen::Base::String& entryName, int& value) const;
+ result SetValue(const Tizen::Base::String& entryName, int value);
+ result GetMediaCapability(Tizen::Base::String key, bool& value) const;
+ result GetMediaCapability(Tizen::Base::String key, int& value) const;
+ result GetMediaCapability(Tizen::Base::String key) const;
+
+ //ICameraEventListener
+ virtual void OnCameraAutoFocused(bool completeCondition);
+ virtual void OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r);
+ virtual void OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r);
+ virtual void OnCameraErrorOccurred(Tizen::Media::CameraErrorReason r);
+
+ //IVideoRecorderEventListener
+ virtual void OnVideoRecorderCanceled(result r);
+ virtual void OnVideoRecorderClosed(result r);
+ virtual void OnVideoRecorderEndReached(Tizen::Media::RecordingEndCondition endCondition);
+ virtual void OnVideoRecorderErrorOccurred(Tizen::Media::RecorderErrorReason r);
+ virtual void OnVideoRecorderPaused(result r);
+ virtual void OnVideoRecorderStarted(result r);
+ virtual void OnVideoRecorderStopped(result r);
+
+ virtual void OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state);
+
+private:
+ CameraPresentationModel(void);
+ CameraPresentationModel(const CameraPresentationModel&);
+ CameraPresentationModel& operator = (const CameraPresentationModel&);
+ virtual ~CameraPresentationModel(void);
+ result CreateThumbnail(int currentCameraMode);
+ result CreateFileName(Tizen::Base::String& fullFileName);
+ Tizen::Base::String SearchContentFilePath(int mode);
+
+ void StorageCardStateChaged(bool isMounted);
+ void RemoveVideoFile(void);
+ void SetDeviceManagerEventListner(void);
+ void RemoveDeviceManagerEventListner(void);
+
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+ static void DestroyPresentationModelInstance(void);
+ friend class CameraApp;
+
+private:
+ static CameraPresentationModel* __pPresentationModel;
+ Tizen::Media::Camera* __pCamera;
+ Tizen::Base::Collection::IList* __pPreviewResolutionList;
+ Tizen::Base::Collection::IList* __pCaptureResolutionList;
+ Tizen::Base::Collection::IList* __pIsoList;
+ Tizen::Media::VideoRecorder* __pVideoRecorder;
+ ICameraEventListner* __pCameraListener;
+ Tizen::Content::ContentManager* __pContentManager;
+ Tizen::Content::ImageContentInfo* __pImageContentInfo;
+ Tizen::Content::VideoContentInfo* __pVideoContentInfo;
+ CameraSettingsPresentationModel* __pCameraSettingsPresentationModel;
+ Tizen::Graphics::Bitmap* __pBitmap;
+ Tizen::Base::String __lastestContentName;
+ Tizen::Base::String __errorResult;
+ int __appControlRequestType;
+ Tizen::Ui::OrientationStatus __dir;
+ int __cameraMode;
+ int __storageCardState;
+ int __storageCardChageState;
+ int __isStopCaptured;
+ int __contentCount;
+ int __onVideoRecorderStarted;
+};
+
+#endif // _CM_CAMERA_PRESENTATION_MODEL_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraResourceManager.h
+ * @brief This is the header file for ResourceManager class.
+ */
+
+#ifndef _CM_CAMERA_RESOURCE_MANAGER_H_
+#define _CM_CAMERA_RESOURCE_MANAGER_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FUi.h>
+
+enum ResourceId
+{
+ RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR = 0,
+ RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS,
+ RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR,
+ RESOURCE_ID_CAMERA_MODE_FLASH_ON_PRESS,
+ RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR,
+ RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS,
+ RESOURCE_ID_CAMERA_MODE_SELF_SHOT_NOR,
+ RESOURCE_ID_CAMERA_MODE_SELF_SHOT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_BUSTSHOT_NOR,
+ RESOURCE_ID_CAMERA_MODE_BUSTSHOT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_SINGLE_SHOT_NOR,
+ RESOURCE_ID_CAMERA_MODE_SINGLE_SHOT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_SETTING_NOR,
+ RESOURCE_ID_CAMERA_MODE_SETTING_PRESS,
+ RESOURCE_ID_CAMERA_MODE_CAMCORDER_ON,
+ RESOURCE_ID_CAMERA_MODE_CAMERA_ON,
+ RESOURCE_ID_CAMERA_MODE_BG,
+ RESOURCE_ID_CAMERA_MODE_BUTTON_VER,
+ RESOURCE_ID_CAMERA_MODE_SHUTTER_ICON,
+ RESOURCE_ID_CAMERA_MODE_SHUTTER_NORMAL,
+ RESOURCE_ID_CAMERA_MODE_SHUTTER_PRESS,
+ RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG,
+ RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG_PRESS,
+ RESOURCE_ID_CAMERA_MODE_OPTION_BG_VER,
+ RESOURCE_ID_CAMERA_MODE_OPTION_BG_VER_PRESS,
+ RESOURCE_ID_CAMERA_MODE_TEMP_IMG,
+ RESOURCE_ID_CAMERA_LOCK,
+ RESOURCE_ID_CAMERA_NORMAL_BG_VER,
+ RESOURCE_ID_CAMERA_NORMAL_BG_VER_01,
+ RESOURCE_ID_CAMERA_NORMAL_BG_VER2,
+ RESOURCE_ID_CAMERA_NORMAL_BG_VER2_01,
+ RESOURCE_ID_CAMERA_PAUSE,
+ RESOURCE_ID_CAMERA_REC,
+ RESOURCE_ID_CAMERA_RADIO_BTN_OFF,
+ RESOURCE_ID_CAMERA_RADIO_BTN_ON,
+ RESOURCE_ID_CAMERA_ICON_BACK,
+ RESOURCE_ID_CAMERA_ICON_BACK_PRESS,
+ RESOURCE_ID_CAMERA_FOCUS_NOT_READY,
+ RESOURCE_ID_CAMERA_READY,
+ RESOURCE_ID_CAMERA_FOCUS_FIAL,
+ RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_NORMAL,
+ RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_PRESS,
+ RESOURCE_ID_CAMCODER_RECORDING_SHUTTER_NORMAL,
+ RESOURCE_ID_CAMCODER_RECORDING_CAF,
+ RESOURCE_ID_CAMCODER_RECORDING_CAF_PRESS,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_00,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_01,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_02,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_03,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_04,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_05,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_FULL,
+ RESOURCE_ID_CAMERA_INDICATOR_BATTERY_CHARGE,
+ RESOURCE_ID_CAMERA_INDICATOR_STORAGE_IN,
+ RESOURCE_ID_CAMERA_INDICATOR_STORAGE_IN_FULL,
+ RESOURCE_ID_CAMERA_INDICATOR_STORAGE_T_FLASH,
+ RESOURCE_ID_CAMERA_INDICATOR_STORAGE_T_FLASH_FULL,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_50,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_60,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_100,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_200,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_400,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_800,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_1600,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_3200,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_AUTO,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_NIGHT,
+ RESOURCE_ID_CAMERA_INDICATOR_ISO_SPORT,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_0_1M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_0_3M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_0_5M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_0_8M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_1_3M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_2_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_3_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_3_2M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_3_6M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_5_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_7_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_8_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_10_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_12_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_12_4M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W0_1M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W0_3M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W0_4M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W1M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W1_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W1_5M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W2_4M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W3_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W4_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W5_7M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W6_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W6_5M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W8_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_W10_0M,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_176_144,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_320_240,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_640_480,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_720_480,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_1024_760,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_1024_780,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_1280_720,
+ RESOURCE_ID_CAMERA_INDICATOR_SIZE_1920_1080,
+ RESOURCE_ID_CAMERA_INDICATOR_TIMER_2S,
+ RESOURCE_ID_CAMERA_INDICATOR_TIMER_5S,
+ RESOURCE_ID_CAMERA_INDICATOR_TIMER_10S,
+ RESOURCE_ID_CAMERA_INDICATOR_TIMER_OFF,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_CLOUDY,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_DAYLIGHT,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_TUNGSTEN,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_AUTO,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_CLOUD,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_FLOU,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_HORIZON,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_INCANDESCENT,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_SHADE,
+ RESOURCE_ID_CAMERA_INDICATOR_WB_SUN,
+ RESOURCE_ID_CAMERA_INDICATOR_ANTI_SHAKE,
+ RESOURCE_ID_CAMERA_INDICATOR_ANTI_SHAKE_HIGH,
+ RESOURCE_ID_CAMERA_INDICATOR_ANTI_SHAKE_OFF,
+ RESOURCE_ID_CAMERA_INDICATOR_AUTO_CONTRAST,
+ RESOURCE_ID_CAMERA_INDICATOR_AUTO_RECORDING,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_01,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_02,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_03,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_04,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_05,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_MOBILEAP_01,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_MOBILEAP_02,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_MOBILEAP_03,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_MOBILEAP_04,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_MOBILEAP_05,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_NOCONNECTED_01,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_NOCONNECTED_02,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_NOCONNECTED_03,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_NOCONNECTED_04,
+ RESOURCE_ID_CAMERA_INDICATOR_WIFI_NOCONNECTED_05,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_0,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_1,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_2,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_3,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_4,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_5,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_6,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_7,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_8,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_9,
+ RESOURCE_ID_CAMERA_INDICATOR_NUM_10,
+ RESOURCE_ID_CAMERA_SHRTCUT_EDIT_BG_VER,
+ RESOURCE_ID_CAMERA_SHRTCUT_EDIT_BG_02_VER,
+ RESOURCE_ID_CAMERA_SHRTCUT_MENUBAR_BG_VER,
+ RESOURCE_ID_CAMERA_SHRTCUT_TEXT_BG_VER,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_1_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_1_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_2_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_2_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_3_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_3_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_4_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_4_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_5_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_5_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_6_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_6_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_7_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_7_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_8_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_8_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_9_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_9_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_MINUS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_MINUS_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_PLUS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_PLUS_PRESS,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_NOR,
+ RESOURCE_ID_CAMERA_MODE_EXPOSIRE_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_60_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_60_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_100_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_100_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_200_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_200_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_400_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_400_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_800_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_800_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_AUTO_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_AUTO_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_NIGHT_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_NIGHT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_ISO_SPORT_NOR,
+ RESOURCE_ID_CAMERA_MODE_ISO_SPORT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_AUTO_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_AUTO_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_INCANDESCENT_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_INCANDESCENT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_FLUORESCEN_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_FLUORESCEN_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_DAY_LIGHT_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_DAY_LIGHT_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_CLOUDY_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_CLOUDY_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_HORIZON_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_HORIZON_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_SHADE_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_SHADE_PRESS,
+ RESOURCE_ID_CAMERA_MODE_WB_TUNGSTEN_NOR,
+ RESOURCE_ID_CAMERA_MODE_WB_TUNGSTEN_PRESS,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER_VER,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_BG,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_BG_9_,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_BG_2DEPTH,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_BG_2DEPTH_9_,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_SCROLL,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_SHADOW_01,
+ RESOURCE_ID_CAMERA_OPTION_POPUP_SHADOW_02,
+ RESOURCE_ID_CAMERA_POPUP_BG_9_,
+ RESOURCE_ID_CAMERA_POPUP_EX,
+ RESOURCE_ID_CAMERA_POPUP_EXPOSURE_VER_BG,
+ RESOURCE_ID_CAMERA_POPUP_EXP_BAR,
+ RESOURCE_ID_CAMERA_POPUP_EXP_BAR_VER,
+ RESOURCE_ID_CAMERA_POPUP_EX_LINE,
+ RESOURCE_ID_CAMERA_POPUP_EX_LINE_VER,
+ RESOURCE_ID_CAMERA_POPUP_ZOOM,
+ RESOURCE_ID_CAMERA_POPUP_ZOOM_BAR,
+ RESOURCE_ID_CAMERA_POPUP_ZOOM_BAR_VER,
+ RESOURCE_ID_CAMERA_POPUP_ZOOM_VER,
+ RESOURCE_ID_CAMERA_SHOOT_SHARE_POPUP,
+ RESOURCE_ID_CAMERA_TIMER_POPUP,
+ RESOURCE_ID_CAMERA_INDICATOR_BLINK_DETECTION,
+ RESOURCE_ID_CAMERA_INDICATOR_FACE_DETECTION,
+ RESOURCE_ID_CAMERA_INDICATOR_GPS,
+ RESOURCE_ID_CAMERA_INDICATOR_GUIDELINE,
+ RESOURCE_ID_CAMERA_INDICATOR_LOCK,
+ RESOURCE_ID_CAMERA_INDICATOR_MACRO,
+ RESOURCE_ID_CAMERA_INDICATOR_MB,
+ RESOURCE_ID_CAMERA_INDICATOR_METERING_CENTER,
+ RESOURCE_ID_CAMERA_INDICATOR_METERING_MATRIX,
+ RESOURCE_ID_CAMERA_INDICATOR_METERING_SPOT,
+ RESOURCE_ID_CAMERA_INDICATOR_OUTDOOR_VISIBILITY,
+ RESOURCE_ID_CAMERA_INDICATOR_REVIEW,
+ RESOURCE_ID_CAMERA_INDICATOR_SMILE_SHOT,
+ RESOURCE_ID_MAX
+};
+
+namespace Tizen { namespace Graphics {
+class Bitmap;
+}}
+
+class ResourceManager
+{
+public:
+ static Tizen::Graphics::Bitmap* GetBitmapN(int id);
+ static Tizen::Graphics::Rectangle GetBounds(ResourceId id);
+ static Tizen::Graphics::Point GetPosition(ResourceId id);
+ static Tizen::Graphics::Dimension GetSize(ResourceId id);
+ static Tizen::Base::String GetSceneId(ResourceId id);
+ static Tizen::Base::String GetString(ResourceId id);
+
+private:
+ ResourceManager(void);
+ ResourceManager(const ResourceManager&);
+ ResourceManager& operator = (const ResourceManager&);
+ virtual ~ResourceManager(void);
+
+private:
+ static Tizen::Ui::Variant __resource[RESOURCE_ID_MAX];
+};
+
+#endif // _CM_CAMERA_RESOURCE_MANAGER_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraScenesList.h
+ * @brief The list of literal text for scenemanager
+ */
+
+#ifndef _CM_CAMERA_SCENES_LIST_H_
+#define _CM_CAMERA_SCENES_LIST_H_
+
+extern const wchar_t* IDSCN_CAMERA;
+extern const wchar_t* IDSCN_CAMCORDER;
+extern const wchar_t* IDC_FORM_CAMERA;
+extern const wchar_t* IDC_FORM_CAMCORDER;
+
+#endif // _CM_CAMERA_SCENES_LIST_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraSettingsPresentationModel.h
+ * @brief This is the header file for CameraSettingsPresentationModel class.
+ */
+
+#ifndef _CM_CAMERA_SETTINGS_PRESENTATION_MODEL_H_
+#define _CM_CAMERA_SETTINGS_PRESENTATION_MODEL_H_
+
+#include <FApp.h>
+#include <FIo.h>
+#include "CmTypes.h"
+
+class CameraSettingsPresentationModel
+{
+public:
+ result GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, int& value) const;
+ result SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, int value);
+ result ResetCameraSettingsRegistry(void);
+
+ static CameraSettingsPresentationModel* GetInstance(void);
+
+private:
+ CameraSettingsPresentationModel(void);
+ CameraSettingsPresentationModel(const CameraSettingsPresentationModel&);
+ CameraSettingsPresentationModel& operator = (const CameraSettingsPresentationModel&);
+ virtual ~CameraSettingsPresentationModel(void);
+
+ result Construct(void);
+ result CreateDefaultRegistry(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+ static void DestroyCameraSettingInstance(void);
+ friend class CameraApp;
+
+private:
+ static CameraSettingsPresentationModel* __pCameraSettingsPresentationModel;
+ Tizen::Io::Registry* __pDefaultCameraRegistry;
+ Tizen::Io::Registry* __pAppCameraRegistry;
+};
+
+#endif // _CM_CAMERA_SETTINGS_PRESENTATION_MODEL_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraThumbnailPanel.h
+ * @brief This is the header file for Camera Information Panel class.
+ */
+
+#include <new>
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FUi.h>
+#include "CmCameraResourceManager.h"
+
+#ifndef _CM_CAMERA_THUMBNAIL_PANEL_H_
+#define _CM_CAMERA_THUMBNAIL_PANEL_H_
+
+class CameraThumbnailPanel
+ : public Tizen::Ui::Controls::Panel
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ CameraThumbnailPanel(void);
+ virtual ~CameraThumbnailPanel(void);
+ result Initialize(Tizen::Graphics::Rectangle rect);
+
+ void SetOldBitmap(Tizen::Graphics::Bitmap* pBmp);
+ void SetNewBitmap(Tizen::Graphics::Bitmap* pBmp);
+ void SetCAFBitmap(Tizen::Graphics::Bitmap* pBmp);
+ void SetDrawSliderImg(void);
+
+ virtual result OnDraw(void);
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+private:
+ Tizen::Graphics::Bitmap* __pOldBitmap;
+ Tizen::Graphics::Bitmap* __pNewBitmap;
+ Tizen::Graphics::Bitmap* __pBackUpBitmap;
+ Tizen::Graphics::Bitmap* __pBackgroundBitmap;
+ Tizen::Graphics::Bitmap* __pCAFBitmap;
+ Tizen::Graphics::Canvas* __pCanvas;
+ Tizen::Base::Runtime::Timer* __pAnimationTimer;
+ Tizen::Ui::OrientationStatus __dir;
+ int __count;
+ bool __ImgSilder;
+};
+
+#endif //_CM_CAMERA_THUMBNAIL_PANEL_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmFormFactory.h
+ * @brief This is the header file for CameraFormFactory class.
+ */
+
+#ifndef _CM_FORM_FACTORY_H_
+#define _CM_FORM_FACTORY_H_
+
+#include <new>
+#include <FUi.h>
+#include "CmCamcorderForm.h"
+#include "CmCameraForm.h"
+
+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 // _CM_FORM_FACTORY_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmICameraEventListener.h
+ * @brief This is the header file for ICameraActionEventListener class.
+ */
+
+#ifndef _CM_ICAMERA_EVENT_LISTENER_H_
+#define _CM_ICAMERA_EVENT_LISTENER_H_
+
+enum CameraActionEvent
+{
+ CAMERA_ACTION_EVENT_AUTO_FOCUSED
+ , CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED
+ , CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED
+ , CAMERA_ACTION_EVENT_PREVIEWED
+ , CAMERA_ACTION_EVENT_CAPTURED
+ , CAMERA_ACTION_EVENT_ERROR_OCCURRED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_CANCELED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_CLOSED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_END_REACHED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_PAUSED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_STARTED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_STOPPED
+ , CAMERA_ACTION_EVENT_CAMERA_PREVIEWED
+ , CAMERA_ACTION_EVENT_VIDEO_RECORDER_PREVIEWED
+ , CAMERA_ACTION_EVENT_CAMERA_THUMBNAIL_BUTTON_LOCK
+ , CAMERA_ACTION_EVENT_VIDEO_THUMBNAIL_BUTTON_LOCK
+ , CAMERA_ACTION_EVENT_FRAME_ACTIVATED
+ , CAMERA_ACTION_EVENT_FRAME_DEACTIVATED
+ , CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED
+ , CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT
+ , CAMERA_ACTION_EVENT_MAX
+};
+
+class ICameraEventListner
+{
+public:
+ virtual ~ICameraEventListner(void){}
+
+ virtual void OnCameraActionPerformed(CameraActionEvent event) = 0;
+};
+
+#endif // _CM_ICAMERA_EVENT_LISTENER_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmMainFrame.h
+ * @brief This is the header file for MainFrame class.
+ */
+
+#ifndef _CM_MAIN_FRAME_H_
+#define _CM_MAIN_FRAME_H_
+
+#include <FApp.h>
+#include <FUi.h>
+#include "CmFormFactory.h"
+
+class MainFrame
+ : public Tizen::Ui::Controls::Frame
+ , public Tizen::Ui::Controls::IFrameEventListener
+{
+public:
+ MainFrame(void);
+ virtual ~MainFrame(void);
+
+ result Initialize(const int mode);
+ result StartAppControl(RequestId requestId, Tizen::Base::Collection::ArrayList* pArgs);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+
+ virtual void OnFrameActivated(const Tizen::Ui::Controls::Frame& source);
+ virtual void OnFrameDeactivated(const Tizen::Ui::Controls::Frame& source);
+ virtual void OnFrameTerminating(const Tizen::Ui::Controls::Frame& source);
+
+public:
+ static const RequestId IDA_FORM_CAMERA = 104;
+ static const RequestId IDA_FORM_CAMCORDER = 105;
+
+private:
+ bool __isAppControlRequst;
+};
+
+#endif // _CM_MAIN_FRAME_H_
\ No newline at end of file
--- /dev/null
+//
+// 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 CmTypes.h
+ * @brief The list of literal strings for Settings registry
+ */
+
+#ifndef _CM_TYPES_H_
+#define _CM_TYPES_H_
+
+enum ActionID
+{
+ IDA_BUTTON_CAMCORDER_FLASH = 101,
+ IDA_BUTTON_CAMCORDER_SELF = 102,
+ IDA_BUTTON_CAMCORDER_SETTING = 103,
+ IDA_BUTTON_CAMCORDER_RECORD = 104,
+ IDA_BUTTON_CAMCORDER_THUMBNAIL = 105,
+ IDA_BUTTON_CAMCORDER_CANCEL = 106,
+ IDA_BUTTON_CAMERA_FLASH = 201,
+ IDA_BUTTON_CAMERA_SELF = 202,
+ IDA_BUTTON_CAMERA_SETTING = 203,
+ IDA_BUTTON_CAMERA_THUMBNAIL = 204,
+};
+
+extern const unsigned int COLOR_SETTING_MENU_TITLE;
+extern const unsigned int COLOR_SETTING_MENU_VAULE;
+extern const unsigned int COLOR_SETTING_MENU_VALUE_DISABLE;
+extern const unsigned int COLOR_PANEL_BACKGROUND_BLACK;
+extern const unsigned int COLOR_PANEL_BACKGROUND_GRAY;
+extern const unsigned int COLOR_GUIDELINE;
+extern const unsigned int COLOR_TITLE;
+extern const unsigned int COLOR_TIMER_TEXT;
+
+extern const int X_THUMBNAIL_IMG_PANEL_LANDSCPAE_WVGA;
+extern const int X_THUMBNAIL_IMG_PANEL_LANDSCPAE;
+extern const int Y_THUMBNAIL_IMG_PANEL_LANDSCPAE;
+extern const int W_THUMBNAIL_IMG_PANEL_LANDSCPAE;
+extern const int H_THUMBNAIL_IMG_PANEL_LANDSCPAE;
+
+extern const int X_THUMBNAIL_IMG_PANEL_PORTRAIT;
+extern const int Y_THUMBNAIL_IMG_PANEL_PORTRAIT_WVGA;
+extern const int Y_THUMBNAIL_IMG_PANEL_PORTRAIT;
+extern const int W_THUMBNAIL_IMG_PANEL_PORTRAIT;
+extern const int H_THUMBNAIL_IMG_PANEL_PORTRAIT;
+
+extern const int STORAGE_TYPE_PHONE;
+extern const int STORAGE_TYPE_MEMORYCARD;
+extern const int MAX_DIRECTORY_PATH_LENGTH;
+extern const int APP_CONTROL_TYPE_STANDARD;
+extern const int APP_CONTROL_TYPE_REQUESET;
+
+extern const wchar_t* SECTION_CAMERA;
+extern const wchar_t* SECTION_CAMCORDER;
+
+extern const wchar_t* APPCONTROL_KEY_TYPE;
+extern const wchar_t* APPCONTROL_KEY_PATH;
+extern const wchar_t* APPCONTROL_KEY_INDEX;
+extern const wchar_t* APPCONTROL_DATA_CAMERA;
+extern const wchar_t* APPCONTROL_DATA_CAMCORDER;
+
+extern const wchar_t* CURRENT_MODE;
+extern const wchar_t* FLASH_MODE;
+extern const wchar_t* SELF_PORTRAIT_ENABLE;
+extern const wchar_t* SHOOTING_MODE;
+extern const wchar_t* EXPOSURE_VALUE;
+extern const wchar_t* BRIGHTNESS_VALUE;
+extern const wchar_t* TIMER_INTERVAL;
+extern const wchar_t* ISO_VALUE;
+extern const wchar_t* WHITE_BALANCE_TYPE;
+extern const wchar_t* EXPOSURE_METERING_TYPE;
+extern const wchar_t* GEO_TAGGING_ENABLE;
+extern const wchar_t* GUIDELINE_ENABLE;
+extern const wchar_t* CAPTURE_RESOLUTION;
+extern const wchar_t* STORAGE_TYPE;
+extern const wchar_t* RECORDING_MODE;
+
+extern const wchar_t* IDS_TYPE_IMAGE;
+extern const wchar_t* APPCONTROL_PROVIDER_ID_IMAGEVIEW;
+extern const wchar_t* APPCONTROL_OPERATION_ID_IMAGEVIEW;
+extern const wchar_t* STRING_CAMERA_FOLDER;
+
+extern const wchar_t* IDS_CAM_BODY_FLASH;
+extern const wchar_t* IDS_CAM_BODY_SETTINGS;
+extern const wchar_t* IDS_CAM_BODY_AUTO;
+extern const wchar_t* IDS_CAM_BODY_OFF;
+extern const wchar_t* IDS_CAM_BODY_ON;
+extern const wchar_t* IDS_CAM_OPT_EXPOSURE_VALUE;
+extern const wchar_t* IDS_MENU_EXPOSURE_M20;
+extern const wchar_t* IDS_MENU_EXPOSURE_M15;
+extern const wchar_t* IDS_MENU_EXPOSURE_M10;
+extern const wchar_t* IDS_MENU_EXPOSURE_M05;
+extern const wchar_t* IDS_MENU_EXPOSURE_00;
+extern const wchar_t* IDS_MENU_EXPOSURE_P05;
+extern const wchar_t* IDS_MENU_EXPOSURE_P10;
+extern const wchar_t* IDS_MENU_EXPOSURE_P15;
+extern const wchar_t* IDS_MENU_EXPOSURE_P20;
+extern const wchar_t* IDS_CAM_BODY_TIMER;
+extern const wchar_t* IDS_CAM_BODY_2_SEC;
+extern const wchar_t* IDS_CAM_BODY_5_SEC;
+extern const wchar_t* IDS_CAM_BODY_10_SEC;
+extern const wchar_t* IDS_CAM_BODY_ISO;
+extern const wchar_t* IDS_MENU_ISO_50;
+extern const wchar_t* IDS_MENU_ISO_100;
+extern const wchar_t* IDS_MENU_ISO_200;
+extern const wchar_t* IDS_MENU_ISO_400;
+extern const wchar_t* IDS_MENU_ISO_800;
+extern const wchar_t* IDS_CAM_OPT_WHITE_BALANCE_ABB;
+extern const wchar_t* IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT;
+extern const wchar_t* IDS_CAM_BODY_FLUORESCENT;
+extern const wchar_t* IDS_CAM_BODY_DAYLIGHT;
+extern const wchar_t* IDS_CAM_BODY_CLOUDY;
+extern const wchar_t* IDS_CAM_BODY_GUIDELINE;
+extern const wchar_t* IDS_CAM_BODY_STORAGE;
+extern const wchar_t* IDS_COM_BODY_PHONE;
+extern const wchar_t* IDS_CAM_OPT_MEMORY_CARD;
+extern const wchar_t* IDS_CAM_BODY_RESOLUTION;
+extern const wchar_t* IDS_CAM_BODY_RESET_SETTINGS_RESET;
+
+#endif // _CM_TYPES_H_
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+ <Id>hdufar9ycj</Id>
+ <Version>1.0.0</Version>
+ <Type>C++App</Type>
+ <Author/>
+ <Descriptions/>
+ <Requirements>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch">armv7</Feature>
+ </Requirements>
+ <Apps>
+ <ApiVersion>2.0</ApiVersion>
+ <Privileges>
+ <Privilege>http://tizen.org/privilege/content.read</Privilege>
+ <Privilege>http://tizen.org/privilege/location</Privilege>
+ <Privilege>http://tizen.org/privilege/alarm</Privilege>
+ <Privilege>http://tizen.org/privilege/videorecorder</Privilege>
+ <Privilege>http://tizen.org/privilege/camera</Privilege>
+ <Privilege>http://tizen.org/privilege/power</Privilege>
+ <Privilege>http://tizen.org/privilege/content.write</Privilege>
+ <Privilege>http://tizen.org/privilege/telephonymanager</Privilege>
+ <Privilege>http://tizen.org/privilege/systeminfo</Privilege>
+ <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+ </Privileges>
+ <UiApp HwAcceleration="Off" Main="True" MenuIconVisible="True" Name="Camera" SubMode="True">
+ <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+ <UiTheme SystemTheme="White"/>
+ <DisplayNames>
+ <DisplayName Locale="eng-PH">Camera-Ref</DisplayName>
+ <DisplayName Locale="zho-SG">照相机-Ref</DisplayName>
+ <DisplayName Locale="kat-GE">ფოტოაპარატი-Ref</DisplayName>
+ <DisplayName Locale="est-EE">Kaamera-Ref</DisplayName>
+ <DisplayName Locale="ukr-UA">Камера-Ref</DisplayName>
+ <DisplayName Locale="srp-RS">Kamera-Ref</DisplayName>
+ <DisplayName Locale="hrv-HR">Kamera-Ref</DisplayName>
+ <DisplayName Locale="isl-IS">Myndavél-Ref</DisplayName>
+ <DisplayName Locale="ell-GR">Κάμερα-Ref</DisplayName>
+ <DisplayName Locale="glg-ES">Cámara-Ref</DisplayName>
+ <DisplayName Locale="lit-LT">Fotoapar.-Ref</DisplayName>
+ <DisplayName Locale="aze-AZ">Kamera-Ref</DisplayName>
+ <DisplayName Locale="eng-US">Camera-Ref</DisplayName>
+ <DisplayName Locale="mkd-MK">Камера-Ref</DisplayName>
+ <DisplayName Locale="zho-HK">相機-Ref</DisplayName>
+ <DisplayName Locale="hye-AM">Խցիկ-Ref</DisplayName>
+ <DisplayName Locale="hun-HU">Fényképező-Ref</DisplayName>
+ <DisplayName Locale="slk-SK">Fotoaparát-Ref</DisplayName>
+ <DisplayName Locale="ces-CZ">Fotoaparát-Ref</DisplayName>
+ <DisplayName Locale="fin-FI">Kamera-Ref</DisplayName>
+ <DisplayName Locale="ara-AE">الكاميرا-Ref</DisplayName>
+ <DisplayName Locale="ita-IT">Fotocamera-Ref</DisplayName>
+ <DisplayName Locale="eus-ES">Kamera-Ref</DisplayName>
+ <DisplayName Locale="tur-TR">Kamera-Ref</DisplayName>
+ <DisplayName Locale="rus-RU">Камера-Ref</DisplayName>
+ <DisplayName Locale="cat-ES">Càmera-Ref</DisplayName>
+ <DisplayName Locale="kaz-KZ">Камера-Ref</DisplayName>
+ <DisplayName Locale="deu-DE">Kamera-Ref</DisplayName>
+ <DisplayName Locale="zho-CN">照相机-Ref</DisplayName>
+ <DisplayName Locale="por-PT">Câmara-Ref</DisplayName>
+ <DisplayName Locale="slv-SI">Fotoaparat-Ref</DisplayName>
+ <DisplayName Locale="fra-FR">Appareil photo-Ref</DisplayName>
+ <DisplayName Locale="ron-RO">Cameră foto-Ref</DisplayName>
+ <DisplayName Locale="hin-IN">कैमरा-Ref</DisplayName>
+ <DisplayName Locale="fra-CA">Appareil photo-Ref</DisplayName>
+ <DisplayName Locale="spa-ES">Cámara-Ref</DisplayName>
+ <DisplayName Locale="nld-NL">Camera-Ref</DisplayName>
+ <DisplayName Locale="dan-DK">Kamera-Ref</DisplayName>
+ <DisplayName Locale="por-BR">Câmera-Ref</DisplayName>
+ <DisplayName Locale="bul-BG">Камера-Ref</DisplayName>
+ <DisplayName Locale="zho-TW">相機-Ref</DisplayName>
+ <DisplayName Locale="jpn-JP">カメラ-Ref</DisplayName>
+ <DisplayName Locale="swe-SE">Kamera-Ref</DisplayName>
+ <DisplayName Locale="kor-KR">카메라-Ref</DisplayName>
+ <DisplayName Locale="spa-MX">Cámara-Ref</DisplayName>
+ <DisplayName Locale="nob-NO">Kamera-Ref</DisplayName>
+ <DisplayName Locale="uzb-UZ">Kamera-Ref</DisplayName>
+ <DisplayName Locale="pol-PL">Aparat-Ref</DisplayName>
+ <DisplayName Locale="gle-IE">Ceamara-Ref</DisplayName>
+ <DisplayName Locale="eng-GB">Camera-Ref</DisplayName>
+ <DisplayName Locale="lav-LV">Kamera-Ref</DisplayName>
+ </DisplayNames>
+ <Icons>
+ <Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
+ </Icons>
+ <LaunchConditions/>
+ <Notifications>
+ <Notification Name="Ticker">On</Notification>
+ <Notification Name="Sound">On</Notification>
+ <Notification Name="Contents">Off</Notification>
+ <Notification Name="Badge">On</Notification>
+ </Notifications>
+ </UiApp>
+ </Apps>
+</Manifest>
--- /dev/null
+Name: apps.Camera
+Summary: Camera 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-content)
+BuildRequires: pkgconfig(osp-appfw)
+BuildRequires: pkgconfig(osp-uifw)
+BuildRequires: osp-appfw-internal-devel
+BuildRequires: osp-uifw-internal-devel
+BuildRequires: pkgconfig(osp-uifw)
+BuildRequires: osp-uifw-internal-devel
+BuildRequires: pkgconfig(osp-media)
+BuildRequires: osp-media-internal-devel
+BuildRequires: pkgconfig(osp-image)
+BuildRequires: osp-media-internal-devel
+BuildRequires: pkgconfig(osp-net)
+BuildRequires: osp-net-internal-devel
+BuildRequires: pkgconfig(osp-image-core)
+BuildRequires: pkgconfig(osp-locations)
+BuildRequires: pkgconfig(osp-telephony)
+
+Requires: osp-installer
+
+%description
+Verification application: Camera
+
+%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=hdufar9ycj
+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/Camera
+
+%postun
+/sbin/ldconfig
+PKG_ID=hdufar9ycj
+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/*
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">توازن اللون الأبيض</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">قيمة الإضاءة</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">إرجاع الضبط؟</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">براق</text>
+ <text id="IDS_CAM_BODY_ON">مفعل</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">خطوط الإرشاد</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 ثوان</text>
+ <text id="IDS_CAM_BODY_CLOUDY">غائم</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 ثوان</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">نمط التصوير</text>
+ <text id="IDS_CAM_BODY_2_SEC">ثانيتان</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">صور متلاحقة</text>
+ <text id="IDS_CAM_BODY_TIMER">المؤقت</text>
+ <text id="IDS_CAM_BODY_AUTO">تلقائي</text>
+ <text id="IDS_CAM_BODY_SETTINGS">الضبط</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">فلاش</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">يتعذر بدء الكاميرا أثناء المكالمة</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">بطاقة الذاكرة</text>
+ <text id="IDS_CAM_BODY_OFF">إيقاف تشغيل</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">مشع</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">إرجاع</text>
+ <text id="IDS_CAM_BODY_SINGLE">فردي</text>
+ <text id="IDS_COM_BODY_PHONE">الهاتف</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">البطارية ضعيفة</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">الدقة</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">ضوء النهار</text>
+ <text id="IDS_CAM_BODY_STORAGE">مكان التخزين</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Ağ balans</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Foto-ekspozisiya müddəti</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Parametrlər sıfırlansın?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Közərmə</text>
+ <text id="IDS_CAM_BODY_ON">Qoş</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Göstərişlər</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 san</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Buludlu</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 san</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Çəkiliş rejimi</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 san</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Partlayış çəkilişi</text>
+ <text id="IDS_CAM_BODY_TIMER">Taymer</text>
+ <text id="IDS_CAM_BODY_AUTO">Avtomatik</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Parametrlər</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Parlaq işıq</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Zəng ərzində kameranı başlatmaq mümkün deyil</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Yaddaş kartı</text>
+ <text id="IDS_CAM_BODY_OFF">Söndür</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Flüoresent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Sıfırlansın</text>
+ <text id="IDS_CAM_BODY_SINGLE">Tək</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batareya zəifdir</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rezolyusiya</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Gündüz</text>
+ <text id="IDS_CAM_BODY_STORAGE">Ehtiyat</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Баланс на бялото</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Стойност на експонацията</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Нyлиране на настройките?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Изкуствено осветление</text>
+ <text id="IDS_CAM_BODY_ON">Включено</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Направляващи линии</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 сек</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Облачно</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 сек</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Режим на снимане</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 сек</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Бързо снимане</text>
+ <text id="IDS_CAM_BODY_TIMER">Таймер</text>
+ <text id="IDS_CAM_BODY_AUTO">Авто</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Настройки</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Светкавица</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Не може да пусне камерата\nпо време на разговор</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Карта с памет</text>
+ <text id="IDS_CAM_BODY_OFF">Изключено</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Флуоресцентен</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Нyлиране</text>
+ <text id="IDS_CAM_BODY_SINGLE">Единична</text>
+ <text id="IDS_COM_BODY_PHONE">Телефон</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Изтощена батерия</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Разделителна способност</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Дневна светлина</text>
+ <text id="IDS_CAM_BODY_STORAGE">Устройство за съхранение на данни</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balanç de blancs</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor d'exposició</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Restablir ajustaments?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">Activat</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Instruccions</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Ennuvolat</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Mode disparament</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Ràfega</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporitzador</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ajustaments</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flaix</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">No es pot iniciar la càmera durant la trucada</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Targeta de memòria</text>
+ <text id="IDS_CAM_BODY_OFF">Desactivat</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Restablir</text>
+ <text id="IDS_CAM_BODY_SINGLE">Senzill</text>
+ <text id="IDS_COM_BODY_PHONE">Telèfon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Bateria baixa</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolució</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Llum diürna</text>
+ <text id="IDS_CAM_BODY_STORAGE">Emmagatzematge</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Vyvážení bílé</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Hodnota expozice</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Vynulovat nastavení?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Žhnoucí</text>
+ <text id="IDS_CAM_BODY_ON">Zapnout</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Vodící linky</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Oblačno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Režim fotografování</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sériové snímání</text>
+ <text id="IDS_CAM_BODY_TIMER">Samospoušť</text>
+ <text id="IDS_CAM_BODY_AUTO">Automaticky</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Nastavení</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Blesk</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Během hovoru nelze\nspustit fotoaparát</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Paměťová karta</text>
+ <text id="IDS_CAM_BODY_OFF">Vypnout</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Zářivka</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Vynulovat</text>
+ <text id="IDS_CAM_BODY_SINGLE">Jeden snímek</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Vybitá baterie</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rozlišení</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Denní světlo</text>
+ <text id="IDS_CAM_BODY_STORAGE">Úložiště</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Hvidbalance</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Eksponeringsværdi</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Nulstil indstillinger?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Hvidglødende</text>
+ <text id="IDS_CAM_BODY_ON">Til</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Hjælpelinjer</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Skyet</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fototilstand</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Burst-billede</text>
+ <text id="IDS_CAM_BODY_TIMER">Selvudløser</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Indstillinger</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Kameralys</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Kan ikke starte kamera\nunder opkald</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Hukommelseskort</text>
+ <text id="IDS_CAM_BODY_OFF">Fra</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescerende</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Nulstil</text>
+ <text id="IDS_CAM_BODY_SINGLE">Enkelt</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Lavt batteriniveau</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Opløsning</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dagslys</text>
+ <text id="IDS_CAM_BODY_STORAGE">Lagring</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Weißabgl.</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Belichtungswert</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Einstellungen zurücksetzen?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Glühlampenlicht</text>
+ <text id="IDS_CAM_BODY_ON">Ein</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Hilfslinien</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 Sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Bewölkt</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 Sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Aufnahmemodus</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 Sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Serienbilder</text>
+ <text id="IDS_CAM_BODY_TIMER">Selbstauslöser</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Einstellungen</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Fotolicht</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Starten der Kamera während\nAnruf nicht möglich</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Speicherkarte</text>
+ <text id="IDS_CAM_BODY_OFF">Aus</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluoreszierend</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Zurücksetzen</text>
+ <text id="IDS_CAM_BODY_SINGLE">Einzeln</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Akku fast leer</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Auflösung</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Tageslicht</text>
+ <text id="IDS_CAM_BODY_STORAGE">Speicher</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Εξισορρόπ.λευκού</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Τιμή έκθεσης</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Επαναφορά ρυθμίσεων;</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Πυρακτώσεως</text>
+ <text id="IDS_CAM_BODY_ON">Ενεργό</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Οδηγίες</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 δευτ.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Συννεφιά</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 δευτ.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Λειτουργία λήψης</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 δευτ.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Λειτ. συνεχούς λήψης</text>
+ <text id="IDS_CAM_BODY_TIMER">Χρονομετρητής</text>
+ <text id="IDS_CAM_BODY_AUTO">Αυτόματο</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ρυθμίσεις</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Φλας</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Δεν είναι δυνατή η εκκίνηση κάμερας\nκατά την κλήση</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Κάρτα μνήμης</text>
+ <text id="IDS_CAM_BODY_OFF">Ανενεργό</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Φθορισμού</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Επαναφορά</text>
+ <text id="IDS_CAM_BODY_SINGLE">Μονή</text>
+ <text id="IDS_COM_BODY_PHONE">Τηλέφωνο</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Χαμηλή μπαταρία</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Ανάλυση</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Φως ημέρας</text>
+ <text id="IDS_CAM_BODY_STORAGE">Αποθήκευση</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">White balance</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Exposure value</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Reset settings?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">On</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Guidelines</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 secs</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Cloudy</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 secs</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Shooting mode</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 secs</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Burst shot</text>
+ <text id="IDS_CAM_BODY_TIMER">Timer</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Settings</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Unable to start Camera during call</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memory card</text>
+ <text id="IDS_CAM_BODY_OFF">Off</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Reset</text>
+ <text id="IDS_CAM_BODY_SINGLE">Single</text>
+ <text id="IDS_COM_BODY_PHONE">Phone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Low battery</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolution</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Daylight</text>
+ <text id="IDS_CAM_BODY_STORAGE">Storage</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">White balance</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Exposure value</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Reset settings?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">On</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Guidelines</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 secs</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Cloudy</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 secs</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Shooting mode</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 secs</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Burst shot</text>
+ <text id="IDS_CAM_BODY_TIMER">Timer</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Settings</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Unable to start camera during call</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memory card</text>
+ <text id="IDS_CAM_BODY_OFF">Off</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Reset</text>
+ <text id="IDS_CAM_BODY_SINGLE">Single</text>
+ <text id="IDS_COM_BODY_PHONE">Phone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Low battery</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolution</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Daylight</text>
+ <text id="IDS_CAM_BODY_STORAGE">Storage</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">White balance</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Exposure value</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Reset settings?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">On</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Guidelines</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sec</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Cloudy</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sec</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Shooting mode</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sec</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Burst shot</text>
+ <text id="IDS_CAM_BODY_TIMER">Timer</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Settings</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Unable to start camera during call</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memory card</text>
+ <text id="IDS_CAM_BODY_OFF">Off</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Reset</text>
+ <text id="IDS_CAM_BODY_SINGLE">Single</text>
+ <text id="IDS_COM_BODY_PHONE">Phone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Low battery</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolution</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Daylight</text>
+ <text id="IDS_CAM_BODY_STORAGE">Storage</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Valge tasakaal</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Säritusväärtus</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Lähtestada seaded?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Ergav</text>
+ <text id="IDS_CAM_BODY_ON">Sees</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Juhised</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Pilves</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Pildistusrežiim</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sarivõte</text>
+ <text id="IDS_CAM_BODY_TIMER">Taimer</text>
+ <text id="IDS_CAM_BODY_AUTO">Automaatne</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Seaded</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Välk</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Kõne ajal ei saa\nkaamerat käivitada</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Mälukaart</text>
+ <text id="IDS_CAM_BODY_OFF">Väljas</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Kiiskav</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Lähtesta</text>
+ <text id="IDS_CAM_BODY_SINGLE">Ühene</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Aku on peaaegu tühi</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Eraldusvõime</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Päevavalgus</text>
+ <text id="IDS_CAM_BODY_STORAGE">Hoiundamine</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Zuri-balantzea</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Irekidura balioa</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Konfigurazioa berrabiarazi?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Goritasunezkoa</text>
+ <text id="IDS_CAM_BODY_ON">Aktibatuta</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Gida marrak</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Lainotua</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Kliskatze modua</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Jarraikako ateratzea</text>
+ <text id="IDS_CAM_BODY_TIMER">Tenporizadorea</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ezarpenak</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flasha</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Ezin da kamera abiarazi\ndeian zehar</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memoria txartela</text>
+ <text id="IDS_CAM_BODY_OFF">Desaktibatuta</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluoreszentea</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Berrezarri</text>
+ <text id="IDS_CAM_BODY_SINGLE">Bakarra</text>
+ <text id="IDS_COM_BODY_PHONE">Telefonoa</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Bateria gutxi</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Bereizmena</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Egun-argia</text>
+ <text id="IDS_CAM_BODY_STORAGE">Biltegiratzea</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Valkotasapaino</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valotusarvo</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Nollataanko asetukset?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Hehkulampun valo</text>
+ <text id="IDS_CAM_BODY_ON">Päällä</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Suuntaviivat</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Pilvinen</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Kuvaustila</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sarjakuvaus</text>
+ <text id="IDS_CAM_BODY_TIMER">Ajastin</text>
+ <text id="IDS_CAM_BODY_AUTO">Automaattinen</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Asetukset</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Salama</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Kameraa ei voi käyttää puhelun aikana</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Muistikortti</text>
+ <text id="IDS_CAM_BODY_OFF">Pois</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Loistevalo</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Nollaa</text>
+ <text id="IDS_CAM_BODY_SINGLE">Yksi</text>
+ <text id="IDS_COM_BODY_PHONE">Puhelin</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Akku on loppumassa</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Tarkkuus</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Päivänvalo</text>
+ <text id="IDS_CAM_BODY_STORAGE">Tallennustila</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Équilibre des blancs</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valeur d'exposition</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Réinitialiser les paramètres ?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">Activé</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Grille repère</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nuageux</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Mode prise de vue</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Rafale</text>
+ <text id="IDS_CAM_BODY_TIMER">Retardateur</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Paramètres</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Impossible de lancer l'appareil photo pendant un appel</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Carte mémoire</text>
+ <text id="IDS_CAM_BODY_OFF">Désactivé</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Réinitialiser</text>
+ <text id="IDS_CAM_BODY_SINGLE">Unique</text>
+ <text id="IDS_COM_BODY_PHONE">Téléphone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Pile faible</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Résolution</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Lumière du jour</text>
+ <text id="IDS_CAM_BODY_STORAGE">Stockage</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balance des blancs</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valeur d'exposition</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Réinitialiser les paramètres ?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">Activé</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Guide</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sec</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nuageux</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sec</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Mode de capture</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sec</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Rafale</text>
+ <text id="IDS_CAM_BODY_TIMER">Retardateur</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto.</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Paramètres</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Appareil photo non disponible\npendant appel</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Carte mémoire</text>
+ <text id="IDS_CAM_BODY_OFF">Désactivé</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Réinitialiser</text>
+ <text id="IDS_CAM_BODY_SINGLE">Unique</text>
+ <text id="IDS_COM_BODY_PHONE">Téléphone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batterie faible</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Résolution</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Lumière naturelle</text>
+ <text id="IDS_CAM_BODY_STORAGE">Stockage</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Leibhéal bán</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Luach nochta</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Athshocraigh socruithe?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Gealbhruthach</text>
+ <text id="IDS_CAM_BODY_ON">Air</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Treoirlínte</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 shoic</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Scamallach</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 soic</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Mód scannánaíochta</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 shoic</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Seat rúisce</text>
+ <text id="IDS_CAM_BODY_TIMER">Amadóir</text>
+ <text id="IDS_CAM_BODY_AUTO">Uath-</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Socruithe</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Splanc</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Ní féidir Ceamara a thosú le linn glao</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Cárta cuimhne</text>
+ <text id="IDS_CAM_BODY_OFF">As</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluaraiseach</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Athshocraigh</text>
+ <text id="IDS_CAM_BODY_SINGLE">Singil</text>
+ <text id="IDS_COM_BODY_PHONE">Fón</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Ceallra lag</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Taifeach</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Solas an Lae</text>
+ <text id="IDS_CAM_BODY_STORAGE">Stóras</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balance de brancos</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor de exposición</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Restablecer axustes?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescente</text>
+ <text id="IDS_CAM_BODY_ON">Activada</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Pautas</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nubrado</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modo disparo</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Refacho</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizador</text>
+ <text id="IDS_CAM_BODY_AUTO">Automático</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Axustes</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Non se pode iniciar a cámara\ndurante unha chamada</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Tarxeta de memoria</text>
+ <text id="IDS_CAM_BODY_OFF">Desactivado</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Restablecer</text>
+ <text id="IDS_CAM_BODY_SINGLE">Sinxelo</text>
+ <text id="IDS_COM_BODY_PHONE">Teléfono</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batería baixa</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolución</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luz diúrna</text>
+ <text id="IDS_CAM_BODY_STORAGE">Almacenamento</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">ह्वाइट बैलेंस</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">एक्सपोज़र मान</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">सेटिंग्स रीसेट करें?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">उज्ज्वल</text>
+ <text id="IDS_CAM_BODY_ON">चालू</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">गाइडलाइंस</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 से.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">क्लाउडी</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 से.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">शूटिंग मोड</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 से.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">बर्स्ट शॉट</text>
+ <text id="IDS_CAM_BODY_TIMER">टाइमर</text>
+ <text id="IDS_CAM_BODY_AUTO">स्वतः</text>
+ <text id="IDS_CAM_BODY_SETTINGS">सेटिंग्स</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">चमक</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">कॉल के दौरान कैमरा चालू करने में अक्षम</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">मेमोरी कार्ड</text>
+ <text id="IDS_CAM_BODY_OFF">बंद</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">प्रतिदीप्ति</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">रीसेट</text>
+ <text id="IDS_CAM_BODY_SINGLE">एकल</text>
+ <text id="IDS_COM_BODY_PHONE">फोन</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">बैटरी कम है</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">रेज़ोल्यूशन</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">डेलाइट</text>
+ <text id="IDS_CAM_BODY_STORAGE">स्टोरेज</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Korekcija bijele boje</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Vrijednost ekspozicije</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Poništiti postavke?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Žarulja</text>
+ <text id="IDS_CAM_BODY_ON">Uključi</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Smjernice</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Oblačno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Način fotografiranja</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Uzastopno</text>
+ <text id="IDS_CAM_BODY_TIMER">Odbrojavanje</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Postavke</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Bljeskalica</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Nemoguće pokrenuti kameru tijekom poziva</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Mem. kartica</text>
+ <text id="IDS_CAM_BODY_OFF">Isključi</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent.</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Poništavanje</text>
+ <text id="IDS_CAM_BODY_SINGLE">Jedna</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Baterija skoro prazna</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rezolucija</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dnevna</text>
+ <text id="IDS_CAM_BODY_STORAGE">Spremanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Fehéregyensúly</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Fényérték</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Alapbeáll. visszaállítja?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Lámpafény</text>
+ <text id="IDS_CAM_BODY_ON">Be</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Segédvonalak</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 mp</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Felhős</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 mp</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fénykép mód</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 mp</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sorozatfelvétel</text>
+ <text id="IDS_CAM_BODY_TIMER">Időzítő</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto.</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Beállítások</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Mobilfény</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Hívás közben a Kamera\nnem indítható el</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memóriakártya</text>
+ <text id="IDS_CAM_BODY_OFF">Ki</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fénycső</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Visszaállítás</text>
+ <text id="IDS_CAM_BODY_SINGLE">Egyszerű</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Az akkumulátor lemerült</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Felbontás</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Nappali fény</text>
+ <text id="IDS_CAM_BODY_STORAGE">Tárhely</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Սպիտակի հաշվեկշիռ</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Լուսակայման արժեք</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Զրոյացնե՞լ կայանքները</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Շիկացման լամպ</text>
+ <text id="IDS_CAM_BODY_ON">Միացված է</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Ուղեցույցեր</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 վրկ</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Ամպամած</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 վրկ</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Նկարահանման ռեժիմ</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 վրկ</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Նկարաշարք</text>
+ <text id="IDS_CAM_BODY_TIMER">Ժամանակաչափ</text>
+ <text id="IDS_CAM_BODY_AUTO">Ավտոմատ</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Պարամետրեր</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Բռնկում</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Անհնար է խցիկը միացնել զանգի ընթացքում</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Հիշողության քարտ</text>
+ <text id="IDS_CAM_BODY_OFF">Անջատված</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Ֆլուորեսցենտ</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Զրոյացնել</text>
+ <text id="IDS_CAM_BODY_SINGLE">Մեկ</text>
+ <text id="IDS_COM_BODY_PHONE">Հեռախոս</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Մարտկոցի լիցքը թույլ է</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Լուծաչափ</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Օրվա լուսավոր ժամանակը</text>
+ <text id="IDS_CAM_BODY_STORAGE">Պահոց</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Hvítjöfnun</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Ljósgildi</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Núllstilla?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Venjuleg pera</text>
+ <text id="IDS_CAM_BODY_ON">Kveikt</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Leiðbeiningar</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Skýjað</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Tökustilling</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Myndaröð</text>
+ <text id="IDS_CAM_BODY_TIMER">Niðurteljari</text>
+ <text id="IDS_CAM_BODY_AUTO">Sjálfvirkt</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Stillingar</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flass</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Ekki er hægt að ræsa myndavél\n á meðan símtal stendur yfir</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Minniskort</text>
+ <text id="IDS_CAM_BODY_OFF">Slökkt</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Flúrljós</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Endurstilla</text>
+ <text id="IDS_CAM_BODY_SINGLE">Einn</text>
+ <text id="IDS_COM_BODY_PHONE">Sími</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Rafhlaðan er að tæmast</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Upplausn</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dagsbirta</text>
+ <text id="IDS_CAM_BODY_STORAGE">Geymsla</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Bilanc. bianco</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valore esposizione</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Ripristinare le impostazioni?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescente</text>
+ <text id="IDS_CAM_BODY_ON">Attivo</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Linee guida</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sec</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nuvoloso</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sec</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modalità scatto</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sec</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Scatto multiplo</text>
+ <text id="IDS_CAM_BODY_TIMER">Timer</text>
+ <text id="IDS_CAM_BODY_AUTO">Automatica</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Impostazioni</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Impossibile avviare fotocamera\ndurante la chiamata</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Scheda di memoria</text>
+ <text id="IDS_CAM_BODY_OFF">Non attivo</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Ripristina</text>
+ <text id="IDS_CAM_BODY_SINGLE">Singola</text>
+ <text id="IDS_COM_BODY_PHONE">Telefono</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batteria scarica</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Risoluzione</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luce naturale</text>
+ <text id="IDS_CAM_BODY_STORAGE">Memoria</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">ホワイトバランス</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">露出補正</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">設定をリセットしますか?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">白熱灯</text>
+ <text id="IDS_CAM_BODY_ON">ON</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">補助グリッド</text>
+ <text id="IDS_CAM_BODY_5_SEC">5秒</text>
+ <text id="IDS_CAM_BODY_CLOUDY">曇り</text>
+ <text id="IDS_CAM_BODY_10_SEC">10秒</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">撮影モード</text>
+ <text id="IDS_CAM_BODY_2_SEC">2秒</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">連写</text>
+ <text id="IDS_CAM_BODY_TIMER">タイマー</text>
+ <text id="IDS_CAM_BODY_AUTO">自動</text>
+ <text id="IDS_CAM_BODY_SETTINGS">設定</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">フラッシュ</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">通話中には、カメラを起動できません。</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">外部SDカード</text>
+ <text id="IDS_CAM_BODY_OFF">OFF</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">蛍光灯</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">リセット</text>
+ <text id="IDS_CAM_BODY_SINGLE">シングル</text>
+ <text id="IDS_COM_BODY_PHONE">本体</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">バッテリー残量不足</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">解像度</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">晴天</text>
+ <text id="IDS_CAM_BODY_STORAGE">ストレージ</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">თეთრი ბალანსი</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">ექსპოზიციის ზომა</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">დაბრუნდეს საწყისი პარამეტრები?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">კაშკაშა</text>
+ <text id="IDS_CAM_BODY_ON">ჩართ.</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">მითითებები</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 წმ.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">ღრუბლიანი</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 წმ.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">გადაღების რეჟიმი</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 წმ.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">იმპულსური გადაღება</text>
+ <text id="IDS_CAM_BODY_TIMER">თაიმერი</text>
+ <text id="IDS_CAM_BODY_AUTO">ავტომატური</text>
+ <text id="IDS_CAM_BODY_SETTINGS">პარამეტრები</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">ნათება</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">კამერას ვერ ჩართავთ ზარის დროს</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">მეხსიერების ბარათი</text>
+ <text id="IDS_CAM_BODY_OFF">გამორთ.</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">ფლუორესცენტული</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">გადატვირთვა</text>
+ <text id="IDS_CAM_BODY_SINGLE">ერთიანი</text>
+ <text id="IDS_COM_BODY_PHONE">ტელეფონი</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">კვების ელემენტი იცლება</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">გარჩევადობა</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">დღის განათ.</text>
+ <text id="IDS_CAM_BODY_STORAGE">მეხსიერება</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Ақ баланс</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Экспозиция мәні</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Реттегіштерді қосасыз ба?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Қыздыру шамы</text>
+ <text id="IDS_CAM_BODY_ON">Қосылған</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Тор</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 сек</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Бұлтты</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 сек</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Түсірілім режимі</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 сек</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Пакеттік түсіру</text>
+ <text id="IDS_CAM_BODY_TIMER">Таймер</text>
+ <text id="IDS_CAM_BODY_AUTO">Авто</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Қондырғ-р</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Жарық</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Камераны ашу мүмкін емес\nқоңырау шалу кезінде</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Жад картасы</text>
+ <text id="IDS_CAM_BODY_OFF">Өшірілген</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Флуоресцентті</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Алып тастау</text>
+ <text id="IDS_CAM_BODY_SINGLE">Жалғыз өзі</text>
+ <text id="IDS_COM_BODY_PHONE">Телефон</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Батареяның заряды аз</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Шешім</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Күндізгі жарық</text>
+ <text id="IDS_CAM_BODY_STORAGE">Сақтау орны</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">화이트밸런스</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">노출</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">초기화할까요?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">백열등</text>
+ <text id="IDS_CAM_BODY_ON">켜기</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">안내선</text>
+ <text id="IDS_CAM_BODY_5_SEC">5초</text>
+ <text id="IDS_CAM_BODY_CLOUDY">흐린날</text>
+ <text id="IDS_CAM_BODY_10_SEC">10초</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">촬영 모드</text>
+ <text id="IDS_CAM_BODY_2_SEC">2초</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">버스트 샷</text>
+ <text id="IDS_CAM_BODY_TIMER">타이머</text>
+ <text id="IDS_CAM_BODY_AUTO">자동</text>
+ <text id="IDS_CAM_BODY_SETTINGS">설정</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">플래시</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">통화 중에는 카메라를 실행할 수 없습니다</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">메모리 카드</text>
+ <text id="IDS_CAM_BODY_OFF">끄기</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">형광등</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">초기화</text>
+ <text id="IDS_CAM_BODY_SINGLE">일반</text>
+ <text id="IDS_COM_BODY_PHONE">휴대폰</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">배터리가 부족합니다</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">해상도</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">태양광</text>
+ <text id="IDS_CAM_BODY_STORAGE">저장소</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Baltā balanss</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Ekspozīcijas vērtība</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Vai atjaunot iestatījumus?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Kvēlspuldze</text>
+ <text id="IDS_CAM_BODY_ON">Ieslēgt</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Instrukcija</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Mākoņains</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fotografēšanas režīms</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sērijveida foto</text>
+ <text id="IDS_CAM_BODY_TIMER">Taimeris</text>
+ <text id="IDS_CAM_BODY_AUTO">Automātiski</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Iestatījumi</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Zibspuldze</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Zvana laikā nevar\nstartēt kameru</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Atmiņas karte</text>
+ <text id="IDS_CAM_BODY_OFF">Izslēgt</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Dienasgaismas lampa</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Atiestatīt</text>
+ <text id="IDS_CAM_BODY_SINGLE">Viens</text>
+ <text id="IDS_COM_BODY_PHONE">Tālrunis</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Akumulators gandrīz tukšs</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Izšķirtspēja</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dienasgaisma</text>
+ <text id="IDS_CAM_BODY_STORAGE">Krātuve</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balt. sp. bal.</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Ekspozicijos vertė</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Iš naujo nustatyti nustatymus?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Kaitinamoji lempa</text>
+ <text id="IDS_CAM_BODY_ON">Įjungti</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Instrukcijos</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Debesuota</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fotografavimo režimas</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Nepertrauk. fotogr.</text>
+ <text id="IDS_CAM_BODY_TIMER">Laikmatis</text>
+ <text id="IDS_CAM_BODY_AUTO">Automatinis</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Nustat.</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Blykstė</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Pokalbio metu\nfotoaparato įjungti negalima</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Atminties kortelė</text>
+ <text id="IDS_CAM_BODY_OFF">Išjungti</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescentinis</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Nustatymas iš naujo</text>
+ <text id="IDS_CAM_BODY_SINGLE">Vienas</text>
+ <text id="IDS_COM_BODY_PHONE">Telefonas</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Senka akumuliatorius!</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Raiška</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dienos šviesa</text>
+ <text id="IDS_CAM_BODY_STORAGE">Saugykla</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Баланс на бело</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Вредност на експозиција</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Ресетирај го нагодувањето?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Светло од сијалица</text>
+ <text id="IDS_CAM_BODY_ON">Вклучено</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Со водилки</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 сек.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Облачно</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 сек.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Режим за сликање</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 сек.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Рафално сликање</text>
+ <text id="IDS_CAM_BODY_TIMER">Тајмер</text>
+ <text id="IDS_CAM_BODY_AUTO">Автоматски</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Опции</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Блиц</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Не може да се вклучи фотоапаратот за време на повик</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Мемориска картичка</text>
+ <text id="IDS_CAM_BODY_OFF">Исклучено</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Флуоресцентно</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Ресетирај</text>
+ <text id="IDS_CAM_BODY_SINGLE">Единечен</text>
+ <text id="IDS_COM_BODY_PHONE">Телефон</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Батеријата е празна</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Резолуција</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Дневна светлина</text>
+ <text id="IDS_CAM_BODY_STORAGE">Меморија</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Witbalans</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Belichtingswaarde</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Instellingen resetten?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Kunstlicht</text>
+ <text id="IDS_CAM_BODY_ON">Aan</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Richtlijnen</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sec.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Bewolkt</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sec.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fotostand</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sec.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Continu-opname</text>
+ <text id="IDS_CAM_BODY_TIMER">Timer</text>
+ <text id="IDS_CAM_BODY_AUTO">Automatisch</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Instellingen</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flitser</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Kan camera tijdens\noproep niet starten</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Geheugenkaart</text>
+ <text id="IDS_CAM_BODY_OFF">Uit</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">TL-verlichting</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Resetten</text>
+ <text id="IDS_CAM_BODY_SINGLE">Eén</text>
+ <text id="IDS_COM_BODY_PHONE">Telefoon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batterij bijna leeg</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolutie</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Daglicht</text>
+ <text id="IDS_CAM_BODY_STORAGE">Opslag</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Hvitbalanse</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Ekspon.verdi</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Nullstille innstillinger?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Hvitglødende</text>
+ <text id="IDS_CAM_BODY_ON">På</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Hjelpelinjer</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Overskyet</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Bildemodus</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Bildeserie</text>
+ <text id="IDS_CAM_BODY_TIMER">Selvutløser</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Innstillinger</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Fotolys</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Kan ikke starte kamera\nunder en samtale</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Minnekort</text>
+ <text id="IDS_CAM_BODY_OFF">Av</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescerende</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Nullstilling</text>
+ <text id="IDS_CAM_BODY_SINGLE">Enkel</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Lavt batterinivå</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Oppløsning</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dagslys</text>
+ <text id="IDS_CAM_BODY_STORAGE">Lagring</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balans bieli</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Wartość ekspozycji</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Wyzerować ustawienia?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Żarowe</text>
+ <text id="IDS_CAM_BODY_ON">Wł.</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Linie pomocnicze</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Pochmurno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Tryb fotografowania</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Zdjęcia seryjne</text>
+ <text id="IDS_CAM_BODY_TIMER">Samowyzwalacz</text>
+ <text id="IDS_CAM_BODY_AUTO">Automatyczny</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ustawienia</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flesz</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">W trakcie połączenia\nnie można uruchomić aparatu</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Karta pamięci</text>
+ <text id="IDS_CAM_BODY_OFF">Wył.</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Jarzeniowe</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Ust.fabryczne</text>
+ <text id="IDS_CAM_BODY_SINGLE">Jedno zdjęcie</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Bateria rozładowana</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rozdzielczość</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Słonecznie</text>
+ <text id="IDS_CAM_BODY_STORAGE">Domyślna pamięć</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Controle do branco</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor de exposição</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Zerar configurações?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Azulado</text>
+ <text id="IDS_CAM_BODY_ON">Ativado</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Guias</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nublado</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modo de disparo</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Contínuo</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizador</text>
+ <text id="IDS_CAM_BODY_AUTO">Automático</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Configurações</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Impossível iniciar a câmera\ndurante chamadas</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Cartão de memória</text>
+ <text id="IDS_CAM_BODY_OFF">Desativado</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Zerar</text>
+ <text id="IDS_CAM_BODY_SINGLE">Único</text>
+ <text id="IDS_COM_BODY_PHONE">Telefone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Bateria fraca</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolução</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luz do dia</text>
+ <text id="IDS_CAM_BODY_STORAGE">Armazenamento</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Equilíbrio brancos</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor de exposição</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Repor definições?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescente</text>
+ <text id="IDS_CAM_BODY_ON">Ligar</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Directrizes</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 segs.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nublado</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 segs.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modo de disparo</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 segs.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Disparos contínuos</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizador</text>
+ <text id="IDS_CAM_BODY_AUTO">Automático</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Definições</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Impossível iniciar a câmara\ndurante chamadas</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Cartão de memória</text>
+ <text id="IDS_CAM_BODY_OFF">Desligar</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Repor</text>
+ <text id="IDS_CAM_BODY_SINGLE">Único</text>
+ <text id="IDS_COM_BODY_PHONE">Telefone</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Bateria fraca</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolução</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luz solar</text>
+ <text id="IDS_CAM_BODY_STORAGE">Armazenamento</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balans de alb</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valoare expunere</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Reiniţializaţi setările?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescent</text>
+ <text id="IDS_CAM_BODY_ON">Pornit</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Grilă</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sec</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Înnorat</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sec</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Mod fotografiere</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sec</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Fotograf. continuă</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizator</text>
+ <text id="IDS_CAM_BODY_AUTO">Automat</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Setări</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Bliţ</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Imposibil de pornit aparat foto\nîn timpul apelului</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Cartelă de memorie</text>
+ <text id="IDS_CAM_BODY_OFF">Oprit</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescent</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Reiniţializare</text>
+ <text id="IDS_CAM_BODY_SINGLE">Singur</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Baterie descărcată</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rezoluţie</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Lumina zilei</text>
+ <text id="IDS_CAM_BODY_STORAGE">Stocare</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Баланс белого</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Значение экспозиции</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Сбросить настройки?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Лампа накаливания</text>
+ <text id="IDS_CAM_BODY_ON">Включено</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Сетка</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 секунд</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Облачно</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 секунд</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Режим съемки</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 секунды</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Непрерывная съемка</text>
+ <text id="IDS_CAM_BODY_TIMER">Таймер</text>
+ <text id="IDS_CAM_BODY_AUTO">Авто</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Настройки</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Вспышка</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Невозможно запустить камеру\nво время вызова</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Карта памяти</text>
+ <text id="IDS_CAM_BODY_OFF">Выключено</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Флуоресцентный свет</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Сброс</text>
+ <text id="IDS_CAM_BODY_SINGLE">Один снимок</text>
+ <text id="IDS_COM_BODY_PHONE">Телефон</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Аккумулятор разряжен</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Разрешение</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Дневной свет</text>
+ <text id="IDS_CAM_BODY_STORAGE">Память</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="3.0.0.201210110856" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDF_CAMCORDER_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_NORMAL" type="NONE"/>
+ <layout mode="Landscape" style="FORM_STYLE_NORMAL" type="NONE"/>
+ </Form>
+ <Panel id="IDC_SETTING_PANEL" parent="IDF_CAMCORDER_FORM">
+ <property backgroundColor="#292929" backgroundColorOpacity="100" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="160" mode="Portrait" type="NONE" width="720" x="0" y="0"/>
+ <layout height="720" mode="Landscape" type="NONE" width="160" x="0" y="0"/>
+ </Panel>
+ <Button id="IDC_SET_FLASH_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="606" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="28"/>
+ </Button>
+ <Button id="IDC_SELF_SHOT_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="462" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="172"/>
+ </Button>
+ <Button id="IDC_SETTING_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="30" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="604"/>
+ </Button>
+ <Panel id="IDC_ACTION_PANEL" parent="IDF_CAMCORDER_FORM">
+ <property backgroundColor="#292929" backgroundColorOpacity="100" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="160" mode="Portrait" type="NONE" width="720" x="0" y="1120"/>
+ <layout height="720" mode="Landscape" type="NONE" width="160" x="1120" y="0"/>
+ </Panel>
+ <Label id="IDC_CAMERA_ICON_LABEL" parent="IDF_CAMCORDER_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+ <layout height="50" mode="Portrait" width="50" x="658" y="1174"/>
+ <layout height="50" mode="Landscape" width="50" x="1174" y="12"/>
+ </Label>
+ <Label id="IDC_CAMCORDER_ICON_LABEL" parent="IDF_CAMCORDER_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+ <layout height="50" mode="Portrait" width="50" x="486" y="1174"/>
+ <layout height="50" mode="Landscape" width="50" x="1174" y="184"/>
+ </Label>
+ <Button id="IDC_MODE_CHANGE_MODE_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="72" mode="Portrait" width="122" x="536" y="1164"/>
+ <layout height="122" mode="Landscape" width="72" x="1163" y="62"/>
+ </Button>
+ <Button id="IDC_RECORD_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="108" mode="Portrait" width="214" x="252" y="1144"/>
+ <layout height="214" mode="Landscape" width="108" x="1144" y="254"/>
+ </Button>
+ <Button id="IDC_BACK_BUTTON" parent="IDF_CAMCORDER_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="108" mode="Portrait" width="108" x="8" y="1146"/>
+ <layout height="108" mode="Landscape" width="108" x="1146" y="604"/>
+ </Button>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="3.0.0.201210110856" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDF_CAMERA_FORM">
+ <property backgroundColor="" backgroundColorOpacity="100" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_NORMAL" type="NONE"/>
+ <layout mode="Landscape" style="FORM_STYLE_NORMAL" type="NONE"/>
+ </Form>
+ <Panel id="IDC_SETTING_PANEL" parent="IDF_CAMERA_FORM">
+ <property backgroundColor="#292929" backgroundColorOpacity="100" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="160" mode="Portrait" type="NONE" width="720" x="0" y="0"/>
+ <layout height="720" mode="Landscape" type="NONE" width="160" x="0" y="0"/>
+ </Panel>
+ <Button id="IDC_SET_FLASH_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="606" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="28"/>
+ </Button>
+ <Button id="IDC_SELF_SHOT_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="462" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="172"/>
+ </Button>
+ <Button id="IDC_SETTING_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="86" mode="Portrait" width="86" x="30" y="38"/>
+ <layout height="86" mode="Landscape" width="86" x="38" y="604"/>
+ </Button>
+ <Panel id="IDC_ACTION_PANEL" parent="IDF_CAMERA_FORM">
+ <property backgroundColor="#292929" backgroundColorOpacity="100" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="160" mode="Portrait" type="NONE" width="720" x="0" y="1120"/>
+ <layout height="720" mode="Landscape" type="NONE" width="160" x="1120" y="0"/>
+ </Panel>
+ <Label id="IDC_CAMERA_ICON_LABEL" parent="IDF_CAMERA_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+ <layout height="50" mode="Portrait" width="50" x="658" y="1174"/>
+ <layout height="50" mode="Landscape" width="50" x="1174" y="12"/>
+ </Label>
+ <Label id="IDC_CAMCORDER_ICON_LABEL" parent="IDF_CAMERA_FORM">
+ <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+ <layout height="50" mode="Portrait" width="50" x="486" y="1174"/>
+ <layout height="50" mode="Landscape" width="50" x="1174" y="184"/>
+ </Label>
+ <Button id="IDC_MODE_CHANGE_MODE_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="72" mode="Portrait" width="122" x="536" y="1164"/>
+ <layout height="122" mode="Landscape" width="72" x="1163" y="62"/>
+ </Button>
+ <Button id="IDC_SHUTTER_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="108" mode="Portrait" width="214" x="252" y="1144"/>
+ <layout height="214" mode="Landscape" width="108" x="1144" y="254"/>
+ </Button>
+ <Button id="IDC_BACK_BUTTON" parent="IDF_CAMERA_FORM">
+ <property disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="108" mode="Portrait" width="108" x="8" y="1146"/>
+ <layout height="108" mode="Landscape" width="108" x="1146" y="604"/>
+ </Button>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Vyváženie bielej</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Hodnota expozície</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Vynulovať nastavenia?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Žiarovka</text>
+ <text id="IDS_CAM_BODY_ON">Zap.</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Vodiace čiary</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Oblačno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Režim fotografovania</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Sériové snímanie</text>
+ <text id="IDS_CAM_BODY_TIMER">Časovač</text>
+ <text id="IDS_CAM_BODY_AUTO">Automaticky</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Nastavenia</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Blesk</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Počas hovoru nie je možné\nspustiť fotoaparát</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Pamäťová karta</text>
+ <text id="IDS_CAM_BODY_OFF">Vyp.</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Žiarivka</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Vynulovať</text>
+ <text id="IDS_CAM_BODY_SINGLE">Jediný</text>
+ <text id="IDS_COM_BODY_PHONE">Telefón</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batéria vybitá</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rozlíšenie</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Denné svetlo</text>
+ <text id="IDS_CAM_BODY_STORAGE">Úložisko</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Ravnotežje beline</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Vrednost osvetlitve</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Ponastavitev nastavitev?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Žarnica</text>
+ <text id="IDS_CAM_BODY_ON">Vključeno</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Smernice</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sek</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Oblačno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sek</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Snemalni način</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sek</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Rafalni posnetek</text>
+ <text id="IDS_CAM_BODY_TIMER">Časovnik</text>
+ <text id="IDS_CAM_BODY_AUTO">Samodejno</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Nastavitve</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Bliskavica</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Ne morem vključiti kamere\nmed klicem</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Pomnilniška kartica</text>
+ <text id="IDS_CAM_BODY_OFF">Izključeno</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescentno</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Ponastavi</text>
+ <text id="IDS_CAM_BODY_SINGLE">Enojno</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Baterija prazna</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Ločljivost</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dnevna svetloba</text>
+ <text id="IDS_CAM_BODY_STORAGE">Shranjevanje</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balance blanco</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor de exposición</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">¿Restablecer ajustes?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescente</text>
+ <text id="IDS_CAM_BODY_ON">Activado</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Instrucciones</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nublado</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modo de disparo</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Disparo continuo</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizador</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ajustes</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">No se puede iniciar la cámara durante la llamada</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Tarjeta de memoria</text>
+ <text id="IDS_CAM_BODY_OFF">Desactivada</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Restablecer</text>
+ <text id="IDS_CAM_BODY_SINGLE">Sencillo</text>
+ <text id="IDS_COM_BODY_PHONE">Teléfono</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batería baja</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolución</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luz del día</text>
+ <text id="IDS_CAM_BODY_STORAGE">Almacenamiento</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balance de blancos</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Valor de exposición</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">¿Restablecer configuración?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Incandescente</text>
+ <text id="IDS_CAM_BODY_ON">Activado</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Instrucciones</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 seg</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Nublado</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 seg</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Modo de captura</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 seg</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Disparo continuo</text>
+ <text id="IDS_CAM_BODY_TIMER">Temporizador</text>
+ <text id="IDS_CAM_BODY_AUTO">Automático</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Configuración</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flash</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">No se puede iniciar la cámara\ndurante la llamada</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Tarjeta de memoria</text>
+ <text id="IDS_CAM_BODY_OFF">Desactivado</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluorescente</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Restablecer</text>
+ <text id="IDS_CAM_BODY_SINGLE">Único</text>
+ <text id="IDS_COM_BODY_PHONE">Teléfono</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batería baja</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Resolución</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Luz de día</text>
+ <text id="IDS_CAM_BODY_STORAGE">Almacenamiento</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Balans bele boje</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Nivo ekspozicije</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Resetovanje podešavanja?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Usijanje</text>
+ <text id="IDS_CAM_BODY_ON">Uključeno</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Smernice</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Oblačno</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Način snimanja</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Rafalni snimak</text>
+ <text id="IDS_CAM_BODY_TIMER">Tajmer</text>
+ <text id="IDS_CAM_BODY_AUTO">Automatski</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Podešavanja</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Blic</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Nemoguće uključiti kameru tokom poziva</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Memorijska kartica</text>
+ <text id="IDS_CAM_BODY_OFF">Isključeno</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Flourescentno</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Resetuj</text>
+ <text id="IDS_CAM_BODY_SINGLE">Pojedinačni</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Baterija prazna</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rezolucija</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dnevna svetlost</text>
+ <text id="IDS_CAM_BODY_STORAGE">Memorija</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Vitbalans</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Exponeringsvärde</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Återställa inställningar?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Glödlampa</text>
+ <text id="IDS_CAM_BODY_ON">På</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Riktlinjer</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 s</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Mulet</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 s</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Fotoläge</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 s</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Serietagning</text>
+ <text id="IDS_CAM_BODY_TIMER">Självutlösare</text>
+ <text id="IDS_CAM_BODY_AUTO">Auto</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Inställningar</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Fotolampa</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Det går inte att\nstarta kameran\nunder samtal</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Minneskort</text>
+ <text id="IDS_CAM_BODY_OFF">Av</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Lysrör</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Nollställ</text>
+ <text id="IDS_CAM_BODY_SINGLE">En</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Låg batterinivå</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Upplösning</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Dagsljus</text>
+ <text id="IDS_CAM_BODY_STORAGE">Lagring</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Beyaz dengesi</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Poz değeri</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Ayarlar sıfırlansın mı?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Parlak</text>
+ <text id="IDS_CAM_BODY_ON">Açık</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Yönergeler</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 sn</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Bulutlu</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 sn</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Çekim modu</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 sn</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Çoklu çekim</text>
+ <text id="IDS_CAM_BODY_TIMER">Zamanlayıcı</text>
+ <text id="IDS_CAM_BODY_AUTO">Otomatik</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Ayarlar</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flaş</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Arama sırasında\nkamera başlatılamaz</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Hafıza kartı</text>
+ <text id="IDS_CAM_BODY_OFF">Kapalı</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Floresan</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Sıfırla</text>
+ <text id="IDS_CAM_BODY_SINGLE">Tek</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Düşük pil</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Çözünürlük</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Günışığı</text>
+ <text id="IDS_CAM_BODY_STORAGE">Kayıt yeri</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Баланс білого</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Значення витримки</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Скинути параметри?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Штучне світло</text>
+ <text id="IDS_CAM_BODY_ON">Увімкнено</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Вказівки</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 сек.</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Хмарно</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 сек.</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Режим зйомки</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 сек.</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Серійна зйомка</text>
+ <text id="IDS_CAM_BODY_TIMER">Таймер</text>
+ <text id="IDS_CAM_BODY_AUTO">Авто</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Установки</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Спалах</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Неможливо запустити камеру\nпід час виклику</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Карта пам’яті</text>
+ <text id="IDS_CAM_BODY_OFF">Вимкнено</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Флуоресцентний</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Скинути</text>
+ <text id="IDS_CAM_BODY_SINGLE">Одинарний</text>
+ <text id="IDS_COM_BODY_PHONE">Телефон</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Батарея розряджена</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Роздільна здатність</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Денне світло</text>
+ <text id="IDS_CAM_BODY_STORAGE">Пам'ять</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">Oq rang balansi</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">Defekt qiymati</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">Parametrlar qayt. o'rnatilsinmii?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">Cho‘g‘lanma lampa</text>
+ <text id="IDS_CAM_BODY_ON">Yoq.</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">Yo‘riqnomalar</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 soniya</text>
+ <text id="IDS_CAM_BODY_CLOUDY">Bulutli</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 soniya</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">Suratga olish rejimi</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 soniya</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">Fleshli kadr</text>
+ <text id="IDS_CAM_BODY_TIMER">Taymer</text>
+ <text id="IDS_CAM_BODY_AUTO">Avtomatik</text>
+ <text id="IDS_CAM_BODY_SETTINGS">Parametrlar</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">Flesh</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">Qo‘ng‘iroq mobaynida Kamerani ishga tushirib bo‘lmaydi</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">Xotira kartasi</text>
+ <text id="IDS_CAM_BODY_OFF">O‘ch.</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">Fluoressensiya</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">Qayta yuklash</text>
+ <text id="IDS_CAM_BODY_SINGLE">Yakka</text>
+ <text id="IDS_COM_BODY_PHONE">Telefon</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">Batareya quvvati kam</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">Rezolyutsiya</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">Kunduz</text>
+ <text id="IDS_CAM_BODY_STORAGE">Xotira</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">白平衡</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">曝光值</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">要复位设置吗?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">白炽光</text>
+ <text id="IDS_CAM_BODY_ON">开</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">构图线</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 秒</text>
+ <text id="IDS_CAM_BODY_CLOUDY">阴天</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 秒</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">拍摄模式</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 秒</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">急速连拍</text>
+ <text id="IDS_CAM_BODY_TIMER">定时器</text>
+ <text id="IDS_CAM_BODY_AUTO">自动</text>
+ <text id="IDS_CAM_BODY_SETTINGS">设定</text>
+ <text id="IDS_CAM_BODY_ISO">感光度</text>
+ <text id="IDS_CAM_BODY_FLASH">闪光灯</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">通话中无法启动照相机</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">存储卡</text>
+ <text id="IDS_CAM_BODY_OFF">关</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">荧光</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">重置</text>
+ <text id="IDS_CAM_BODY_SINGLE">单一拍摄</text>
+ <text id="IDS_COM_BODY_PHONE">手机</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">电量低</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">分辨率</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">白天</text>
+ <text id="IDS_CAM_BODY_STORAGE">存储器</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">白平衡</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">曝光值</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">要重設設定嗎?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">高色溫光管</text>
+ <text id="IDS_CAM_BODY_ON">開啟</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">指引</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 秒</text>
+ <text id="IDS_CAM_BODY_CLOUDY">陰天</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 秒</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">拍攝模式</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 秒</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">連續快拍</text>
+ <text id="IDS_CAM_BODY_TIMER">計時器</text>
+ <text id="IDS_CAM_BODY_AUTO">自動</text>
+ <text id="IDS_CAM_BODY_SETTINGS">設定</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">閃光燈</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">通話期間無法啟動相機</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">記憶卡</text>
+ <text id="IDS_CAM_BODY_OFF">關</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">日光燈</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">重設</text>
+ <text id="IDS_CAM_BODY_SINGLE">單張</text>
+ <text id="IDS_COM_BODY_PHONE">電話</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">電量不足</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">解像度</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">白天</text>
+ <text id="IDS_CAM_BODY_STORAGE">儲存位置</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">白平衡</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">曝光值</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">要复位设置吗?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">室内强光</text>
+ <text id="IDS_CAM_BODY_ON">开</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">指南</text>
+ <text id="IDS_CAM_BODY_5_SEC">5秒</text>
+ <text id="IDS_CAM_BODY_CLOUDY">多云</text>
+ <text id="IDS_CAM_BODY_10_SEC">10秒</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">拍摄模式</text>
+ <text id="IDS_CAM_BODY_2_SEC">2秒</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">爆裂摄影</text>
+ <text id="IDS_CAM_BODY_TIMER">计时器</text>
+ <text id="IDS_CAM_BODY_AUTO">自动</text>
+ <text id="IDS_CAM_BODY_SETTINGS">设定</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">闪光灯</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">通话时\n无法开启照相机</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">存储卡</text>
+ <text id="IDS_CAM_BODY_OFF">关</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">萤光灯</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">重置</text>
+ <text id="IDS_CAM_BODY_SINGLE">单拍</text>
+ <text id="IDS_COM_BODY_PHONE">手机</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">电量低</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">分辨率</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">日光</text>
+ <text id="IDS_CAM_BODY_STORAGE">存储容量</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212071727" Dversion="20120315">
+ <text id="IDS_CAM_OPT_WHITE_BALANCE_ABB">白平衡</text>
+ <text id="IDS_CAM_OPT_EXPOSURE_VALUE">曝光值</text>
+ <text id="IDS_CAM_POP_RESET_SETTINGS_Q">要重設設定嗎?</text>
+ <text id="IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT">白熾燈</text>
+ <text id="IDS_CAM_BODY_ON">開啟</text>
+ <text id="IDS_CAM_BODY_GUIDELINE">指引線</text>
+ <text id="IDS_CAM_BODY_5_SEC">5 秒</text>
+ <text id="IDS_CAM_BODY_CLOUDY">陰天</text>
+ <text id="IDS_CAM_BODY_10_SEC">10 秒</text>
+ <text id="IDS_CAM_OPT_SHOOTING_MODE">拍攝模式</text>
+ <text id="IDS_CAM_BODY_2_SEC">2 秒</text>
+ <text id="IDS_CAM_OPT_BURST_SHOT_ABB">連續快拍</text>
+ <text id="IDS_CAM_BODY_TIMER">計時器</text>
+ <text id="IDS_CAM_BODY_AUTO">自動</text>
+ <text id="IDS_CAM_BODY_SETTINGS">設定</text>
+ <text id="IDS_CAM_BODY_ISO">ISO</text>
+ <text id="IDS_CAM_BODY_FLASH">閃光燈</text>
+ <text id="IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL">通話期間無法啟動相機</text>
+ <text id="IDS_CAM_OPT_MEMORY_CARD">記憶卡</text>
+ <text id="IDS_CAM_BODY_OFF">關</text>
+ <text id="IDS_CAM_BODY_FLUORESCENT">螢光燈</text>
+ <text id="IDS_CAM_BODY_RESET_SETTINGS_RESET">重設</text>
+ <text id="IDS_CAM_BODY_SINGLE">單拍</text>
+ <text id="IDS_COM_BODY_PHONE">電話</text>
+ <text id="IDS_COM_BODY_LOW_BATTERY">電量不足</text>
+ <text id="IDS_CAM_BODY_RESOLUTION">解析度</text>
+ <text id="IDS_CAM_BODY_DAYLIGHT">白天</text>
+ <text id="IDS_CAM_BODY_STORAGE">儲存空間</text>
+</string_table>
--- /dev/null
+//
+// 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 CmCamcorderForm.cpp
+ * @brief This is the implementation file for CamcorderForm class.
+ */
+
+#include "CmCameraApp.h"
+#include "CmCamcorderForm.h"
+#include "CmCameraPresentationModel.h"
+#include "CmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Media;
+using namespace Tizen::System;
+using namespace Tizen::Telephony;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Uix;
+
+static const int MAX_CAMERA_EXPOSURE_VALUE = 8;
+static const int CAMERA_EXPOSURE_VALUE_ZERO = 0;
+static const int CAMERA_EXPOSURE_VALUE_ONE = 1;
+static const int SLIDER_RECTVALID_X_POS = 430;
+static const int CAMERA_ZOOM_SLIDER_RANGE = 334;
+static const int CAMERA_ZOOM_TIMER_VALUE = 2000;
+static const int CAMERA_GUIDELINE_ENABLE = 1;
+static const int STORAGE_VALUE_ZERO = 0;
+static const int CAMERA_FOCUS_NOT_READY = 0;
+static const int CAMERA_FOCUS_READY = 1;
+static const int CAMERA_FOCUS_FAIL = 2;
+static const int UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN = 2048;
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT = 543;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT = 1172;
+static const int X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT = 10;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT_WGA = 0;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT = 0;
+static const int X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE = 9;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE = 55;
+static const int FONT_SIZE_SETTING_MENU_ITEM = 38;
+static const int FONT_SIZE_SETTING_SUB_MENU_ITEM = 34;
+static const int H_SETTING_MENU_ITEM = 67;
+static const int X_SETTING_MENU_LIST_LANDSCAPE = 30;
+static const int Y_SETTING_MENU_LIST_LANDSCAPE = 350;
+static const int W_SETTING_MENU_LIST_LANDSCAPE = 556;
+static const int H_SETTING_MENU_LIST_LANDSCAPE = 340;
+static const int X_SETTING_MENU_LIST_PORTRAIT = 26;
+static const int Y_SETTING_MENU_LIST_PORTRAIT = 90;
+static const int W_SETTING_MENU_LIST_PORTRAIT = 556;
+static const int H_SETTING_MENU_LIST_PORTRAIT = 340;
+static const int X_SETTING_MENU_CONTENTS = 34;
+static const int Y_SETTING_MENU_CONTENTS = 0;
+static const int W_SETTING_MENU_CONTENTS = 280;
+static const int H_SETTING_MENU_CONTENTS = 67;
+static const int X_SETTING_MENU_CONTENTS_VALUE = 280;
+static const int Y_SETTING_MENU_CONTENTS_VALUE = 0;
+static const int W_SETTING_MENU_CONTENTS_VALUE = 290;
+static const int H_SETTING_MENU_CONTENTS_VALUE = 67;
+static const int H_SETTING_SUBMENU_ITEM = 88;
+static const int X_SETTING_SUBMENU_RADIO_ICON = 0;
+static const int Y_SETTING_SUBMENU_RADIO_ICON = 0;
+static const int W_SETTING_SUBMENU_RADIO_ICON = 84;
+static const int H_SETTING_SUBMENU_RADIO_ICON = 84;
+static const int X_SETTING_SUBMENU_ICON = 75;
+static const int Y_SETTING_SUBMENU_ICON = 0;
+static const int W_SETTING_SUBMENU_ICON = 84;
+static const int H_SETTING_SUBMENU_ICON = 84;
+static const int X_SETTING_SUBMENU_2ITEM_TEXT = 75;
+static const int Y_SETTING_SUBMENU_2ITEM_TEXT = 0;
+static const int W_SETTING_SUBMENU_2ITEM_TEXT = 320;
+static const int H_SETTING_SUBMENU_2ITEM_TEXT = 84;
+static const int X_SETTING_SUBMENU_3ITEM_TEXT = 165;
+static const int Y_SETTING_SUBMENU_3ITEM_TEXT = 0;
+static const int W_SETTING_SUBMENU_3ITEM_TEXT = 320;
+static const int H_SETTING_SUBMENU_3ITEM_TEXT = 84;
+static const int X_SUBMENU_PANEL_START_PORTRAIT = 170;
+static const int X_SUBMENU_PANEL_START_LANDSCAPE = 340;
+static const int Y_SUBMENU_PANEL_START_PORTRAIT = 75;
+static const int X_SUBMENU_WB_MODE_PANEL = 340;
+static const int Y_SUBMENU_WB_MODE_PANEL = 60;
+static const int W_SUBMENU_WB_MODE_PANEL = 460;
+static const int H_SUBMENU_WB_MODE_PANEL = 500;
+static const int X_SUBMENU_WB_MODE_LIST = 2;
+static const int Y_SUBMENU_WB_MODE_LIST = 64;
+static const int W_SUBMENU_WB_MODE_LIST = 456;
+static const int H_SUBMENU_WB_MODE_LIST = 500;
+static const int X_SUBMENU_GEO_MODE_PANEL = 340;
+static const int Y_SUBMENU_GEO_MODE_PANEL = 280;
+static const int W_SUBMENU_GEO_MODE_PANEL = 460;
+static const int H_SUBMENU_GEO_MODE_PANEL = 240;
+static const int X_SUBMENU_GEO_MODE_LIST = 2;
+static const int Y_SUBMENU_GEO_MODE_LIST = 64;
+static const int W_SUBMENU_GEO_MODE_LIST = 456;
+static const int H_SUBMENU_GEO_MODE_LIST = 240;
+static const int X_SUBMENU_STORAGE_PANEL = 340;
+static const int Y_SUBMENU_STORAGE_PANEL = 340;
+static const int W_SUBMENU_STORAGE_PANEL = 460;
+static const int H_SUBMENU_STORAGE_PANEL = 240;
+static const int X_SUBMENU_STORAGE_LIST = 2;
+static const int Y_SUBMENU_STORAGE_LIST = 64;
+static const int W_SUBMENU_STORAGE_LIST = 456;
+static const int H_SUBMENU_STORAGE_LIST = 240;
+static const int X_ZOOM_PANEL_SLIDER_LANDSCAPE = 26;
+static const int Y_ZOOM_PANEL_SLIDER_LANDSCAPE = 120;
+static const int W_ZOOM_PANEL_SLIDER_LANDSCAPE = 60;
+static const int H_ZOOM_PANEL_SLIDER_LANDSCAPE = 336;
+static const int X_ZOOM_PANEL_SLIDER_PORTRAIT = 120;
+static const int Y_ZOOM_PANEL_SLIDER_PORTRAIT = 26;
+static const int W_ZOOM_PANEL_SLIDER_PORTRAIT = 336;
+static const int H_ZOOM_PANEL_SLIDER_PORTRAIT = 60;
+static const int OFFSET_ZOOM_PANEL_SLIDER_BUTTON = 30;
+static const int OFFSET_ZOOM_PANEL_SLIDER_BUTTON_LANDSCAPE = 400;
+static const int X_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE = 120;
+static const int Y_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE = 570;
+static const int X_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT = 570;
+static const int Y_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT = 120;
+static const int X_EXPOSURE_PANEL_SLIDER_LANDSCAPE = 28;
+static const int Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE = 120;
+static const int W_EXPOSURE_PANEL_SLIDER_LANDSCAPE = 60;
+static const int H_EXPOSURE_PANEL_SLIDER_LANDSCAPE = 336;
+static const int X_EXPOSURE_PANEL_SLIDER_PORTRAIT = 120;
+static const int Y_EXPOSURE_PANEL_SLIDER_PORTRAIT = 28;
+static const int W_EXPOSURE_PANEL_SLIDER_PORTRAIT = 336;
+static const int H_EXPOSURE_PANEL_SLIDER_PORTRAIT = 60;
+static const int OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON = 30;
+static const int X_FLASH_MODE_SETTING_LIST_RECT = 26;
+static const int Y_FLASH_MODE_SETTING_LIST_RECT = 94;
+static const int W_FLASH_MODE_SETTING_LIST_RECT = 428;
+static const int H_FLASH_MODE_SETTING_LIST_RECT = 350;
+static const int X_FLASH_MODE_LIST_START_POS_PORTRAIT = 288;
+static const int X_FLASH_MODE_LIST_START_POS_LANDSCAPE = 26;
+static const int X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT = 311;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT = 6;
+static const int W_INDICATOR_STORAGE_CLEAR_AREA_PORTRAIT = 48;
+static const int H_INDICATOR_STORAGE_CLEAR_AREA_PORTRAIT = 90;
+static const int X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE = 516;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE = 0;
+static const int W_INDICATOR_STORAGE_CLEAR_AREA_LANDSCAPE = 90;
+static const int H_INDICATOR_STORAGE_CLEAR_AREA_LANDSCAPE = 48;
+static const int FONT_SIZE_INDICATOR_STORAGE_FREE_SPACE = 38;
+static const int X_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int Y_PREVIEW_OVERLAY_PORTRAIT = 160;
+static const int W_PREVIEW_OVERLAY_PORTRAIT = 720;
+static const int H_PREVIEW_OVERLAY_PORTRAIT = 960;
+static const int X_FULL_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int Y_FULL_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int W_FULL_PREVIEW_OVERLAY_PORTRAIT = 720;
+static const int H_FULL_PREVIEW_OVERLAY_PORTRAIT = 1280;
+static const int X_PREVIEW_OVERLAY_LANDSCAPE = 160;
+static const int Y_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int W_PREVIEW_OVERLAY_LANDSCAPE = 960;
+static const int H_PREVIEW_OVERLAY_LANDSCAPE = 720;
+static const int X_FULL_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int Y_FULL_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int W_FULL_PREVIEW_OVERLAY_LANDSCAPE = 1280;
+static const int H_FULL_PREVIEW_OVERLAY_LANDSCAPE = 720;
+static const int W_THUMBNAIL_SCALE_SIZE = 80;
+static const int H_THUMBNAIL_SCALE_SIZE = 80;
+static const int X_THUMBNAIL_BUTTON_IMG = 14;
+static const int Y_THUMBNAIL_BUTTON_IMG = 14;
+static const int X_BASE_POS = 0;
+static const int Y_BASE_POS = 0;
+static const int FRAME_SKIP = 4;
+static const int BITS_PER_BYTE = 8;
+static const int BYTE_BUFFER_START_POS = 0;
+static const int BYTE_ARRAY_START_POS = 0;
+static const int CAMERA_TIMER_ONE_MILLI_SEC = 1;
+static const int REG_DEFAULT_VALUE_ZERO = 0;
+static const int ROTATION_IN_DEGREE_90 = 90;
+static const int ROTATION_IN_DEGREE_180 = 180;
+static const int ROTATION_IN_DEGREE_270 = 270;
+static const int DIVIDE_BY_TWO = 2;
+static const int CAMERA_EXPOSURE_TIMER_VALUE = 2000;
+static const int INDEX_UNIT_ZERO = 0;
+static const int INDEX_UNIT_ONE = 1;
+static const int FLASH_MODE_OFF = 0;
+static const int FLASH_MODE_ON = 1;
+static const int FLASH_MODE_AUTO = 2;
+static const int SETTING_TIMER_RECORD_0_SEC = 0;
+static const int SETTING_TIMER_RECORD_2_SEC = 1;
+static const int SETTING_TIMER_RECORD_5_SEC = 2;
+static const int SETTING_TIMER_RECORD_10_SEC = 3;
+static const int CAMERA_TIMER_1_SEC = 1000;
+static const int CAMERA_TIMER_2_SEC = 2000;
+static const int CAMERA_TIMER_5_SEC = 5000;
+static const int CAMERA_TIMER_10_SEC = 10000;
+static const int SERRING_TIMER_2_SEC_COUNT = 2;
+static const int SERRING_TIMER_5_SEC_COUNT = 5;
+static const int SERRING_TIMER_10_SEC_COUNT = 10;
+static const int CAMCORDER_TIMER_LIMIT = 120000;
+static const int CAMCORDER_TIMER_ONE_SEC = 1000;
+static const int CAMCORDER_FORM_PRIMARY_MODE = 0;
+static const int CAMCORDER_FORM_SECONDARY_MODE = 1;
+static const int SUBMENU_WB_COUNT = 5;
+static const int SUBMENU_GUIDELINE_COUNT = 2;
+static const int SUBMENU_STORAGETYPE_COUNT = 2;
+static const int SUBMENU_MODE_OFF = 0;
+static const int SUBMENU_MODE_ON = 1;
+static const int SUBMENU_MODE_AUTO = 2;
+static const int SUBMENU_WB_AUTO_IMG_IDX = 0;
+static const int SUBMENU_WB_INCANDESCENT_IMG_IDX = 1;
+static const int SUBMENU_WB_FLUORESCENT_IMG_IDX = 2;
+static const int SUBMENU_WB_DAYLIGHT_IMG_IDX = 3;
+static const int SUBMENU_WB_CLOUDY_IMG_IDX = 4;
+static const int SUBMENU_STORAGE_TYPE_PHONE = 0;
+static const int SUBMENU_STORAGE_TYPE_MEMORYCARD = 1;
+static const int MAX_SUBMENU_CONTENT = 10;
+static const int DRAW_INITIALIZED = 0;
+static const int DRAW_MOVED = 1;
+static const int DRAW_RELEASED = 2;
+static const int DISABLE_GUIDELINE = 0;
+static const int MAX_SETTING_MENU_COUNT = 5;
+static const int MAX_FLASH_MENU_COUNT = 3;
+static const int MENU_COUNT_CLEAR = 0;
+static const int MENU_MODE_DISABLE = -1;
+static const int MENU_TWO_ELEMENT = 2;
+static const int MENU_THREE_ELEMENT = 3;
+static const int EXPOSURE_TIMER_IS_ALIVE = 1;
+static const int ZOOM_TIMER_IS_ALIVE = 1;
+static const int MESSAGEBOX_DISPLAY_TIME_2_SEC = 2000;
+static const int MESSAGEBOX_DISPLAY_TIME_3_SEC = 3000;
+static const int MULTIPLY_BY_TWO = 2;
+static const int ZOOM_LEVEL_ZERO = 0;
+
+static const int X_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA = 658;
+static const int Y_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA = 1100;
+static const int X_ACTION_PANEL_CAMERA_ICON_LABEL_LANDSCAPE_WVGA = 1100;
+static const int Y_ACTION_PANEL_CAMERA_ICON_LABLE_LANDSCAPE_WVGA = 172;
+
+static const int X_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA = 486;
+static const int Y_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA = 1100;
+static const int X_ACTION_PANEL_CAMCODER_ICON_LABEL_LANDSCAPE_WVGA = 1100;
+static const int Y_ACTION_PANEL_CAMCODER_ICON_LABLE_LANDSCAPE_WVGA = 0;
+
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA = 536;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA = 1098;
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA = 1085;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA = 44;
+
+static const int X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA = 252;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA = 1060;
+static const int X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA = 1065;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA = 252;
+
+static const int X_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA = 8;
+static const int Y_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA = 1065;
+static const int X_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA = 1065;
+static const int Y_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA = 8;
+
+static const int X_ACTION_PANEL_CAMERA_PORTRAIT_WVGA = 0;
+static const int Y_ACTION_PANEL_CAMERA_PORTRAIT_WVGA = 1040;
+static const int X_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA = 1040;
+static const int Y_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA = 0;
+static const int DISPLAY_WVGA = 1200;
+
+static const wchar_t* IDS_MENU_SETTING_MAIN_MENU_NAME = L"SettingMainMenu";
+static const wchar_t* IDS_MENU_FLASH_MENU_NAME = L"FlashMenu";
+static const wchar_t* IDS_FLASH_BUTTON_NAME = L"FlashButton";
+static const wchar_t* IDS_RECORDE_BUTTON_NAME = L"RecordButton";
+static const wchar_t* IDS_THUMBNAIL_PANLE_NAME = L"ThumbnailPanel";
+static const wchar_t* IDS_SETTING_UI_PANEL_NAME = L"SettingPanel";
+static const wchar_t* IDS_ACTION_UI_PANEL_NAME = L"ActionPanel";
+static const wchar_t* IDS_ACTION_UI_CAMCORDER_MODE = L"ActionCamcorderMode";
+static const wchar_t* IDS_INIT_REG_KEY = L"NONE";
+static const wchar_t* IDS_CAMERA_INFO_PANEL_NAME = L"CameraInfoPanel";
+
+enum MenuIdx
+{
+ MENU_IDX_01 = 0,
+ MENU_IDX_02,
+ MENU_IDX_03,
+ MENU_IDX_04,
+ MENU_IDX_05,
+ MENU_IDX_06,
+ MENU_IDX_07,
+ MENU_IDX_08,
+ MENU_IDX_09,
+ MENU_IDX_10,
+ MENU_IDX_MAX
+};
+
+CamcorderForm::CamcorderForm(void)
+ : __pCamcorderPresentationModel(null)
+ , __screenMode(SCREEN_MODE_NORMAL)
+ , __pOverlayPanel(null)
+ , __pAppTimer(null)
+ , __pSettingTimer(null)
+ , __pRecordTimer(null)
+ , __pPopupTimer(null)
+ , __pExposureCloseTimer(null)
+ , __pZoomCloseTimer(null)
+ , __pMakerFocusTimer(null)
+ , __pListViewMainMenu(null)
+ , __pListFlashMainMenu(null)
+ , __pListViewSubMenu(null)
+ , __mainMenuCount(MENU_MODE_DISABLE)
+ , __subMenuCount(MENU_MODE_DISABLE)
+ , __settingMode(CAMCORDER_SUB_MENU_CONTENT_MAX)
+ , __settingIsoIndex(0)
+ , __settingWhiteBalance(0)
+ , __currentZoomLevel(0)
+ , __maxZoomLevel(0)
+ , __settingExposure(0)
+ , __timeCount(0)
+ , __recordTimeCount(0)
+ , __closeTimerValue(0)
+ , __isRecording(false)
+ , __previewResolutionWidth(0)
+ , __previewResolutionHeight(0)
+ , __lowMemoryCapacity(false)
+ , __isMemoryFull(false)
+ , __isLockScreenMode(false)
+ , __isOrientationChanged(false)
+ , __displayResolution(DISPLAY_RESOLUTION_HVGA)
+ , __pSettingPanel(null)
+ , __pActionPanel(null)
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __pFlashButton(null)
+ , __pSelfShotButton(null)
+ , __pSettingButton(null)
+ , __pCameraIconLabel(null)
+ , __pCamcoderIconLabel(null)
+ , __pSwButton(null)
+ , __pRecordButton(null)
+ , __pBackButton(null)
+ , __pButtonPoint(Point(0, 0))
+ , __pThumbnailPanel(null)
+ , __pCameraInfoPanel(null)
+ , __pCamraInfoSubPanel(null)
+ , __pCamraInfoSubIndicatorPanel(null)
+ , __pSettingMenuString(null)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CamcorderForm::~CamcorderForm(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ int storageType = STORAGE_TYPE_PHONE;
+ Point currentPosition;
+
+ AddKeyEventListener(*this);
+
+ AddOrientationEventListener(*this);
+ SetOrientation(ORIENTATION_AUTOMATIC_FOUR_DIRECTION);
+ __dir = GetOrientationStatus();
+
+ __pCamcorderPresentationModel->SetOrientation(__dir);
+
+ InitAppTimer();
+ InitSettingTimer();
+
+ __pCameraInfoPanel = new (std::nothrow) CameraInfoPanel();
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ currentPosition.x = (W_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ currentPosition.x = (W_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_PORTRAIT, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(STORAGE_TYPE, storageType);
+ if (r != E_SUCCESS)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+ }
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCamcorderPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCamcorderPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+
+ r = __pCameraInfoPanel->Initialize(rect);
+ TryCatch(r == E_SUCCESS, , "__pCameraInfoPanel Initialize fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetCurrentMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ __pCameraInfoPanel->SetStorageType(storageType);
+ __pCameraInfoPanel->SetDrawIndicator(true);
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+ __pCameraInfoPanel->AddTouchEventListener(*this);
+ __pCameraInfoPanel->SetName(IDS_CAMERA_INFO_PANEL_NAME);
+ AddOrientationEventListener(*__pCameraInfoPanel);
+ AddControl(*__pCameraInfoPanel);
+ SetControlAlwaysOnTop(*__pCameraInfoPanel, true);
+
+ __pCamraInfoSubIndicatorPanel = new (std::nothrow) CamraInfoSubIndicatorPanel();
+ TryCatch(__pCamraInfoSubIndicatorPanel != null, r = E_FAILURE, "__pCamraInfoSubIndicatorPanel is null");
+
+ r = __pCamraInfoSubIndicatorPanel->Initialize(rectPanel);
+ TryCatch(r == E_SUCCESS, , "__pCamraInfoSubIndicatorPanel Initialize fail[%s]", GetErrorMessage(r));
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+ __pCamraInfoSubIndicatorPanel->SetStorageType(storageType);
+ __pCamraInfoSubIndicatorPanel->AddTouchEventListener(*this);
+ __pCamraInfoSubIndicatorPanel->SetCurrentMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ __pCamraInfoSubIndicatorPanel->StartCheckStorageInfoTimer();
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicatorStroageInfo(false);
+ AddOrientationEventListener(*this);
+ AddControl(*__pCamraInfoSubIndicatorPanel);
+ SetControlAlwaysOnTop(*__pCamraInfoSubIndicatorPanel, false);
+
+ SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ r = InitSettingMenuPanel();
+ TryCatch(r == E_SUCCESS, , "InitSettingMenuPanel() fail[%s]", GetErrorMessage(r));
+
+ r = InitActionMenuPanel();
+ TryCatch(r == E_SUCCESS, , "InitActionMenuPanel() fail[%s]", GetErrorMessage(r));
+
+ HideUiPanel(false);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pCameraInfoPanel;
+
+ return r;
+}
+
+result
+CamcorderForm::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __pCamcorderPresentationModel->KeepScreenOnState(false, true);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+
+ __lowMemoryCapacity = false;
+
+ if (__isLockScreenMode)
+ {
+ AppLogDebug("OnTerminating KEY_POWER_HOLD");
+ __isLockScreenMode = false;
+ }
+
+ __isOrientationChanged = false;
+
+ __screenMode = SCREEN_MODE_NORMAL;
+
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+
+ __pCamcorderPresentationModel = null;
+
+ EndRecordTimer();
+
+ if (__pAppTimer)
+ {
+ __pAppTimer->Cancel();
+
+ delete __pAppTimer;
+ __pAppTimer = null;
+ }
+
+ __pSettingTimer->Cancel();
+ delete __pSettingTimer;
+ __pSettingTimer = null;
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+
+ delete __pExposureCloseTimer;
+ __pExposureCloseTimer = null;
+ }
+
+ if (__pZoomCloseTimer)
+ {
+ __pZoomCloseTimer->Cancel();
+
+ delete __pZoomCloseTimer;
+ __pZoomCloseTimer = null;
+ }
+
+ if (__pMakerFocusTimer)
+ {
+ __pMakerFocusTimer->Cancel();
+
+ delete __pMakerFocusTimer;
+ __pMakerFocusTimer = null;
+ }
+
+ if (__pSettingMenuString)
+ {
+ int idx = 0;
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ delete [] __pSettingMenuString[idx];
+ }
+ delete __pSettingMenuString;
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamcorderForm::SetRecordMode(int timerInterval)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (timerInterval == SETTING_TIMER_RECORD_0_SEC)
+ {
+ result r = E_SUCCESS;
+
+ AppLogDebug("Record start");
+
+ __pSettingTimer->Cancel();
+
+ __isRecording = true;
+
+ __pCamcorderPresentationModel->StartRecord();
+ r = StartRecordTimer();
+ TryReturnVoid(r == E_SUCCESS, "StartRecordTimer() fail[%s]", GetErrorMessage(r));
+ SetRecordButton(true);
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ EndPopupTimer();
+ }
+ else
+ {
+ r = SettingTimerRecord(timerInterval);
+ TryReturnVoid(r == E_SUCCESS, "SettingTimerCapture() fail[%s]", GetErrorMessage(r));
+
+ __timeCount = 0;
+
+ r = DrawTimerPopup();
+ TryReturnVoid(r == E_SUCCESS, "DrawTimerPopup() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ AppLogDebug("ENTER");
+ bool onVideoRecorderStopped = false;
+
+ switch (actionId)
+ {
+ case IDA_BUTTON_CAMCORDER_CANCEL:
+ {
+ __pCamcorderPresentationModel->CancelRecord();
+ EndRecordTimer();
+ SetRecordButton(false);
+ }
+ break;
+
+ case IDA_BUTTON_CAMCORDER_FLASH:
+ {
+ int selfPortraitEnable = 0;
+ result r = E_SUCCESS;
+ bool value = false;
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCamcorderPresentationModel->GetBatteryLevel();
+ isCharging = __pCamcorderPresentationModel->IsCharging();
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+
+ if (r != E_SUCCESS)
+ {
+ selfPortraitEnable = 0;
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("FLASEH OFF!!!");
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ if (batteryLevel == BATTERY_LOW && isCharging == false)
+ {
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", L"Unable to use flash.Low battery", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ else
+ {
+ SetFlashPopop();
+ }
+ }
+ else
+ {
+ AppLogDebug("FLASEH OFF!!!");
+ }
+ }
+ }
+ break;
+
+ case IDA_BUTTON_CAMCORDER_SETTING:
+ {
+ result r = E_SUCCESS;
+
+ MakeSettingPopup();
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case IDA_BUTTON_CAMCORDER_SELF:
+ {
+ int direction = 0;
+ result r = E_SUCCESS;
+
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_DIRECTION, direction);
+
+ onVideoRecorderStopped = __pCamcorderPresentationModel->GetOnVideoRecorderStopped();
+
+ if (r == E_SUCCESS && direction != CameraPresentationModel::CAMERA_DIRECTION_FRONT)
+ {
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct("Info", "Secondary camear is not suppport", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ else
+ {
+ HidePopup();
+
+ if ( onVideoRecorderStopped == false)
+ {
+ SetSelfModeButton();
+ }
+ else
+ {
+ String string= L"Video is saving...";
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", string, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ }
+ }
+ break;
+
+ case IDA_BUTTON_CAMCORDER_THUMBNAIL:
+ {
+ Point currentPosition;
+ int selfPortraitEnable = 0;
+ bool focusSupport = false;
+ result r = E_SUCCESS;
+
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+
+ if (__pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ currentPosition.x = (W_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ currentPosition.x = (W_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ }
+
+ if (__pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ if (__isRecording == true)
+ {
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ DrawFocus(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ DrawFocus(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+ }
+ }
+ }
+ else
+ {
+ SetThumbNailButton();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("EXIT");
+}
+
+bool
+CamcorderForm::SendAppControlResult(RequestId requestId)
+{
+ AppLogDebug("ENTER");
+
+ result r = E_SUCCESS;
+ String fullFileName = L"";
+ int storageType = STORAGE_TYPE_PHONE;
+ int mode = CameraPresentationModel::CAMERA_MODE_SNAPSHOT;
+ String filePath = L"";
+ int requestType = 0;
+ bool isAppControl = false;
+
+ HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+ pDataList->Construct();
+
+ AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ requestType = __pCamcorderPresentationModel->GetAppControlRequestType();
+
+ switch (requestType)
+ {
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_CANCELED:
+ {
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_CANCELED, null);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_SUCCEEDED:
+ {
+ r = __pCamcorderPresentationModel->GetValue(CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ r = __pCamcorderPresentationModel->GetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = filePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetMediaPath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = filePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetExternalStoragePath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("FilePath %ls", filePath.GetPointer());
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ r = __pCamcorderPresentationModel->GetLatestContentName(CameraPresentationModel::CAMERA_MODE_SNAPSHOT, fullFileName);
+ TryCatch(r == E_SUCCESS, , "pCameraPresentationModel->GetLatestContentName fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetLatestContentName(CameraPresentationModel::CAMERA_MODE_RECORD, fullFileName);
+ TryCatch(r == E_SUCCESS, , "pCameraPresentationModel->GetLatestContentName fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("fullFileName:%ls", fullFileName.GetPointer());
+
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(filePath + fullFileName));
+
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_SUCCEEDED, pDataList);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED:
+ {
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_FAILED, null);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ AppLogDebug("Not AppControl");
+ }
+
+ delete pDataList;
+ pDataList = null;
+
+ AppLogDebug("EXIT");
+ return true;
+
+CATCH:
+ delete pDataList;
+ pDataList = null;
+
+ AppLogDebug("EXIT - CATCH");
+ return false;
+}
+
+void
+CamcorderForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ UiApp* pApp = null;
+ CameraApp* pCameraApp = static_cast<CameraApp*>(CameraApp::GetInstance());
+
+ __isRecording = false;
+
+ __pCamcorderPresentationModel->StopCamera();
+
+ pApp = UiApp::GetInstance();
+ TryReturnVoid(pApp != null, "pApp is null");
+
+ SendAppControlResult(pCameraApp->GetRequestId());
+
+ r = pApp->Terminate();
+ TryReturnVoid(r == E_SUCCESS, "Failed Terminate [%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::LaunchAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pDataType, const Tizen::Base::Collection::IMap* extraData)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ AppControl* pAc = null;
+
+ pAc = AppManager::FindAppControlN(providerId, operationId);
+ TryCatch(pAc != null, r = E_OBJ_NOT_FOUND, "Failed to find the appcontrol");
+
+ r = pAc->Start(null, null, extraData, null);
+ TryCatch(r == E_SUCCESS, , "[%s] Failed to start the appcontrol", GetErrorMessage(r));
+
+ delete pAc;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pAc != null)
+ {
+ delete pAc;
+ }
+
+ return E_FAILURE;
+}
+
+void
+CamcorderForm::OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ AppLogDebug("ENTER");
+ OnCameraActionPerformed(static_cast<CameraActionEvent>(requestId));
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ Dimension dim;
+ BufferInfo bufferinfo;
+ Point currentPosition;
+ result r = E_SUCCESS;
+ int regVal = 0;
+ int previewResolutionSize = 0;
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+ int storageType = STORAGE_TYPE_PHONE;
+ int selfPortraitEnable = 0;
+ bool value = false;
+ int flashMode = 0;
+
+ __isRecording = false;
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "Timer::Start() fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetPresentationChangedEventListener(this);
+
+ __pCamcorderPresentationModel->KeepScreenOnState(true, false);
+
+ if (__pCamcorderPresentationModel->IsCameraInstance())
+ {
+ AppLogDebug("OnSceneActivatedN 1");
+
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+ else
+ {
+ AppLogDebug("OnSceneActivatedN 2");
+
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+
+ Update();
+
+ dim = __pCamcorderPresentationModel->GetPreviewResolution();
+ AppLogDebug("CamcorderForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ __previewResolutionWidth = dim.width;
+ __previewResolutionHeight = dim.height;
+
+ AppLogDebug("__screenMode [%d]", __screenMode);
+
+ r = SetScreenMode(SCREEN_MODE_NORMAL, true);
+ TryReturnVoid(r == E_SUCCESS, "SetScreenMode() failed:%s", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_PORTRAIT, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ SetRecordButton(false);
+
+ __pCamcorderPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ r = __pCamcorderPresentationModel->GetValue(GUIDELINE_ENABLE, regVal);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (regVal == DISABLE_GUIDELINE)
+ {
+ DrawMarker(false);
+ }
+ else
+ {
+ DrawMarker(true);
+ }
+
+ InDrawFocus();
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ HidePopup();
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->StartPreview(&bufferinfo);
+
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ __pCameraInfoPanel->StartCheckStorageInfoTimer();
+
+ SetCamcoderSettingsDevice();
+
+ AppLogDebug("OnSceneActivatedN");
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+
+ __pCamcorderPresentationModel->SetFlashMode(CameraFlashMode(flashMode));
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+
+ __pCamcorderPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+
+ CheckLowBatteryStatus();
+
+ callStatus = GetCurrentCallStatus();
+ AppLogDebug("callStatus = %d", callStatus);
+
+ if (callStatus != CALL_STATUS_IDLE && callStatus != CALL_STATUS_UNDEFINED)
+ {
+ ShowUnlaunchPopup();
+ }
+
+ if (__pCamraInfoSubIndicatorPanel == null)
+ {
+ __pCamraInfoSubIndicatorPanel = new (std::nothrow) CamraInfoSubIndicatorPanel();
+
+ r = __pCamraInfoSubIndicatorPanel->Initialize(rectPanel);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+ __pCamraInfoSubIndicatorPanel->AddTouchEventListener(*this);
+ AddOrientationEventListener(*this);
+ AddControl(*__pCamraInfoSubIndicatorPanel);
+ SetControlAlwaysOnTop(*__pCamraInfoSubIndicatorPanel, true);
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+
+ __pCamcorderPresentationModel->GetValue(STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCamcorderPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCamcorderPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ __pCamraInfoSubIndicatorPanel->SetStorageType(storageType);
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+ __pCamraInfoSubIndicatorPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ __pCamraInfoSubIndicatorPanel->StartCheckStorageInfoTimer();
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicatorStroageInfo(false);
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+ AppLogDebug("ENTER");
+
+ __pCamcorderPresentationModel->KeepScreenOnState(false, true);
+
+ __isRecording = false;
+
+ __isOrientationChanged = false;
+
+ __timeCount = 0;
+
+ HideUiAction();
+
+ __pAppTimer->Cancel();
+
+ __pSettingTimer->Cancel();
+
+ EndRecordTimer();
+
+ __pCameraInfoPanel->EndCheckStorageInfoTimer();
+ __pCamraInfoSubIndicatorPanel->EndCheckStorageInfoTimer();
+
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicatorStroageInfo(false);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::Update(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pRotateBitmap = null;
+ Bitmap* pBitmap = null;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == false)
+ {
+ TryCatch(__pThumbnailPanel != null, , "__pThumbnailPanel is null");
+
+ pThumbnailBitmap = __pCamcorderPresentationModel->GetLatestThumbnail();
+
+ if (pThumbnailBitmap == null)
+ {
+ AppLogDebug("CameraForm::Update :: pThumbnailBitmap = null");
+
+ __pThumbnailPanel->SetShowState(true);
+
+ Draw();
+ Show();
+ }
+ else
+ {
+ AppLogDebug("CameraForm::Update :: pThumbnailBitmap is null");
+
+ r = pThumbnailBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+ TryCatch(r == E_SUCCESS, , "Bitmap::Scale() fail[%s]", GetErrorMessage(r));
+
+ pRotateBitmap = ThumbnailRotationImageN(pThumbnailBitmap, rotationType);
+ TryCatch(pRotateBitmap != null, , "pRotateBitmap is null");
+
+ __pThumbnailPanel->SetOldBitmap(pRotateBitmap);
+
+ delete pRotateBitmap;
+ pRotateBitmap = null;
+
+ Draw();
+ Show();
+ }
+ }
+ else
+ {
+ AppLogDebug("CameraForm::Update :: Not thummail");
+ Point ptThumbnailImg = Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG);
+
+ __pThumbnailPanel->SetShowState(false);
+ //__pThumbnailPanel->Invalidate(true);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+
+ TryCatch(__pBackButton != null, , "__pBackButton is null");
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetNormalBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK_PRESS);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetPressedBitmap(ptThumbnailImg, *pBitmap);
+ __pBackButton->SetShowState(true);
+ delete pBitmap;
+ pBitmap = null;
+
+ //Invalidate(true);
+ Draw();
+ Show();
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ return;
+}
+
+void
+CamcorderForm::OnCameraActionPerformed(CameraActionEvent event)
+{
+ AppLogDebug("ENTER");
+
+ __timeCount = 0;
+
+ __pSettingTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ switch (event)
+ {
+ case CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED");
+ DrawFocus(CAMERA_FOCUS_READY);
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_AUTO_FOCUSED:
+ {
+ if (__pCamcorderPresentationModel->GetRecorderState() != RECORDER_STATE_RECORDING)
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_AUTO_FOCUSED : NOT STATE_RECORDING");
+ DrawFocus(CAMERA_FOCUS_READY);
+ }
+ else
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_AUTO_FOCUSED : STATE_RECORDING");
+ DrawFocus(CAMERA_FOCUS_READY);
+ InitMakerFocusTimer();
+
+ __pMakerFocusTimer->Cancel();
+ __pMakerFocusTimer->Start(CAMCORDER_TIMER_ONE_SEC);
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED");
+ DrawFocus(CAMERA_FOCUS_FAIL);
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_CANCELED:
+ {
+ AppLogDebug("VIDEO_RECORDER_CANCELED_LISTENER.");
+ StartInitAppTimer();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_THUMBNAIL_BUTTON_LOCK:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_VIDEO_THUMBNAIL_BUTTON_LOCK.");
+ Update();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_PREVIEWED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_VIDEO_RECORDER_PREVIEWED.");
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_CLOSED:
+ {
+ AppLogDebug("VIDEO_RECORDER_CLOSED_LISTENER.");
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ int selfPortraitEnable = 0;
+ bool isAppControl = false;
+ int requestType = 0;
+ result r = E_SUCCESS;
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pRotateBitmap = null;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ requestType = __pCamcorderPresentationModel->GetAppControlRequestType();
+
+ HideUiPanel(false);
+
+ __pCamcorderPresentationModel->SetOnVideoRecorderStopped(false);
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_SUCCEEDED)
+ {
+ AppLogDebug("Recrrder after OnFormBackRequested");
+
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ StartInitAppTimer();
+
+ pThumbnailBitmap = __pCamcorderPresentationModel->GetLatestThumbnail();
+ TryReturnVoid(pThumbnailBitmap != null, "pThumbnailBitmap is null");
+
+ r = pThumbnailBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+ TryReturnVoid(r == E_SUCCESS, "Bitmap::Scale() fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+ else
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+
+ pRotateBitmap = ThumbnailRotationImageN(pThumbnailBitmap, rotationType);
+ TryReturnVoid(pRotateBitmap != null, "pRotateBitmap is null");
+
+ __pThumbnailPanel->SetShowState(true);
+ __pThumbnailPanel->Invalidate(true);
+ __pThumbnailPanel->SetNewBitmap(pRotateBitmap);
+ __pThumbnailPanel->SetDrawSliderImg();
+
+ delete pRotateBitmap;
+ pRotateBitmap = null;
+
+ Update();
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ cameraFlashMode = __pCamcorderPresentationModel->GetFlashMode();
+
+ if (cameraFlashMode != CAMERA_FLASH_MODE_OFF)
+ {
+ __pCamcorderPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+ }
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_END_REACHED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_VIDEO_RECORDER_END_REACHED.");
+
+ bool isAppControl = false;
+ int requestType = 0;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ requestType = __pCamcorderPresentationModel->GetAppControlRequestType();
+
+ HideUiPanel(false);
+
+ __pCamcorderPresentationModel->SetOnVideoRecorderStopped(false);
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_SUCCEEDED)
+ {
+ AppLogDebug("RECORDER_END_REACHED after OnFormBackRequested");
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ SetRecordEndReached();
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED:
+ {
+ AppLogDebug("VIDEO_RECORDER_ERROR_OCCURRED_LISTENER.");
+ bool isAppControl = false;
+ int requestType = 0;
+
+ HideUiPanel(false);
+
+ __pCamcorderPresentationModel->SetOnVideoRecorderStopped(false);
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+ requestType = __pCamcorderPresentationModel->GetAppControlRequestType();
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED)
+ {
+ AppLogDebug("RECORDER_ERROR_OCCURRED after OnFormBackRequested");
+
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ SetRecordErrorOccurred();
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_PAUSED:
+ {
+ AppLogDebug("VIDEO_RECORDER_PAUSED_LISTENER.");
+ StartInitAppTimer();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_STARTED:
+ {
+ AppLogDebug("VIDEO_RECORDER_STARTED_LISTENER.");
+ StopInitAppTimer();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_VIDEO_RECORDER_STOPPED:
+ {
+ AppLogDebug("VIDEO_RECORDER_STOPPED_LISTENER.");
+
+ __pCamcorderPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+
+ InDrawFocus();
+
+ StartInitAppTimer();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_FRAME_ACTIVATED:
+ {
+ __pCamcorderPresentationModel->SetOnVideoRecorderStopped(false);
+ if (__pCamcorderPresentationModel->IsCameraPoweredOn())
+ {
+ if (__pCamcorderPresentationModel->GetCameraState() == CAMERA_STATE_ERROR)
+ {
+ result r = E_SUCCESS;
+ BufferInfo bufferinfo;
+ AppLogDebug("FRAME_ACTIVATED:CAMERA_STATE_ERROR");
+
+ __pCamcorderPresentationModel->ToggleCameraCamcorder(CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_ACTIVATED:CameraPoweredOn");
+ }
+ else
+ {
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+
+ callStatus = GetCurrentCallStatus();
+ AppLogDebug("callStatus = %d", callStatus);
+
+ if (callStatus != CALL_STATUS_IDLE && callStatus != CALL_STATUS_UNDEFINED)
+ {
+ ShowUnlaunchPopup();
+ }
+ else
+ {
+ GetCameraToForeground();
+ }
+
+ CheckLowBatteryStatus();
+ }
+
+ HideUiModeChangedButton();
+ DrawThumbnail();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_FRAME_DEACTIVATED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_DEACTIVATED happen");
+ __pCamcorderPresentationModel->SetOnVideoRecorderStopped(false);
+
+ HideUiModeChangedButton();
+ SendCameraToBackground();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED");
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCamcorderPresentationModel->GetBatteryLevel();
+ isCharging = __pCamcorderPresentationModel->IsCharging();
+
+ AppLogDebug("batteryLevel = %d", batteryLevel);
+ if (batteryLevel == BATTERY_CRITICAL || batteryLevel == BATTERY_EMPTY)// || batteryLevel == BATTERY_LOW)
+ {
+ if (isCharging == false)
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED");
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT happen");
+ bool doHidePopup = false;
+ bool isAppControl = false;
+ int requestType = 0;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ requestType = __pCamcorderPresentationModel->GetAppControlRequestType();
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED)
+ {
+ AppLogDebug("Camera Captured after OnFormBackRequested");
+
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ if (__isRecording || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ HideUiPanel(false);
+
+ StopRecord();
+ }
+
+ if (__pListViewMainMenu != null)
+ {
+ if (__pListViewMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (doHidePopup == true)
+ {
+ HidePopup();
+ }
+
+ __pCamcorderPresentationModel->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ Update();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::InitSettingMenuPanel(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __pSettingPanel = static_cast<Panel*>(GetControl(L"IDC_SETTING_PANEL"));
+ TryCatch(__pSettingPanel != null, r = E_SYSTEM, "__pSettingPanel is null, Make panel fail!!!");
+
+ __pSettingPanel->AddTouchEventListener(*this);
+ __pSettingPanel->SetName(IDS_SETTING_UI_PANEL_NAME);
+
+ __pFlashButton = static_cast<Button*>(GetControl(L"IDC_SET_FLASH_BUTTON"));
+ TryCatch(__pFlashButton != null, r = E_SYSTEM, "__pFlashButton is null");
+
+ __pFlashButton->SetName(IDS_FLASH_BUTTON_NAME);
+ __pFlashButton->SetActionId(IDA_BUTTON_CAMCORDER_FLASH);
+ __pFlashButton->AddActionEventListener(*this);
+ __pFlashButton->AddTouchEventListener(*this);
+
+ __pSelfShotButton = static_cast<Button*>(GetControl(L"IDC_SELF_SHOT_BUTTON"));
+ TryCatch(__pSelfShotButton != null, r = E_SYSTEM, "__pSelfShotButton is null");
+
+ __pSelfShotButton->SetActionId(IDA_BUTTON_CAMCORDER_SELF);
+ __pSelfShotButton->AddActionEventListener(*this);
+ __pSelfShotButton->AddTouchEventListener(*this);
+
+ __pSettingButton = static_cast<Button*>(GetControl(L"IDC_SETTING_BUTTON"));
+ TryCatch(__pSettingButton != null, r = E_SYSTEM, "__pSettingButton is null");
+
+ __pSettingButton->SetActionId(IDA_BUTTON_CAMCORDER_SETTING);
+ __pSettingButton->AddActionEventListener(*this);
+ __pSettingButton->AddTouchEventListener(*this);
+
+ r = UpdateUiPanelIcon();
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "UpdateUiPanelIcon() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ __pFlashButton = null;
+ __pSelfShotButton = null;
+ __pSettingButton = null;
+
+ return r;
+}
+
+result
+CamcorderForm::UpdateUiPanelIcon(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ Bitmap* pBitmap = null;
+ Bitmap* pBitmapRotate = null;
+ int flashMode = 0;
+ bool value = false;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "CamcorderSettingsPresentationModel::GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "CamcorderSettingsPresentationModel::GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "CamcorderSettingsPresentationModel::GetValue() fail[%s]", GetErrorMessage(r));
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "CamcorderSettingsPresentationModel::GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR);
+ }
+ else
+ {
+ if (flashMode == FLASH_MODE_OFF)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR);
+ }
+ else if (flashMode == FLASH_MODE_ON)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR);
+ }
+ else if (flashMode == FLASH_MODE_AUTO)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ChangeMode::pBitmapRotate is null");
+
+ __pFlashButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS);
+ }
+ else
+ {
+ if (flashMode == FLASH_MODE_OFF)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS);
+ }
+ else if (flashMode == FLASH_MODE_ON)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_ON_PRESS);
+ }
+ else if (flashMode == FLASH_MODE_AUTO)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ChangeMode::pBitmapRotate is null");
+
+ __pFlashButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SELF_SHOT_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ChangeMode::pBitmapRotate is null");
+
+ __pSelfShotButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SELF_SHOT_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ChangeMode::pBitmapRotate is null");
+
+ __pSelfShotButton->SetPressedBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SETTING_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ __pSettingButton->SetNormalBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SETTING_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ __pSettingButton->SetPressedBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ return r;
+}
+
+void
+CamcorderForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPsition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ String controlName = source.GetName();
+
+ StartInitAppTimer();
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+
+ r = __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pZoomCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ String controlName = source.GetName();
+ result r = E_SUCCESS;
+ bool doHidePopup = false;
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ if (source.Equals(*__pRecordButton) == true)
+ {
+ __closeTimerValue = 0;
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ AppLogDebug("X = %d Y = %d", currentPosition.x, currentPosition.y);
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if ( currentPosition.y > Y_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT || currentPosition.x > X_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT)
+ {
+ __closeTimerValue = 0;
+
+ AppLogDebug("ExposureSlider Hide");
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ if ( currentPosition.x > X_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE || currentPosition.y > Y_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE)
+ {
+ __closeTimerValue = 0;
+
+ AppLogDebug("ExposureSlider Hide");
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ r = DrawZoomSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+
+ r = __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pZoomCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+
+ if (__pListViewMainMenu != null)
+ {
+ if (__pListViewMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListFlashMainMenu != null)
+ {
+ if (__pListFlashMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if ((doHidePopup == false) && (__pCameraInfoPanel->GetDrawZoom() == false && __pCameraInfoPanel->GetDrawExposure() == false))
+ {
+ if ((controlName.Equals(String(IDS_CAMERA_INFO_PANEL_NAME))) && (__pCamcorderPresentationModel->GetCameraState() == CAMERA_STATE_PREVIEW))
+ {
+ DrawTouchAutoFocus(currentPosition);
+ }
+ }
+ else
+ {
+ HidePopup();
+ }
+
+ if ((controlName.Equals(String(IDS_RECORDE_BUTTON_NAME)))&&(source.Equals(*__pRecordButton) == true))
+ {
+ bool onVideoRecorderStopped = false;
+
+ HideUiAction();
+
+ if (__isRecording == false)
+ {
+ if (__pCamcorderPresentationModel->GetRecorderState()== RECORDER_STATE_INITIALIZED
+ || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_OPENED
+ || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_PAUSED
+ || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_CLOSED
+ || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_STOPPED
+ )
+ {
+ HideUiPanel(true);
+
+ onVideoRecorderStopped = __pCamcorderPresentationModel->GetOnVideoRecorderStopped();
+
+ if ( onVideoRecorderStopped == false)
+ {
+ StartRecord();
+ }
+ else
+ {
+ String string= L"Video is saving...";
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", string, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ }
+ }
+ else
+ {
+ HideUiPanel(false);
+
+ StopRecord();
+ }
+ }
+
+ if (controlName.Equals(String(IDS_THUMBNAIL_PANLE_NAME))
+ && __pThumbnailPanel->GetShowState() == true
+ && isAppControl == false
+ && __pCamcorderPresentationModel->GetRecorderState() != RECORDER_STATE_RECORDING
+ )
+ {
+ if (__pCamcorderPresentationModel->GetLatestThumbnail() != null)
+ {
+ int storageCardChageState = CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN;
+ bool onVideoRecorderStopped = false;
+ String fullFileName = L"";
+
+ onVideoRecorderStopped = __pCamcorderPresentationModel->GetOnVideoRecorderStopped();
+
+ storageCardChageState = __pCamcorderPresentationModel->GetStorageCardChageState();
+ if (storageCardChageState == CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT)
+ {
+ AppLogDebug("MOUNT_TO_UNMOUNT : Don't LaunchImageview");
+ __pCamcorderPresentationModel->SetStorageCardChageState(CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+
+ if (onVideoRecorderStopped == false)
+ {
+ fullFileName = __pCamcorderPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ if (fullFileName == L"")
+ {
+ AppLogDebug("file do not found");
+ }
+ else
+ {
+ AppLogDebug("LaunchImageview : MOUNT_TO_UNMOUNT");
+
+ LaunchImageview();
+ }
+ }
+ }
+ else
+ {
+ AppLogDebug("LaunchImageview");
+ __pCamcorderPresentationModel->SetStorageCardChageState(CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+
+ if ( onVideoRecorderStopped == false)
+ {
+ fullFileName = __pCamcorderPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ if (fullFileName == L"")
+ {
+ AppLogDebug("file do not found");
+ }
+ else
+ {
+ LaunchImageview();
+ }
+ }
+ else
+ {
+ String string= L"Video is saving...";
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", string, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ String controlName = source.GetName();
+ result r = E_SUCCESS;
+ bool onVideoRecorderStopped = false;
+
+ if ((controlName.Equals(String(IDS_ACTION_UI_CAMCORDER_MODE))))
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ if (__pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ AppLogDebug("Return Camera transform");
+ }
+ else
+ {
+ onVideoRecorderStopped = __pCamcorderPresentationModel->GetOnVideoRecorderStopped();
+
+ AppLogDebug("pSceneManager->GoForward : onVideoRecorderStopped = %d", onVideoRecorderStopped);
+
+ if ( onVideoRecorderStopped == false)
+ {
+ AppLogDebug("IDA_BUTTON_CAMCORDER_MODE");
+
+ r = __pCamcorderPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Reg setvalue fail[%s]", GetErrorMessage(r));
+
+ EndRecordTimer();
+
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMERA));
+ TryReturnVoid(r == E_SUCCESS, "SceneManager::GoForward fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ String string= L"Video is saving...";
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", string, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ }
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_MOVED);
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+ }
+ else if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ r = DrawZoomSlider(currentPosition, DRAW_MOVED);
+ TryReturnVoid(r == E_SUCCESS, "DrawZoomSlider() fail[%s]", GetErrorMessage(r));
+
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ if (timer.Equals(*__pAppTimer))
+ {
+ UiApp* pApp = null;
+
+ AppLogDebug("__pAppTimer expire");
+
+ __pCamcorderPresentationModel->StopCamera();
+ EndRecordTimer();
+ SetRecordButton(false);
+
+ pApp = UiApp::GetInstance();
+ TryReturnVoid(pApp != null, "pApp is null");
+
+ r = pApp->Terminate();
+ TryReturnVoid(r == E_SUCCESS, "Failed Terminate [%s]", GetErrorMessage(r));
+ }
+ else if (timer.Equals(*__pSettingTimer))
+ {
+ AppLogDebug("__pSettingTimer expire");
+ result r = E_SUCCESS;
+
+ AppLogDebug("Record start");
+
+ __pSettingTimer->Cancel();
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(false);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(0);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __isRecording = true;
+
+ __pCamcorderPresentationModel->StartRecord();
+
+ r = StartRecordTimer();
+ TryReturnVoid(r == E_SUCCESS, "StartRecordTimer() fail[%s]", GetErrorMessage(r));
+
+ SetRecordButton(true);
+ }
+ else if (timer.Equals(*__pPopupTimer))
+ {
+ if (__isRecording != true)
+ {
+ __timeCount--;
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(__timeCount);
+
+ if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(true);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ AppLogDebug("__timeCount=%d", __timeCount);
+
+ if (__timeCount == INDEX_UNIT_ZERO || __timeCount == INDEX_UNIT_ONE)
+ {
+ EndPopupTimer();
+ }
+ }
+ }
+ else if (timer.Equals(*__pRecordTimer))
+ {
+ if (__isRecording == true)
+ {
+ __recordTimeCount++;
+ __pCameraInfoPanel->SetTimeCount(__recordTimeCount);
+ __pCamraInfoSubIndicatorPanel->SetTimeCount(__recordTimeCount);
+ }
+ }
+ else if (timer.Equals(*__pExposureCloseTimer))
+ {
+ __closeTimerValue++;
+
+ AppLogDebug("__closeTimerValue expire %d", __closeTimerValue);
+
+ if (__closeTimerValue == EXPOSURE_TIMER_IS_ALIVE)
+ {
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ __pCameraInfoPanel->SetDrawExposure(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ __closeTimerValue = 0;
+
+ __pExposureCloseTimer->Cancel();
+ }
+ }
+ else if (timer.Equals(*__pZoomCloseTimer))
+ {
+ __closeTimerValue++;
+
+ AppLogDebug("__pCloseTimer expire %d", __closeTimerValue);
+
+ if (__closeTimerValue == ZOOM_TIMER_IS_ALIVE)
+ {
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ __closeTimerValue = 0;
+
+ __pZoomCloseTimer->Cancel();
+ }
+ }
+ else if (timer.Equals(*__pMakerFocusTimer))
+ {
+ AppLogDebug("__pMakerFocusTimer expire");
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ r = __pMakerFocusTimer->Cancel();
+
+ delete __pMakerFocusTimer;
+ __pMakerFocusTimer = null;
+ }
+ else
+ {
+ AppLogDebug("Not expire");
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::InitActionMenuPanel(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rectThumbnailButton;
+ Rectangle clientArea = GetClientAreaBounds();
+
+ __pActionPanel = static_cast<Panel*>(GetControl(L"IDC_ACTION_PANEL"));
+ TryCatch(__pActionPanel != null, r = E_SYSTEM, "__pActionPanel is null, Make panel fail!!!");
+
+ __pActionPanel->SetName(IDS_ACTION_UI_PANEL_NAME);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ if (clientArea.height == DISPLAY_WVGA)
+ {
+ __displayResolution = DISPLAY_RESOLUTION_WVGA;
+ }
+ else
+ {
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+ }
+ }
+ else
+ {
+ if (clientArea.width == DISPLAY_WVGA)
+ {
+ __displayResolution = DISPLAY_RESOLUTION_WVGA;
+ }
+ else
+ {
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+ }
+ }
+ __pActionPanel->AddTouchEventListener(*this);
+
+ __pCameraIconLabel = static_cast<Label*>(GetControl(L"IDC_CAMERA_ICON_LABEL"));
+ TryCatch(__pCameraIconLabel != null, r = E_SYSTEM, "__pCameraIconLabel is null");
+
+ __pCameraIconLabel->AddTouchEventListener(*this);
+
+ __pSwButton = static_cast<Button*>(GetControl(L"IDC_MODE_CHANGE_MODE_BUTTON"));
+ TryCatch(__pSwButton != null, r = E_SYSTEM, "__pSwButton is null");
+
+ __pSwButton->SetName(IDS_ACTION_UI_CAMCORDER_MODE);
+ __pSwButton->AddTouchEventListener(*this);
+
+ __pCamcoderIconLabel = static_cast<Label*>(GetControl(L"IDC_CAMCORDER_ICON_LABEL"));
+ TryCatch(__pCamcoderIconLabel != null, r = E_SYSTEM, "__pCamcoderIconLabel is null");
+
+ __pCamcoderIconLabel->AddTouchEventListener(*this);
+
+ __pRecordButton = static_cast<Button*>(GetControl(L"IDC_RECORD_BUTTON"));
+ TryCatch(__pRecordButton != null, r = E_SYSTEM, "pRecodeButton is null");
+
+ __pRecordButton->SetName(IDS_RECORDE_BUTTON_NAME);
+ __pRecordButton->AddTouchEventListener(*this);
+
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, Y_THUMBNAIL_IMG_PANEL_PORTRAIT_WVGA,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_LANDSCPAE_WVGA, Y_THUMBNAIL_IMG_PANEL_LANDSCPAE,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, Y_THUMBNAIL_IMG_PANEL_PORTRAIT,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_LANDSCPAE, Y_THUMBNAIL_IMG_PANEL_LANDSCPAE,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+
+ __pThumbnailPanel = new (std::nothrow) CameraThumbnailPanel();
+ TryCatch(__pThumbnailPanel != null, r = E_FAILURE, "__pThumbnailPanel is null");
+
+ r = __pThumbnailPanel->Initialize(rectThumbnailButton);
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "__pThumbnailPanel Create fail[%s]", GetErrorMessage(r));
+
+ __pThumbnailPanel->SetName(IDS_THUMBNAIL_PANLE_NAME);
+ __pThumbnailPanel->AddTouchEventListener(*this);
+ AddControl(*__pThumbnailPanel);
+ AddOrientationEventListener(*__pThumbnailPanel);
+
+ __pBackButton = static_cast<Button*>(GetControl(L"IDC_BACK_BUTTON"));
+ TryCatch(__pBackButton != null, r = E_SYSTEM, "__pBackButton is null");
+ __pBackButton->SetActionId(IDA_BUTTON_CAMCORDER_THUMBNAIL);
+ __pBackButton->AddActionEventListener(*this);
+ __pBackButton->SetShowState(false);
+ __pBackButton->AddTouchEventListener(*this);
+
+ r = UpdateUiActionPanelIcon();
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "UpdateUiActionPanelIcon() fail");
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ __pCameraIconLabel = null;
+ __pSwButton = null;
+ __pCamcoderIconLabel = null;
+ __pRecordButton = null;
+ __pBackButton = null;
+
+ delete __pThumbnailPanel;
+ __pThumbnailPanel = null;
+
+ return r;
+}
+
+result
+CamcorderForm::UpdateUiActionPanelIcon(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Bitmap* pBitmapRotate = null;
+
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ Point ptModeChangeButton;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_90;
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT);
+
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT);
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE);
+ }
+
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ __pCameraIconLabel->SetPosition(X_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA);
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA);
+ __pCamcoderIconLabel->SetPosition(X_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA);
+ __pRecordButton->SetPosition(X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA, Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA);
+ __pBackButton->SetPosition(X_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA, Y_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA);
+
+ __pActionPanel->SetBounds(X_ACTION_PANEL_CAMERA_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_PORTRAIT_WVGA, W_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT);
+
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT_WGA);
+ }
+ else
+ {
+ __pCameraIconLabel->SetPosition(X_ACTION_PANEL_CAMERA_ICON_LABEL_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_ICON_LABLE_LANDSCAPE_WVGA);
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA);
+ __pCamcoderIconLabel->SetPosition(X_ACTION_PANEL_CAMCODER_ICON_LABEL_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMCODER_ICON_LABLE_LANDSCAPE_WVGA);
+ __pRecordButton->SetPosition(X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA, Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA);
+ __pBackButton->SetPosition(X_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA, Y_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA);
+
+ __pActionPanel->SetBounds(X_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA, X_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE);
+ }
+ }
+ else
+ {
+ AppLogDebug("DISPLAY_RESOLUTION_HVGA");
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_CAMERA_ON);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ __pCameraIconLabel->SetBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ChangeMode::pBitmapRotate is null");
+
+ __pSwButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+ __pSwButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BUTTON_VER);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ __pSwButton->SetNormalBitmap(ptModeChangeButton, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_CAMCORDER_ON);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ __pCamcoderIconLabel->SetBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_NORMAL);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "RecordButton::pBitmapRotate is null");
+
+ __pRecordButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "RecordButton::pBitmapRotate is null");
+
+ __pRecordButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ThumbnailButton::pBitmap is null");
+
+ __pBackButton->SetNormalBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ThumbnailButton::pBitmap is null");
+
+ __pBackButton->SetPressedBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+ return r;
+}
+
+result
+CamcorderForm::Initialize(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Construct(L"IDL_CAMCORDER_FORM");
+
+ __pCamcorderPresentationModel = CameraPresentationModel::GetInstance();
+ TryCatch(__pCamcorderPresentationModel != null, r = E_SYSTEM, "__pCamcorderPresentationModel is null");
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CamcorderForm::InitAppTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pAppTimer = new (std::nothrow) Timer();
+ __pAppTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::InitMakerFocusTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pMakerFocusTimer = new (std::nothrow) Timer();
+ __pMakerFocusTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::InitSettingTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pSettingTimer = new (std::nothrow) Timer();
+ __pSettingTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::StartInitAppTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ if (__pCamcorderPresentationModel->GetRecorderState() != RECORDER_STATE_RECORDING)
+ {
+ AppLogDebug("StartInitAppTimer : RecorderState() = %d", __pCamcorderPresentationModel->GetRecorderState());
+ __pAppTimer->Cancel();
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "Timer::Start() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::StopInitAppTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pAppTimer->Cancel();
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::UpdateUiIndicatorStorage(Canvas* pCanvas, const String& str)
+{
+ AppLogDebug("ENTER");
+ Font* pFnt = null;
+ Point point;
+ Rectangle listRect;
+ Dimension dim;
+ result r = E_SUCCESS;
+ int textClearX = 0;
+ int textClearY = 0;
+ int textClearWidth = 0;
+ int textClearHeight= 0;
+
+ if (pCanvas)
+ {
+ listRect = pCanvas->GetBounds();
+
+ pFnt = new (std::nothrow) Font();
+ pFnt->Construct(FONT_STYLE_PLAIN, FONT_SIZE_INDICATOR_STORAGE_FREE_SPACE);
+
+ r = pCanvas->SetFont(*pFnt);
+ TryCatch(r == E_SUCCESS, , "Canvas::SetFont() fail[%s]", GetErrorMessage(r));
+
+ pCanvas->SetForegroundColor(COLOR_SETTING_MENU_TITLE);
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT;
+
+ textClearX = point.x;
+ textClearY = point.y;
+ textClearWidth = W_INDICATOR_STORAGE_CLEAR_AREA_PORTRAIT;
+ textClearHeight = H_INDICATOR_STORAGE_CLEAR_AREA_PORTRAIT;
+ }
+ else
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE;
+
+ textClearX = point.x;
+ textClearY = point.y;
+ textClearWidth = W_INDICATOR_STORAGE_CLEAR_AREA_LANDSCAPE;
+ textClearHeight = H_INDICATOR_STORAGE_CLEAR_AREA_LANDSCAPE;
+ }
+
+ r = pCanvas->Clear(Rectangle(textClearX, textClearY, textClearWidth, textClearHeight));
+ TryCatch(r == E_SUCCESS, , "Canvas Clear() fail[%s]", GetErrorMessage(r));
+
+ r = pCanvas->DrawText(point, str);
+ TryCatch(r == E_SUCCESS, , "Canvas::DrawText() fail[%s]", GetErrorMessage(r));
+
+ delete pFnt;
+ pFnt = null;
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pFnt;
+ pFnt = null;
+
+ return r;
+}
+
+result
+CamcorderForm::SettingTimerRecord(int timeInterval)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ switch (timeInterval)
+ {
+ case SETTING_TIMER_RECORD_0_SEC:
+ {
+ AppLogDebug("settingTimer = 0");
+ }
+ break;
+
+ case SETTING_TIMER_RECORD_2_SEC:
+ {
+ AppLogDebug("settingTimer = 2");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_2_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SETTING_TIMER_RECORD_5_SEC:
+ {
+ AppLogDebug("settingTimer = 5");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_5_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SETTING_TIMER_RECORD_10_SEC:
+ {
+ AppLogDebug("settingTimer = 10");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_10_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("timmer Invail element id");
+ }
+ break;
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CamcorderForm::MakeSettingPopup(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectList = Rectangle(X_SETTING_MENU_LIST_LANDSCAPE, Y_SETTING_MENU_LIST_LANDSCAPE, W_SETTING_MENU_LIST_LANDSCAPE, H_SETTING_MENU_LIST_LANDSCAPE);
+
+ HidePopup();
+
+ Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectList = Rectangle(X_SETTING_MENU_LIST_PORTRAIT, Y_SETTING_MENU_LIST_PORTRAIT, W_SETTING_MENU_LIST_PORTRAIT, H_SETTING_MENU_LIST_PORTRAIT);
+ }
+ else
+ {
+ rectList = Rectangle(X_SETTING_MENU_LIST_LANDSCAPE, Y_SETTING_MENU_LIST_LANDSCAPE, W_SETTING_MENU_LIST_LANDSCAPE, H_SETTING_MENU_LIST_LANDSCAPE);
+ }
+
+ MakeMenuString();
+ SetSettingMainMenuCount(MAX_SETTING_MENU_COUNT);
+
+ __pCameraInfoPanel->SetDrawSettingMenuBackground(true);
+ __pCameraInfoPanel->Invalidate(true);
+ if (__pListViewMainMenu == null)
+ {
+ __pListViewMainMenu = new (std::nothrow) ListView();
+ __pListViewMainMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListViewMainMenu->SetItemProvider(*this);
+ __pListViewMainMenu->AddListViewItemEventListener(*this);
+ __pListViewMainMenu->SetName(IDS_MENU_SETTING_MAIN_MENU_NAME);
+ }
+ else
+ {
+ __pListViewMainMenu->SetBounds(rectList);
+ __pListViewMainMenu->SetShowState(true);
+ }
+ __pCameraInfoPanel->AddControl(*__pListViewMainMenu);
+
+ __pListViewMainMenu->UpdateList();
+}
+
+void
+CamcorderForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pListViewMainMenu != null && listView.Equals(*__pListViewMainMenu))
+ {
+ if (__pListViewMainMenu && __pListViewMainMenu->GetShowState() == true)
+ {
+ r = ProcessMainListPopup(index);
+ }
+ TryReturnVoid(r == E_SUCCESS, "ProcessMainListPopup() fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pListViewSubMenu != null && listView.Equals(*__pListViewSubMenu))
+ {
+ r = ProcessSubListPopup(index);
+ TryReturnVoid(r == E_SUCCESS, "ProcessSubListPopup() fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pListFlashMainMenu != null && listView.Equals(*__pListFlashMainMenu))
+ {
+ if (__pListFlashMainMenu && __pListFlashMainMenu->GetShowState() == true)
+ {
+ r = ProcessFlashListPopup(index);
+ }
+ TryReturnVoid(r == E_SUCCESS, "ProcessMainListPopup() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+ListItemBase*
+CamcorderForm::CreateItem(int index, int itemWidth)
+{
+ AppLogDebug("ENTER");
+ CustomItem* pItem = null;
+ result r = E_SUCCESS;
+ int elementId = 0;
+ int regVal = 0;
+ Bitmap* pBitmap = null;
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ String tmpString;
+
+ bool createSubMenu = false;
+
+ if (__pListViewSubMenu)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_SETTING_SUBMENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+ createSubMenu = true;
+ switch (GetSettingSubMenuMode())
+ {
+ case CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE:
+ {
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_WB_MODE:
+ {
+ String arrString[] =
+ {
+ IDS_CAM_BODY_AUTO,
+ IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT,
+ IDS_CAM_BODY_FLUORESCENT,
+ IDS_CAM_BODY_DAYLIGHT,
+ IDS_CAM_BODY_CLOUDY,
+ };
+
+ pAppResource->GetString(arrString[index], tmpString);
+
+ ResourceId resId = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+
+ switch (index)
+ {
+ case SUBMENU_WB_AUTO_IMG_IDX:
+ {
+ resId = RESOURCE_ID_CAMERA_INDICATOR_WB_AUTO;
+ }
+ break;
+
+ case SUBMENU_WB_INCANDESCENT_IMG_IDX:
+ {
+ resId = RESOURCE_ID_CAMERA_INDICATOR_WB_INCANDESCENT;
+ }
+ break;
+
+ case SUBMENU_WB_FLUORESCENT_IMG_IDX:
+ {
+ resId = RESOURCE_ID_CAMERA_INDICATOR_WB_FLOU;
+ }
+ break;
+
+ case SUBMENU_WB_DAYLIGHT_IMG_IDX:
+ {
+ resId = RESOURCE_ID_CAMERA_INDICATOR_WB_DAYLIGHT;
+ }
+ break;
+
+ case SUBMENU_WB_CLOUDY_IMG_IDX:
+ {
+ resId = RESOURCE_ID_CAMERA_INDICATOR_WB_CLOUDY;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(WHITE_BALANCE_TYPE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ elementId = (index * MENU_THREE_ELEMENT);
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ elementId++;
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_RADIO_ICON, Y_SETTING_SUBMENU_RADIO_ICON, W_SETTING_SUBMENU_RADIO_ICON, H_SETTING_SUBMENU_RADIO_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ pBitmap = ResourceManager::GetBitmapN(resId);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_ICON, Y_SETTING_SUBMENU_ICON, W_SETTING_SUBMENU_ICON, H_SETTING_SUBMENU_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_3ITEM_TEXT, Y_SETTING_SUBMENU_3ITEM_TEXT, W_SETTING_SUBMENU_3ITEM_TEXT, H_SETTING_SUBMENU_3ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE:
+ {
+ String str = L"";
+ elementId = (index * MENU_TWO_ELEMENT);
+
+ r = __pCamcorderPresentationModel->GetValue(GUIDELINE_ENABLE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ if (index == SUBMENU_MODE_OFF)
+ {
+ str = IDS_CAM_BODY_OFF;
+ }
+ else
+ {
+ str = IDS_CAM_BODY_ON;
+ }
+
+ pAppResource->GetString(str, tmpString);
+
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_RADIO_ICON, Y_SETTING_SUBMENU_RADIO_ICON, W_SETTING_SUBMENU_RADIO_ICON, H_SETTING_SUBMENU_RADIO_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_2ITEM_TEXT, Y_SETTING_SUBMENU_2ITEM_TEXT, W_SETTING_SUBMENU_2ITEM_TEXT, H_SETTING_SUBMENU_2ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE:
+ {
+ String str = L"";
+ elementId = (index * MENU_TWO_ELEMENT);
+
+ r = __pCamcorderPresentationModel->GetValue(STORAGE_TYPE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ if (index == STORAGE_TYPE_PHONE)
+ {
+ str = IDS_COM_BODY_PHONE;
+ }
+ else
+ {
+ str = IDS_CAM_OPT_MEMORY_CARD;
+ }
+
+ pAppResource->GetString(str, tmpString);
+
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_RADIO_ICON, Y_SETTING_SUBMENU_RADIO_ICON, W_SETTING_SUBMENU_RADIO_ICON, H_SETTING_SUBMENU_RADIO_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+
+ if (str.Equals(String(IDS_CAM_OPT_MEMORY_CARD)))
+ {
+ if (__pCamcorderPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_2ITEM_TEXT, Y_SETTING_SUBMENU_2ITEM_TEXT, W_SETTING_SUBMENU_2ITEM_TEXT, H_SETTING_SUBMENU_2ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_2ITEM_TEXT, Y_SETTING_SUBMENU_2ITEM_TEXT, W_SETTING_SUBMENU_2ITEM_TEXT, H_SETTING_SUBMENU_2ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_2ITEM_TEXT, Y_SETTING_SUBMENU_2ITEM_TEXT, W_SETTING_SUBMENU_2ITEM_TEXT, H_SETTING_SUBMENU_2ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ if (__pListViewMainMenu && __pListViewMainMenu->GetShowState() == true)
+ {
+ if (createSubMenu == false)
+ {
+ pItem = new (std::nothrow) CustomItem();
+
+ String listName = __pListViewMainMenu->GetName();
+
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)))
+ {
+ int selfPortraitEnable = 0;
+
+ pItem->Construct(Dimension(itemWidth, H_SETTING_MENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+
+ elementId = (index * MENU_TWO_ELEMENT);
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ String strTmp = L"";
+ strTmp = __pSettingMenuString[index][0];
+ elementId++;
+
+ if (strTmp.GetLength())
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ if (index == CAMCORDER_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ }
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ if (index == CAMCORDER_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else
+ {
+ pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS, Y_SETTING_MENU_CONTENTS, W_SETTING_MENU_CONTENTS, H_SETTING_MENU_CONTENTS), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ String arrRegStringSupportWhiteBalance[4] =
+ {
+ EXPOSURE_VALUE,
+ WHITE_BALANCE_TYPE,
+ GUIDELINE_ENABLE,
+ STORAGE_TYPE
+ };
+
+ String arrRegStringSupportBrightness[4] =
+ {
+ BRIGHTNESS_VALUE,
+ WHITE_BALANCE_TYPE,
+ GUIDELINE_ENABLE,
+ STORAGE_TYPE
+ };
+
+ if (index < GetSettingMainMenuCount() - INDEX_UNIT_ONE)
+ {
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ bool value = false;
+ int storageType = STORAGE_TYPE_PHONE;
+
+ __pCamcorderPresentationModel->GetValue(STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCamcorderPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCamcorderPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, value);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, value);
+ }
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(arrRegStringSupportWhiteBalance[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, value);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, value);
+ }
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(arrRegStringSupportBrightness[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetValue(arrRegStringSupportWhiteBalance[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ AppLogDebug("%s[%d]", strTmp.GetPointer(), regVal);
+ strTmp = __pSettingMenuString[index][regVal + INDEX_UNIT_ONE];
+ elementId++;
+ if (strTmp.GetLength())
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ if (index == CAMCORDER_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ }
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ if (index == CAMCORDER_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE, W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE), elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ r = pItem->SetElementTextHorizontalAlignment(elementId, ALIGNMENT_CENTER);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else
+ {
+ delete pItem;
+ pItem = null;
+ TryCatch(pItem != null, r = E_SYSTEM, "Is not SettingMainMenu/FlashMenu");
+ }
+ }
+ }
+
+ if (__pListFlashMainMenu && __pListFlashMainMenu->GetShowState() == true)
+ {
+ String listName = __pListFlashMainMenu->GetName();
+
+ if (listName.Equals(String(IDS_MENU_FLASH_MENU_NAME)))
+ {
+ bool value = false;
+ int selfPortraitEnable = 0;
+ int flashMode = 0;
+
+ pItem = new (std::nothrow) CustomItem();
+
+ pItem->Construct(Dimension(itemWidth, H_SETTING_SUBMENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(FLASH_MODE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ ResourceId resId = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+ }
+ break;
+
+ case SUBMENU_MODE_AUTO:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ String arrString[] =
+ {
+ IDS_CAM_BODY_OFF,
+ IDS_CAM_BODY_ON,
+ IDS_CAM_BODY_AUTO,
+ };
+
+ pAppResource->GetString(arrString[index], tmpString);
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ elementId = (index * MENU_THREE_ELEMENT);
+ elementId++;
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_RADIO_ICON, Y_SETTING_SUBMENU_RADIO_ICON, W_SETTING_SUBMENU_RADIO_ICON, H_SETTING_SUBMENU_RADIO_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ pBitmap = ResourceManager::GetBitmapN(resId);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ r = pItem->AddElement(Rectangle(X_SETTING_SUBMENU_ICON, Y_SETTING_SUBMENU_ICON, W_SETTING_SUBMENU_ICON, H_SETTING_SUBMENU_ICON), elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ pItem->AddElement(Rectangle(X_SETTING_SUBMENU_3ITEM_TEXT, Y_SETTING_SUBMENU_3ITEM_TEXT, W_SETTING_SUBMENU_3ITEM_TEXT, H_SETTING_SUBMENU_3ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ pItem->AddElement(Rectangle(X_SETTING_SUBMENU_3ITEM_TEXT, Y_SETTING_SUBMENU_3ITEM_TEXT, W_SETTING_SUBMENU_3ITEM_TEXT, H_SETTING_SUBMENU_3ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ else
+ {
+ pItem->AddElement(Rectangle(X_SETTING_SUBMENU_3ITEM_TEXT, Y_SETTING_SUBMENU_3ITEM_TEXT, W_SETTING_SUBMENU_3ITEM_TEXT, H_SETTING_SUBMENU_3ITEM_TEXT), elementId, tmpString, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ }
+ }
+ else
+ {
+ delete pItem;
+ pItem = null;
+ TryCatch(pItem != null, r = E_SYSTEM, "Is not SettingMainMenu/FlashMenu");
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return pItem;
+
+CATCH:
+ delete pItem;
+ pItem = null;
+
+ delete pBitmap;
+ pBitmap = null;
+
+ return null;
+}
+
+bool
+CamcorderForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ AppLogDebug("ENTER");
+ delete pItem;
+ pItem = null;
+
+ AppLogDebug("EXIT");
+ return true;
+}
+
+int
+CamcorderForm::GetItemCount(void)
+{
+ AppLogDebug("ENTER");
+
+ if (__pListViewSubMenu)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ return GetSettingSubMenuCount();
+ }
+ }
+
+ if (__pListViewMainMenu)
+ {
+ return GetSettingMainMenuCount();
+ }
+
+ if (__pListFlashMainMenu)
+ {
+ return GetSettingMainMenuCount();
+ }
+
+ AppLogDebug("EXIT");
+ return 0;
+}
+
+void
+CamcorderForm::IncreaseDecreaseZoom(Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int getZoomLevel = 0;
+ int maxZoomLevel = 0;
+ int zoomLevel = 0;
+ Point buttonPosition;
+
+ maxZoomLevel = __pCamcorderPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCamcorderPresentationModel->GetZoomLevel();
+
+ buttonPosition = GetZoomButtonPoint();
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (keyCode == KEY_SIDE_UP && (getZoomLevel < maxZoomLevel))
+ {
+ zoomLevel++;
+
+ AppLogDebug("KEY_SIDE_UP zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ __pCamcorderPresentationModel->ZoomIn();
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else if (keyCode == KEY_SIDE_DOWN && (getZoomLevel >= ZOOM_LEVEL_ZERO))
+ {
+ zoomLevel--;
+
+ AppLogDebug("KEY_SIDE_DOWN zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ if (getZoomLevel != ZOOM_LEVEL_ZERO)
+ {
+ __pCamcorderPresentationModel->ZoomOut();
+ }
+
+ if (getZoomLevel == ZOOM_LEVEL_ZERO)
+ {
+ buttonPosition.x = buttonPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ }
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ if (keyCode == KEY_SIDE_UP && (getZoomLevel < maxZoomLevel))
+ {
+ zoomLevel++;
+
+ AppLogDebug("KEY_SIDE_UP zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ __pCamcorderPresentationModel->ZoomIn();
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else if (keyCode == KEY_SIDE_DOWN && (getZoomLevel >= ZOOM_LEVEL_ZERO))
+ {
+ zoomLevel--;
+
+ AppLogDebug("KEY_SIDE_DOWN zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ if (getZoomLevel != ZOOM_LEVEL_ZERO)
+ {
+ __pCamcorderPresentationModel->ZoomOut();
+ }
+
+ if (getZoomLevel == ZOOM_LEVEL_ZERO)
+ {
+ buttonPosition.y = buttonPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ }
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ r = ConsumeInputEvent();
+ TryReturnVoid(r == E_SUCCESS, "Consuming input event failed(%s)", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+Tizen::Graphics::Point
+CamcorderForm::GetZoomButtonPoint(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __pButtonPoint;
+}
+
+void
+CamcorderForm::SetZoomButtonPoint(const Tizen::Graphics::Point& pt)
+{
+ AppLogDebug("ENTER");
+ __pButtonPoint = pt;
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyPressed Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ if (keyCode == KEY_POWER_HOLD)
+ {
+ AppLogDebug("ENTER OnKeyPressed Control : KEY_POWER_HOLD");
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyReleased Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ if (keyCode == KEY_POWER_HOLD)
+ {
+ AppLogDebug("ENTER OnKeyPressed Control : KEY_POWER_HOLD");
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyLongPressed Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ if (keyCode == KEY_SIDE_UP
+ || keyCode == KEY_SIDE_DOWN)
+ {
+ // Empty statement
+ }
+ else if (keyCode == KEY_POWER_HOLD)
+ {
+ AppLogDebug("ENTER OnKeyPressed Control : KEY_POWER_HOLD");
+ __isLockScreenMode = true;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+inline int
+CamcorderForm::GetSettingMainMenuCount(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __mainMenuCount;
+}
+
+inline void
+CamcorderForm::SetSettingMainMenuCount(int count)
+{
+ AppLogDebug("ENTER");
+ __mainMenuCount = count;
+ AppLogDebug("EXIT");
+}
+
+inline int
+CamcorderForm::GetSettingSubMenuCount(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __subMenuCount;
+}
+
+inline void
+CamcorderForm::SetSettingSubMenuCount(int count)
+{
+ AppLogDebug("ENTER");
+ __subMenuCount = count;
+ AppLogDebug("EXIT");
+}
+
+inline CamcorderSubMenuContent
+CamcorderForm::GetSettingSubMenuMode(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __settingMode;
+}
+
+inline void
+CamcorderForm::SetSettingSubMenuMode(const CamcorderSubMenuContent mode)
+{
+ AppLogDebug("ENTER");
+ __settingMode = mode;
+ AppLogDebug("EXIT");
+}
+
+inline void
+CamcorderForm::SetSubMenuListviewState(const int menuCount, const CamcorderSubMenuContent mode)
+{
+ AppLogDebug("ENTER");
+ SetSettingSubMenuCount(menuCount);
+ SetSettingSubMenuMode(mode);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetGuideLine(int guideLineEnable)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamcorderPresentationModel->SetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetStorageType(int storageType)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = __pCamcorderPresentationModel->SetValue(STORAGE_TYPE, storageType);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ else if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ if (__pCamcorderPresentationModel->IsStorageCardMounted() == true)
+ {
+ AppLogDebug("StorageCard mount");
+
+ r = __pCamcorderPresentationModel->SetValue(STORAGE_TYPE, storageType);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_MOUNT);
+ }
+ else
+ {
+ AppLogDebug("StorageCard unmount");
+ __pCamcorderPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::RestoreDefaultSetting(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int adjustValue = 0;
+
+ __pCamcorderPresentationModel->ResetCameraSettingsRegistry( );
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(EXPOSURE_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetExposure(adjustValue);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(BRIGHTNESS_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetBrightness(adjustValue);
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(WHITE_BALANCE_TYPE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetWhiteBalance((CameraWhiteBalance)adjustValue);
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(WHITE_BALANCE_TYPE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetWhiteBalance((CameraWhiteBalance)adjustValue);
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ AppLogDebug("ERROR EXIT");
+ return r;
+}
+
+result
+CamcorderForm::DrawMarker(bool useGuidline)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ result r = E_SUCCESS;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (useGuidline)
+ {
+ __pCameraInfoPanel->SetDrawMarkerGuideline(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerGuideline(false);
+ }
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CamcorderForm::DrawFocus(int focusMode)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool focusSupport = false;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(focusMode);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(focusMode);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CamcorderForm::ToggleCameraDirection(int direction)
+{
+ AppLogDebug("ENTER");
+ BufferInfo bufferinfo;
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Dimension dim;
+ Point currentPosition;
+
+ __pAppTimer->Cancel();
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer::Start() fail[%s]", GetErrorMessage(r));
+
+ if (direction == CAMCORDER_FORM_SECONDARY_MODE)
+ {
+ __pCamcorderPresentationModel->ToggleCameraDirection(CameraPresentationModel::CAMERA_DIRECTION_FRONT);
+ }
+ else if (direction == CAMCORDER_FORM_PRIMARY_MODE)
+ {
+ __pCamcorderPresentationModel->ToggleCameraDirection(CameraPresentationModel::CAMERA_DIRECTION_BACK);
+ }
+
+ dim = __pCamcorderPresentationModel->GetPreviewResolution();
+ AppLogDebug("CamcorderForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ AppLogDebug("SelfPortraitMode __screenMode [%d]", __screenMode);
+
+ r = SetScreenMode(SCREEN_MODE_NORMAL, true);
+ TryReturnVoid(r == E_SUCCESS, "SetScreenMode() failed:%s", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+
+ __pCamcorderPresentationModel->StartPreview(&bufferinfo);
+
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+
+ InDrawFocus();
+
+ SetCamcoderSettingsDevice();
+
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::DrawTimerPopup(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ result r = E_SUCCESS;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ __pCameraInfoPanel->SetDrawPopupTimer(true);
+
+ StartPopupTimer();
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamcorderForm::SetFlashPopop(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectList = Rectangle(X_FLASH_MODE_SETTING_LIST_RECT, Y_FLASH_MODE_SETTING_LIST_RECT, W_FLASH_MODE_SETTING_LIST_RECT, H_FLASH_MODE_SETTING_LIST_RECT);
+ HidePopup();
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectList.x = X_FLASH_MODE_LIST_START_POS_PORTRAIT;
+ }
+ else
+ {
+ rectList.x = X_FLASH_MODE_LIST_START_POS_LANDSCAPE;
+ }
+
+ __pCameraInfoPanel->SetDrawFlashMenuBackground(true);
+ __pCameraInfoPanel->Invalidate(true);
+ SetSettingMainMenuCount(MAX_FLASH_MENU_COUNT);
+
+ if (__pListFlashMainMenu == null)
+ {
+ __pListFlashMainMenu = new (std::nothrow) ListView();
+ __pListFlashMainMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListFlashMainMenu->SetItemProvider(*this);
+ __pListFlashMainMenu->AddListViewItemEventListener(*this);
+ __pListFlashMainMenu->SetName(IDS_MENU_FLASH_MENU_NAME);
+ __pCameraInfoPanel->AddControl(*__pListFlashMainMenu);
+ }
+ else
+ {
+ __pListFlashMainMenu->SetBounds(rectList);
+ __pListFlashMainMenu->SetShowState(true);
+ }
+ __pListFlashMainMenu->UpdateList();
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::ProcessMainListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectPanel;
+ Rectangle rectList;
+ String strTitle = L"";
+ String listName = L"";
+ result r = E_SUCCESS;
+
+ bool drawPopup = true;
+
+ listName = __pListViewMainMenu->GetName();
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)))
+ {
+ if (__pCamraInfoSubPanel && __pListViewSubMenu)
+ {
+ __pCamraInfoSubPanel->SetShowState(false);
+ __pCamraInfoSubPanel->RemoveControl(*__pListViewSubMenu);
+ __pListViewSubMenu = null;
+ RemoveControl(*__pCamraInfoSubPanel);
+ __pCamraInfoSubPanel = null;
+
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMCORDER_SUB_MENU_CONTENT_MAX);
+ }
+
+ switch (index)
+ {
+ case CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE:
+ {
+ drawPopup = false;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int selfPortraitEnable = 0;
+ int adjustValue = 0;
+
+ AppLogDebug("Set Exposure mode");
+
+ HidePopup();
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE");
+
+ r = __pCamcorderPresentationModel->GetValue(EXPOSURE_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetExposure(adjustValue);
+
+ r = CreateExposureSlider();
+ TryCatch(r == E_SUCCESS, , "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE");
+
+ r = __pCamcorderPresentationModel->GetValue(BRIGHTNESS_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCamcorderPresentationModel->SetBrightness(adjustValue);
+
+ r = CreateExposureSlider();
+ TryCatch(r == E_SUCCESS, , "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("Exposure do not support");
+ }
+ }
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_WB_MODE:
+ {
+ int selfPortraitEnable = 0;
+
+ AppLogDebug("Set WB");
+ pAppResource->GetString(IDS_CAM_OPT_WHITE_BALANCE_ABB, strTitle);
+ rectPanel = Rectangle(X_SUBMENU_WB_MODE_PANEL, Y_SUBMENU_WB_MODE_PANEL, W_SUBMENU_WB_MODE_PANEL, H_SUBMENU_WB_MODE_PANEL);
+ rectList = Rectangle(X_SUBMENU_WB_MODE_LIST, Y_SUBMENU_WB_MODE_LIST, W_SUBMENU_WB_MODE_LIST, H_SUBMENU_WB_MODE_LIST);
+ SetSubMenuListviewState(SUBMENU_WB_COUNT, CAMCORDER_SUB_MENU_CONTENT_WB_MODE);
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Support WB");
+ }
+ else
+ {
+ AppLogDebug("Not Support WB");
+
+ r = __pCamcorderPresentationModel->SetValue(WHITE_BALANCE_TYPE, REG_DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+ }
+ }
+ else
+ {
+ AppLogDebug("Not Support WB");
+
+ r = __pCamcorderPresentationModel->SetValue(WHITE_BALANCE_TYPE, REG_DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+ }
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE:
+ {
+ AppLogDebug("Set geo tag or guideline mode");
+ rectPanel = Rectangle(X_SUBMENU_GEO_MODE_PANEL, Y_SUBMENU_GEO_MODE_PANEL, W_SUBMENU_GEO_MODE_PANEL, H_SUBMENU_GEO_MODE_PANEL);
+
+ pAppResource->GetString(IDS_CAM_BODY_GUIDELINE, strTitle);
+ SetSubMenuListviewState(SUBMENU_GUIDELINE_COUNT, CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE);
+ rectList = Rectangle(X_SUBMENU_GEO_MODE_LIST, Y_SUBMENU_GEO_MODE_LIST, W_SUBMENU_GEO_MODE_LIST, H_SUBMENU_GEO_MODE_LIST);
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE:
+ {
+ AppLogDebug("Set storage mode");
+
+ pAppResource->GetString(IDS_CAM_BODY_STORAGE, strTitle);
+ rectPanel = Rectangle(X_SUBMENU_STORAGE_PANEL, Y_SUBMENU_STORAGE_PANEL, W_SUBMENU_STORAGE_PANEL, H_SUBMENU_STORAGE_PANEL);
+ rectList = Rectangle(X_SUBMENU_STORAGE_LIST, Y_SUBMENU_STORAGE_LIST, W_SUBMENU_STORAGE_LIST, H_SUBMENU_STORAGE_LIST);
+ SetSubMenuListviewState(SUBMENU_STORAGETYPE_COUNT, CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE);
+ }
+ break;
+
+ case CAMCORDER_SUB_MENU_CONTENT_RESET_MODE:
+ {
+ AppLogDebug("Camcorder Reset");
+ String tmpString;
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ pAppResource->GetString(L"IDS_CAM_POP_RESET_SETTINGS_Q", tmpString);
+
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMCORDER_SUB_MENU_CONTENT_RESET_MODE);
+ drawPopup = false;
+
+ ShowMessageBox(tmpString, MSGBOX_STYLE_YESNO, L"");
+ }
+ break;
+
+ default:
+ {
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMCORDER_SUB_MENU_CONTENT_MAX);
+ AppLogDebug("Invaild index");
+ drawPopup = false;
+ }
+ break;
+ }
+
+ if (drawPopup)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel.x = X_SUBMENU_PANEL_START_PORTRAIT;
+ rectPanel.y += Y_SUBMENU_PANEL_START_PORTRAIT;
+ }
+ else
+ {
+ rectPanel.x = X_SUBMENU_PANEL_START_LANDSCAPE;
+ }
+
+ if (__pCamraInfoSubPanel == null)
+ {
+ __pCamraInfoSubPanel = new (std::nothrow) CamraInfoSubPanel();
+ TryCatch(__pCamraInfoSubPanel != null, r = E_FAILURE, "__pCamraInfoSubPanel is null");
+
+ r = __pCamraInfoSubPanel->Initialize(rectPanel);
+ TryCatch(r == E_SUCCESS, , "__pCamraInfoSubPanel Initialize fail[%s]", GetErrorMessage(r));
+
+ __pCamraInfoSubPanel->AddTouchEventListener(*this);
+ AddOrientationEventListener(*this);
+ AddControl(*__pCamraInfoSubPanel);
+ SetControlAlwaysOnTop(*__pCamraInfoSubPanel, true);
+ }
+
+ __pCamraInfoSubPanel->SetMenuTitle(strTitle);
+ __pCameraInfoPanel->Invalidate(true);
+ __pCamraInfoSubPanel->Invalidate(true);
+
+ __pListViewSubMenu = new (std::nothrow) ListView();
+ __pListViewSubMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListViewSubMenu->SetItemProvider(*this);
+ __pListViewSubMenu->AddListViewItemEventListener(*this);
+ __pCamraInfoSubPanel->AddControl(*__pListViewSubMenu);
+
+ __pListViewSubMenu->UpdateList();
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (__pCamraInfoSubPanel)
+ {
+ RemoveControl(*__pCamraInfoSubPanel);
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMCORDER_SUB_MENU_CONTENT_MAX);
+ }
+ else
+ {
+ delete __pListViewSubMenu;
+ }
+
+ __pCamraInfoSubPanel = null;
+ __pListViewSubMenu = null;
+
+ return r;
+}
+
+result
+CamcorderForm::ProcessFlashListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectPanel;
+ Rectangle rectList;
+ String strTitle = L"";
+ String listName = L"";
+ Bitmap* pBitmapNormal = null;
+ Bitmap* pBitmapPress = null;
+ result r = E_SUCCESS;
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+
+ AppLogDebug("Sub Menu (%d)", index);
+ int regVal = 0;
+ bool value = false;
+ int selfPortraitEnable = 0;
+
+ ResourceId resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ ResourceId resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ regVal = SUBMENU_MODE_ON;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_ON_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_ON;
+ }
+ break;
+
+ case SUBMENU_MODE_AUTO:
+ {
+ regVal = SUBMENU_MODE_AUTO;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_AUTO;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ }
+ }
+
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, regVal);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ TryCatch(__pSettingPanel != null, r = E_SYSTEM, "__pSettingPanel is null");
+
+ TryCatch(__pFlashButton != null, r = E_SYSTEM, "__pFlashButton is null");
+
+ pBitmapNormal = ResourceManager::GetBitmapN(resIdNormal);
+ TryCatch(pBitmapNormal != null, r = E_SYSTEM, "pBitmapNormal is null");
+
+ __pFlashButton->SetNormalBackgroundBitmap(*pBitmapNormal);
+
+ delete pBitmapNormal;
+ pBitmapNormal = null;
+
+ pBitmapPress = ResourceManager::GetBitmapN(resIdPress);
+ TryCatch(pBitmapPress != null, r = E_SYSTEM, "pBitmapPress is null");
+
+ __pFlashButton->SetPressedBackgroundBitmap(*pBitmapPress);
+
+ delete pBitmapPress;
+ pBitmapPress = null;
+
+ __pFlashButton->Invalidate(true);
+ HidePopup();
+
+ SetSettingMainMenuCount(MENU_COUNT_CLEAR);
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMCORDER_SUB_MENU_CONTENT_MAX);
+
+ __pCamcorderPresentationModel->SetFlashMode(cameraFlashMode);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CamcorderForm::ProcessSubListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ String strRegKey = IDS_INIT_REG_KEY;
+ result r = E_SUCCESS;
+ int regVal = 0;
+ int selfPortraitEnable = 0;
+ CamcorderSubMenuContent camSubMenuContent = CAMCORDER_SUB_MENU_CONTENT_MAX;
+
+ camSubMenuContent = GetSettingSubMenuMode();
+
+ if (camSubMenuContent == CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ AppLogDebug("Setting - EXPOSURE");
+ }
+ else if (camSubMenuContent == CAMCORDER_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ if (r == E_SUCCESS)
+ {
+ __pCamcorderPresentationModel->SetWhiteBalance((CameraWhiteBalance)index);
+ }
+ }
+ else
+ {
+ AppLogDebug("Target unsupport - white balance same");
+ }
+ __settingWhiteBalance = index;
+ regVal = __settingWhiteBalance;
+ strRegKey = WHITE_BALANCE_TYPE;
+ }
+ else if (camSubMenuContent == CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE)
+ {
+ int guideLine = 0;
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ AppLogDebug("Setting - Guideline = off");
+ guideLine = SUBMENU_MODE_OFF;
+ SetGuideLine(guideLine);
+ r = DrawMarker(false);
+ TryCatch(r == E_SUCCESS, , "DrawMarker() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ AppLogDebug("Setting - Guideline = on");
+ guideLine = SUBMENU_MODE_ON;
+ SetGuideLine(guideLine);
+ r = DrawMarker(true);
+ TryCatch(r == E_SUCCESS, , "DrawMarker() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("Setting - Guideline, Invail element id");
+ }
+ break;
+ }
+
+ regVal = guideLine;
+ strRegKey = GUIDELINE_ENABLE;
+ }
+ else if (camSubMenuContent == CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE)
+ {
+ int storage = STORAGE_TYPE_PHONE;
+
+ switch (index)
+ {
+ case SUBMENU_STORAGE_TYPE_PHONE:
+ {
+ AppLogDebug("Setting - Storage type = Phone");
+ storage = STORAGE_TYPE_PHONE;
+ SetStorageType(storage);
+ }
+ break;
+
+ case SUBMENU_STORAGE_TYPE_MEMORYCARD:
+ {
+ AppLogDebug("Setting - Storage type = card");
+ storage = STORAGE_TYPE_MEMORYCARD;
+
+ if (__pCamcorderPresentationModel->IsStorageCardMounted() == true)
+ {
+ SetStorageType(storage);
+ }
+ else
+ {
+ AppLogDebug("Setting - dont draw t-flash icon");
+ }
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("Setting - Storage, Invail index id");
+ }
+ break;
+ }
+
+ __pCamcorderPresentationModel->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_RECORD);
+
+ Update();
+
+ __pCameraInfoPanel->SetStorageType(storage);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ if (strRegKey != IDS_INIT_REG_KEY)
+ {
+ AppLogDebug("Set vaule");
+ r = __pCamcorderPresentationModel->SetValue(strRegKey, regVal);
+ TryCatch(r == E_SUCCESS, , "Faled to set value to registry");
+ }
+
+ HidePopup();
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ HidePopup();
+
+ return r;
+}
+
+result
+CamcorderForm::StartRecordTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ if (__pRecordTimer == null)
+ {
+ __recordTimeCount = 0;
+ __pRecordTimer = new (std::nothrow) Timer();
+ __pRecordTimer->Construct(*this);
+
+ r = __pRecordTimer->StartAsRepeatable(CAMCORDER_TIMER_ONE_SEC);
+ TryCatch(r == E_SUCCESS, , "Timer::StartAsRepeatable fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pRecordTimer;
+ __pRecordTimer = null;
+
+ return r;
+}
+
+void
+CamcorderForm::EndRecordTimer(void)
+{
+ AppLogDebug("ENTER");
+ if (__pRecordTimer)
+ {
+ __pRecordTimer->Cancel();
+ delete __pRecordTimer;
+ __pRecordTimer = null;
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::StartPopupTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int settingTimer = 0;
+
+ __timeCount = 0;
+
+ __pPopupTimer = new (std::nothrow) Timer();
+ __pPopupTimer->Construct(*this);
+
+ r = __pPopupTimer->StartAsRepeatable(CAMERA_TIMER_1_SEC);
+ TryCatch(r == E_SUCCESS, , "__pPopupTimer start fail[%s]", GetErrorMessage(r));
+
+ r = __pCamcorderPresentationModel->GetValue(TIMER_INTERVAL, settingTimer);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (settingTimer == SETTING_TIMER_RECORD_2_SEC)
+ {
+ __timeCount = SERRING_TIMER_2_SEC_COUNT;
+ }
+ else if (settingTimer == SETTING_TIMER_RECORD_5_SEC)
+ {
+ __timeCount = SERRING_TIMER_5_SEC_COUNT;
+ }
+ else if (settingTimer == SETTING_TIMER_RECORD_10_SEC)
+ {
+ __timeCount = SERRING_TIMER_10_SEC_COUNT;
+ }
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(__timeCount);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+
+ return r;
+}
+
+result
+CamcorderForm::EndPopupTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ TryCatch(__pPopupTimer != null, r = E_SYSTEM, "__pPopupTimer is null");
+
+ r = __pPopupTimer->Cancel();
+
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CamcorderForm::SetRecordButton(bool start)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ Bitmap* pBitmapRotate = null;
+
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ Point ptModeChangeButton;
+
+ TryReturnVoid(__pRecordButton != null, "__pRecordButton not found !!!");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_90;
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT);
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE);
+ }
+
+ if (start)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_SHUTTER_NORMAL);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_STANDBY_SHUTTER_NORMAL);
+ }
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, , "pBitmap is null");
+
+ __pRecordButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+ __pRecordButton->Invalidate(true);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+}
+
+void
+CamcorderForm::SetContinuousAutoFocusButton(void)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ bool isAppControl = false;
+
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Invalidate(true);
+
+ __pBackButton->SetShowState(true);
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_CAF);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_CAF);
+ }
+
+ pBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+ __pBackButton->SetNormalBitmap(Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ if (isAppControl == true)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_CAF_PRESS);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMCODER_RECORDING_CAF_PRESS);
+ }
+
+ pBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+ __pBackButton->SetPressedBitmap(Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ __pBackButton->Invalidate(true);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetThumbNailButton(void)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+ Point ptThumbnailImg = Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG);
+ Bitmap* pBitmap = null;
+ bool onVideoRecorderStopped = false;
+
+ onVideoRecorderStopped = __pCamcorderPresentationModel->GetOnVideoRecorderStopped();
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ if ( onVideoRecorderStopped == false)
+ {
+ AppLogDebug("CameraForm::Update :: Not thummail");
+
+ TryCatch(__pBackButton != null, , "__pThumbnailButton is null");
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetNormalBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK_PRESS);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetPressedBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ __pBackButton->Invalidate(true);
+ Invalidate(true);
+
+ if (__isRecording == false)
+ {
+ __pCamcorderPresentationModel->SetAppControlRequestType(CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_CANCELED);
+ }
+
+ AppLogDebug("IDA_BUTTON_CAMCORDER_THUMBNAIL : Back to the App");
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ String string= L"Video is saving...";
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", string, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ return;
+}
+
+void
+CamcorderForm::SetSelfModeButton(void)
+{
+ AppLogDebug("ENTER");
+ int selfPortraitEnable = 0;
+ result r = E_SUCCESS;
+ bool value = false;
+
+ if (__pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ AppLogDebug("Return Camera transform");
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getvalue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CAMCORDER_FORM_PRIMARY_MODE)
+ {
+ AppLogDebug("CAMCORDER 1");
+
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryReturnVoid(r == E_SUCCESS, "Reg setValue fail[%s]", GetErrorMessage(r));
+
+ r = __pCamcorderPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY);
+ TryReturnVoid(r == E_SUCCESS, "Reg setValue fail[%s]", GetErrorMessage(r));
+
+ ToggleCameraDirection(CAMCORDER_FORM_SECONDARY_MODE);
+
+ r = UpdateUiPanelIcon();
+ TryReturnVoid(r == E_SUCCESS, "UpdateUiPanelIcon() fail[%s]", GetErrorMessage(r));
+ }
+ else if (selfPortraitEnable == CAMCORDER_FORM_SECONDARY_MODE)
+ {
+ AppLogDebug("CAMCORDER 0");
+
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_ON);
+ TryReturnVoid(r == E_SUCCESS, "Reg setValue fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+ }
+
+ r = __pCamcorderPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+ TryReturnVoid(r == E_SUCCESS, "Reg setValue fail[%s]", GetErrorMessage(r));
+
+ ToggleCameraDirection(CAMCORDER_FORM_PRIMARY_MODE);
+
+ r = UpdateUiPanelIcon();
+ TryReturnVoid(r == E_SUCCESS, "UpdateUiPanelIcon() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ TryReturnVoid(__pFlashButton != null, "__pFlashButton is null");
+ __pFlashButton->Invalidate(true);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetCamcoderSettingsDevice(void)
+{
+ AppLogDebug("ENTER");
+ int brightness = 0;
+ int exposure = 0;
+ int isoIndex = 0;
+ int wbIndex = 0;
+ result r = E_SUCCESS;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int selfPortraitEnable = 0;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(EXPOSURE_VALUE, exposure);
+ TryReturnVoid(r == E_SUCCESS, "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetExposure(exposure);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(BRIGHTNESS_VALUE, brightness);
+ TryReturnVoid(r == E_SUCCESS, "brightness Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetBrightness(brightness);
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+ }
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(ISO_VALUE, isoIndex);
+ TryReturnVoid(r == E_SUCCESS, "isoIndex Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetIsoLevel((CameraIsoLevel)isoIndex);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r =__pCamcorderPresentationModel->GetValue(WHITE_BALANCE_TYPE, wbIndex);
+ TryReturnVoid(r == E_SUCCESS, "WB Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->SetWhiteBalance((CameraWhiteBalance)wbIndex);
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("WB unsupport");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+Bitmap*
+CamcorderForm::RotationImageN(Bitmap* pSrcBitmap, ImageRotationType rotationType)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Bitmap* pBitmap = new (std::nothrow) Bitmap();
+
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+ TryCatch(pSrcBitmap != null, r = E_SYSTEM, "pSrcBitmap is null");
+
+ if (rotationType == IMAGE_ROTATION_90
+ || rotationType == IMAGE_ROTATION_270)
+ {
+ BufferInfo bufferinfo;
+ Canvas canvas;
+ Dimension dim(pSrcBitmap->GetHeight(), pSrcBitmap->GetWidth());
+
+ r = pBitmap->Construct(dim, BITMAP_PIXEL_FORMAT_ARGB8888);
+ TryCatch(r == E_SUCCESS, , "pBitmap->Construct() fail[%s]", GetErrorMessage(r));
+
+ pBitmap->Lock(bufferinfo);
+
+ r = canvas.Construct(bufferinfo);
+ TryCatch(r == E_SUCCESS, , "canvas.Construct() fail[%s]", GetErrorMessage(r));
+
+ Point pointStart((pSrcBitmap->GetHeight() / DIVIDE_BY_TWO - pSrcBitmap->GetWidth() / DIVIDE_BY_TWO), INDEX_UNIT_ZERO);
+ Point pointPivot(pSrcBitmap->GetHeight() / DIVIDE_BY_TWO, pSrcBitmap->GetWidth() / DIVIDE_BY_TWO);
+
+ switch (rotationType)
+ {
+ case IMAGE_ROTATION_90:
+ {
+ AppLogDebug("IMAGE_ROTATION_90");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_90);
+ }
+ break;
+
+ case IMAGE_ROTATION_180:
+ {
+ AppLogDebug("IMAGE_ROTATION_180");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_180);
+ }
+ break;
+
+ case IMAGE_ROTATION_270:
+ {
+ AppLogDebug("IMAGE_ROTATION_270");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_270);
+ }
+ break;
+
+ default:
+ break;
+ }
+ pBitmap->Unlock();
+
+ AppLogDebug("EXIT");
+ return pBitmap;
+ }
+
+ pBitmap->Construct(*pSrcBitmap, Rectangle(X_BASE_POS, Y_BASE_POS, pSrcBitmap->GetWidth(), pSrcBitmap->GetHeight()));
+
+ AppLogDebug("EXIT");
+ return pBitmap;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ AppLogDebug("CATCH - EXIT");
+ return null;
+}
+
+Bitmap*
+CamcorderForm::ThumbnailRotationImageN(Bitmap* pSrcBitmap, ImageRotationType rotationType)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ ByteBuffer* pSrcByteBuff = null;
+ ByteBuffer dstByteBuff;
+ BufferInfo buffInfo;
+ result r = E_SUCCESS;
+ Dimension dim;
+ int size = 0;
+
+ TryCatch(pSrcBitmap != null, r = E_SYSTEM, "pSrcBitmap is null");
+
+ if (rotationType == IMAGE_ROTATION_0)
+ {
+ pBitmap = new (std::nothrow) Bitmap();
+ pBitmap->Construct(*pSrcBitmap, Rectangle(X_BASE_POS, Y_BASE_POS, pSrcBitmap->GetWidth(), pSrcBitmap->GetHeight()));
+
+ AppLogDebug("IMAGE_ROTATION_0 - EXIT");
+ return pBitmap;
+ }
+
+ dim.width = pSrcBitmap->GetWidth();
+ dim.height = pSrcBitmap->GetHeight();
+
+ size = dim.width * dim.height * (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE);
+
+ r = dstByteBuff.Construct(size);
+ TryCatch(r == E_SUCCESS, r = GetLastResult(), "dstByteBuff.Construct failed:%s %d %d %f", GetErrorMessage(GetLastResult()), dim.width, dim.height, (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE));
+
+ r = dstByteBuff.SetPosition(BYTE_BUFFER_START_POS);
+ TryCatch(r == E_SUCCESS, , "dstByteBuff SetPosition() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcBitmap->Lock(buffInfo, CAMERA_TIMER_ONE_MILLI_SEC);
+ TryCatch(r == E_SUCCESS, , "pSrcBitmap Lock() fail[%s]", GetErrorMessage(r));
+
+ pSrcByteBuff = new (std::nothrow) ByteBuffer();
+ TryCatch(pSrcByteBuff, , "pSrcByteBuff failed:%s", GetErrorMessage(GetLastResult()));
+
+ r = pSrcByteBuff->Construct(size);
+ TryCatch(r == E_SUCCESS, r = GetLastResult(), "pSrcByteBuff->Construct() failed:%s %d %d %f", GetErrorMessage(GetLastResult()), dim.width, dim.height, (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE));
+
+ r = pSrcByteBuff->SetPosition(BYTE_BUFFER_START_POS);
+ TryCatch(r == E_SUCCESS, , "pSrcByteBuff SetPosition() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcByteBuff->SetArray(static_cast<byte*>(buffInfo.pPixels), BYTE_ARRAY_START_POS, size);
+ TryCatch(r == E_SUCCESS, , "pSrcByteBuff SetArray() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcBitmap->Unlock();
+ TryCatch(r == E_SUCCESS, , "pSrcBitmap Unlock() fail[%s]", GetErrorMessage(r));
+
+ r = ImageUtil::Rotate(*pSrcByteBuff, dstByteBuff, dim, rotationType, MEDIA_PIXEL_FORMAT_RGBA8888);
+ TryCatch(r == E_SUCCESS, , "Rotate() fail[%s]", GetErrorMessage(r));
+
+ if (rotationType == IMAGE_ROTATION_90
+ || rotationType == IMAGE_ROTATION_270)
+ {
+ dim.width = pSrcBitmap->GetHeight();
+ dim.height = pSrcBitmap->GetWidth();
+ }
+ else
+ {
+ dim.width = pSrcBitmap->GetWidth();
+ dim.height = pSrcBitmap->GetHeight();
+ }
+
+ pBitmap = new (std::nothrow) Bitmap();
+ pBitmap->Construct(dstByteBuff, dim, pSrcBitmap->GetPixelColorFormat());
+
+ delete pSrcByteBuff;
+ pSrcByteBuff = null;
+
+ AppLogDebug("EXIT");
+ return pBitmap;
+
+CATCH:
+ AppLogDebug("Image rotation process fail[%s]", GetErrorMessage(r));
+ if (pSrcByteBuff != null)
+ {
+ delete pSrcByteBuff;
+ pSrcByteBuff = null;
+ }
+
+ return null;
+}
+
+result
+CamcorderForm::SetSliderAdjustValue(const Tizen::Graphics::Point& currentPosition, const Tizen::Graphics::Rectangle& movableValidRect, const Tizen::Base::String& entryName, const int maxEntryValue)
+{
+ AppLogDebug("ENTER SliderAdjustValue %ls", entryName.GetPointer());
+ result r = E_SUCCESS;
+ int adjustEntryValue = 0;
+ int currentEntryValue = 0;
+ int step = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int selfPortraitEnable = 0;
+ bool IsSliderAdjustValue = false;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ step = movableValidRect.width / maxEntryValue;
+ if (currentPosition.x > movableValidRect.x)
+ {
+ if (currentPosition.x > SLIDER_RECTVALID_X_POS)
+ {
+ adjustEntryValue = maxEntryValue - ((currentPosition.x - movableValidRect.x) / step);
+ if (adjustEntryValue == CAMERA_EXPOSURE_VALUE_ONE)
+ {
+ adjustEntryValue = CAMERA_EXPOSURE_VALUE_ZERO;
+ }
+ }
+ else
+ {
+ adjustEntryValue = maxEntryValue - ((currentPosition.x - movableValidRect.x) / step);
+ }
+
+ IsSliderAdjustValue = true;
+ }
+ else
+ {
+ IsSliderAdjustValue = false;
+ }
+ }
+ else
+ {
+ step = movableValidRect.height / maxEntryValue;
+ if (currentPosition.y > movableValidRect.y)
+ {
+ adjustEntryValue = ((currentPosition.y - movableValidRect.y) / step);
+ IsSliderAdjustValue = true;
+ }
+ else
+ {
+ IsSliderAdjustValue = false;
+ }
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (entryName.Equals(String(EXPOSURE_VALUE)))
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(EXPOSURE_VALUE, currentEntryValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(BRIGHTNESS_VALUE, currentEntryValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (currentEntryValue != adjustEntryValue && IsSliderAdjustValue)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->SetValue(EXPOSURE_VALUE, adjustEntryValue);
+ TryCatch(r == E_SUCCESS, , "etValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->SetValue(BRIGHTNESS_VALUE, adjustEntryValue);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ __pCamcorderPresentationModel->SetExposure(adjustEntryValue);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ __pCamcorderPresentationModel->SetBrightness(adjustEntryValue);
+ }
+ else
+ {
+ AppLogDebug("SetBrightness do not support");
+ }
+ }
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CamcorderForm::CreateExposureSlider(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ __closeTimerValue = 0;
+ __pExposureCloseTimer = new (std::nothrow) Timer();
+ __pExposureCloseTimer->Construct(*this);
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryCatch(r == E_SUCCESS, , "Timer::start fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetDrawExposure(true);
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pExposureCloseTimer;
+ __pExposureCloseTimer = null;
+
+ return r;
+}
+
+result
+CamcorderForm::DrawExposureSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point buttonPosition;
+ result r = E_SUCCESS;
+ int exposure = 0;
+ int step = 0;
+ int selfPortraitEnable = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(EXPOSURE_VALUE, exposure);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("Exposure value %d",exposure);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCamcorderPresentationModel->GetValue(BRIGHTNESS_VALUE, exposure);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("Exposure value %d",exposure);
+ }
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ step = W_EXPOSURE_PANEL_SLIDER_PORTRAIT / MAX_CAMERA_EXPOSURE_VALUE;
+
+ buttonPosition.x = (step * (MAX_CAMERA_EXPOSURE_VALUE - exposure)) + X_EXPOSURE_PANEL_SLIDER_PORTRAIT;
+ buttonPosition.y = Y_EXPOSURE_PANEL_SLIDER_PORTRAIT;
+ AppLogDebug("DrawExposureSlider X Point %d", buttonPosition.x);
+ }
+ else
+ {
+ step = H_EXPOSURE_PANEL_SLIDER_LANDSCAPE / MAX_CAMERA_EXPOSURE_VALUE;
+
+ buttonPosition.x = X_EXPOSURE_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = (step * exposure) + Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE;
+ AppLogDebug("DrawExposureSlider Y Point %d", buttonPosition.y);
+ }
+
+ r = DrawExposureSlider(buttonPosition, DRAW_INITIALIZED);
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CamcorderForm::DrawExposureSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point buttonPosition;
+ bool isSliderRectValid = false;
+
+ AppLogDebug("DrawExposureSlider DrawMode %d, X Point %d, Y Point %d", DrawMode, currentPosition.x, currentPosition.y);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = currentPosition.y;
+ isSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_EXPOSURE_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_EXPOSURE_PANEL_SLIDER_PORTRAIT + W_EXPOSURE_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_EXPOSURE_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= (Y_EXPOSURE_PANEL_SLIDER_PORTRAIT + H_EXPOSURE_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_EXPOSURE_PANEL_SLIDER_PORTRAIT;
+ isSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, Rectangle(X_EXPOSURE_PANEL_SLIDER_PORTRAIT, Y_EXPOSURE_PANEL_SLIDER_PORTRAIT, W_EXPOSURE_PANEL_SLIDER_PORTRAIT, H_EXPOSURE_PANEL_SLIDER_PORTRAIT), EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_EXPOSURE_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_EXPOSURE_PANEL_SLIDER_PORTRAIT + W_EXPOSURE_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_EXPOSURE_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= (Y_EXPOSURE_PANEL_SLIDER_PORTRAIT + H_EXPOSURE_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_EXPOSURE_PANEL_SLIDER_PORTRAIT;
+ isSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, Rectangle(X_EXPOSURE_PANEL_SLIDER_PORTRAIT, Y_EXPOSURE_PANEL_SLIDER_PORTRAIT, W_EXPOSURE_PANEL_SLIDER_PORTRAIT, H_EXPOSURE_PANEL_SLIDER_PORTRAIT), EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_EXPOSURE_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= (X_EXPOSURE_PANEL_SLIDER_LANDSCAPE + W_EXPOSURE_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE + H_EXPOSURE_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_EXPOSURE_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, Rectangle(X_EXPOSURE_PANEL_SLIDER_LANDSCAPE, Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE, W_EXPOSURE_PANEL_SLIDER_LANDSCAPE, H_EXPOSURE_PANEL_SLIDER_LANDSCAPE), EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_EXPOSURE_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= (X_EXPOSURE_PANEL_SLIDER_LANDSCAPE + W_EXPOSURE_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE + H_EXPOSURE_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_EXPOSURE_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, Rectangle(X_EXPOSURE_PANEL_SLIDER_LANDSCAPE, Y_EXPOSURE_PANEL_SLIDER_LANDSCAPE, W_EXPOSURE_PANEL_SLIDER_LANDSCAPE, H_EXPOSURE_PANEL_SLIDER_LANDSCAPE), EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (isSliderRectValid)
+ {
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CamcorderForm::CreateZoomSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point point;
+ result r = E_SUCCESS;
+
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ __closeTimerValue = 0;
+ __pZoomCloseTimer = new (std::nothrow) Timer();
+ __pZoomCloseTimer->Construct(*this);
+
+ __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryCatch(r == E_SUCCESS, , "Timer::start fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetDrawZoom(true);
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pZoomCloseTimer;
+ __pZoomCloseTimer = null;
+
+ return r;
+}
+
+result
+CamcorderForm::DrawZoomSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point buttonPosition;
+ result r = E_SUCCESS;
+ int zoomStep = 0;
+ int maxZoomLevel = 0;
+ int currentZoomLevel = 0;
+
+ maxZoomLevel = __pCamcorderPresentationModel->GetMaxZoomLevel();
+ currentZoomLevel = __pCamcorderPresentationModel->GetZoomLevel();
+
+ AppLogDebug("maxZoomLevel =%d, currentZoomLevel=%d, zoomStep=%d", maxZoomLevel, currentZoomLevel, zoomStep);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ zoomStep = W_ZOOM_PANEL_SLIDER_PORTRAIT / maxZoomLevel;
+
+ buttonPosition.x = (zoomStep * currentZoomLevel) + X_ZOOM_PANEL_SLIDER_PORTRAIT;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+
+ AppLogDebug("DrawZoomSlider X Point %d", buttonPosition.x);
+ }
+ else
+ {
+ zoomStep = H_ZOOM_PANEL_SLIDER_LANDSCAPE / maxZoomLevel;
+
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = OFFSET_ZOOM_PANEL_SLIDER_BUTTON_LANDSCAPE - (zoomStep * currentZoomLevel);
+
+ AppLogDebug("DrawZoomSlider Y Point %d", buttonPosition.y);
+ }
+
+ AppLogDebug("DrawZoomSlider Y Point %d", buttonPosition.y);
+
+ r = DrawZoomSlider(buttonPosition, DRAW_INITIALIZED);
+ TryCatch(r == E_SUCCESS, , "DrawZoomSlider() fail[%s]", GetErrorMessage(r));
+
+ SetZoomButtonPoint(buttonPosition);
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+result
+CamcorderForm::DrawZoomSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point buttonPosition;
+ bool isSliderRectValid = false;
+ int zoomStep = 0;
+ int getZoomLevel = 0;
+ int maxZoomLevel = 0;
+ int zoomLevel = 0;
+
+ AppLogDebug("DrawZoomSlider DrawMode %d, X Point %d, Y Point %d", DrawMode, currentPosition.x, currentPosition.y);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = currentPosition.y;
+ isSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_ZOOM_PANEL_SLIDER_PORTRAIT + W_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= MULTIPLY_BY_TWO * (Y_ZOOM_PANEL_SLIDER_PORTRAIT + H_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+ isSliderRectValid = true;
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_ZOOM_PANEL_SLIDER_PORTRAIT + W_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= MULTIPLY_BY_TWO * (Y_ZOOM_PANEL_SLIDER_PORTRAIT + H_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+ isSliderRectValid = true;
+
+ maxZoomLevel = __pCamcorderPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCamcorderPresentationModel->GetZoomLevel();
+ zoomStep = CAMERA_ZOOM_SLIDER_RANGE / maxZoomLevel;
+ zoomLevel = (currentPosition.x - X_ZOOM_PANEL_SLIDER_PORTRAIT) / zoomStep;
+ AppLogDebug("DrawZoomSlider:zoomLevel=%d", zoomLevel);
+ __pCamcorderPresentationModel->SetZoomValue(zoomLevel);
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= MULTIPLY_BY_TWO * (X_ZOOM_PANEL_SLIDER_LANDSCAPE + W_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_ZOOM_PANEL_SLIDER_LANDSCAPE + H_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= MULTIPLY_BY_TWO * (X_ZOOM_PANEL_SLIDER_LANDSCAPE + W_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_ZOOM_PANEL_SLIDER_LANDSCAPE + H_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ isSliderRectValid = true;
+
+ maxZoomLevel = __pCamcorderPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCamcorderPresentationModel->GetZoomLevel();
+ zoomStep = CAMERA_ZOOM_SLIDER_RANGE / maxZoomLevel;
+ zoomLevel = maxZoomLevel - ((currentPosition.y - Y_ZOOM_PANEL_SLIDER_LANDSCAPE) / zoomStep);
+ AppLogDebug("DrawZoomSlider:zoomLevel=%d", zoomLevel);
+ __pCamcorderPresentationModel->SetZoomValue(zoomLevel);
+ }
+ }
+ else
+ {
+ isSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ isSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (isSliderRectValid)
+ {
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamcorderForm::ShowMessageBox(const String& text, MessageBoxStyle style, const String& title)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ MessageBox messageBox;
+ int result = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ int guideLineEnable = 0;
+
+ messageBox.Construct(title, text, style, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ r = messageBox.ShowAndWait(result);
+ TryReturnVoid(r == E_SUCCESS, "ShowAndWait() fail(%s)", GetErrorMessage(r));
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_YES:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_YES");
+
+ r = __pCamcorderPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "GetValue() fail(%s)", GetErrorMessage(r));
+
+ if (guideLineEnable == CAMERA_GUIDELINE_ENABLE)
+ {
+ r = DrawMarker(false);
+ TryReturnVoid(r == E_SUCCESS, "DrawMarker() fail(%s)", GetErrorMessage(r));
+
+ SetGuideLine(REG_DEFAULT_VALUE_ZERO);
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "GetValue() fail(%s)", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("SUBMENU_RESET_MODE : CAMERA_FORM_SECONDARY_MODE");
+
+ r = __pCamcorderPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+ TryReturnVoid(r == E_SUCCESS, "SetValue() fail(%s)", GetErrorMessage(r));
+
+ ToggleCameraDirection(CAMCORDER_FORM_PRIMARY_MODE);
+ }
+
+ RestoreDefaultSetting();
+
+ r = UpdateUiPanelIcon();
+ TryReturnVoid(r == E_SUCCESS, "UpdateUiPanelIcon() fail(%s)", GetErrorMessage(r));
+
+ TryReturnVoid(__pFlashButton != null, "__pFlashButton is null");
+ __pFlashButton->Invalidate(true);
+ }
+ break;
+
+ case MSGBOX_RESULT_NO:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_NO");
+ }
+ break;
+
+ case MSGBOX_RESULT_CLOSE:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_CLOSE");
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ HidePopup();
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ BufferInfo bufferinfo;
+ int selfPortraitEnable = CAMCORDER_FORM_PRIMARY_MODE;
+ int guideLineEnable = DISABLE_GUIDELINE;
+ String listName = L"";
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ bool isValidRect = false;
+ bool modified = false;
+
+ if (__dir != orientationStatus)
+ {
+ __isOrientationChanged = true;
+
+ if (__pAppTimer != null)
+ {
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ {
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ AppLogDebug("SCREEN_MODE_NORMAL");
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_FULL_PREVIEW_OVERLAY_PORTRAIT, Y_FULL_PREVIEW_OVERLAY_PORTRAIT, W_FULL_PREVIEW_OVERLAY_PORTRAIT, H_FULL_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ }
+ else
+ {
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ AppLogDebug("SCREEN_MODE_NORMAL");
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rect = Rectangle(X_FULL_PREVIEW_OVERLAY_LANDSCAPE, Y_FULL_PREVIEW_OVERLAY_LANDSCAPE, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, H_FULL_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ }
+
+ if (__pOverlayPanel)
+ {
+ switch (orientationStatus)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ __pOverlayPanel->SetBounds(rect);
+ }
+
+ __dir = orientationStatus;
+
+ __pCamcorderPresentationModel->SetOrientation(__dir);
+
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ if (__pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING || __isRecording == true)
+ {
+ HidePanel(true, true);
+ }
+ else
+ {
+ HidePanel(false, true);
+ }
+ }
+ else
+ {
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (guideLineEnable == DISABLE_GUIDELINE)
+ {
+ r = DrawMarker(false);
+ }
+ else
+ {
+ r = DrawMarker(true);
+ }
+ TryReturnVoid(r == E_SUCCESS, "DrawMarker fail[%s]", GetErrorMessage(r));
+
+ if (__pCameraInfoPanel->GetDrawZoom())
+ {
+ DrawZoomSlider();
+ }
+
+ UpdateUiPanelIcon();
+ UpdateUiActionPanelIcon();
+
+ if (__isRecording || __pCamcorderPresentationModel->GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(true);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ else
+ {
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(true);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(true);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ }
+ }
+
+ if (__pListViewMainMenu != null)
+ {
+ listName = __pListViewMainMenu->GetName();
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)) && __pListViewMainMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pListFlashMainMenu != null)
+ {
+ listName = __pListFlashMainMenu->GetName();
+
+ if (listName.Equals(String(IDS_MENU_FLASH_MENU_NAME))&& __pListFlashMainMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ if (__pExposureCloseTimer->Cancel() == E_SUCCESS)
+ {
+ HidePopup();
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = CreateExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = CreateExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ }
+
+ Invalidate(true);
+ __isOrientationChanged = false;
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::HidePopup(void)
+{
+ AppLogDebug("ENTER");
+
+ TryReturnVoid(__pCameraInfoPanel != null, "__pCameraInfoPanel is null");
+
+ if (__pListViewSubMenu)
+ {
+ if (__pCamraInfoSubPanel != null)
+ {
+ __pCamraInfoSubPanel->SetShowState(false);
+ }
+ __pListViewSubMenu->SetShowState(false);
+ }
+
+ if (__pListViewMainMenu)
+ {
+ __pListViewMainMenu->SetShowState(false);
+ }
+
+ if (__pListFlashMainMenu)
+ {
+ __pListFlashMainMenu->SetShowState(false);
+ }
+
+ __pCameraInfoPanel->SetDrawFlashMenuBackground(false);
+ __pCameraInfoPanel->SetDrawSettingMenuBackground(false);
+
+ if (__isOrientationChanged)
+ {
+ __isOrientationChanged = false;
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::CheckStorageInfo(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ MessageBox messageBox;
+ int result = 0;
+ int timerInterval = 0;
+ String strTemp = L"";
+ int remainedNum = 0;
+
+ remainedNum = __pCameraInfoPanel->GetRemainedPhoto();
+ remainedNum = __pCamraInfoSubIndicatorPanel->GetRemainedPhoto();
+
+ AppLogDebug("remainedNum = %d", remainedNum);
+
+ if (remainedNum == STORAGE_VALUE_ZERO)
+ {
+ if (__lowMemoryCapacity == false)
+ {
+ __lowMemoryCapacity = true;
+
+ __isMemoryFull = false;
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ if (__pCamraInfoSubIndicatorPanel->GetDrawRecordTimer() == true)
+ {
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+
+ messageBox.Construct(L"", L"Low Memory Left. You may take some photo depending on the subject", MSGBOX_STYLE_OK, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ }
+ else if (__lowMemoryCapacity == true)
+ {
+ __isMemoryFull = true;
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ if (__pCamraInfoSubIndicatorPanel->GetDrawRecordTimer() == true)
+ {
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+
+ messageBox.Construct(L"", L"Memory Full", MSGBOX_STYLE_OK, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ }
+
+ r = messageBox.ShowAndWait(result);
+ TryReturnVoid(r == E_SUCCESS, "ShowAndWait() fail(%s)", GetErrorMessage(r));
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_OK:
+ {
+ if (__lowMemoryCapacity == true)
+ {
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ __pCameraInfoPanel->SetStorageTitle(strTemp);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ if (__isMemoryFull == true)
+ {
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ __pCameraInfoPanel->SetStorageTitle(strTemp);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (__isRecording == false)
+ {
+ r = __pCamcorderPresentationModel->GetValue(TIMER_INTERVAL, timerInterval);
+ TryReturnVoid(r == E_SUCCESS, "Reg getvalue fail[%s]", GetErrorMessage(r));
+
+ HidePopup();
+
+ AppLogDebug("__isRecording = false -> true");
+
+ SetRecordMode(timerInterval);
+ }
+ else
+ {
+ AppLogDebug("__isRecording = true");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::SetScreenMode(const ScreenMode mode, bool destory)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point currentPosition;
+ bool modified = false;
+ bool isValidRect = false;
+ BufferInfo bufferinfo;
+ int previewResolutionSize = 0;
+ int selfPortraitEnable = 0;
+ Dimension dim;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+
+ AppLogDebug("__screenMode[%d] mode[%d]", __screenMode, mode);
+ __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+
+ switch (mode)
+ {
+ case SCREEN_MODE_NORMAL:
+ {
+ if (destory == true)
+ {
+ if (__screenMode != mode)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->KeepScreenOnState(true, false);
+
+ __pCamcorderPresentationModel->StopCamera();
+ }
+
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ AppLogDebug("Client area rect (%d, %d, %d, %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ __pOverlayPanel = new (std::nothrow) OverlayPanel();
+ __pOverlayPanel->Construct(rect);
+ AddControl(*__pOverlayPanel);
+
+ if (rect.width > clientRect.width
+ || rect.height > clientRect.height)
+ {
+ rect.width = clientRect.width;
+ rect.height = clientRect.height;
+ }
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ TryCatch(isValidRect, r = GetLastResult(), "OverlayRegion::EvaluateBounds failed : %s", GetErrorMessage(r));
+
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (__screenMode != mode)
+ {
+ AppLogDebug("__screenMode[%d] mode[%d]", __screenMode, mode );
+ if (__pCamcorderPresentationModel->IsCameraInstance())
+ {
+ AppLogDebug("OnSceneActivatedN 1");
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+ else
+ {
+ AppLogDebug("OnSceneActivatedN 2");
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+
+ dim = __pCamcorderPresentationModel->GetPreviewResolution();
+ AppLogDebug("CamcorderForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ __previewResolutionWidth = dim.width;
+ __previewResolutionHeight = dim.height;
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryCatch(r == E_SUCCESS, , "GetBackgroundBufferInfo() fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->StartPreview(&bufferinfo);
+
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ __pCamraInfoSubIndicatorPanel->SetPreviewResolutionSize(previewResolutionSize);
+ }
+ else
+ {
+ AppLogDebug("__screenMode = mode");
+ }
+ __screenMode = SCREEN_MODE_NORMAL;
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (__pOverlayPanel)
+ {
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ r = __pOverlayPanel->SetBounds(rect);
+ AppLogDebug("pOverlayPanel->SetBounds() [%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("Client area rect (%d, %d, %d, %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ if (rect.width > clientRect.width
+ || rect.height > clientRect.height)
+ {
+ rect.width = clientRect.width;
+ rect.height = clientRect.height;
+ }
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ TryCatch(isValidRect, r = GetLastResult(), "OverlayRegion::EvaluateBounds failed : %s", GetErrorMessage(r));
+
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ __screenMode = SCREEN_MODE_NORMAL;
+ }
+
+ HidePanel(false, false);
+
+ __pCameraInfoPanel->SetOverlayPanelMode(__screenMode);
+ __pCamraInfoSubIndicatorPanel->SetOverlayPanelMode(__screenMode);
+ }
+ break;
+
+ case SCREEN_MODE_FULL:
+ {
+ Rectangle rect = Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height);
+
+ if (destory == true)
+ {
+ if (__screenMode != mode)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMCORDER_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->KeepScreenOnState(true, false);
+
+ __pCamcorderPresentationModel->StopCamera();
+ }
+
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+
+ __pOverlayPanel = new (std::nothrow) OverlayPanel();
+ __pOverlayPanel->Construct(rect);
+ AddControl(*__pOverlayPanel);
+
+ AppLogDebug("Client area rect (%d, %d, %d, %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ TryCatch(isValidRect, r = GetLastResult(), "OverlayRegion::EvaluateBounds failed : %s", GetErrorMessage(r));
+
+ AppLogDebug("SCREEN_MODE_FULL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (__screenMode != mode)
+ {
+ AppLogDebug("__screenMode[%d] mode[%d]", __screenMode, mode);
+ if (__pCamcorderPresentationModel->IsCameraInstance())
+ {
+ AppLogDebug("OnSceneActivatedN 1");
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+ else
+ {
+ AppLogDebug("OnSceneActivatedN 2");
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+
+ dim = __pCamcorderPresentationModel->GetPreviewResolution();
+ AppLogDebug("CamcorderForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ __previewResolutionWidth = dim.width;
+ __previewResolutionHeight = dim.height;
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryCatch(r == E_SUCCESS, , "GetBackgroundBufferInfo() fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->StartPreview(&bufferinfo);
+
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+ }
+ else
+ {
+ AppLogDebug("__screenMode = mode");
+ }
+ __screenMode = SCREEN_MODE_FULL;
+ }
+ else
+ {
+ if (__pOverlayPanel)
+ {
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ r = __pOverlayPanel->SetBounds(rect);
+ AppLogDebug("pOverlayPanel->SetBounds() [%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("Client area rect (%d, %d, %d, %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ TryCatch(isValidRect, r = GetLastResult(), "OverlayRegion::EvaluateBounds failed : %s", GetErrorMessage(r));
+
+ AppLogDebug("SCREEN_MODE_FULL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ __screenMode = SCREEN_MODE_FULL;
+ }
+
+ HidePanel(true, false);
+
+ __pCameraInfoPanel->SetOverlayPanelMode(__screenMode);
+
+ __pCamraInfoSubIndicatorPanel->SetOverlayPanelMode(__screenMode);
+
+ Draw();
+ Show();
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ __screenMode = SCREEN_MODE_NORMAL;
+ __pCameraInfoPanel->SetOverlayPanelMode(__screenMode);
+ __pCamraInfoSubIndicatorPanel->SetOverlayPanelMode(__screenMode);
+ return r;
+}
+
+void
+CamcorderForm::InDrawFocus(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ Point currentPosition;
+ int selfPortraitEnable = 0;
+ result r = E_SUCCESS;
+ bool focusSupport = false;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ currentPosition.x = (W_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ currentPosition.x = (W_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ }
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::StartRecord(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool focusSupport = false;
+
+ AppLogDebug("Record Start");
+
+ InitMakerFocusTimer();
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCamraInfoSubIndicatorPanel->StartDrawRecordTimer();
+
+ if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(true);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ else
+ {
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(true);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawRecordTimer(true);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+ }
+ }
+
+ __pMakerFocusTimer->Cancel();
+
+ __pMakerFocusTimer->Start(CAMCORDER_TIMER_ONE_SEC);
+
+ CheckStorageInfo();
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ SetContinuousAutoFocusButton();
+ }
+ else
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(false);
+ __pBackButton->Invalidate(true);
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Invalidate(true);
+ }
+
+ AppLogDebug("Don't Draw ContinuousAutoFocusButton");
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ SetContinuousAutoFocusButton();
+ }
+ else
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(false);
+ __pBackButton->Invalidate(true);
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Invalidate(true);
+ }
+
+ AppLogDebug("Don't Draw ContinuousAutoFocusButton");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::StopRecord(void)
+{
+ AppLogDebug("ENTER");
+
+ DrawThumbnail();
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ //__pCamraInfoSubIndicatorPanel->SetDrawIndicatorStroageInfo(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+
+ if (__pMakerFocusTimer)
+ {
+ __pMakerFocusTimer->Cancel();
+ }
+
+ __isRecording = false;
+
+ __pCamcorderPresentationModel->StopRecord();
+
+ EndRecordTimer();
+
+ SetRecordButton(false);
+
+ __timeCount = 0;
+
+ __pSettingTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetRecordEndReached(void)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pRotateBitmap = null;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ Point currentPosition;
+
+ AppLogDebug("VIDEO_RECORDER_END_REACHED_LISTENER.");
+
+ DrawThumbnail();
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+
+ if (__pMakerFocusTimer)
+ {
+ __pMakerFocusTimer->Cancel();
+ }
+
+ __isRecording = false;
+ EndRecordTimer();
+ SetRecordButton(false);
+
+ __timeCount = 0;
+
+ __pSettingTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+ else
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+
+ __pCamcorderPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+
+ InDrawFocus();
+
+ StartInitAppTimer();
+
+ pThumbnailBitmap = __pCamcorderPresentationModel->GetLatestThumbnail();
+ TryReturnVoid(pThumbnailBitmap != null, "pRotateBitmap is null");
+ pThumbnailBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ currentPosition.x = (W_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_PORTRAIT / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ rotationType = IMAGE_ROTATION_0;
+ currentPosition.x = (W_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ currentPosition.y = (H_PREVIEW_OVERLAY_LANDSCAPE / DIVIDE_BY_TWO);
+ }
+
+ pRotateBitmap = ThumbnailRotationImageN(pThumbnailBitmap, rotationType);
+ TryReturnVoid(pRotateBitmap != null, "pRotateBitmap is null");
+
+ __pThumbnailPanel->SetShowState(true);
+ __pThumbnailPanel->Invalidate(true);
+ __pThumbnailPanel->SetNewBitmap(pRotateBitmap);
+ __pThumbnailPanel->SetDrawSliderImg();
+
+ delete pRotateBitmap;
+ pRotateBitmap = null;
+
+ Update();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SetRecordErrorOccurred(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ Point currentPosition;
+
+ AppLogDebug("SetRecordErrorOccurred.");
+
+ DrawThumbnail();
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+
+ if (__pMakerFocusTimer)
+ {
+ __pMakerFocusTimer->Cancel();
+ }
+
+ __isRecording = false;
+ EndRecordTimer();
+ SetRecordButton(false);
+
+ __timeCount = 0;
+
+ __pSettingTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ __pCamcorderPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+
+ InDrawFocus();
+
+ StartInitAppTimer();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::HideUiAction(void)
+{
+ AppLogDebug("ENTER");
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ if (__pExposureCloseTimer != null)
+ {
+ __closeTimerValue = 0;
+
+ __pExposureCloseTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ __pCameraInfoPanel->SetDrawExposure(false);
+ HidePopup();
+ Invalidate(true);
+ }
+
+ if (__pZoomCloseTimer != null)
+ {
+ __closeTimerValue = 0;
+
+ __pZoomCloseTimer->Cancel();
+ }
+
+ if (__pMakerFocusTimer != null)
+ {
+ __pMakerFocusTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::HideUiModeChangedButton(void)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ if (__pCameraIconLabel)
+ {
+ __pCameraIconLabel->SetShowState(false);
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ __pCamcoderIconLabel->SetShowState(false);
+ }
+
+ if (__pSwButton)
+ {
+ __pSwButton->SetShowState(false);
+ }
+ }
+ else
+ {
+ if (__pCameraIconLabel)
+ {
+ __pCameraIconLabel->SetShowState(true);
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ __pCamcoderIconLabel->SetShowState(true);
+ }
+
+ if (__pSwButton)
+ {
+ __pSwButton->SetShowState(true);
+ }
+ }
+
+ Invalidate(true);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::HideUiPanel(bool state)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (state == true)
+ {
+ __pFlashButton->SetShowState(false);
+ __pSelfShotButton->SetShowState(false);
+ __pSettingButton->SetShowState(false);
+ __pCameraIconLabel->SetShowState(false);
+ __pCamcoderIconLabel->SetShowState(false);
+ __pSwButton->SetShowState(false);
+ __pRecordButton->SetShowState(true);
+ __pBackButton->SetShowState(true);
+ __pThumbnailPanel->SetShowState(true);
+
+ __pSettingPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ __pActionPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ }
+ else
+ {
+ __pFlashButton->SetShowState(true);
+ __pSelfShotButton->SetShowState(true);
+ __pSettingButton->SetShowState(true);
+
+ if (isAppControl)
+ {
+ __pCameraIconLabel->SetShowState(false);
+ __pCamcoderIconLabel->SetShowState(false);
+ __pSwButton->SetShowState(false);
+ }
+ else
+ {
+ __pCameraIconLabel->SetShowState(true);
+ __pCamcoderIconLabel->SetShowState(true);
+ __pSwButton->SetShowState(true);
+ }
+ __pRecordButton->SetShowState(true);
+ __pBackButton->SetShowState(true);
+ __pThumbnailPanel->SetShowState(true);
+
+ __pSettingPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_GRAY);
+ __pActionPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_GRAY);
+ }
+
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ Invalidate(true);
+ }
+ else
+ {
+ Draw();
+ Show();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::HidePanel(bool isWideMode, bool isInvalidated)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pSettingPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pSettingPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSettingPanel");
+ SetControlAlwaysOnTop(*__pSettingPanel, true);
+ }
+ }
+
+ if (__pActionPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pActionPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pActionPanel");
+ SetControlAlwaysOnTop(*__pActionPanel, true);
+ }
+ }
+
+ if (__pFlashButton)
+ {
+ if (IsControlAlwaysOnTop(*__pFlashButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pFlashButton");
+ SetControlAlwaysOnTop(*__pFlashButton, true);
+ }
+ }
+
+ if (__pSelfShotButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSelfShotButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSelfShotButton");
+ SetControlAlwaysOnTop(*__pSelfShotButton, true);
+ }
+ }
+
+ if (__pSettingButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSettingButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSettingButton");
+ SetControlAlwaysOnTop(*__pSettingButton, true);
+ }
+ }
+
+ if (__pCameraIconLabel)
+ {
+ if (IsControlAlwaysOnTop(*__pCameraIconLabel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pCameraIconLabel");
+ SetControlAlwaysOnTop(*__pCameraIconLabel, true);
+ }
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ if (IsControlAlwaysOnTop(*__pCamcoderIconLabel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pCamcoderIconLabel");
+ SetControlAlwaysOnTop(*__pCamcoderIconLabel, true);
+ }
+ }
+
+ if (__pSwButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSwButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSwButton");
+ SetControlAlwaysOnTop(*__pSwButton, true);
+ }
+ }
+
+ if (__pRecordButton)
+ {
+ if (IsControlAlwaysOnTop(*__pRecordButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pRecordButton");
+ SetControlAlwaysOnTop(*__pRecordButton, true);
+ }
+ }
+
+ if (__pBackButton)
+ {
+ if (IsControlAlwaysOnTop(*__pBackButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pBackButton");
+ SetControlAlwaysOnTop(*__pBackButton, true);
+ }
+ }
+
+ if (__pThumbnailPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pThumbnailPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pThumbnailPanel");
+ SetControlAlwaysOnTop(*__pThumbnailPanel, true);
+ }
+ }
+
+ if (isWideMode == true)
+ {
+ AppLogDebug("Wide MODE");
+
+ if (__pSettingPanel)
+ {
+ r = __pSettingPanel->SetShowState(false);
+ AppLogDebug("__pSettingPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+
+ if (__pActionPanel)
+ {
+ r = __pActionPanel->SetShowState(false);
+ AppLogDebug("__pActionPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ AppLogDebug("Normal MODE");
+ if (__pSettingPanel)
+ {
+ r = __pSettingPanel->SetShowState(true);
+ AppLogDebug("__pSettingPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+ if (__pActionPanel)
+ {
+ r = __pActionPanel->SetShowState(true);
+ AppLogDebug("__pActionPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (isInvalidated == true)
+ {
+ Invalidate(true);
+ }
+ else
+ {
+ Draw();
+ Show();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::DrawTouchAutoFocus(const Tizen::Graphics::Point& currentPosition)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool focusSupport = false;
+
+ r = __pCamcorderPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ r = __pCamcorderPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ __pCamcorderPresentationModel->SetAutoFocusPoint(currentPosition);
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::LaunchImageview(void)
+{
+ AppLogDebug("ENTER");
+ String fullFileName = L"";
+ String listIndex = L"";
+ int contentCount = 0;
+ result r = E_SUCCESS;
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ if (__pZoomCloseTimer)
+ {
+ __pZoomCloseTimer->Cancel();
+ }
+
+ if (__pPopupTimer)
+ {
+ __timeCount = 0;
+ __pPopupTimer->Cancel();
+ }
+
+ HidePopup();
+
+ HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+ pDataList->Construct();
+
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_CAMCORDER));
+
+ fullFileName = __pCamcorderPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_RECORD);
+ AppLogDebug("fullFileName = %ls", fullFileName.GetPointer());
+
+ contentCount = __pCamcorderPresentationModel->GetContentCount();
+ AppLogDebug("contentCount : %d", contentCount);
+
+ listIndex.Format(10, L"%d", contentCount - INDEX_UNIT_ONE);
+ AppLogDebug(" listIndex : %ls", listIndex.GetPointer());
+
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(fullFileName));
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
+
+ r = LaunchAppControl(APPCONTROL_PROVIDER_ID_IMAGEVIEW, APPCONTROL_OPERATION_ID_IMAGEVIEW, null, null, pDataList);
+ TryReturnVoid(r == E_SUCCESS, "Faled to LaunchAppControl[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::GetCameraToForeground(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ Dimension dim;
+ BufferInfo bufferinfo;
+ Point currentPosition;
+ result r = E_SUCCESS;
+ int previewResolutionSize = 0;
+
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_ACTIVATED happen");
+
+ __isLockScreenMode = false;
+
+ __pCamcorderPresentationModel->KeepScreenOnState(true, false);
+
+ StartInitAppTimer();
+
+ if (__pCamcorderPresentationModel->IsCameraInstance())
+ {
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+ else
+ {
+ __pCamcorderPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+
+ Update();
+
+ dim = __pCamcorderPresentationModel->GetPreviewResolution();
+ AppLogDebug("CamcorderForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ __previewResolutionWidth = dim.width;
+ __previewResolutionHeight = dim.height;
+
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_ACTIVATED: __screenMode [%d]", __screenMode);
+
+ r = SetScreenMode(SCREEN_MODE_NORMAL, false);
+ TryReturnVoid(r == E_SUCCESS, "SetScreenMode() failed:%s", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ InDrawFocus();
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCamcorderPresentationModel->StartPreview(&bufferinfo);
+
+ __pCamcorderPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ __pCamraInfoSubIndicatorPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ SetCamcoderSettingsDevice();
+
+ __pCameraInfoPanel->StartCheckStorageInfoTimer();
+
+ __pCamraInfoSubIndicatorPanel->StartCheckStorageInfoTimer();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::SendCameraToBackground(void)
+{
+ AppLogDebug("ENTER");
+
+ HideUiPanel(false);
+
+ StopInitAppTimer();
+
+ __pCamcorderPresentationModel->KeepScreenOnState(false, true);
+
+ DrawThumbnail();
+
+ __pCameraInfoPanel->SetDrawRecordTimer(false);
+
+ __pCameraInfoPanel->SetDrawIndicator(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCamraInfoSubIndicatorPanel->StopDrawRecordTimer();
+
+ __pCamraInfoSubIndicatorPanel->SetDrawRecordTimer(false);
+
+ __pCamraInfoSubIndicatorPanel->SetDrawIndicator(false);
+
+ __pCamraInfoSubIndicatorPanel->Invalidate(true);
+
+ if (__pMakerFocusTimer)
+ {
+ __pMakerFocusTimer->Cancel();
+ }
+
+ if (__isRecording == true)
+ {
+ AppLogDebug("StopRecord");
+ __pCamcorderPresentationModel->StopRecord();
+ }
+
+ __isRecording = false;
+
+ EndRecordTimer();
+
+ SetRecordButton(false);
+
+ __timeCount = 0;
+
+ __pSettingTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->EndCheckStorageInfoTimer();
+
+ __pCamraInfoSubIndicatorPanel->EndCheckStorageInfoTimer();
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ HidePopup();
+
+ __pCamcorderPresentationModel->StopCamera();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::DrawThumbnail(void)
+{
+ AppLogDebug("ENTER");
+
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(true);
+ __pBackButton->Draw();
+ __pBackButton->Show();
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+ }
+ }
+ else
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(false);
+ __pBackButton->Draw();
+ __pBackButton->Show();
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(true);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamcorderForm::ShowUnlaunchPopup(void)
+{
+ AppLogDebug("ENTER");
+ int result = 0;
+ MessageBox msgBox;
+ String tmpString;
+ String* pItemText=null;
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ pItemText = new (std::nothrow) String();
+
+ pAppResource->GetString(L"IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL", tmpString);
+
+ msgBox.Construct(L"", tmpString, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ msgBox.ShowAndWait(result);
+
+ delete pItemText;
+ pItemText = null;
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_CLOSE:
+ {
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ break;
+
+ default:
+ {
+ }
+ break;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+Tizen::Telephony::CallStatus
+CamcorderForm::GetCurrentCallStatus(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+
+ CallManager* pCallManager = new (std::nothrow) CallManager();
+
+ r = pCallManager->Construct();
+ TryCatch(r == E_SUCCESS, , "pCallManager::Construct() failed by [%s]", GetErrorMessage(r));
+
+ callStatus = pCallManager->GetCurrentCallStatus();
+
+ AppLogDebug("callStatus = %d", callStatus);
+
+ delete pCallManager;
+
+ AppLogDebug("EXIT");
+ return callStatus;
+
+CATCH:
+ AppLogDebug("ENTER");
+ delete pCallManager;
+ return CALL_STATUS_UNDEFINED;
+}
+
+Tizen::Telephony::CallType
+CamcorderForm::GetCurrentCallType(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ CallType callType = TYPE_UNDEFINED_CALL;
+
+ CallManager* pCallManager = new (std::nothrow) CallManager();
+
+ r = pCallManager->Construct();
+ TryCatch(r == E_SUCCESS, , "pCallManager::Construct() failed by [%s]", GetErrorMessage(r));
+
+ callType = pCallManager->GetCurrentCallType();
+ AppLogDebug("callType = %d", callType);
+
+ delete pCallManager;
+
+ AppLogDebug("EXIT");
+ return callType;
+
+CATCH:
+ AppLogDebug("EXIT");
+ delete pCallManager;
+ return TYPE_UNDEFINED_CALL;
+}
+
+void
+CamcorderForm::CheckLowBatteryStatus(void)
+{
+ AppLogDebug("ENTER");
+ int result = 0;
+ MessageBox msgBox;
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCamcorderPresentationModel->GetBatteryLevel();
+ isCharging = __pCamcorderPresentationModel->IsCharging();
+
+ AppLogDebug("batteryLevel = %d", batteryLevel);
+
+ if (batteryLevel == BATTERY_CRITICAL || batteryLevel == BATTERY_EMPTY)// || batteryLevel == BATTERY_LOW)
+ {
+ if (isCharging == false)
+ {
+ msgBox.Construct(L"", L"Unable to start camera.Low battery", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ msgBox.ShowAndWait(result);
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_CLOSE:
+ {
+ AppLogDebug("MSGBOX_RESULT_CLOSE");
+ CamcorderForm::OnFormBackRequested(*this);
+ }
+ break;
+
+ default:
+ {
+ }
+ break;
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CamcorderForm::MakeMenuString(void)
+{
+ AppLogDebug("ENTER");
+ int idx = 0;
+ String tmpString;
+ result r = E_SUCCESS;
+
+ if (__pSettingMenuString == null)
+ {
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ __pSettingMenuString = new (std::nothrow) String*[MAX_SETTING_MENU_COUNT];
+ TryCatch(__pSettingMenuString != null, r = E_FAILURE, "__pSettingMenuString is null");
+
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ __pSettingMenuString[idx] = new (std::nothrow) String[MAX_SUBMENU_CONTENT];
+ TryCatch(__pSettingMenuString[idx] != null, r = E_FAILURE, "__pSettingMenuString[%d] is null", idx);
+ }
+
+ pAppResource->GetString(IDS_CAM_OPT_EXPOSURE_VALUE, tmpString);
+
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_01] = tmpString;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_02] = IDS_MENU_EXPOSURE_P20;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_03] = IDS_MENU_EXPOSURE_P15;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_04] = IDS_MENU_EXPOSURE_P10;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_05] = IDS_MENU_EXPOSURE_P05;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_06] = IDS_MENU_EXPOSURE_00;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_07] = IDS_MENU_EXPOSURE_M05;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_08] = IDS_MENU_EXPOSURE_M10;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_09] = IDS_MENU_EXPOSURE_M15;
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_10] = IDS_MENU_EXPOSURE_M20;
+
+ pAppResource->GetString(IDS_CAM_OPT_WHITE_BALANCE_ABB, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_AUTO, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_03] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_FLUORESCENT, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_04] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_DAYLIGHT, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_05] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_CLOUDY, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_07] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_GUIDELINE, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_OFF, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_ON, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_03] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_STORAGE, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_COM_BODY_PHONE, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_OPT_MEMORY_CARD, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_STORAGETYPE_MODE][MENU_IDX_03] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_RESET_SETTINGS_RESET, tmpString);
+ __pSettingMenuString[CAMCORDER_SUB_MENU_CONTENT_RESET_MODE][MENU_IDX_01] = tmpString;
+ }
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (__pSettingMenuString)
+ {
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ if (__pSettingMenuString[idx])
+ {
+ delete [] __pSettingMenuString[idx];
+ __pSettingMenuString[idx] = null;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ delete __pSettingMenuString;
+ __pSettingMenuString = null;
+ }
+
+ return r;
+}
+
+bool
+CamcorderForm::IsDisplayResolutionWvga(void)
+{
+ AppLogDebug("ENTER");
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ AppLogDebug("DISPLAY_RESOLUTION_WVGA - EXIT");
+ return true;
+ }
+ else
+ {
+ AppLogDebug("EXIT");
+ return false;
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraApp.cpp
+ * @brief This is the implementation file for CameraApp class.
+ */
+
+#include "CmCameraApp.h"
+#include "CmCameraPresentationModel.h"
+#include "CmCameraSettingsPresentationModel.h"
+#include "CmMainFrame.h"
+#include "CmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+static const wchar_t* PARAM_LANGUAGE = L"http://tizen.org/setting/locale.language";
+static const wchar_t* PARAM_COUNTRY = L"http://tizen.org/setting/locale.country";
+static const wchar_t* APPCONTROL_OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture";//Gallery ref is modified to be deleted.
+static const wchar_t* APPCONTROL_OPERATION_ID_CREATECONTENT = L"http://tizen.org/appcontrol/operation/createcontent";
+static const wchar_t* MAIN_OPERATION_ID = L"http://tizen.org/appcontrol/operation/main";
+static const wchar_t* STRING_FRAME_NAME = L"CameraApp";
+static const wchar_t* APPCONTROL_PARAM_TYPE = L"type";
+static const wchar_t* APPCONTROL_PARAM_TYPE_CAMERA = L"camera";
+static const wchar_t* APPCONTROL_PARAM_TYPE_CAMCORDER = L"camcorder";
+
+CameraApp::CameraApp(void)
+ : __requestId(null)
+ , __appControlType(APP_CONTROL_TYPE_UNKNOWN)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraApp::~CameraApp(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+UiApp*
+CameraApp::CreateInstance(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return new (std::nothrow) CameraApp();
+}
+
+bool
+CameraApp::IsAppControl(void)
+{
+ AppLogDebug("ENTER");
+
+ if (__appControlType == APP_CONTROL_TYPE_REQUESET)
+ {
+ AppLogDebug("EXIT");
+ return true;
+ }
+ else
+ {
+ AppLogDebug("EXIT");
+ return false;
+ }
+}
+
+void
+CameraApp::SetAppControlType(int type)
+{
+ AppLogDebug("ENTER");
+ __appControlType = (AppControlType)type;
+ AppLogDebug("EXIT");
+}
+
+RequestId
+CameraApp::GetRequestId(void)
+{
+ return __requestId;
+}
+
+bool
+CameraApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+ AppLogDebug("ENTER");
+
+ CameraPresentationModel* pCameraPresentationModel = CameraPresentationModel::GetInstance();
+ TryCatch(pCameraPresentationModel != null, , "pCameraPresentationModel is null");
+
+ AppControlProviderManager::GetInstance()->SetAppControlProviderEventListener(this);
+
+ SettingInfo::AddSettingEventListener(*this);
+
+ PowerManager::SetChargingEventListener(*this);
+
+ AppLogDebug("EXIT");
+ return true;
+
+CATCH:
+ return false;
+}
+
+bool
+CameraApp::OnAppInitialized(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int mode = 0;
+
+ MainFrame* pCameraAppFrame = new (std::nothrow) MainFrame();
+ r = pCameraAppFrame->Construct();
+
+ CameraPresentationModel* pCameraPresentationModel = CameraPresentationModel::GetInstance();
+ TryCatch(pCameraPresentationModel != null, , "pCameraPresentationModel is null");
+
+ pCameraAppFrame->SetName(STRING_FRAME_NAME);
+ r = AddFrame(*pCameraAppFrame);
+ TryCatch(r == E_SUCCESS, , "UiApp::AddFrame() fail[%s]", GetErrorMessage(r));
+
+ r = pCameraPresentationModel->GetValue(CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "Read register GetValue() fail[%s]", GetErrorMessage(r));
+
+ r = pCameraAppFrame->Initialize(mode);
+ TryCatch(r == E_SUCCESS, , "MainFrame::Initialize() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return true;
+
+CATCH:
+ AppLogDebug("CATCH - EXIT");
+ return false;
+}
+
+bool
+CameraApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+ AppLogDebug("ENTER");
+
+ __appControlType = APP_CONTROL_TYPE_UNKNOWN;
+
+ CameraPresentationModel::DestroyPresentationModelInstance();
+ CameraSettingsPresentationModel::DestroyCameraSettingInstance();
+
+ PowerManager::SetChargingEventListener(*(static_cast<IChargingEventListener*>(null)));
+
+ AppLogDebug("EXIT");
+ return true;
+}
+
+void
+CameraApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+ AppLogDebug("ENTER");
+
+ CameraPresentationModel* pCameraPresentationModel = CameraPresentationModel::GetInstance();
+ TryReturnVoid(pCameraPresentationModel != null, "pCameraPresentationModel is null");
+
+ if (pCameraPresentationModel->IsCameraInstance() == false)
+ {
+ AppLogDebug("IsCameraInstance is null");
+ }
+ else
+ {
+ AppLogDebug("IsCameraInstance is not null");
+ MainFrame* pFrame = static_cast<MainFrame*>(UiApp::GetInstance()->GetFrame(STRING_FRAME_NAME));
+ TryReturnVoid(pFrame != null, "pFrame is null");
+
+ Form* pForm = pFrame->GetCurrentForm();
+ TryReturnVoid(pForm != null, "pForm is null");
+
+ pForm->SendUserEvent(CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED, null);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraApp::OnChargingStateChanged(bool charging)
+{
+ AppLogDebug("ENTER");
+
+ if (charging == false)
+ {
+ MainFrame* pFrame = static_cast<MainFrame*>(UiApp::GetInstance()->GetFrame(STRING_FRAME_NAME));
+ TryReturnVoid(pFrame != null, "pFrame is null");
+
+ Form* pForm = pFrame->GetCurrentForm();
+ TryReturnVoid(pForm != null, "pForm is null");
+
+ pForm->SendUserEvent(CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED, null);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraApp::OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId,
+ const Tizen::Base::String* pUriScheme, const Tizen::Base::String* pDataType,
+ const Tizen::Base::Collection::IMap* pArgs)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ CameraPresentationModel* pCameraPresentationModel = CameraPresentationModel::GetInstance();
+ TryReturnVoid(pCameraPresentationModel != null, "pCameraPresentationModel is null");
+
+ __requestId = reqId;
+
+ AppLogDebug("OnAppControlRequestReceived : operationId %ls", operationId.GetPointer());
+ if (operationId.Equals(APPCONTROL_OPERATION_ID_CREATECONTENT, false))
+ {
+ AppLogDebug("APPCONTROL_OPERATION_ID_CREATECONTENT");
+ __appControlType = APP_CONTROL_TYPE_REQUESET;
+
+ if (pArgs != null)
+ {
+ IList* pKeyList = pArgs->GetKeysN();
+ if (pKeyList != null && pKeyList->GetCount() > 0)
+ {
+ IEnumerator* pEnum = pKeyList->GetEnumeratorN();
+ String* pKey = null;
+ String* pValue = null;
+
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ pKey = static_cast<String*>(pEnum->GetCurrent());
+ AppLogDebug("pKey %ls", pKey->GetPointer());
+
+ if (pKey->CompareTo(APPCONTROL_PARAM_TYPE) == 0)
+ {
+ pValue = const_cast<String*>(static_cast<const String*>(pArgs->GetValue(*pKey)));
+ AppLogDebug("pValue %ls", pValue->GetPointer());
+
+ if (pValue->CompareTo(APPCONTROL_PARAM_TYPE_CAMERA) == 0)
+ {
+ r = pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Set value to registry[%s]", GetErrorMessage(r));
+ }
+ else if (pValue->CompareTo(APPCONTROL_PARAM_TYPE_CAMCORDER) == 0)
+ {
+ r = pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_RECORD);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Set value to registry[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("PARAM TYPE Value");
+ r = pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Set value to registry[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ AppLogDebug("PARAM TYPE UNKNOWN");
+ r = pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Set value to registry[%s]", GetErrorMessage(r));
+ }
+ }
+ delete pEnum;
+ pEnum = null;
+ }
+ }
+ }
+ else if (operationId.Equals(MAIN_OPERATION_ID, true))
+ {
+ AppLogDebug("MAIN_OPERATION_ID");
+ __appControlType = APP_CONTROL_TYPE_STANDARD;
+ }
+ else
+ {
+ if (operationId.Equals(APPCONTROL_OPERATION_ID_CAPTURE, false))
+ {
+ AppLogDebug("APPCONTROL_OPERATION_ID_CAPTURE");
+ __appControlType = APP_CONTROL_TYPE_REQUESET;
+
+ r = pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Set value to registry[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("UNKNOWN");
+
+ __appControlType = APP_CONTROL_TYPE_UNKNOWN;
+ }
+ }
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+CameraApp::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLogDebug("ENTER");
+ if (key.CompareTo(PARAM_LANGUAGE) == 0 || key.CompareTo(PARAM_COUNTRY) == 0)
+ {
+ AppControlProviderManager::GetInstance()->SendAppControlResult(__requestId, APP_CTRL_RESULT_TERMINATED, null);
+ Terminate();
+ }
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraAppEntry.cpp
+ * @brief This file contains the Tizen application entry poi
+ */
+
+#include "CmCameraApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+_EXPORT_ int OspMain(int argc, char *pArgv[]);
+#ifdef _PROFILE
+extern void start_profile(void);
+extern void end_profile(void);
+#else
+#define start_profile()
+#define end_profile()
+#endif
+
+int
+OspMain(int argc, char *pArgv[])
+{
+ result r = E_SUCCESS;
+
+ AppLogDebug("ENTER");
+ ArrayList* pArgs = new (std::nothrow) ArrayList();
+ pArgs->Construct();
+ for (int i = 0; i < argc; i++)
+ {
+ pArgs->Add(*(new (std::nothrow) String(pArgv[i])));
+ }
+
+ start_profile();
+ r = Tizen::App::UiApp::Execute(CameraApp::CreateInstance, pArgs);
+ if (IsFailed(r))
+ {
+ AppLogException("Application execution failed-[%s].", GetErrorMessage(r));
+ r &= 0x0000FFFF;
+ }
+ end_profile();
+
+ pArgs->RemoveAll(true);
+ delete pArgs;
+ AppLogDebug("EXIT");
+
+ return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
--- /dev/null
+//
+// 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 CmCameraForm.cpp
+ * @brief This is the implementation file for CameraForm class.
+ */
+
+#include "CmCameraApp.h"
+#include "CmCameraForm.h"
+#include "CmCameraPresentationModel.h"
+#include "CmCameraSettingsPresentationModel.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::Telephony;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+static const int MAX_CAMERA_EXPOSURE_VALUE = 8;
+static const int CAMERA_EXPOSURE_VALUE_ZERO = 0;
+static const int CAMERA_EXPOSURE_VALUE_ONE = 1;
+static const int SLIDER_RECTVALID_X_POS = 430;
+static const int CAMERA_EXPOSURE_TIMER_VALUE = 2000;
+static const int CAMERA_ZOOM_SLIDER_RANGE = 334;
+static const int CAMERA_ZOOM_TIMER_VALUE = 2000;
+static const int CAMERA_GUIDELINE_ENABLE = 1;
+static const int FLASH_MODE_OFF = 0;
+static const int FLASH_MODE_ON = 1;
+static const int FLASH_MODE_AUTO = 2;
+static const int X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE = 10;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE = 7;
+static const int X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT = 56;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT = 0;
+static const int Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT_WGA = 0;
+static const int X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE = 25;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE = 78;
+static const int X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT = 78;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT = 22;
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT = 543;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT = 1172;
+static const int X_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE = 120;
+static const int Y_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE = 570;
+static const int X_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT = 570;
+static const int Y_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT = 120;
+static const int X_EXPOSURE_PANEL_SIDER_LANDSCAPE = 28;
+static const int Y_EXPOSURE_PANEL_SIDER_LANDSCAPE = 120;
+static const int W_EXPOSURE_PANEL_SIDER_LANDSCAPE = 60;
+static const int H_EXPOSURE_PANEL_SIDER_LANDSCAPE = 336;
+static const int X_EXPOSURE_PANEL_SIDER_PORTRAIT = 120;
+static const int Y_EXPOSURE_PANEL_SIDER_PORTRAIT = 28;
+static const int W_EXPOSURE_PANEL_SIDER_PORTRAIT = 336;
+static const int H_EXPOSURE_PANEL_SIDER_PORTRAIT = 60;
+static const int OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON = 30;
+static const int X_ZOOM_PANEL_DRAW = 1;
+static const int Y_ZOOM_PANEL_DRAW = 57;
+static const int X_ZOOM_PANEL_SLIDER_LANDSCAPE = 26;
+static const int Y_ZOOM_PANEL_SLIDER_LANDSCAPE = 120;
+static const int W_ZOOM_PANEL_SLIDER_LANDSCAPE = 60;
+static const int H_ZOOM_PANEL_SLIDER_LANDSCAPE = 336;
+static const int X_ZOOM_PANEL_SLIDER_PORTRAIT = 120;
+static const int Y_ZOOM_PANEL_SLIDER_PORTRAIT = 28;
+static const int W_ZOOM_PANEL_SLIDER_PORTRAIT = 336;
+static const int H_ZOOM_PANEL_SLIDER_PORTRAIT = 60;
+static const int OFFSET_ZOOM_PANEL_SLIDER_BUTTON = 30;
+static const int OFFSET_ZOOM_PANEL_SLIDER_BUTTON_LANDSCAPE = 400;
+static const int FONT_SIZE_SETTING_MENU_ITEM = 38;
+static const int FONT_SIZE_SETTING_SUB_MENU_ITEM = 34;
+static const int H_SETTING_MENU_TITLE_TOP_MARGIN_PORTRAIT = 26;
+static const int H_SETTING_MENU_TITLE_TOP_MARGIN_LANDSCAPE = 94;
+static const int H_SETTING_MENU_PANEL_TITLE = 50;
+static const int H_SETTING_MENU_ITEM = 65;
+static const int X_SETTING_MENU_LIST_PORTRAIT = 24;
+static const int Y_SETTING_MENU_LIST_PORTRAIT = 90;
+static const int W_SETTING_MENU_LIST_PORTRAIT = 556;
+static const int H_SETTING_MENU_LIST_PORTRAIT = 540;
+static const int X_SETTING_MENU_LIST_LANDSCAPE = 26;
+static const int Y_SETTING_MENU_LIST_LANDSCAPE = 74;
+static const int Y_SETTING_MENU_LIST_LANDSCAPE_MARGIN = 80;
+static const int W_SETTING_MENU_LIST_LANDSCAPE = 556;
+static const int H_SETTING_MENU_LIST_LANDSCAPE = 540;
+static const int X_SETTING_MENU_CONTESTS = 34;
+static const int Y_SETTING_MENU_CONTESTS = 0;
+static const int W_SETTING_MENU_CONTESTS = 280;
+static const int H_SETTING_MENU_CONTESTS = 65;
+static const int X_SETTING_MENU_CONTENTS_VALUE = 280;
+static const int Y_SETTING_MENU_CONTENTS_VALUE = 0;
+static const int W_SETTING_MENU_CONTENTS_VALUE = 290;
+static const int H_SETTING_MENU_CONTENTS_VALUE = 65;
+static const int H_SETTING_SUBMENU_ITEM = 88;
+static const int X_SETTING_SUBMENU_RADIO_ICON = 0;
+static const int Y_SETTING_SUBMENU_RADIO_ICON = 0;
+static const int W_SETTING_SUBMENU_RADIO_ICON = 84;
+static const int H_SETTING_SUBMENU_RADIO_ICON = 84;
+static const int X_SETTING_SUBMENU_ICON = 75;
+static const int Y_SETTING_SUBMENU_ICON = 0;
+static const int W_SETTING_SUBMENU_ICON = 84;
+static const int H_SETTING_SUBMENU_ICON = 84;
+static const int X_SETTING_SUBMENU_2TEXT_ITEM = 75;
+static const int Y_SETTING_SUBMENU_2TEXT_ITEM = 0;
+static const int W_SETTING_SUBMENU_2TEXT_ITEM = 320;
+static const int H_SETTING_SUBMENU_2TEXT_ITEM = 84;
+static const int X_SETTING_SUBMENU_3TEXT_ITEM = 165;
+static const int Y_SETTING_SUBMENU_3TEXT_ITEM = 0;
+static const int W_SETTING_SUBMENU_3TEXT_ITEM = 320;
+static const int H_SETTING_SUBMENU_3TEXT_ITEM = 84;
+static const int X_SUBMENU_PANEL_START_PORTRAIT = 170;
+static const int X_SUBMENU_PANEL_START_LANDSCAPE = 340;
+static const int Y_SUBMENU_PANEL_OFFSET_PORTRAIT = 150;
+static const int X_SUBMENU_TIMER_MODE_PANEL = 340;
+static const int Y_SUBMENU_TIMER_MODE_PANEL = 120;
+static const int W_SUBMENU_TIMER_MODE_PANEL = 460;
+static const int H_SUBMENU_TIMER_MODE_PANEL = 420;
+static const int X_SUBMENU_TIMER_MODE_LIST = 2;
+static const int Y_SUBMENU_TIMER_MODE_LIST = 64;
+static const int W_SUBMENU_TIMER_MODE_LIST = 456;
+static const int H_SUBMENU_TIMER_MODE_LIST = 420;
+static const int X_SUBMENU_ISO_MODE_PANEL = 340;
+static const int Y_SUBMENU_ISO_MODE_PANEL = 120;
+static const int W_SUBMENU_ISO_MODE_PANEL = 460;
+static const int X_SUBMENU_ISO_MODE_LIST = 2;
+static const int Y_SUBMENU_ISO_MODE_LIST = 64;
+static const int W_SUBMENU_ISO_MODE_LIST = 456;
+static const int X_SUBMENU_WB_MODE_PANEL = 340;
+static const int Y_SUBMENU_WB_MODE_PANEL = 120;
+static const int W_SUBMENU_WB_MODE_PANEL = 460;
+static const int H_SUBMENU_WB_MODE_PANEL = 500;
+static const int X_SUBMENU_WB_MODE_LIST = 2;
+static const int Y_SUBMENU_WB_MODE_LIST = 64;
+static const int W_SUBMENU_WB_MODE_LIST = 456;
+static const int H_SUBMENU_WB_MODE_LIST = 500;
+static const int X_SUBMENU_GUIDELINE_MODE_PANEL = 340;
+static const int Y_SUBMENU_GUIDELINE_MODE_PANEL = 360;
+static const int W_SUBMENU_GUIDELINE_MODE_PANEL = 460;
+static const int H_SUBMENU_GUIDELINE_MODE_PANEL = 240;
+static const int X_SUBMENU_GUIDELINE_MODE_LIST = 2;
+static const int Y_SUBMENU_GUIDELINE_MODE_LIST = 64;
+static const int W_SUBMENU_GUIDELINE_MODE_LIST = 456;
+static const int H_SUBMENU_GUIDELINE_MODE_LIST = 240;
+static const int X_SUBMENU_STORAGE_MODE_PANEL = 340;
+static const int Y_SUBMENU_STORAGE_MODE_PANEL = 470;
+static const int W_SUBMENU_STORAGE_MODE_PANEL = 460;
+static const int H_SUBMENU_STORAGE_MODE_PANEL = 240;
+static const int X_SUBMENU_STORAGE_MODE_LIST = 2;
+static const int Y_SUBMENU_STORAGE_MODE_LIST = 64;
+static const int W_SUBMENU_STORAGE_MODE_LIST = 456;
+static const int H_SUBMENU_STORAGE_MODE_LIST = 240;
+static const int X_FLASH_MODE_SETTING_LIST_LANDSCAPE = 26;
+static const int Y_FLASH_MODE_SETTING_LIST_LANDSCAPE = 94;
+static const int W_FLASH_MODE_SETTING_LIST_LANDSCAPE = 428;
+static const int H_FLASH_MODE_SETTING_LIST_LANDSCAPE = 350;
+static const int X_FLASH_MODE_SETTING_LIST_PORTRAIT = 288;
+static const int Y_FLASH_MODE_SETTING_LIST_PORTRAIT = 85;
+static const int W_FLASH_MODE_SETTING_LIST_PORTRAIT = 428;
+static const int H_FLASH_MODE_SETTING_LIST_PORTRAIT = 350;
+static const int H_FLASH_MODE_TITLE_TOP_MARGIN = 28;
+static const int X_FLASH_MODE_LIST_START_POS_PORTRAIT = 288;
+static const int X_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int Y_PREVIEW_OVERLAY_PORTRAIT = 160;
+static const int W_PREVIEW_OVERLAY_PORTRAIT = 720;
+static const int H_PREVIEW_OVERLAY_PORTRAIT = 960;
+static const int X_FULL_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int Y_FULL_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int W_FULL_PREVIEW_OVERLAY_PORTRAIT = 720;
+static const int H_FULL_PREVIEW_OVERLAY_PORTRAIT = 1280;
+static const int X_PREVIEW_OVERLAY_LANDSCAPE = 160;
+static const int Y_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int W_PREVIEW_OVERLAY_LANDSCAPE = 960;
+static const int H_PREVIEW_OVERLAY_LANDSCAPE = 720;
+static const int X_FULL_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int Y_FULL_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int W_FULL_PREVIEW_OVERLAY_LANDSCAPE = 1280;
+static const int H_FULL_PREVIEW_OVERLAY_LANDSCAPE = 720;
+static const int W_THUMBNAIL_SCALE_SIZE = 80;
+static const int H_THUMBNAIL_SCALE_SIZE = 80;
+static const int X_THUMBNAIL_BUTTON_IMG = 14;
+static const int Y_THUMBNAIL_BUTTON_IMG = 14;
+static const int X_BASE_POS = 0;
+static const int Y_BASE_POS = 0;
+static const int BITS_PER_BYTE = 8;
+static const int BYTE_BUFFER_START_POS = 0;
+static const int BYTE_ARRAY_START_POS = 0;
+static const int CAMERA_TIMER_ONE_MILLI_SEC = 1;
+static const int ROTATION_IN_DEGREE_90 = 90;
+static const int ROTATION_IN_DEGREE_180 = 180;
+static const int ROTATION_IN_DEGREE_270 = 270;
+static const int FRAME_SKIP = 4;
+static const int REG_DEFAULT_VAULE_ZERO = 0;
+static const int CAMERA_CAPTURE_NORMAL = 0;
+static const int CAMERA_CAPTURE_BURST = 1;
+static const int STORAGE_VALUE_ZERO = 0;
+static const int DIVIDE_BY_TWO = 2;
+static const int INDEX_UNIT_ZERO = 0;
+static const int INDEX_UNIT_ONE = 1;
+static const int INDEX_UNIT_TWO = 2;
+static const int DEVICE_PORTRAIT = 1;
+static const int ROTATION_IN_DEGREE = 90;
+static const int CAMERA_FOCUS_NOT_READY = 0;
+static const int CAMERA_FOCUS_READY = 1;
+static const int CAMERA_FOCUS_FAIL = 2;
+static const int CAMERA_TIMER_LIMIT = 120000;
+static const int SETTING_TIMER_CAPTURE_0_SEC = 0;
+static const int SETTING_TIMER_CAPTURE_2_SEC = 1;
+static const int SETTING_TIMER_CAPTURE_5_SEC = 2;
+static const int SETTING_TIMER_CAPTURE_10_SEC = 3;
+static const int SETTING_TIMER_2_SEC_COUNT = 2;
+static const int SETTING_TIMER_5_SEC_COUNT = 5;
+static const int SETTING_TIMER_10_SEC_COUNT = 10;
+static const int CAMERA_TIMER_1_SEC = 1000;
+static const int CAMERA_TIMER_2_SEC = 2000;
+static const int CAMERA_TIMER_5_SEC = 5000;
+static const int CAMERA_TIMER_10_SEC = 10000;
+static const int SUBMENU_MODE_OFF = 0;
+static const int SUBMENU_MODE_ON = 1;
+static const int SUBMENU_MODE_AUTO = 2;
+static const int SUBMENU_STORAGE_TYPE_PHONE = 0;
+static const int SUBMENU_STORAGE_TYPE_MEMORYCARD = 1;
+static const int SUBMENU_TIMER_COUNT = 4;
+static const int SUBMENU_WB_COUNT = 5;
+static const int MAX_ISO_COUNT= 9;
+static const int SUBMENU_GUIDELINE_COUNT = 2;
+static const int SUBMENU_STORAGE_TYPE_COUNT = 2;
+static const int MAX_SUBMENU_CONTENT = 10;
+static const int DRAW_INITIALIZED = 0;
+static const int DRAW_MOVED = 1;
+static const int DRAW_RELEASED = 2;
+static const int DISABLE_GUIDELINE = 0;
+static const int EXPOSURE_TIMER_IS_ALIVE = 1;
+static const int ZOOM_TIMER_IS_ALIVE = 1;
+static const int MAX_SETTING_MENU_COUNT = 8;
+static const int MAX_FLASH_MENU_COUNT = 3;
+static const int MENU_COUNT_CLEAR = 0;
+static const int MENU_MODE_DISABLE = -1;
+static const int MENU_TWO_ELEMENT = 2;
+static const int MENU_THREE_ELEMENT = 3;
+static const int MESSAGEBOX_DISPLAY_TIME_2_SEC = 2000;
+static const int MESSAGEBOX_DISPLAY_TIME_3_SEC = 3000;
+static const int UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN = 2048;
+static const int ZOOM_LEVEL_ZERO = 0;
+static const int MULTIPLY_BY_TWO = 2;
+static const int MULTIPLY_BY_TEN = 10;
+static const int NORMAL_MODE_RATIO = 13;
+static const int PREVIEW_RESOLOTION_WIDTH = 640;
+static const int PREVIEW_RESOLOTION_HEIGHT = 480;
+
+static const int X_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA = 658;
+static const int Y_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA = 1100;
+static const int X_ACTION_PANEL_CAMERA_ICON_LABEL_LANDSCAPE_WVGA = 1100;
+static const int Y_ACTION_PANEL_CAMERA_ICON_LABLE_LANDSCAPE_WVGA = 172;
+
+static const int X_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA = 486;
+static const int Y_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA = 1100;
+static const int X_ACTION_PANEL_CAMCODER_ICON_LABEL_LANDSCAPE_WVGA = 1100;
+static const int Y_ACTION_PANEL_CAMCODER_ICON_LABLE_LANDSCAPE_WVGA = 0;
+
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA = 536;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA = 1098;
+static const int X_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA = 1085;
+static const int Y_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA = 44;
+
+static const int X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA = 252;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA = 1060;
+static const int X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA = 1065;
+static const int Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA = 252;
+
+static const int X_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA = 8;
+static const int Y_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA = 1065;
+static const int X_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA = 1065;
+static const int Y_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA = 8;
+
+static const int X_ACTION_PANEL_CAMERA_PORTRAIT_WVGA = 0;
+static const int Y_ACTION_PANEL_CAMERA_PORTRAIT_WVGA = 1040;
+static const int X_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA = 1040;
+static const int Y_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA = 0;
+static const int DISPLAY_WVGA = 1200;
+
+static const wchar_t* IDS_MENU_SETTING_MAIN_MENU_NAME = L"SettingMainMenu";
+static const wchar_t* IDS_MENU_FLASH_MENU_NAME = L"FlashMenu";
+static const wchar_t* IDS_FLASH_BUTTON_NAME = L"FlashButton";
+static const wchar_t* IDS_THUMBNAIL_PANLE_NAME = L"ThumbnailPanel";
+static const wchar_t* IDS_CAMERA_INFO_PANEL_NAME = L"CameraInfoPanel";
+static const wchar_t* IDS_SETTING_UI_PANEL_NAME = L"SettingPanel";
+static const wchar_t* IDS_ACTION_UI_PANEL_NAME = L"ActionPanel";
+static const wchar_t* IDS_ACTION_UI_PANEL_CAPTURE_NAME = L"ActionCapture";
+static const wchar_t* IDS_ACTION_UI_CAMERA_MODE = L"ActionCameraMode";
+static const wchar_t* IDS_INIT_REG_KEY = L"NONE";
+
+enum MenuIdx
+{
+ MENU_IDX_01 = 0,
+ MENU_IDX_02,
+ MENU_IDX_03,
+ MENU_IDX_04,
+ MENU_IDX_05,
+ MENU_IDX_06,
+ MENU_IDX_07,
+ MENU_IDX_08,
+ MENU_IDX_09,
+ MENU_IDX_10,
+ MENU_IDX_MAX
+};
+
+CameraForm::CameraForm(void)
+ : __pCameraPresentationModel(null)
+ , __pOverlayPanel(null)
+ , __screenMode(SCREEN_MODE_NORMAL)
+ , __pAppTimer(null)
+ , __pSettingTimer(null)
+ , __pCaptureStartTimer(null)
+ , __pPopupTimer(null)
+ , __pExposureCloseTimer(null)
+ , __pZoomCloseTimer(null)
+ , __pTouchAutoFocusTimer(null)
+ , __pListViewMainMenu(null)
+ , __pListFlashMainMenu(null)
+ , __pListViewSubMenu(null)
+ , __mainMenuCount(MENU_MODE_DISABLE)
+ , __subMenuCount(MENU_MODE_DISABLE)
+ , __settingMode(CAMERA_SUB_MENU_CONTENT_MAX)
+ , __settingWhiteBalance(0)
+ , __settingIsoIndex(0)
+ , __settingTimeInterval(0)
+ , __currentZoomLevel(0)
+ , __maxZoomLevel(0)
+ , __settingExposure(0)
+ , __primaryCurrentResolutionIndex(0)
+ , __secondaryCurrentResolutionIndex(0)
+ , __timeCount(0)
+ , __isTimerRunning(false)
+ , __closeTimerValue(0)
+ , __isUsedTimerCaptured(false)
+ , __previewResolutionWidth(0)
+ , __previewResolutionHeight(0)
+ , __captureResolutionWidth(0)
+ , __captureResolutionHeight(0)
+ , __lowMemoryCapacity(false)
+ , __isMemoryFull(false)
+ , __isLockScreenMode(false)
+ , __resolutionChange(false)
+ , __isToggleCameraDirection(false)
+ , __isOrientationChanged(false)
+ , __isProhibitionTouchEvent(false)
+ , __displayResolution(DISPLAY_RESOLUTION_HVGA)
+ , __pSettingPanel(null)
+ , __pActionPanel(null)
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __deviceOrientation(DEVICE_PORTRAIT)
+ , __pFlashButton(null)
+ , __pSelfShotButton(null)
+ , __pSettingButton(null)
+ , __pCameraIconLabel(null)
+ , __pCamcoderIconLabel(null)
+ , __pSwButton(null)
+ , __pShutterButton(null)
+ , __pBackButton(null)
+ , __pButtonPoint(Point(0, 0))
+ , __pPreviewResolutionList(null)
+ , __pCaptureResolutionList(null)
+ , __pIsoList(null)
+ , __pThumbnailPanel(null)
+ , __pCameraInfoPanel(null)
+ , __pCamraInfoSubPanel(null)
+ , __pSettingMenuString(null)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraForm::~CameraForm(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ Point currentPosition;
+ int storageType = STORAGE_TYPE_PHONE;
+
+ AddKeyEventListener(*this);
+ AddOrientationEventListener(*this);
+ SetOrientation(ORIENTATION_AUTOMATIC_FOUR_DIRECTION);
+ __dir = GetOrientationStatus();
+
+ __pCameraPresentationModel->SetOrientation(__dir);
+
+ InitAppTimer();
+ InitSettingTimer();
+ InitCaptureStartTimer();
+ InitTouchAutoFocusStartTimer();
+
+ r = __pCameraPresentationModel->GetValue(STORAGE_TYPE, storageType);
+ if (r != E_SUCCESS)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+ }
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCameraPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCameraPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+
+ __pCameraInfoPanel = new (std::nothrow) CameraInfoPanel();
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ currentPosition.x = (rect.width / DIVIDE_BY_TWO);
+ currentPosition.y = (rect.height / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ currentPosition.x = (rect.width / DIVIDE_BY_TWO);
+ currentPosition.y = (rect.height / DIVIDE_BY_TWO);
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_PORTRAIT, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ r = __pCameraInfoPanel->Initialize(rect);
+ TryCatch(r == E_SUCCESS, , "__pCameraInfoPanel Initialize fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetPreviewResolutionSize(REG_DEFAULT_VAULE_ZERO);
+ __pCameraInfoPanel->SetCurrentMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ __pCameraInfoPanel->SetStorageType(storageType);
+ __pCameraInfoPanel->SetDrawIndicator(true);
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+ __pCameraInfoPanel->AddTouchEventListener(*this);
+ __pCameraInfoPanel->SetName(IDS_CAMERA_INFO_PANEL_NAME);
+ AddOrientationEventListener(*__pCameraInfoPanel);
+ AddControl(*__pCameraInfoPanel);
+ SetControlAlwaysOnTop(*__pCameraInfoPanel, true);
+
+ SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ InitSettingMenuPanel();
+ InitActionMenuPanel();
+
+ HideUiPanel(false);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pCameraInfoPanel;
+ return r;
+}
+
+result
+CameraForm::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __pCameraPresentationModel->KeepScreenOnState(false, true);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+
+ if (__isLockScreenMode)
+ {
+ AppLogDebug("OnTerminating KEY_POWER_HOLD");
+
+ __isLockScreenMode = false;
+ }
+
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+
+ __lowMemoryCapacity = false;
+
+ __isTimerRunning = false;
+
+ __resolutionChange = false;
+
+ __isToggleCameraDirection = false;
+
+ __isOrientationChanged = false;
+
+ __isProhibitionTouchEvent = false;
+ //__screenMode = SCREEN_MODE_NORMAL;
+
+ __pCameraPresentationModel = null;
+
+ DeleteTimer();
+
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ delete __pPreviewResolutionList;
+ }
+
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ delete __pCaptureResolutionList;
+ }
+
+ if (__pIsoList)
+ {
+ __pIsoList->RemoveAll(true);
+ delete __pIsoList;
+ }
+
+ if (__pSettingMenuString)
+ {
+ int idx = 0;
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ delete [] __pSettingMenuString[idx];
+ }
+ delete __pSettingMenuString;
+ }
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CameraForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ result r = E_SUCCESS;
+ int regVal = 0;
+ Dimension previewResolutionDim;
+ Dimension captureResolutionDim;
+ BufferInfo bufferinfo;
+ int previewResolutionSize = 0;
+ //IList* captureResolutionList;
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+ int storageType = STORAGE_TYPE_PHONE;
+ int selfPortraitEnable = 0;
+ bool value = false;
+ int flashMode = 0;
+
+ __isTimerRunning = false;
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetPresentationChangedEventListener(this);
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ if (__pCameraPresentationModel->IsCameraInstance())
+ {
+ AppLogDebug("INITIALIZED");
+
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+ else
+ {
+ AppLogDebug("NOT_INITIALIZED");
+
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+
+ Update();
+
+ previewResolutionDim = __pCameraPresentationModel->GetPreviewResolution();
+
+ AppLogDebug("CameraForm::GetPreviewResolution(W:%d, H:%d)", previewResolutionDim.width, previewResolutionDim.height);
+
+ __previewResolutionWidth = previewResolutionDim.width;
+ __previewResolutionHeight = previewResolutionDim.height;
+
+ captureResolutionDim = __pCameraPresentationModel->GetCaptureResolution();
+
+ __captureResolutionWidth = captureResolutionDim.width;
+ __captureResolutionHeight = captureResolutionDim.height;
+
+ AppLogDebug("CameraForm::captureResolutionDim(W:%d, H:%d)", captureResolutionDim.width, captureResolutionDim.height);
+ //captureResolutionList = __pCameraPresentationModel->GetCaptureResolutionListN();
+
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+ AppLogDebug("__screenMode [%d]", __screenMode);
+
+ r = SetScreenMode(__screenMode, true);
+ TryReturnVoid(r == E_SUCCESS, "SetScreenMode() failed:%s", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, regVal);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (regVal == DISABLE_GUIDELINE)
+ {
+ DrawMarker(false);
+ }
+ else
+ {
+ DrawMarker(true);
+ }
+
+ InDrawFocus();
+
+ r = __pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Write Reg fail[%s]", GetErrorMessage(r));
+
+ HidePopup();
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ __pCameraInfoPanel->StartCheckStorageInfoTimer();
+
+ SetCameraSettingsDevice();
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Write Reg fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+
+ __pCameraPresentationModel->SetFlashMode(CameraFlashMode(flashMode));
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ __pCameraPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+
+ CheckLowBatteryStatus();
+
+ callStatus = GetCurrentCallStatus();
+ AppLogDebug("callStatus = %d", callStatus);
+
+ if (callStatus != CALL_STATUS_IDLE && callStatus != CALL_STATUS_UNDEFINED)
+ {
+ ShowUnlaunchPopup();
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_PORTRAIT, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rectPanel = Rectangle(0, 0, W_FULL_PREVIEW_OVERLAY_LANDSCAPE, X_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ __pCameraPresentationModel->GetValue(STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCameraPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCameraPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
+{
+ AppLogDebug("ENTER");
+
+ __pCameraPresentationModel->KeepScreenOnState(false, true);
+
+ __isTimerRunning = false;
+
+ __resolutionChange = false;
+
+ __isToggleCameraDirection = false;
+
+ __isOrientationChanged = false;
+
+ __isProhibitionTouchEvent = false;
+
+ if (__isUsedTimerCaptured == true)
+ {
+ __timeCount = 0;
+
+ __isUsedTimerCaptured = false;
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawPopupTimer() == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ if (__pExposureCloseTimer != null)
+ {
+ __closeTimerValue = 0;
+
+ __pExposureCloseTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ __pCameraInfoPanel->SetDrawExposure(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ if (__pZoomCloseTimer != null)
+ {
+ __closeTimerValue = 0;
+
+ __pZoomCloseTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ if (__pAppTimer != null)
+ {
+ __pAppTimer->Cancel();
+ }
+
+ if (__pSettingTimer != null)
+ {
+ __pSettingTimer->Cancel();
+ }
+
+ if (__pCaptureStartTimer)
+ {
+ __pCaptureStartTimer->Cancel();
+ }
+
+ if (__pTouchAutoFocusTimer)
+ {
+ __pTouchAutoFocusTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->EndCheckStorageInfoTimer();
+
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(false);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::Update(void)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pRotateBitmap = null;
+ Bitmap* pBitmap = null;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ Dimension dimScaleSize = Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE);
+ Point ptThumbnailImg = Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG);
+ result r = E_SUCCESS;
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == false)
+ {
+ TryCatch(__pThumbnailPanel != null, , "__pThumbnailPanel is null");
+
+ pThumbnailBitmap = __pCameraPresentationModel->GetLatestThumbnail();
+
+ if (pThumbnailBitmap == null)
+ {
+ AppLogDebug("CameraForm::Update :: pThumbnailBitmap = null");
+
+ __pThumbnailPanel->SetShowState(true);
+
+ Draw();
+ Show();
+ }
+ else
+ {
+ AppLogDebug("CameraForm::Update :: pThumbnailBitmap is not null");
+
+ r = pThumbnailBitmap->Scale(dimScaleSize);
+ TryCatch(r == E_SUCCESS, , "Bitmap::Scale() fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+ else
+ {
+ rotationType = IMAGE_ROTATION_270;
+ }
+
+ pRotateBitmap = ThumbnailRotationImageN(pThumbnailBitmap, rotationType);
+ TryCatch(pRotateBitmap != null, , "pRotateBitmap is null");
+
+ __pThumbnailPanel->SetOldBitmap(pRotateBitmap);
+ delete pRotateBitmap;
+ pRotateBitmap = null;
+
+ Draw();
+ Show();
+ }
+ }
+ else
+ {
+ AppLogDebug("CameraForm::Update :: Not thummail");
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+
+ __pBackButton->SetShowState(true);
+ TryCatch(__pThumbnailPanel != null, , "__pThumbnailPanel is null");
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetNormalBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK_PRESS);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pBackButton->SetPressedBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ __pBackButton->Draw();
+ __pBackButton->Show();
+
+ Draw();
+ Show();
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ return;
+}
+
+void
+CameraForm::CaptureModeChanged(int mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ BufferInfo bufferinfo;
+ Point currentPosition;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ int guideLineEnable = 0;
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ bool value = false;
+ int selfPortraitEnable = 0;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (mode == CAMERA_CAPTURE_NORMAL)
+ {
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("DoStartPreview");
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (guideLineEnable == DISABLE_GUIDELINE)
+ {
+ DrawMarker(false);
+ }
+ else
+ {
+ DrawMarker(true);
+ }
+
+ InDrawFocus();
+
+ EndPopupTimer();
+
+ __isUsedTimerCaptured = false;
+ Update();
+ }
+ else if (mode == CAMERA_CAPTURE_BURST)
+ {
+ // Empty statement
+ }
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getvalue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ cameraFlashMode = __pCameraPresentationModel->GetFlashMode();
+
+ AppLogDebug("PRIMARY_SUPPORT_FLASH");
+
+ if (cameraFlashMode != CAMERA_FLASH_MODE_OFF)
+ {
+ __pCameraPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+ }
+ else
+ {
+ AppLogDebug("PRIMARY_FLASH NOT SUPPORT");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnCameraActionPerformed(CameraActionEvent event)
+{
+ AppLogDebug("ENTER");
+ BufferInfo bufferinfo;
+ result r = E_SUCCESS;
+
+ switch (event)
+ {
+ case CAMERA_ACTION_EVENT_AUTO_FOCUSED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_AUTO_FOCUSED");
+ DrawFocus(CAMERA_FOCUS_READY);
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED");
+ DrawFocus(CAMERA_FOCUS_READY);
+
+ TryReturnVoid(__pTouchAutoFocusTimer != null, "__pTouchAutoFocusTimer is null");
+ __pTouchAutoFocusTimer->Cancel();
+
+ r = __pTouchAutoFocusTimer->Start(CAMERA_TIMER_2_SEC);
+ TryReturnVoid(r == E_SUCCESS, "Faled Start Timer[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED");
+ DrawFocus(CAMERA_FOCUS_FAIL);
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_CAMERA_PREVIEWED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_CAMERA_PREVIEWED.");
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_CAMERA_THUMBNAIL_BUTTON_LOCK:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_CAMERA_THUMBNAIL_BUTTON_LOCK.");
+ Update();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_CAPTURED:
+ {
+ AppLogDebug("CAMERA_CAPTURED_LISTENER");
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ bool isAppControl = false;
+ int requestType = 0;
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pRotateBitmap = null;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ requestType = __pCameraPresentationModel->GetAppControlRequestType();
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_SUCCEEDED)
+ {
+ BufferInfo bufferinfo;
+
+ AppLogDebug("Camera Captured after OnFormBackRequested");
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+ __isProhibitionTouchEvent = true;
+
+ CameraForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ pThumbnailBitmap = __pCameraPresentationModel->GetLatestThumbnail();
+ TryReturnVoid(pThumbnailBitmap != null, "pThumbnailBitmap is null");
+
+ r = pThumbnailBitmap->Scale(Dimension(W_THUMBNAIL_SCALE_SIZE, H_THUMBNAIL_SCALE_SIZE));
+ TryReturnVoid(r == E_SUCCESS, "Bitmap::Scale() fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ }
+ else
+ {
+ rotationType = IMAGE_ROTATION_270;
+ }
+
+ pRotateBitmap = ThumbnailRotationImageN(pThumbnailBitmap, rotationType);
+ TryReturnVoid(pRotateBitmap != null, "pRotateBitmap is null");
+
+ __pThumbnailPanel->SetNewBitmap(pRotateBitmap);
+ __pThumbnailPanel->SetDrawSliderImg();
+
+ CaptureModeChanged(CAMERA_CAPTURE_NORMAL);
+
+ delete pRotateBitmap;
+ pRotateBitmap = null;
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_ERROR_OCCURRED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_ERROR_OCCURRED");
+ bool isAppControl = false;
+ int requestType = 0;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+ requestType = __pCameraPresentationModel->GetAppControlRequestType();
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED)
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_ERROR_OCCURRED after OnFormBackRequested");
+
+ CameraForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ SetCameraErrorOccurred();
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_FRAME_ACTIVATED:
+ {
+ if (__pCameraPresentationModel->IsCameraPoweredOn())
+ {
+ if (__pCameraPresentationModel->GetCameraState() == CAMERA_STATE_ERROR)
+ {
+ AppLogDebug("FRAME_ACTIVATED:CAMERA_STATE_ERROR");
+ BufferInfo bufferinfo;
+ result r = E_SUCCESS;
+
+ __pCameraPresentationModel->ToggleCameraCamcorder(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_ACTIVATED:CameraPoweredOn");
+ }
+ else
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_ACTIVATED");
+
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+
+ callStatus = GetCurrentCallStatus();
+ AppLogDebug("callStatus = %d", callStatus);
+
+ if (callStatus != CALL_STATUS_IDLE && callStatus != CALL_STATUS_UNDEFINED)
+ {
+ ShowUnlaunchPopup();
+ }
+ else
+ {
+ GetCameraToForeground();
+ }
+
+ CheckLowBatteryStatus();
+ }
+
+ HideUiModeChangedButton();
+ DrawThumbnail();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_FRAME_DEACTIVATED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_FRAME_DEACTIVATED");
+
+ HideUiModeChangedButton();
+ SendCameraToBackground();
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_BATTERY_LEVEL_CHANGED");
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCameraPresentationModel->GetBatteryLevel();
+ isCharging = __pCameraPresentationModel->IsCharging();
+
+ AppLogDebug("batteryLevel = %d", batteryLevel);
+
+ if (batteryLevel == BATTERY_CRITICAL || batteryLevel == BATTERY_EMPTY)// || batteryLevel == BATTERY_LOW)
+ {
+ if (isCharging == false)
+ {
+ CameraForm::OnFormBackRequested(*this);
+ }
+ }
+ }
+ break;
+
+ case CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT:
+ {
+ AppLogDebug("CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT");
+ bool doHidePopup = false;
+ bool isAppControl = false;
+ int requestType = 0;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ requestType = __pCameraPresentationModel->GetAppControlRequestType();
+
+ if (isAppControl == true && requestType == CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED)
+ {
+ AppLogDebug("Camera Captured after OnFormBackRequested");
+
+ CameraForm::OnFormBackRequested(*this);
+ }
+ else
+ {
+ __pCameraPresentationModel->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+
+ Update();
+
+ if (__isTimerRunning == true)
+ {
+ if (__pPopupTimer != null)
+ {
+ r = __pPopupTimer->Cancel();
+
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+ }
+
+ __timeCount = INDEX_UNIT_ZERO;
+
+ if (__isUsedTimerCaptured == true)
+ {
+ __isTimerRunning = false;
+
+ __isUsedTimerCaptured = false;
+
+ if (__pSettingTimer != null)
+ {
+ __pSettingTimer->Cancel();
+ }
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(false);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(0);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ HideUiPanel(false);
+ }
+ }
+
+ if (__pListViewMainMenu != null)
+ {
+ if (__pListViewMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (doHidePopup == true)
+ {
+ HidePopup();
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::InitSettingMenuPanel(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __pSettingPanel = static_cast<Panel*>(GetControl(L"IDC_SETTING_PANEL"));
+ TryCatch(__pSettingPanel != null, r = E_SYSTEM, "__pSettingPanel is null, Make panel fail!!!");
+
+ __pSettingPanel->AddTouchEventListener(*this);
+ __pSettingPanel->SetName(IDS_SETTING_UI_PANEL_NAME);
+
+ __pFlashButton = static_cast<Button*>(GetControl(L"IDC_SET_FLASH_BUTTON"));
+ TryCatch(__pFlashButton != null, r = E_SYSTEM, "__pFlashButton is null");
+ __pFlashButton->AddTouchEventListener(*this);
+
+ __pFlashButton->SetActionId(IDA_BUTTON_CAMERA_FLASH);
+ __pFlashButton->SetName(IDS_FLASH_BUTTON_NAME);
+ __pFlashButton->AddActionEventListener(*this);
+
+ __pSelfShotButton = static_cast<Button*>(GetControl(L"IDC_SELF_SHOT_BUTTON"));
+ TryCatch(__pSelfShotButton != null, r = E_SYSTEM, "__pSelfShotButton is null");
+ __pSelfShotButton->AddTouchEventListener(*this);
+
+ __pSelfShotButton->SetActionId(IDA_BUTTON_CAMERA_SELF);
+ __pSelfShotButton->AddActionEventListener(*this);
+
+ __pSettingButton = static_cast<Button*>(GetControl(L"IDC_SETTING_BUTTON"));
+ TryCatch(__pSettingButton != null, r = E_SYSTEM, "pSettingButton is null");
+ __pSettingButton->AddTouchEventListener(*this);
+
+ __pSettingButton->SetActionId(IDA_BUTTON_CAMERA_SETTING);
+ __pSettingButton->AddActionEventListener(*this);
+
+ r = UpdateUiPanelIcon();
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "UpdateSetUiPanelIcon() - fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ __pFlashButton = null;
+ __pSelfShotButton = null;
+ __pSettingButton = null;
+
+ return r;
+}
+
+void
+CameraForm::OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ String controlName = source.GetName();
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if ((__isProhibitionTouchEvent == true) && (isAppControl == true))
+ {
+ AppLogDebug("OnTouchPressed return");
+ return;
+ }
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+
+ r = __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pZoomCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ String controlName = source.GetName();
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if ((__isProhibitionTouchEvent == true) && (isAppControl == true))
+ {
+ AppLogDebug("OnTouchLongPressed return");
+ return;
+ }
+
+ if ((controlName.Equals(String(IDS_ACTION_UI_PANEL_CAPTURE_NAME))) && (__pCameraPresentationModel->GetCameraState() == CAMERA_STATE_PREVIEW))
+ {
+ AppLogDebug("OnTouchLongPressed Action");
+ if (source.Equals(*__pShutterButton) == true)
+ {
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ String controlName = source.GetName();
+ bool doHidePopup = false;
+ result r = E_SUCCESS;
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if ((__isProhibitionTouchEvent == true) && (isAppControl == true))
+ {
+ AppLogDebug("OnTouchReleased return");
+ return;
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ if (source.Equals(*__pShutterButton) == true)
+ {
+ __closeTimerValue = 0;
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ AppLogDebug("X = %d Y = %d", currentPosition.x, currentPosition.y);
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if ( currentPosition.y > Y_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT || currentPosition.x > X_HIDE_EXPOSURE_PANEL_SIDER_PORTRAIT )
+ {
+ __closeTimerValue = 0;
+
+ AppLogDebug("ExposureSlider Hide");
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ if ( currentPosition.x > X_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE || currentPosition.y > Y_HIDE_EXPOSURE_PANEL_SIDER_LANDSCAPE)
+ {
+ __closeTimerValue = 0;
+
+ AppLogDebug("ExposureSlider Hide");
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+ else
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+
+ r = __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pExposureCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ r = DrawZoomSlider(currentPosition, DRAW_RELEASED);
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+
+ r = __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryReturnVoid(r == E_SUCCESS, "__pZoomCloseTimer start fail[%s]", GetErrorMessage(r));
+ }
+
+ if (__pListViewMainMenu != null)
+ {
+ if (__pListViewMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListFlashMainMenu != null)
+ {
+ if (__pListFlashMainMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ doHidePopup = true;
+ }
+ }
+
+ if ((doHidePopup == false) && (__pCameraInfoPanel->GetDrawZoom() == false && __pCameraInfoPanel->GetDrawExposure() == false))
+ {
+ if ((controlName.Equals(String(IDS_CAMERA_INFO_PANEL_NAME))) && (__pCameraPresentationModel->GetCameraState() == CAMERA_STATE_PREVIEW))
+ {
+ DrawTouchAutoFocus(currentPosition);
+ }
+ }
+ else
+ {
+ HidePopup();
+ }
+
+ if ((controlName.Equals(String(IDS_ACTION_UI_PANEL_CAPTURE_NAME))) && (__pCameraPresentationModel->GetCameraState() == CAMERA_STATE_PREVIEW))
+ {
+ AppLogDebug("OnTouchPressed Action");
+
+ if (source.Equals(*__pShutterButton) == true)
+ {
+ DoCapture();
+ }
+ }
+
+ if (controlName.Equals(String(IDS_THUMBNAIL_PANLE_NAME))
+ && __pThumbnailPanel->GetShowState() == true
+ && isAppControl == false
+ && __pCameraPresentationModel->GetCameraState()!= CAMERA_STATE_CAPTURED
+ )
+ {
+ if (__pCameraPresentationModel->GetLatestThumbnail() != null)
+ {
+ int storageCardChageState = CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN;
+ String fullFileName = L"";
+
+ storageCardChageState = __pCameraPresentationModel->GetStorageCardChageState();
+ if (storageCardChageState == CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT)
+ {
+ AppLogDebug("MOUNT_TO_UNMOUNT : Don't LaunchImageview");
+ __pCameraPresentationModel->SetStorageCardChageState(CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+
+ fullFileName = __pCameraPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+
+ if (fullFileName == L"")
+ {
+ AppLogDebug("file do not found");
+ }
+ else
+ {
+ AppLogDebug("LaunchImageview : MOUNT_TO_UNMOUNT");
+
+ LaunchImageview();
+ }
+ }
+ else
+ {
+ AppLogDebug("LaunchImageview");
+ __pCameraPresentationModel->SetStorageCardChageState(CameraPresentationModel::STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+
+ fullFileName = __pCameraPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+
+ if (fullFileName == L"")
+ {
+ AppLogDebug("file do not found");
+ }
+ else
+ {
+ LaunchImageview();
+ }
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ String controlName = source.GetName();
+ result r = E_SUCCESS;
+
+ if ((controlName.Equals(String(IDS_ACTION_UI_CAMERA_MODE))))
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ if (__pCameraPresentationModel->GetCameraState() == CAMERA_STATE_CAPTURED)
+ {
+ AppLogDebug("CAMERA_STATE_CAPTURED!!!");
+ }
+ else
+ {
+ AppLogDebug("IDA_BUTTON_CAMERA_MODE!!!");
+
+ r = __pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_RECORD);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMCORDER));
+ TryReturnVoid(r == E_SUCCESS, "SceneManager GoForward[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ r = DrawExposureSlider(currentPosition, DRAW_MOVED);
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pExposureCloseTimer != null, "__pExposureCloseTimer is null");
+ __pExposureCloseTimer->Cancel();
+ }
+ else if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ r = DrawZoomSlider(currentPosition, DRAW_MOVED);
+ TryReturnVoid(r == E_SUCCESS, "DrawZoomSlider() fail[%s]", GetErrorMessage(r));
+
+ __closeTimerValue = 0;
+
+ TryReturnVoid(__pZoomCloseTimer != null, "__pZoomCloseTimer is null");
+ __pZoomCloseTimer->Cancel();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ bool focusSupport = false;
+ int selfPortraitEnable = 0;
+
+ if (timer.Equals(*__pAppTimer))
+ {
+ UiApp* pApp = null;
+
+ AppLogDebug("__pAppTimer expire");
+
+ __pCameraPresentationModel->StopCamera();
+
+ pApp = UiApp::GetInstance();
+ TryReturnVoid(pApp != null, "pApp is null");
+
+ r = pApp->Terminate();
+ TryReturnVoid(r == E_SUCCESS, "Failed Terminate [%s]", GetErrorMessage(r));
+ }
+ else if (timer.Equals(*__pCaptureStartTimer))
+ {
+ int settingTimer = 0;
+
+ __pCaptureStartTimer->Cancel();
+
+ settingTimer = GetShootTimerValue();
+
+ Invalidate(true);
+
+ __isUsedTimerCaptured = true;
+
+ r = SettingTimerCapture(settingTimer);
+ TryReturnVoid(r == E_SUCCESS, "SettingTimerCapture() fail[%s]", GetErrorMessage(r));
+
+ __timeCount = 0;
+
+ r = DrawTimerPopup();
+ TryReturnVoid(r == E_SUCCESS, "DrawTimerPopup() fail[%s]", GetErrorMessage(r));
+ }
+ else if (timer.Equals(*__pTouchAutoFocusTimer))
+ {
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ __pTouchAutoFocusTimer->Cancel();
+ }
+ else if (timer.Equals(*__pPopupTimer))
+ {
+ if (__pCameraPresentationModel->IsPreviewState() == true)
+ {
+ __timeCount--;
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(__timeCount);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("__timeCount=%d", __timeCount);
+
+ if (__timeCount == INDEX_UNIT_ZERO || __timeCount == INDEX_UNIT_ONE)
+ {
+ EndPopupTimer();
+ }
+ }
+ }
+ else if (timer.Equals(*__pSettingTimer))
+ {
+ AppLogDebug("__pSettingTimer expire");
+
+ if (__isUsedTimerCaptured == true)
+ {
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(false);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(0);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ DrawFocus(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ DrawFocus(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ }
+ __pCameraPresentationModel->Capture();
+
+ __isTimerRunning = false;
+
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ HideUiPanel(false);
+ }
+ Update();
+ }
+ else if (timer.Equals(*__pExposureCloseTimer))
+ {
+ __closeTimerValue++;
+
+ AppLogDebug("__closeTimerValue expire %d", __closeTimerValue);
+
+ if (__closeTimerValue == EXPOSURE_TIMER_IS_ALIVE)
+ {
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ __pCameraInfoPanel->SetDrawExposure(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ __closeTimerValue = 0;
+
+ __pExposureCloseTimer->Cancel();
+ }
+ }
+ else if (timer.Equals(*__pZoomCloseTimer))
+ {
+ __closeTimerValue++;
+
+ AppLogDebug("__pCloseTimer expire %d", __closeTimerValue);
+
+ if (__closeTimerValue == ZOOM_TIMER_IS_ALIVE)
+ {
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ HidePopup();
+ Invalidate(true);
+ }
+
+ __closeTimerValue = 0;
+
+ __pZoomCloseTimer->Cancel();
+ }
+ }
+ else
+ {
+ AppLogDebug("Not expire");
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::InitActionMenuPanel(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rectThumbnailButton;
+ Rectangle clientArea = GetClientAreaBounds();
+
+ __pActionPanel = static_cast<Panel*>(GetControl(L"IDC_ACTION_PANEL"));
+ TryCatch(__pActionPanel != null, r = E_SYSTEM, "__pActionPanel is null, Make panel fail!!!");
+
+ __pActionPanel->AddTouchEventListener(*this);
+ __pActionPanel->SetName(IDS_ACTION_UI_PANEL_NAME);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ if (clientArea.height == DISPLAY_WVGA)
+ {
+ __displayResolution = DISPLAY_RESOLUTION_WVGA;
+ }
+ else
+ {
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+ }
+ }
+ else
+ {
+ if (clientArea.width == DISPLAY_WVGA)
+ {
+ __displayResolution = DISPLAY_RESOLUTION_WVGA;
+ }
+ else
+ {
+ __displayResolution = DISPLAY_RESOLUTION_HVGA;
+ }
+ }
+
+ __pCameraIconLabel = static_cast<Label*>(GetControl(L"IDC_CAMERA_ICON_LABEL"));
+ TryCatch(__pCameraIconLabel != null, r = E_SYSTEM, "__pCameraIconLabel is null");
+
+ __pCameraIconLabel->AddTouchEventListener(*this);
+
+ __pSwButton = static_cast<Button*>(GetControl(L"IDC_MODE_CHANGE_MODE_BUTTON"));
+ TryCatch(__pSwButton != null, r = E_SYSTEM, "__pSwButton is null");
+
+ __pSwButton->SetName(IDS_ACTION_UI_CAMERA_MODE);
+ __pSwButton->AddTouchEventListener(*this);
+
+ __pCamcoderIconLabel = static_cast<Label*>(GetControl(L"IDC_CAMCORDER_ICON_LABEL"));
+ TryCatch(__pCamcoderIconLabel != null, r = E_SYSTEM, "__pCamcoderIconLabel is null");
+
+ __pCamcoderIconLabel->AddTouchEventListener(*this);
+
+ __pShutterButton = static_cast<Button*>(GetControl(L"IDC_SHUTTER_BUTTON"));
+ TryCatch(__pShutterButton != null, r = E_SYSTEM, "__pShutterButton is null");
+
+ __pShutterButton->SetName(IDS_ACTION_UI_PANEL_CAPTURE_NAME);
+ __pShutterButton->AddTouchEventListener(*this);
+
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, Y_THUMBNAIL_IMG_PANEL_PORTRAIT_WVGA,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_LANDSCPAE_WVGA, Y_THUMBNAIL_IMG_PANEL_LANDSCPAE,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, Y_THUMBNAIL_IMG_PANEL_PORTRAIT,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_LANDSCPAE, Y_THUMBNAIL_IMG_PANEL_LANDSCPAE,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+
+ __pThumbnailPanel = new (std::nothrow) CameraThumbnailPanel();
+ r = __pThumbnailPanel->Initialize(rectThumbnailButton);
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "__pThumbnailPanel Create fail[%s]", GetErrorMessage(r));
+
+ __pThumbnailPanel->SetName(IDS_THUMBNAIL_PANLE_NAME);
+ __pThumbnailPanel->AddTouchEventListener(*this);
+ AddControl(*__pThumbnailPanel);
+ AddOrientationEventListener(*__pThumbnailPanel);
+
+ __pBackButton = static_cast<Button*>(GetControl(L"IDC_BACK_BUTTON"));
+ TryCatch(__pBackButton != null, r = E_SYSTEM, "__pBackButton is null");
+ __pBackButton->SetActionId(IDA_BUTTON_CAMERA_THUMBNAIL);
+ __pBackButton->AddActionEventListener(*this);
+ __pBackButton->AddTouchEventListener(*this);
+ __pBackButton->SetShowState(false);
+
+ r = UpdateUiActionPanelIcon();
+ TryCatch(r == E_SUCCESS, r = E_SYSTEM, "UpdateUiActionPanelIcon() is fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ __pCameraIconLabel = null;
+ __pCamcoderIconLabel = null;
+ __pSwButton = null;
+ __pShutterButton = null;
+ __pBackButton = null;
+
+ delete __pThumbnailPanel;
+ __pThumbnailPanel = null;
+
+ return r;
+}
+
+result
+CameraForm::UpdateUiPanelIcon(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Bitmap* pBitmapRotate = null;
+ int selfPortraitEnable = CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY;
+ int flashMode = 0;
+ bool value = false;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+
+ TryCatch(__pFlashButton != null, r = E_SYSTEM, "__pFlashButton is null");
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Read Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "Read Reg GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "Read Reg Fail[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Read Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR);
+ }
+ else
+ {
+ if (flashMode == FLASH_MODE_OFF)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR);
+ }
+ else if (flashMode == FLASH_MODE_ON)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR);
+ }
+ else if (flashMode == FLASH_MODE_AUTO)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "FlashButton::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "SwButton::pBitmapRotate is null");
+
+ __pFlashButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS);
+ }
+ else
+ {
+ if (flashMode == FLASH_MODE_OFF)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS);
+ }
+ else if (flashMode == FLASH_MODE_ON)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_ON_PRESS);
+ }
+ else if (flashMode == FLASH_MODE_AUTO)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "FlashButton::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "SwButton::pBitmapRotate is null");
+
+ __pFlashButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ TryCatch(__pSelfShotButton != null, r = E_SYSTEM, "__pSelfShotButton is null");
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SELF_SHOT_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "SelfShot::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "SwButton::pBitmapRotate is null");
+
+ __pSelfShotButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SELF_SHOT_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "SelfShot::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "SwButton::pBitmapRotate is null");
+
+ __pSelfShotButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ TryCatch(__pSettingButton != null, r = E_SYSTEM, "__pSettingButton is null");
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SETTING_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "Setting::pBitmap is null");
+
+ __pSettingButton->SetNormalBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SETTING_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "Setting::pBitmap is null");
+
+ __pSettingButton->SetPressedBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ return r;
+}
+
+result
+CameraForm::UpdateUiActionPanelIcon(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Bitmap* pBitmapRotate = null;
+ ImageRotationType rotationType = IMAGE_ROTATION_0;
+ Point ptShutterIcon;
+ Point ptModeChangeButton;
+ Rectangle rectThumbnailButton;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_90;
+ ptShutterIcon = Point(X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT, Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT);
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT);
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT);
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rotationType = IMAGE_ROTATION_0;
+ ptShutterIcon = Point(X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE, Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE);
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE);
+ }
+
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ __pCameraIconLabel->SetPosition(X_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_ICON_LABEL_PORTRAIT_WVGA);
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_SW_BUTTON_PORTRAIT_WVGA);
+ __pCamcoderIconLabel->SetPosition(X_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMCODER_ICON_LABEL_PORTRAIT_WVGA);
+ __pShutterButton->SetPosition(X_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA, Y_ACTION_PANEL_SHUTTER_ICON_PORTRAIT_WVGA);
+ __pBackButton->SetPosition(X_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA, Y_ACTION_PANEL_BACK_BUTTON_PORTRAIT_WVGA);
+
+ __pActionPanel->SetBounds(X_ACTION_PANEL_CAMERA_PORTRAIT_WVGA, Y_ACTION_PANEL_CAMERA_PORTRAIT_WVGA, W_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT);
+
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_PORTRAIT_WGA);
+ }
+ else
+ {
+ __pCameraIconLabel->SetPosition(X_ACTION_PANEL_CAMERA_ICON_LABEL_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_ICON_LABLE_LANDSCAPE_WVGA);
+ __pSwButton->SetPosition(X_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_SW_BUTTON_LANDSCAPE_WVGA);
+ __pCamcoderIconLabel->SetPosition(X_ACTION_PANEL_CAMCODER_ICON_LABEL_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMCODER_ICON_LABLE_LANDSCAPE_WVGA);
+ __pShutterButton->SetPosition(X_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA, Y_ACTION_PANEL_SHUTTER_ICON_LANDSCAPE_WVGA);
+ __pBackButton->SetPosition(X_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA, Y_ACTION_PANEL_BACK_BUTTON_LANDSCAPE_WVGA);
+
+ __pActionPanel->SetBounds(X_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA, Y_ACTION_PANEL_CAMERA_LANDSCAPE_WVGA, X_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+
+ ptModeChangeButton = Point(X_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE, Y_ACTION_PANEL_CAMERA_CAMCODER_BUTTON_LANDSCAPE);
+ }
+ }
+ else
+ {
+ AppLogDebug("DISPLAY_RESOLUTION_HVGA");
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_CAMERA_ON);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "CameraIconLabel::pBitmap is null");
+
+ __pCameraIconLabel->SetBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "SwButton::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "SwButton::pBitmapRotate is null");
+
+ __pSwButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+ __pSwButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BUTTON_VER);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "SwButton::pBitmap is null");
+
+ __pSwButton->SetNormalBitmap(ptModeChangeButton, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_CAMCORDER_ON);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "CamcoderIconLabel::pBitmap is null");
+
+ __pCamcoderIconLabel->SetBackgroundBitmap(*pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SHUTTER_NORMAL);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ShutterButton::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ShutterButton::pBitmapRotate is null");
+
+ __pShutterButton->SetNormalBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SHUTTER_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ShutterButton::pBitmap is null");
+
+ pBitmapRotate = RotationImageN(pBitmap, rotationType);
+ TryCatch(pBitmapRotate != null, r = E_SYSTEM, "ShutterButton::pBitmapRotate is null");
+
+ __pShutterButton->SetPressedBackgroundBitmap(*pBitmapRotate);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pBitmapRotate;
+ pBitmapRotate = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_SHUTTER_ICON);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ShutterButton::pBitmap is null");
+
+ __pShutterButton->SetNormalBitmap(ptShutterIcon, *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ThumbnailButton::pBitmap is null");
+
+ __pBackButton->SetNormalBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG_PRESS);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "ThumbnailButton::pBitmap is null");
+
+ __pBackButton->SetPressedBackgroundBitmap(*pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+ return r;
+}
+
+result
+CameraForm::SettingTimerCapture(int settingTimeValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ switch (settingTimeValue)
+ {
+ case SETTING_TIMER_CAPTURE_0_SEC:
+ {
+ AppLogDebug("settingTimer = 0");
+ }
+ break;
+
+ case SETTING_TIMER_CAPTURE_2_SEC:
+ {
+ AppLogDebug("settingTimer = 2");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_2_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SETTING_TIMER_CAPTURE_5_SEC:
+ {
+ AppLogDebug("settingTimer = 5");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_5_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SETTING_TIMER_CAPTURE_10_SEC:
+ {
+ AppLogDebug("settingTimer = 10");
+ __pSettingTimer->Cancel();
+
+ r = __pSettingTimer->Start(CAMERA_TIMER_10_SEC);
+ TryCatch(r == E_SUCCESS, , "__pSettingTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("timer Invaild element id");
+ }
+ break;
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CameraForm::CaptureMode(int mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ AppLogDebug("CaptureMode : __deviceOrientation = %d", __deviceOrientation);
+
+ __pCameraPresentationModel->SetExifOrientation(__deviceOrientation);
+
+ if (mode == CAMERA_CAPTURE_NORMAL)
+ {
+ int settingTimer = 0;
+
+ AppLogDebug("CaptureMode : Normal");
+
+ settingTimer = GetShootTimerValue();
+
+ if (settingTimer == SETTING_TIMER_CAPTURE_0_SEC)
+ {
+ __isUsedTimerCaptured = false;
+
+ __isTimerRunning = false;
+
+ __pSettingTimer->Cancel();
+
+ __pCameraPresentationModel->Capture();
+ }
+ else
+ {
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ HideUiPanel(true);
+ }
+
+ __isTimerRunning = true;
+
+ if (__isUsedTimerCaptured == false)
+ {
+ __pCaptureStartTimer->Cancel();
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ r = __pCaptureStartTimer->Start(CAMERA_TIMER_1_SEC);
+ }
+ else
+ {
+ AppLogDebug("OnActionPerformed:ID_BUTTON_CAMERA_CAPTURE");
+ }
+ }
+ }
+ else if (mode == CAMERA_CAPTURE_BURST)
+ {
+ // Empty statement
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
+{
+ AppLogDebug("ENTER");
+
+ switch (actionId)
+ {
+ case IDA_BUTTON_CAMERA_FLASH:
+ {
+ int selfPortraitEnable = 0;
+ result r = E_SUCCESS;
+ bool value = false;
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCameraPresentationModel->GetBatteryLevel();
+ isCharging = __pCameraPresentationModel->IsCharging();
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("FLASEH OFF!!!");
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ if (batteryLevel == BATTERY_LOW && isCharging == false)
+ {
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct(L"", L"Unable to use flash.Low battery", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ else
+ {
+ SetFlashPopop();
+ }
+ }
+ else
+ {
+ AppLogDebug("FLASEH OFF!!!");
+ }
+ }
+ }
+ break;
+
+ case IDA_BUTTON_CAMERA_SELF:
+ {
+ int selfPortraitEnable = 0;
+ result r = E_SUCCESS;
+ bool value = false;
+ int direction = 0;
+
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_DIRECTION, direction);
+
+ if (r == E_SUCCESS && direction != CameraPresentationModel::CAMERA_DIRECTION_FRONT)
+ {
+ int result = 0;
+ MessageBox msgBox;
+
+ msgBox.Construct("Info", "Secondary camear is not suppport", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ msgBox.ShowAndWait(result);
+ }
+ else
+ {
+ HidePopup();
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to get value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ AppLogDebug("ID_BUTTON_CAMERA_SELF 1");
+
+ __isToggleCameraDirection = true;
+
+ r = __pCameraPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ ToggleCameraDirection(CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY);
+ }
+ else if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("ID_BUTTON_CAMERA_SELF 0");
+
+ __isToggleCameraDirection = true;
+
+ r = __pCameraPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_ON);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+ }
+
+ ToggleCameraDirection(CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+ }
+ }
+
+ UpdateUiPanelIcon();
+ MakePreviewResolutionList(true);
+ MakeCaptrueResolutionList(true);
+ MakeIsoList(true);
+
+ TryReturnVoid(__pFlashButton != null, "__pFlashButton is null");
+ __pFlashButton->Invalidate(true);
+
+ __isToggleCameraDirection = false;
+ }
+ break;
+
+ case IDA_BUTTON_CAMERA_SETTING:
+ {
+ result r = E_SUCCESS;
+
+ MakeSettingPopup();
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case IDA_BUTTON_CAMERA_THUMBNAIL:
+ {
+ SetThumbNailButton();
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("EXIT");
+}
+
+bool
+CameraForm::SendAppControlResult(RequestId requestId)
+{
+ AppLogDebug("ENTER");
+
+ result r = E_SUCCESS;
+ String fullFileName = L"";
+ int storageType = STORAGE_TYPE_PHONE;
+ int mode = CameraPresentationModel::CAMERA_MODE_SNAPSHOT;
+ String filePath = L"";
+ int requestType = 0;
+ bool isAppControl = false;
+
+ HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
+ pDataList->Construct();
+
+ AppControlProviderManager* pAppManager = AppControlProviderManager::GetInstance();
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ requestType = __pCameraPresentationModel->GetAppControlRequestType();
+
+ switch (requestType)
+ {
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_CANCELED:
+ {
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_CANCELED, null);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_SUCCEEDED:
+ {
+ r = __pCameraPresentationModel->GetValue(CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->GetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = filePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetMediaPath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = filePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetExternalStoragePath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("FilePath %ls", filePath.GetPointer());
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ r = __pCameraPresentationModel->GetLatestContentName(CameraPresentationModel::CAMERA_MODE_SNAPSHOT, fullFileName);
+ TryCatch(r == E_SUCCESS, , "pCameraPresentationModel->GetLatestContentName fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetLatestContentName(CameraPresentationModel::CAMERA_MODE_RECORD, fullFileName);
+ TryCatch(r == E_SUCCESS, , "pCameraPresentationModel->GetLatestContentName fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("fullFileName:%ls", fullFileName.GetPointer());
+
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(filePath + fullFileName));
+
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_SUCCEEDED, pDataList);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_FAILED:
+ {
+ r = pAppManager->SendAppControlResult(requestId, APP_CTRL_RESULT_FAILED, null);
+ TryCatch(r == E_SUCCESS, , "pAppManager->SendAppControlResult fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ AppLogDebug("Not AppControl");
+ }
+
+ delete pDataList;
+ pDataList = null;
+
+ AppLogDebug("EXIT");
+ return true;
+
+CATCH:
+ delete pDataList;
+ pDataList = null;
+
+ AppLogDebug("EXIT - CATCH");
+ return false;
+}
+
+void
+CameraForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ UiApp* pApp = null;
+ CameraApp* pCameraApp = static_cast<CameraApp*>(CameraApp::GetInstance());
+
+ DeleteTimer();
+
+ __timeCount = 0;
+
+ __isUsedTimerCaptured = false;
+
+ __closeTimerValue = 0;
+
+ __closeTimerValue = 0;
+
+ __pCameraPresentationModel->StopCamera();
+
+ pApp = UiApp::GetInstance();
+ TryReturnVoid(pApp != null, "pApp is null");
+
+ SendAppControlResult(pCameraApp->GetRequestId());
+
+ r = pApp->Terminate();
+ TryReturnVoid(r == E_SUCCESS, "Failed Terminate [%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::LaunchAppControl(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pDataType, const Tizen::Base::Collection::IMap* extraData)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ AppControl* pAc = null;
+
+ pAc = AppManager::FindAppControlN(providerId, operationId);
+ TryCatch(pAc != null, r = E_OBJ_NOT_FOUND, "Failed to find the appcontrol");
+
+ r = pAc->Start(null, null, extraData, null);
+ TryCatch(r == E_SUCCESS, , "[%s] Failed to start the appcontrol", GetErrorMessage(r));
+
+ delete pAc;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pAc != null)
+ {
+ delete pAc;
+ }
+ return E_FAILURE;
+}
+
+void
+CameraForm::OnAppControlCompleted(const Tizen::Base::String& providerId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::IList* pResultList)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ AppLogDebug("ENTER");
+ OnCameraActionPerformed(static_cast<CameraActionEvent>(requestId));
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::Initialize(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Construct(L"IDL_CAMERA_FORM");
+
+ __pCameraPresentationModel = CameraPresentationModel::GetInstance();
+ TryCatch(__pCameraPresentationModel != null, r = E_SYSTEM, "__pCameraPresentationModel is null");
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CameraForm::InitAppTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pAppTimer = new (std::nothrow) Timer();
+ __pAppTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::InitSettingTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pSettingTimer = new (std::nothrow) Timer();
+ __pSettingTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::InitCaptureStartTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pCaptureStartTimer = new (std::nothrow) Timer();
+ __pCaptureStartTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::InitTouchAutoFocusStartTimer(void)
+{
+ AppLogDebug("ENTER");
+ __pTouchAutoFocusTimer = new (std::nothrow) Timer();
+ __pTouchAutoFocusTimer->Construct(*this);
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::ToggleCameraDirection(int direction)
+{
+ AppLogDebug("ENTER");
+ BufferInfo bufferinfo;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ result r = E_SUCCESS;
+ Dimension dim;
+ Point currentPosition;
+ //IList* captureResolutionList;
+
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ if (direction == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ __pCameraPresentationModel->ToggleCameraDirection(CameraPresentationModel::CAMERA_DIRECTION_FRONT);
+ }
+ else if (direction == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ __pCameraPresentationModel->ToggleCameraDirection(CameraPresentationModel::CAMERA_DIRECTION_BACK);
+ }
+
+ dim = __pCameraPresentationModel->GetPreviewResolution();
+ AppLogDebug("CameraForm::GetPreviewResolution(W:%d, H:%d)", dim.width, dim.height);
+
+ //captureResolutionList = __pCameraPresentationModel->GetCaptureResolutionListN();
+
+ AppLogDebug("__screenMode [%d]", __screenMode);
+
+ if (direction == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ r = SetScreenMode(SCREEN_MODE_NORMAL, true);
+ }
+ else
+ {
+ r = SetScreenMode(__screenMode, true);
+ }
+ TryCatch(r == E_SUCCESS, , "SetScreenMode fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+
+ InDrawFocus();
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ SetCameraSettingsDevice();
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CameraForm::MakePreviewResolutionList(bool remakeList = false)
+{
+ AppLogDebug("Enter");
+
+ Dimension dimResolution;
+ IList* pTempList = null;
+ String* pItemString = null;
+ String tempString;
+ result r = E_SUCCESS;
+ int idx = 0;
+ int tot = 0;
+ Dimension dimension;
+ Dimension tempDimention(PREVIEW_RESOLOTION_WIDTH, PREVIEW_RESOLOTION_HEIGHT);
+ int previewResolutionIdx = 0;
+
+ if (remakeList)
+ {
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ }
+
+ delete __pPreviewResolutionList;
+ __pPreviewResolutionList = null;
+ }
+
+ if (__pPreviewResolutionList == null)
+ {
+ __pPreviewResolutionList = new (std::nothrow) ArrayList();
+ r = __pPreviewResolutionList->Construct();
+ TryCatch(r == E_SUCCESS, , "__pPreviewResolutionList construct fail[%s]", GetErrorMessage(r));
+
+ pTempList = __pCameraPresentationModel->GetPreviewResolutionList();
+ TryCatch(pTempList != null, , "GetPreviewResolutionList() return null");
+ tot = pTempList->GetCount();
+ if (tot > 0)
+ {
+ for (idx = tot - INDEX_UNIT_ONE; idx >= 0; idx--)
+ {
+ dimResolution = *(static_cast<Dimension*>(pTempList->GetAt(idx)));
+
+ tempString.Format(32, L"%dX%d", dimResolution.width, dimResolution.height);
+
+ pItemString = new (std::nothrow) String(tempString);
+ TryCatch(pItemString != null, , "pItemString is null");
+
+ __pPreviewResolutionList->Add(*pItemString);
+
+ AppLogDebug("GetPreviewResolutionList w:%d,h:%d", dimResolution.width, dimResolution.height);
+
+ if (dimResolution == tempDimention)
+ {
+ previewResolutionIdx = idx;
+ }
+ }
+ }
+ else
+ {
+ AppLogDebug("Not Support CaptureResolution");
+ }
+
+ dimResolution = *(static_cast<Dimension*>(pTempList->GetAt(previewResolutionIdx)));
+ }
+
+ __previewResolutionWidth = dimResolution.width;
+ __previewResolutionHeight = dimResolution.height;
+
+ AppLogDebug("previewResolution w:%d,h:%d", dimResolution.width, dimResolution.height);
+
+ AppLogDebug("Exit");
+ return;
+
+CATCH:
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+
+ delete __pPreviewResolutionList;
+ __pPreviewResolutionList = null;
+ }
+}
+
+void
+CameraForm::MakeCaptrueResolutionList(bool remakeList = false)
+{
+ AppLogDebug("Enter");
+
+ Dimension dimPreviewResolution;
+ Dimension dimResolution;
+ IList* pTempList = null;
+ String* pItemString = null;
+ String tempString;
+ result r = E_SUCCESS;
+ int idx = 0;
+ int tot = 0;
+
+ if (remakeList)
+ {
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ }
+
+ delete __pCaptureResolutionList;
+ __pCaptureResolutionList = null;
+ }
+
+ if(__pCaptureResolutionList == null)
+ {
+ __pCaptureResolutionList = new (std::nothrow) ArrayList();
+ r = __pCaptureResolutionList->Construct();
+ TryCatch(r == E_SUCCESS, , "__pCaptureResolutionList construct fail[%s]", GetErrorMessage(r));
+
+ pTempList = __pCameraPresentationModel->GetCaptureResolutionList();
+ TryCatch(pTempList != null, , "GetCaptureResolutionList() return null");
+ tot = pTempList->GetCount();
+ if (tot > 0)
+ {
+ for (idx = tot - INDEX_UNIT_ONE; idx >= 0; idx--)
+ {
+ dimResolution = *(static_cast<Dimension*>(pTempList->GetAt(idx)));
+
+ if (dimResolution.width >= __previewResolutionWidth && dimResolution.height >= __previewResolutionHeight)
+ {
+ tempString.Format(32, L"%dX%d", dimResolution.width, dimResolution.height);
+
+ pItemString = new (std::nothrow) String(tempString);
+ TryCatch(pItemString != null, , "pItemString is null");
+
+ __pCaptureResolutionList->Add(*pItemString);
+
+ AppLogDebug("GetCaptureResolutionList w:%d,h:%d", dimResolution.width, dimResolution.height);
+ }
+ }
+ }
+ else
+ {
+ AppLogDebug("Not Support CaptureResolution");
+ }
+ }
+
+ AppLogDebug("Exit");
+ return;
+
+CATCH:
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+
+ delete __pCaptureResolutionList;
+ __pCaptureResolutionList = null;
+ }
+}
+
+void
+CameraForm::MakeIsoList(bool remakeList = false)
+{
+ AppLogDebug("Enter");
+ IList* pTempList = null;
+ String* pItemString = null;
+ String tempString;
+ result r = E_SUCCESS;
+ int idx = 0;
+ int tot = 0;
+
+ const mchar* isoMap[] =
+ {
+ L"DEFAULT",
+ L"MIN",
+ L"AUTO",
+ L"50",
+ L"100",
+ L"200",
+ L"400",
+ L"800",
+ L"1600",
+ L"MAX"
+ };
+
+ if (remakeList)
+ {
+ if (__pIsoList)
+ {
+ __pIsoList->RemoveAll(true);
+ }
+
+ delete __pIsoList;
+ __pIsoList = null;
+ }
+
+ if(__pIsoList == null)
+ {
+ __pIsoList = new (std::nothrow) ArrayList();
+ r = __pIsoList->Construct();
+ TryCatch(r == E_SUCCESS, , "__pIsoList construct fail[%s]", GetErrorMessage(r));
+
+ pTempList = __pCameraPresentationModel->GetIsoList();
+ TryCatch(pTempList != null, , "GetCaptureResolutionList() return null");
+ tot = pTempList->GetCount();
+ if (tot > 0)
+ {
+ for (idx = 0; idx < tot; idx++)
+ {
+ Tizen::Base::Integer* isoObj = (Tizen::Base::Integer*) pTempList->GetAt(idx);
+
+ int isoType = isoObj ? isoObj->ToInt() : -INDEX_UNIT_ONE;
+
+ if (isoType > 0 && isoType < MAX_ISO_COUNT)
+ {
+ pItemString = new (std::nothrow) String(isoMap[isoType]);
+ TryCatch(pItemString != null, , "pItemString is null");
+
+ AppLogDebug("ISO return is = %d VALUE = %ls", isoType, pItemString->GetPointer());
+ __pIsoList->Add(*pItemString);
+ }
+ else
+ {
+ AppLogDebug("isoType out of range");
+ }
+ }
+ }
+ }
+
+ AppLogDebug("Exit");
+ return;
+
+CATCH:
+ if (__pIsoList)
+ {
+ __pIsoList->RemoveAll(true);
+ }
+
+ delete pItemString;
+ pItemString = null;
+
+ delete __pIsoList;
+ __pIsoList = null;
+}
+
+void
+CameraForm::MakeSettingPopup(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectList = Rectangle(X_SETTING_MENU_LIST_LANDSCAPE, Y_SETTING_MENU_LIST_LANDSCAPE,
+ W_SETTING_MENU_LIST_LANDSCAPE, H_SETTING_MENU_LIST_LANDSCAPE);
+ HidePopup();
+
+ MakePreviewResolutionList(true);
+
+ MakeCaptrueResolutionList(false);
+
+ MakeIsoList(false);
+
+ Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawExposure(false);
+ __pCameraInfoPanel->SetDrawZoom(false);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectList = Rectangle(X_SETTING_MENU_LIST_PORTRAIT, Y_SETTING_MENU_LIST_PORTRAIT,
+ W_SETTING_MENU_LIST_PORTRAIT, H_SETTING_MENU_LIST_PORTRAIT);
+ }
+ else
+ {
+ rectList = Rectangle(X_SETTING_MENU_LIST_LANDSCAPE, Y_SETTING_MENU_LIST_LANDSCAPE + Y_SETTING_MENU_LIST_LANDSCAPE_MARGIN,
+ W_SETTING_MENU_LIST_LANDSCAPE, H_SETTING_MENU_LIST_LANDSCAPE);
+ }
+
+ MakeMenuString();
+ SetSettingMainMenuCount(MAX_SETTING_MENU_COUNT);
+
+ __pCameraInfoPanel->SetDrawSettingMenuBackground(true);
+ __pCameraInfoPanel->Invalidate(true);
+ if (__pListViewMainMenu == null)
+ {
+ __pListViewMainMenu = new (std::nothrow) ListView();
+ __pListViewMainMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListViewMainMenu->SetItemProvider(*this);
+ __pListViewMainMenu->AddListViewItemEventListener(*this);
+ __pListViewMainMenu->SetName(IDS_MENU_SETTING_MAIN_MENU_NAME);
+ }
+ else
+ {
+ __pListViewMainMenu->SetBounds(rectList);
+ __pListViewMainMenu->SetShowState(true);
+ }
+ __pCameraInfoPanel->AddControl(*__pListViewMainMenu);
+
+ __pListViewMainMenu->UpdateList();
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pListViewMainMenu != null && listView.Equals(*__pListViewMainMenu))
+ {
+ if (__pListViewMainMenu && __pListViewMainMenu->GetShowState() == true)
+ {
+ r = ProcessMainListPopup(index);
+ }
+ TryReturnVoid(r == E_SUCCESS, "ProcessMainListPopup() fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pListViewSubMenu != null && listView.Equals(*__pListViewSubMenu))
+ {
+ r = ProcessSubListPopup(index);
+ TryReturnVoid(r == E_SUCCESS, "ProcessSubListPopup() fail[%s]", GetErrorMessage(r));
+ }
+ else if (__pListFlashMainMenu != null && listView.Equals(*__pListFlashMainMenu))
+ {
+ if (__pListFlashMainMenu && __pListFlashMainMenu->GetShowState() == true)
+ {
+ r = ProcessFlashListPopup(index);
+ }
+ TryReturnVoid(r == E_SUCCESS, "ProcessMainListPopup() fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+ListItemBase*
+CameraForm::CreateItem(int index, int itemWidth)
+{
+ AppLogDebug("ENTER");
+ CustomItem* pItem = null;
+ Bitmap* pBitmap = null;
+ bool createSubMenu = false;
+ Rectangle rectRadioIcon = Rectangle(X_SETTING_SUBMENU_RADIO_ICON, Y_SETTING_SUBMENU_RADIO_ICON,
+ W_SETTING_SUBMENU_RADIO_ICON, H_SETTING_SUBMENU_RADIO_ICON);
+ Rectangle rectIcon = Rectangle(X_SETTING_SUBMENU_ICON, Y_SETTING_SUBMENU_ICON,
+ W_SETTING_SUBMENU_ICON, H_SETTING_SUBMENU_ICON);
+ Rectangle rectTwoTextItem = Rectangle(X_SETTING_SUBMENU_2TEXT_ITEM, Y_SETTING_SUBMENU_2TEXT_ITEM,
+ W_SETTING_SUBMENU_2TEXT_ITEM, H_SETTING_SUBMENU_2TEXT_ITEM);
+ Rectangle rectThreeTextItem = Rectangle(X_SETTING_SUBMENU_3TEXT_ITEM, Y_SETTING_SUBMENU_3TEXT_ITEM,
+ W_SETTING_SUBMENU_3TEXT_ITEM, H_SETTING_SUBMENU_3TEXT_ITEM);
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ String tmpString;
+ result r = E_SUCCESS;
+ int elementId = 0;
+ int regVal = 0;
+
+ CameraSubMenuContent idx = CAMERA_SUB_MENU_CONTENT_MAX;
+
+ if (__pListViewSubMenu)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(Dimension(itemWidth, H_SETTING_SUBMENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+
+ idx = GetSettingSubMenuMode();
+ createSubMenu = true;
+ switch (idx)
+ {
+ case CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE:
+ {
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_TIMER_MODE:
+ {
+ String arrString[] =
+ {
+ IDS_CAM_BODY_OFF,
+ IDS_CAM_BODY_2_SEC,
+ IDS_CAM_BODY_5_SEC,
+ IDS_CAM_BODY_10_SEC,
+ };
+
+ pAppResource->GetString(arrString[index], tmpString);
+
+ r = __pCameraPresentationModel->GetValue(TIMER_INTERVAL, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ elementId = (index * MENU_TWO_ELEMENT);
+ elementId++;
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ elementId++;
+ r = pItem->AddElement(rectTwoTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_ISO_MODE:
+ {
+ String arrString[] =
+ {
+ IDS_CAM_BODY_AUTO,
+ IDS_MENU_ISO_50,
+ IDS_MENU_ISO_100,
+ IDS_MENU_ISO_200,
+ IDS_MENU_ISO_400,
+ IDS_MENU_ISO_800,
+ };
+
+ r = __pCameraPresentationModel->GetValue(ISO_VALUE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__pIsoList)
+ {
+ String str = L"";
+ if (__pIsoList->GetCount() > index)
+ {
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("ISO index return is = %d", index);
+
+ if (index == INDEX_UNIT_ZERO)
+ {
+ pAppResource->GetString(arrString[index], str);
+ }
+ else
+ {
+ str = *(static_cast<String*>(__pIsoList->GetAt(index)));
+ }
+
+ elementId++;
+ r = pItem->AddElement(rectTwoTextItem, elementId, str, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_WB_MODE:
+ {
+ String arrString[] =
+ {
+ IDS_CAM_BODY_AUTO,
+ IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT,
+ IDS_CAM_BODY_FLUORESCENT,
+ IDS_CAM_BODY_DAYLIGHT,
+ IDS_CAM_BODY_CLOUDY,
+ };
+
+ pAppResource->GetString(arrString[index], tmpString);
+
+ int resId = (static_cast<int>(RESOURCE_ID_CAMERA_MODE_WB_AUTO_NOR) + (index * INDEX_UNIT_TWO));
+
+ r = __pCameraPresentationModel->GetValue(WHITE_BALANCE_TYPE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ elementId = (index * MENU_THREE_ELEMENT);
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ elementId++;
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ pBitmap = ResourceManager::GetBitmapN(resId);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ r = pItem->AddElement(rectIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ r = pItem->AddElement(rectThreeTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE:
+ {
+ String str = L"";
+ elementId = (index * MENU_TWO_ELEMENT);
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ if (index == SUBMENU_MODE_OFF)
+ {
+ str = IDS_CAM_BODY_OFF;
+ }
+ else
+ {
+ str = IDS_CAM_BODY_ON;
+ }
+
+ pAppResource->GetString(str, tmpString);
+
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+
+ r = pItem->AddElement(rectTwoTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE:
+ {
+ int selfPortraitEnable = 0;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__pCaptureResolutionList)
+ {
+ String str = L"";
+ if (__pCaptureResolutionList->GetCount() > index)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ if (index == __primaryCurrentResolutionIndex)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ }
+ else
+ {
+ if (index == __secondaryCurrentResolutionIndex)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ }
+
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ str = *(static_cast<String*>(__pCaptureResolutionList->GetAt(index)));
+
+ elementId++;
+ r = pItem->AddElement(rectTwoTextItem, elementId, str, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE:
+ {
+ String str = L"";
+ elementId = (index * MENU_TWO_ELEMENT);
+
+ r = __pCameraPresentationModel->GetValue(STORAGE_TYPE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ if (index == STORAGE_TYPE_PHONE)
+ {
+ str = IDS_COM_BODY_PHONE;
+ }
+ else
+ {
+ str = IDS_CAM_OPT_MEMORY_CARD;
+ }
+
+ pAppResource->GetString(str, tmpString);
+
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+
+ if (str.Equals(String(IDS_CAM_OPT_MEMORY_CARD)))
+ {
+ if (__pCameraPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = pItem->AddElement(rectTwoTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ }
+ else
+ {
+ r = pItem->AddElement(rectTwoTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(rectTwoTextItem, elementId, tmpString, FONT_SIZE_SETTING_SUB_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ }
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ if (__pListViewMainMenu && __pListViewMainMenu->GetShowState() == true)
+ {
+ if (createSubMenu == false)
+ {
+ pItem = new (std::nothrow) CustomItem();
+ String listName = L"";
+ Rectangle rectContents = Rectangle(X_SETTING_MENU_CONTESTS, Y_SETTING_MENU_CONTESTS,
+ W_SETTING_MENU_CONTESTS, H_SETTING_MENU_CONTESTS);
+
+ Rectangle rectContentsValue = Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE,
+ W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE);
+
+ listName = __pListViewMainMenu->GetName();
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)))
+ {
+ int selfPortraitEnable = 0;
+
+ pItem->Construct(Dimension(itemWidth, H_SETTING_MENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+ elementId = (index * MENU_TWO_ELEMENT);
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ String strTmp = L"";
+ strTmp = __pSettingMenuString[index][0];
+ elementId++;
+ if (strTmp.GetLength())
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ if (index == CAMERA_SUB_MENU_CONTENT_ISO_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail:%s", GetErrorMessage(r));
+ }
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_CAPTURE_RESOLUTION);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ bool value = false;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ if (index == CAMERA_SUB_MENU_CONTENT_ISO_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_WB_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, value);
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_CAPTURE_RESOLUTION);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(rectContents, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ String arrRegStringSupportWhiteBalance[] =
+ {
+ EXPOSURE_VALUE,
+ TIMER_INTERVAL,
+ ISO_VALUE,
+ WHITE_BALANCE_TYPE,
+ GUIDELINE_ENABLE,
+ CAPTURE_RESOLUTION,
+ STORAGE_TYPE,
+ };
+
+ String arrRegStringSupportBrightness[] =
+ {
+ BRIGHTNESS_VALUE,
+ TIMER_INTERVAL,
+ ISO_VALUE,
+ WHITE_BALANCE_TYPE,
+ GUIDELINE_ENABLE,
+ CAPTURE_RESOLUTION,
+ STORAGE_TYPE,
+ };
+
+ if (index < (GetSettingMainMenuCount() - INDEX_UNIT_ONE))
+ {
+ bool value = false;
+ int storageType = STORAGE_TYPE_PHONE;
+
+ __pCameraPresentationModel->GetValue(STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD && __pCameraPresentationModel->IsStorageCardMounted() == false)
+ {
+ r = __pCameraPresentationModel->SetValue(STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, value);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, value);
+ }
+
+#if true
+ if (index == CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE || index == CAMERA_SUB_MENU_CONTENT_ISO_MODE)
+ {
+ // Empty statement
+ }
+ else
+#endif
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(arrRegStringSupportWhiteBalance[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, value);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, value);
+ }
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(arrRegStringSupportBrightness[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetValue(arrRegStringSupportWhiteBalance[index], regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ AppLogDebug("Setting Main Menu");
+ AppLogDebug("%ls[%d]", strTmp.GetPointer(), regVal);
+ AppLogDebug("Err = %s", GetErrorMessage(GetLastResult()));
+#if true
+ if (index == CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE)
+ {
+ if (__pCaptureResolutionList)
+ {
+ int idx = __pCaptureResolutionList->GetCount() - INDEX_UNIT_ONE;
+ if (idx >= 0)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ AppLogDebug("CAM_SELF_PORTRAIT_MODE_PRIMARY");
+ if (idx == 0)
+ {
+ if (__primaryCurrentResolutionIndex == INDEX_UNIT_ONE)
+ {
+ __primaryCurrentResolutionIndex = __primaryCurrentResolutionIndex - INDEX_UNIT_ONE;
+ }
+ strTmp = *(static_cast<String*>(__pCaptureResolutionList->GetAt(__primaryCurrentResolutionIndex)));
+ }
+ else
+ {
+ strTmp = *(static_cast<String*>(__pCaptureResolutionList->GetAt(__primaryCurrentResolutionIndex)));
+ }
+ }
+ else
+ {
+ if (idx == 0)
+ {
+ AppLogDebug("CAM_SELF_PORTRAIT_MODE_SECONDARY");
+ if (__secondaryCurrentResolutionIndex == INDEX_UNIT_ONE)
+ {
+ __secondaryCurrentResolutionIndex = __secondaryCurrentResolutionIndex - INDEX_UNIT_ONE;
+ }
+ strTmp = *(static_cast<String*>(__pCaptureResolutionList->GetAt(__secondaryCurrentResolutionIndex)));
+ }
+ else
+ {
+ strTmp = *(static_cast<String*>(__pCaptureResolutionList->GetAt(__secondaryCurrentResolutionIndex)));
+ }
+ }
+ }
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_ISO_MODE)
+ {
+ if (__pIsoList)
+ {
+ int idx = __pIsoList->GetCount() - INDEX_UNIT_ONE;
+ if (idx >= INDEX_UNIT_ZERO)
+ {
+ r = __pCameraPresentationModel->GetValue(ISO_VALUE, regVal);
+
+ if (regVal == INDEX_UNIT_ZERO)
+ {
+ strTmp = __pSettingMenuString[index][regVal + INDEX_UNIT_ONE];
+ }
+ else
+ {
+ strTmp = *(static_cast<String*>(__pIsoList->GetAt(regVal)));
+ }
+ }
+ }
+ else
+ {
+ strTmp = __pSettingMenuString[index][regVal + INDEX_UNIT_ONE];
+ }
+ }
+ else
+ {
+ strTmp = __pSettingMenuString[index][regVal + INDEX_UNIT_ONE];
+ }
+#else
+ strTmp = __pSettingMenuString[index][regVal + INDEX_UNIT_ONE];
+#endif
+ elementId++;
+
+ if (strTmp.GetLength())
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ if (index == CAMERA_SUB_MENU_CONTENT_ISO_MODE
+ || index == CAMERA_SUB_MENU_CONTENT_WB_MODE
+ )
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ if (index == CAMERA_SUB_MENU_CONTENT_ISO_MODE)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+ }
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else if (index == CAMERA_SUB_MENU_CONTENT_WB_MODE)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else
+ {
+ r = pItem->AddElement(rectContentsValue, elementId, strTmp, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, COLOR_SETTING_MENU_VAULE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ r = pItem->SetElementTextHorizontalAlignment(elementId, ALIGNMENT_CENTER);
+ TryCatch(r == E_SUCCESS, , "CustomItem::SetElementTextHorizontalAlignment() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ else
+ {
+ delete pItem;
+ pItem = null;
+ TryCatch(pItem != null, pItem = null, "pItem is null");
+ }
+ }
+ }
+
+ if (__pListFlashMainMenu && __pListFlashMainMenu->GetShowState() == true)
+ {
+ pItem = new (std::nothrow) CustomItem();
+ Bitmap* pBitmap = null;
+ String listName = L"";
+ Rectangle rectContents = Rectangle(X_SETTING_MENU_CONTESTS, Y_SETTING_MENU_CONTESTS,
+ W_SETTING_MENU_CONTESTS, H_SETTING_MENU_CONTESTS);
+
+ Rectangle rectContentsValue = Rectangle(X_SETTING_MENU_CONTENTS_VALUE, Y_SETTING_MENU_CONTENTS_VALUE,
+ W_SETTING_MENU_CONTENTS_VALUE, H_SETTING_MENU_CONTENTS_VALUE);
+
+ listName = __pListFlashMainMenu->GetName();
+
+ if (listName.Equals(String(IDS_MENU_FLASH_MENU_NAME)))
+ {
+ bool value = false;
+ int selfPortraitEnable = 0;
+ int flashMode = 0;
+
+ pItem->Construct(Dimension(itemWidth, H_SETTING_SUBMENU_ITEM), LIST_ANNEX_STYLE_NORMAL);
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, flashMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (flashMode != FLASH_MODE_OFF)
+ {
+ r = __pCameraPresentationModel->SetValue(FLASH_MODE, FLASH_MODE_OFF);
+ TryCatch(r == E_SUCCESS, , "SetValue Reg Fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+
+ r = __pCameraPresentationModel->GetValue(FLASH_MODE, regVal);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ ResourceId resId = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+ }
+ break;
+
+ case SUBMENU_MODE_AUTO:
+ {
+ resId = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ String arrString[] =
+ {
+ IDS_CAM_BODY_OFF,
+ IDS_CAM_BODY_ON,
+ IDS_CAM_BODY_AUTO,
+ };
+
+ pAppResource->GetString(arrString[index], tmpString);
+
+ if (index == regVal)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_ON);
+ }
+ else
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_RADIO_BTN_OFF);
+ }
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ elementId = (index * MENU_TWO_ELEMENT);
+ elementId++;
+ r = pItem->AddElement(rectRadioIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+ pBitmap = ResourceManager::GetBitmapN(resId);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ r = pItem->AddElement(rectIcon, elementId, *pBitmap, null, null);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ elementId++;
+
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ r = pItem->AddElement(rectThreeTextItem, elementId, tmpString, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, COLOR_SETTING_MENU_TITLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = pItem->AddElement(rectThreeTextItem, elementId, tmpString, FONT_SIZE_SETTING_MENU_ITEM, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, COLOR_SETTING_MENU_VALUE_DISABLE, false);
+ TryCatch(r == E_SUCCESS, , "CustomItem::AddElement() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ delete pItem;
+ pItem = null;
+ TryCatch(pItem != null, pItem = null, "pItem is null");
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return pItem;
+
+CATCH:
+ delete pItem;
+ pItem = null;
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("pItem is null or not SettingMainMenu/FlashMenu");
+ return null;
+}
+
+bool
+CameraForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ AppLogDebug("ENTER");
+ delete pItem;
+ pItem = null;
+
+ AppLogDebug("EXIT");
+ return true;
+}
+
+int
+CameraForm::GetItemCount(void)
+{
+ AppLogDebug("ENTER");
+ if (__pListViewSubMenu)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ AppLogDebug("EXIT");
+ return GetSettingSubMenuCount();
+ }
+ }
+
+ if (__pListViewMainMenu)
+ {
+ AppLogDebug("EXIT");
+ return GetSettingMainMenuCount();
+ }
+
+ if (__pListFlashMainMenu)
+ {
+ AppLogDebug("EXIT");
+ return GetSettingMainMenuCount();
+ }
+
+ AppLogDebug("EXIT");
+ return 0;
+}
+
+void
+CameraForm::IncreaseDecreaseZoom(Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int getZoomLevel = 0;
+ int maxZoomLevel = 0;
+ int zoomLevel = 0;
+ Point buttonPosition;
+
+ maxZoomLevel = __pCameraPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCameraPresentationModel->GetZoomLevel();
+
+ buttonPosition = GetZoomButtonPoint();
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (keyCode == KEY_SIDE_UP && (getZoomLevel < maxZoomLevel))
+ {
+ zoomLevel++;
+
+ AppLogDebug("KEY_SIDE_UP zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ __pCameraPresentationModel->ZoomIn();
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else if (keyCode == KEY_SIDE_DOWN && (getZoomLevel >= ZOOM_LEVEL_ZERO))
+ {
+ zoomLevel--;
+
+ AppLogDebug("KEY_SIDE_DOWN zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ if (getZoomLevel != ZOOM_LEVEL_ZERO)
+ {
+ __pCameraPresentationModel->ZoomOut();
+ }
+
+ if (getZoomLevel == ZOOM_LEVEL_ZERO)
+ {
+ buttonPosition.x = buttonPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ }
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ if (keyCode == KEY_SIDE_UP && (getZoomLevel < maxZoomLevel))
+ {
+ zoomLevel++;
+
+ AppLogDebug("KEY_SIDE_UP zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ __pCameraPresentationModel->ZoomIn();
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else if (keyCode == KEY_SIDE_DOWN && (getZoomLevel >= ZOOM_LEVEL_ZERO))
+ {
+ zoomLevel--;
+
+ AppLogDebug("KEY_SIDE_DOWN zoomLevel : %d, getZoomLevel : %d", zoomLevel, getZoomLevel);
+
+ if (getZoomLevel != ZOOM_LEVEL_ZERO)
+ {
+ __pCameraPresentationModel->ZoomOut();
+ }
+
+ if (getZoomLevel == ZOOM_LEVEL_ZERO)
+ {
+ buttonPosition.y = buttonPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ }
+
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ r = ConsumeInputEvent();
+ TryReturnVoid(r == E_SUCCESS, "Consuming input event failed(%s)", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+Tizen::Graphics::Point
+CameraForm::GetZoomButtonPoint(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __pButtonPoint;
+}
+
+void
+CameraForm::SetZoomButtonPoint(const Tizen::Graphics::Point& pt)
+{
+ AppLogDebug("ENTER");
+ __pButtonPoint = pt;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyPressed Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyReleased Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ if (keyCode == KEY_POWER_HOLD)
+ {
+ AppLogDebug("ENTER OnKeyReleased Control : KEY_POWER_HOLD");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
+{
+ AppLogDebug("ENTER OnKeyLongPressed Control : %ls, KeyCode : %d", source.GetName().GetPointer(), keyCode);
+
+ if (keyCode == KEY_SIDE_UP
+ || keyCode == KEY_SIDE_DOWN)
+ {
+ // Empty statement
+ }
+ else if (keyCode == KEY_POWER_HOLD)
+ {
+ __isLockScreenMode = true;
+ AppLogDebug("ENTER OnKeyLongPressed Control : KEY_POWER_HOLD");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnSliderBarMoved(Tizen::Ui::Controls::Slider& source, int value)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+inline int
+CameraForm::GetSettingMainMenuCount(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __mainMenuCount;
+}
+
+inline void
+CameraForm::SetSettingMainMenuCount(int count)
+{
+ AppLogDebug("ENTER");
+ __mainMenuCount = count;
+ AppLogDebug("EXIT");
+}
+
+inline int
+CameraForm::GetSettingSubMenuCount(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __subMenuCount;
+}
+
+inline void
+CameraForm::SetSettingSubMenuCount(int count)
+{
+ AppLogDebug("ENTER");
+ __subMenuCount = count;
+ AppLogDebug("EXIT");
+}
+
+inline CameraSubMenuContent
+CameraForm::GetSettingSubMenuMode(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __settingMode;
+}
+
+inline void
+CameraForm::SetSettingSubMenuMode(const CameraSubMenuContent mode)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ __settingMode = mode;
+}
+
+inline void
+CameraForm::SetSubMenuListviewState(const int menuCount, const CameraSubMenuContent mode)
+{
+ AppLogDebug("ENTER");
+ SetSettingSubMenuCount(menuCount);
+ SetSettingSubMenuMode(mode);
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::SetMenuTitle(Canvas* pCanvas, const String& str, const int fntSize)
+{
+ AppLogDebug("ENTER");
+ Font* pFnt = null;
+ Rectangle listRect;
+ Dimension dim;
+ Point point;
+ result r = E_SUCCESS;
+ String listName = L"";
+
+ TryCatch(pCanvas != null, r = E_SYSTEM, "pCanvas is null");
+
+ if (__pListViewSubMenu)
+ {
+ listRect = __pListViewSubMenu->GetBounds();
+ }
+ else if (__pListViewMainMenu)
+ {
+ listRect = __pListViewMainMenu->GetBounds();
+ listName = __pListViewMainMenu->GetName();
+ }
+ else if (__pListFlashMainMenu)
+ {
+ listRect = __pListFlashMainMenu->GetBounds();
+ listName = __pListFlashMainMenu->GetName();
+ }
+
+ pFnt = new (std::nothrow) Font();
+ pFnt->Construct(FONT_STYLE_PLAIN, fntSize);
+
+ r = pFnt->GetTextExtent(str, str.GetLength(), dim);
+ TryCatch(pFnt != null, , "pFnt GetTextExtent() fail[%s]", GetErrorMessage(r));
+
+ r = pCanvas->SetFont(*pFnt);
+ TryCatch(pFnt != null, , "pCanvas SetFont() fail[%s]", GetErrorMessage(r));
+
+ pCanvas->SetForegroundColor(COLOR_SETTING_MENU_TITLE);
+
+ point.x = (listRect.width / DIVIDE_BY_TWO) - (dim.width / DIVIDE_BY_TWO);
+ point.y = (H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO);
+
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)))
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ point.y += H_SETTING_MENU_TITLE_TOP_MARGIN_PORTRAIT;
+ }
+ else if (__dir == ORIENTATION_STATUS_LANDSCAPE
+ || __dir == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ point.y += H_SETTING_MENU_TITLE_TOP_MARGIN_LANDSCAPE;
+ }
+ }
+ else if (listName.Equals(String(IDS_MENU_FLASH_MENU_NAME)))
+ {
+ point.y += H_FLASH_MODE_TITLE_TOP_MARGIN;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ point.x += X_FLASH_MODE_LIST_START_POS_PORTRAIT;
+ }
+ }
+
+ r = pCanvas->DrawText(point, str);
+ TryCatch( r == E_SUCCESS, , "pCanvas DrawText() fail[%s]", GetErrorMessage(r));
+
+ delete pFnt;
+ pFnt = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ delete pFnt;
+ pFnt = null;
+
+ return r;
+}
+
+int
+CameraForm::GetShootTimerValue(void) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int timerInterval = 0;
+
+ r = __pCameraPresentationModel->GetValue(TIMER_INTERVAL, timerInterval);
+ TryCatch(r == E_SUCCESS, , "Faled to get value to registry");
+
+ AppLogDebug("EXIT");
+ return timerInterval;
+
+CATCH:
+ return 0;
+}
+
+void
+CameraForm::SetGuideLine(int guideLineEnable)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCameraPresentationModel->SetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SetStorageType(int storageType)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = __pCameraPresentationModel->SetValue(STORAGE_TYPE, storageType);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ else if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ if (__pCameraPresentationModel->IsStorageCardMounted() == true)
+ {
+ AppLogDebug("StorageCard mount");
+ r = __pCameraPresentationModel->SetValue(STORAGE_TYPE, storageType);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_MOUNT);
+ }
+ else
+ {
+ AppLogDebug("StorageCard unmount");
+ __pCameraPresentationModel->SetStorageCardState(CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT);
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::RestoreDefaultSetting(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int adjustValue = 0;
+
+ r = __pCameraPresentationModel->ResetCameraSettingsRegistry();
+ TryCatch(r == E_SUCCESS, ,"ResetCameraSettingsRegistry() fail[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(EXPOSURE_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetExposure(adjustValue);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(BRIGHTNESS_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetBrightness(adjustValue);
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(WHITE_BALANCE_TYPE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetWhiteBalance((CameraWhiteBalance)adjustValue);
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(WHITE_BALANCE_TYPE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetWhiteBalance((CameraWhiteBalance)adjustValue);
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ AppLogDebug("ERROR EXIT");
+ return r;
+}
+
+result
+CameraForm::RestoreResolutionDefault(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ IList* pList = null;
+ IList* pCaptureResolutionList = null;
+ int resolutionCnt = 0;
+ bool wideMode = false;
+ int selfPortraitEnable = 0;
+ int resolutionIndex = 0;
+ int resolutionRatio = 0;
+ Dimension resolutionDim;
+ Dimension captureResolutionDim;
+ BufferInfo bufferinfo;
+
+ TryCatch(__pAppTimer != null, , "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ pCaptureResolutionList = __pCameraPresentationModel->GetCaptureResolutionList();
+
+ resolutionIndex = pCaptureResolutionList->GetCount() - INDEX_UNIT_ONE;
+
+ resolutionDim = *(static_cast<Dimension*>(pCaptureResolutionList->GetAt(resolutionIndex)));
+
+ resolutionRatio = (resolutionDim.width * MULTIPLY_BY_TEN) / (resolutionDim.height);
+
+ if (resolutionRatio > NORMAL_MODE_RATIO)
+ {
+ wideMode = true;
+
+ SetWideOverlayPanel(true);
+ }
+ else
+ {
+ wideMode = false;
+
+ SetNormalOverlayPanel(true);
+ }
+ }
+ else
+ {
+ wideMode = false;
+
+ SetNormalOverlayPanel(true);
+ }
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ __pCameraPresentationModel->StopCamera();
+
+ if (__pCameraPresentationModel->IsCameraInstance())
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+ else
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ pList = __pCameraPresentationModel->GetCaptureResolutionList();
+
+ resolutionCnt = pList->GetCount();
+
+ captureResolutionDim = *(static_cast<Dimension*>(pList->GetAt(resolutionCnt - INDEX_UNIT_ONE)));
+
+ AppLogDebug("dimCaptureResolution(W:%d, H:%d)", captureResolutionDim.width, captureResolutionDim.height);
+
+ __captureResolutionWidth = captureResolutionDim.width;
+
+ __captureResolutionHeight = captureResolutionDim.height;
+
+ __pCameraPresentationModel->SetCaptureResolution(captureResolutionDim);
+
+ __primaryCurrentResolutionIndex = INDEX_UNIT_ZERO;
+ }
+ else
+ {
+ captureResolutionDim = __pCameraPresentationModel->GetCaptureResolution();
+
+ __captureResolutionWidth = captureResolutionDim.width;
+
+ __captureResolutionHeight = captureResolutionDim.height;
+ }
+
+ __settingIsoIndex = INDEX_UNIT_ZERO;
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ if (wideMode == true)
+ {
+ __pOverlayPanel->AddTouchEventListener(*this);
+
+ HidePanel(true, true);
+
+ __screenMode = SCREEN_MODE_FULL;
+ }
+ else
+ {
+ __pOverlayPanel->RemoveTouchEventListener(*this);
+
+ HidePanel(false, true);
+
+ __screenMode = SCREEN_MODE_NORMAL;
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ __screenMode = SCREEN_MODE_NORMAL;
+ return r;
+}
+
+result
+CameraForm::DrawMarker(bool useGuidline)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ result r = E_SUCCESS;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (useGuidline)
+ {
+ __pCameraInfoPanel->SetDrawMarkerGuideline(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerGuideline(false);
+ }
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CameraForm::DrawFocus(int focusMode)
+{
+ AppLogDebug("ENTER");
+ int selfPortraitEnable = 0;
+ bool focusSupport = false;
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(focusMode);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(focusMode);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::DrawTimerPopup(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ result r = E_SUCCESS;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ __pCameraInfoPanel->SetDrawPopupTimer(true);
+
+ StartPopupTimer();
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CameraForm::SetFlashPopop(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectList = Rectangle(X_FLASH_MODE_SETTING_LIST_LANDSCAPE, Y_FLASH_MODE_SETTING_LIST_LANDSCAPE,
+ W_FLASH_MODE_SETTING_LIST_LANDSCAPE, H_FLASH_MODE_SETTING_LIST_LANDSCAPE);
+ HidePopup();
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectList = Rectangle(X_FLASH_MODE_SETTING_LIST_PORTRAIT, Y_FLASH_MODE_SETTING_LIST_PORTRAIT,
+ W_FLASH_MODE_SETTING_LIST_PORTRAIT, H_FLASH_MODE_SETTING_LIST_PORTRAIT);
+ }
+ else
+ {
+ rectList = Rectangle(X_FLASH_MODE_SETTING_LIST_LANDSCAPE, Y_FLASH_MODE_SETTING_LIST_LANDSCAPE,
+ W_FLASH_MODE_SETTING_LIST_LANDSCAPE, H_FLASH_MODE_SETTING_LIST_LANDSCAPE);
+ }
+
+ __pCameraInfoPanel->SetDrawFlashMenuBackground(true);
+ __pCameraInfoPanel->Invalidate(true);
+ SetSettingMainMenuCount(MAX_FLASH_MENU_COUNT);
+
+ if (__pListFlashMainMenu == null)
+ {
+ __pListFlashMainMenu = new (std::nothrow) ListView();
+ __pListFlashMainMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListFlashMainMenu->SetItemProvider(*this);
+ __pListFlashMainMenu->AddListViewItemEventListener(*this);
+ __pListFlashMainMenu->SetName(IDS_MENU_FLASH_MENU_NAME);
+ }
+ else
+ {
+ __pListFlashMainMenu->SetBounds(rectList);
+ __pListFlashMainMenu->SetShowState(true);
+ }
+ __pCameraInfoPanel->AddControl(*__pListFlashMainMenu);
+
+ __pListFlashMainMenu->UpdateList();
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::ProcessFlashListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectPanel;
+ Rectangle rectList;
+ String strTitle = L"";
+ String listName = L"";
+ Bitmap* pBitmapNormal = null;
+ Bitmap* pBitmapPress = null;
+ result r = E_SUCCESS;
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+
+ AppLogDebug("Sub Menu (%d)", index);
+ int regVal = 0;
+ bool value = false;
+ int selfPortraitEnable = 0;
+
+ ResourceId resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ ResourceId resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue Reg Fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is support");
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ regVal = SUBMENU_MODE_ON;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_ON_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_ON_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_ON;
+ }
+ break;
+
+ case SUBMENU_MODE_AUTO:
+ {
+ regVal = SUBMENU_MODE_AUTO;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_AUTO_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_AUTO;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ AppLogDebug("CAMERA_PRIMARY_SUPPORT_FLASH is not support");
+
+ regVal = SUBMENU_MODE_OFF;
+ resIdNormal = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_NOR;
+ resIdPress = RESOURCE_ID_CAMERA_MODE_FLASH_OFF_PRESS;
+ cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ }
+ }
+
+ __pCameraPresentationModel->SetValue(FLASH_MODE, regVal);
+
+ TryCatch(__pSettingPanel != null, r = E_SYSTEM, "__pSettingPanel is null");
+
+ TryCatch(__pFlashButton != null, r = E_SYSTEM, "__pFlashButton is null");
+
+ pBitmapNormal = ResourceManager::GetBitmapN(resIdNormal);
+ TryCatch(pBitmapNormal != null, r = E_SYSTEM, "pBitmapNormal is null");
+
+ __pFlashButton->SetNormalBackgroundBitmap(*pBitmapNormal);
+
+ delete pBitmapNormal;
+ pBitmapNormal = null;
+
+ pBitmapPress = ResourceManager::GetBitmapN(resIdPress);
+ TryCatch(pBitmapPress != null, r = E_SYSTEM, "pBitmapPress is null");
+
+ __pFlashButton->SetPressedBackgroundBitmap(*pBitmapPress);
+
+ delete pBitmapPress;
+ pBitmapPress = null;
+
+ __pFlashButton->Invalidate(true);
+
+ HidePopup();
+
+ SetSettingMainMenuCount(MENU_COUNT_CLEAR);
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMERA_SUB_MENU_CONTENT_MAX);
+
+ __pCameraPresentationModel->SetFlashMode(cameraFlashMode);
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::ProcessMainListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectPanel;
+ Rectangle rectList;
+ String strTitle = L"";
+ String listName = L"";
+
+ result r = E_SUCCESS;
+ bool drawPopup = true;
+
+ listName = __pListViewMainMenu->GetName();
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)))
+ {
+ if (__pCamraInfoSubPanel && __pListViewSubMenu)
+ {
+ __pCamraInfoSubPanel->SetShowState(false);
+ __pCamraInfoSubPanel->RemoveControl(*__pListViewSubMenu);
+ __pListViewSubMenu = null;
+ RemoveControl(*__pCamraInfoSubPanel);
+ __pCamraInfoSubPanel = null;
+
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMERA_SUB_MENU_CONTENT_MAX);
+ }
+
+ switch (index)
+ {
+ case CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE:
+ {
+ drawPopup = false;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int selfPortraitEnable = 0;
+ int adjustValue = 0;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Reg GetValue() fail:%s", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE");
+
+ r = __pCameraPresentationModel->GetValue(EXPOSURE_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetExposure(adjustValue);
+
+ HidePopup();
+
+ r = CreateExposureSlider();
+ TryCatch(r == E_SUCCESS, , "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ AppLogDebug("CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE");
+
+ r = __pCameraPresentationModel->GetValue(BRIGHTNESS_VALUE, adjustValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("adjustValue = %d", adjustValue);
+
+ __pCameraPresentationModel->SetBrightness(adjustValue);
+
+ HidePopup();
+
+ r = CreateExposureSlider();
+ TryCatch(r == E_SUCCESS, , "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("Exposure do not support");
+ }
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_TIMER_MODE:
+ {
+ AppLogDebug("Set Timer");
+ pAppResource->GetString(IDS_CAM_BODY_TIMER, strTitle);
+ rectPanel = Rectangle(X_SUBMENU_TIMER_MODE_PANEL, Y_SUBMENU_TIMER_MODE_PANEL,
+ W_SUBMENU_TIMER_MODE_PANEL, H_SUBMENU_TIMER_MODE_PANEL);
+ rectList = Rectangle(X_SUBMENU_TIMER_MODE_LIST, Y_SUBMENU_TIMER_MODE_LIST,
+ W_SUBMENU_TIMER_MODE_LIST, H_SUBMENU_TIMER_MODE_LIST);
+ SetSubMenuListviewState(SUBMENU_TIMER_COUNT, CAMERA_SUB_MENU_CONTENT_TIMER_MODE);
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_ISO_MODE:
+ {
+ int selfPortraitEnable = 0;
+
+ AppLogDebug("Set ISO");
+ if (__pIsoList)
+ {
+ int isoCnt = __pIsoList->GetCount();
+ if (isoCnt)
+ {
+ int X_Panel = X_SUBMENU_ISO_MODE_PANEL;
+ int Y_Panel = Y_SUBMENU_ISO_MODE_PANEL + 85;
+ int W_Panel = W_SUBMENU_ISO_MODE_PANEL;
+ int H_Panel = Y_SUBMENU_ISO_MODE_LIST + (isoCnt * 88);
+
+ int X_List = X_SUBMENU_ISO_MODE_LIST;
+ int Y_List = Y_SUBMENU_ISO_MODE_LIST;
+ int W_List = W_SUBMENU_ISO_MODE_LIST;
+ int H_List = (isoCnt * 90);
+
+ rectPanel = Rectangle(X_Panel, Y_Panel, W_Panel, H_Panel);
+ rectList = Rectangle(X_List, Y_List, W_List, H_List);
+
+ pAppResource->GetString(IDS_CAM_BODY_ISO, strTitle);
+ SetSubMenuListviewState(isoCnt, CAMERA_SUB_MENU_CONTENT_ISO_MODE);
+ }
+ }
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Reg GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+ }
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Support ISO");
+ }
+ else
+ {
+ r = __pCameraPresentationModel->SetValue(ISO_VALUE, REG_DEFAULT_VAULE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Reg SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_WB_MODE:
+ {
+ int selfPortraitEnable = 0;
+
+ AppLogDebug("Set WB");
+ pAppResource->GetString(IDS_CAM_OPT_WHITE_BALANCE_ABB, strTitle);
+ rectPanel = Rectangle(X_SUBMENU_WB_MODE_PANEL, Y_SUBMENU_WB_MODE_PANEL,
+ W_SUBMENU_WB_MODE_PANEL, H_SUBMENU_WB_MODE_PANEL);
+ rectList = Rectangle(X_SUBMENU_WB_MODE_LIST, Y_SUBMENU_WB_MODE_LIST,
+ W_SUBMENU_WB_MODE_LIST, H_SUBMENU_WB_MODE_LIST);
+ SetSubMenuListviewState(SUBMENU_WB_COUNT, CAMERA_SUB_MENU_CONTENT_WB_MODE);
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Reg GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Support WB");
+ }
+ else
+ {
+ AppLogDebug("Not Support WB");
+
+ r =__pCameraPresentationModel->SetValue(WHITE_BALANCE_TYPE, REG_DEFAULT_VAULE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Reg SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+ }
+ }
+ else
+ {
+#if true
+ AppLogDebug("Not Support WB");
+
+ r = __pCameraPresentationModel->SetValue(WHITE_BALANCE_TYPE, REG_DEFAULT_VAULE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Reg SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+#else
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Support WB");
+ }
+ else
+ {
+ AppLogDebug("Support WB");
+
+ r = __pCameraPresentationModel->SetValue(WHITE_BALANCE_TYPE, REG_DEFAULT_VAULE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Reg SetValue() fail[%s]", GetErrorMessage(r));
+
+ drawPopup = false;
+ }
+#endif
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE:
+ {
+ AppLogDebug("Set geo tag or guideline mode");
+
+ pAppResource->GetString(IDS_CAM_BODY_GUIDELINE, strTitle);
+ SetSubMenuListviewState(SUBMENU_GUIDELINE_COUNT, CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE);
+
+ rectPanel = Rectangle(X_SUBMENU_GUIDELINE_MODE_PANEL, Y_SUBMENU_GUIDELINE_MODE_PANEL,
+ W_SUBMENU_GUIDELINE_MODE_PANEL, H_SUBMENU_GUIDELINE_MODE_PANEL);
+ rectList = Rectangle(X_SUBMENU_GUIDELINE_MODE_LIST, Y_SUBMENU_GUIDELINE_MODE_LIST,
+ W_SUBMENU_GUIDELINE_MODE_LIST, H_SUBMENU_GUIDELINE_MODE_LIST);
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE:
+ {
+ AppLogDebug("Set storage mode");
+
+ pAppResource->GetString(IDS_CAM_BODY_STORAGE, strTitle);
+ rectPanel = Rectangle(X_SUBMENU_STORAGE_MODE_PANEL, Y_SUBMENU_STORAGE_MODE_PANEL,
+ W_SUBMENU_STORAGE_MODE_PANEL, H_SUBMENU_STORAGE_MODE_PANEL);
+ rectList = Rectangle(X_SUBMENU_STORAGE_MODE_LIST, Y_SUBMENU_STORAGE_MODE_LIST,
+ W_SUBMENU_STORAGE_MODE_LIST, H_SUBMENU_STORAGE_MODE_LIST);
+ SetSubMenuListviewState(SUBMENU_STORAGE_TYPE_COUNT, CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE);
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE:
+ {
+ if (__pCaptureResolutionList)
+ {
+ int captrueResolutionCnt = __pCaptureResolutionList->GetCount();
+ if (captrueResolutionCnt)
+ {
+ int X_Panel = X_SUBMENU_WB_MODE_PANEL;
+ int Y_Panel = Y_SUBMENU_WB_MODE_PANEL + 85;
+ int W_Panel = W_SUBMENU_WB_MODE_PANEL;
+ int H_Panel = Y_SUBMENU_WB_MODE_LIST + (captrueResolutionCnt * 88);
+
+ int X_List = X_SUBMENU_WB_MODE_LIST;
+ int Y_List = Y_SUBMENU_WB_MODE_LIST;
+ int W_List = W_SUBMENU_WB_MODE_LIST;
+ int H_List = (captrueResolutionCnt * 90);
+
+ rectPanel = Rectangle(X_Panel, Y_Panel, W_Panel, H_Panel);
+ rectList = Rectangle(X_List, Y_List, W_List, H_List);
+
+ pAppResource->GetString(IDS_CAM_BODY_RESOLUTION, strTitle);
+ SetSubMenuListviewState(captrueResolutionCnt, CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE);
+ }
+ }
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_RESET_MODE:
+ {
+ AppLogDebug("Camera Reset");
+ String tmpString;
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ pAppResource->GetString(L"IDS_CAM_POP_RESET_SETTINGS_Q", tmpString);
+
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMERA_SUB_MENU_CONTENT_RESET_MODE);
+ drawPopup = false;
+
+ ShowMessageBox(tmpString, MSGBOX_STYLE_YESNO, L"");
+ }
+ break;
+
+ default:
+ {
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMERA_SUB_MENU_CONTENT_MAX);
+ AppLogDebug("Invaild index");
+ drawPopup = false;
+ }
+ break;
+ }
+
+ if (drawPopup)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel.x = X_SUBMENU_PANEL_START_PORTRAIT;
+ rectPanel.y += Y_SUBMENU_PANEL_OFFSET_PORTRAIT;
+ }
+ else
+ {
+ rectPanel.x = X_SUBMENU_PANEL_START_LANDSCAPE;
+ }
+
+ if (__pCamraInfoSubPanel == null)
+ {
+ __pCamraInfoSubPanel = new (std::nothrow) CamraInfoSubPanel();
+ TryCatch(__pCamraInfoSubPanel != null, r = E_FAILURE, "__pCamraInfoSubPanel is null");
+
+ r = __pCamraInfoSubPanel->Initialize(rectPanel);
+ TryCatch(r == E_SUCCESS, , "__pCamraInfoSubPanel Initialize fail[%s]", GetErrorMessage(r));
+
+ __pCamraInfoSubPanel->AddTouchEventListener(*this);
+ AddOrientationEventListener(*this);
+ AddControl(*__pCamraInfoSubPanel);
+ SetControlAlwaysOnTop(*__pCamraInfoSubPanel, true);
+ }
+
+ __pCamraInfoSubPanel->SetMenuTitle(strTitle);
+ __pCameraInfoPanel->Invalidate(true);
+ __pCamraInfoSubPanel->Invalidate(true);
+
+ __pListViewSubMenu = new (std::nothrow) ListView();
+ __pListViewSubMenu->Construct(rectList, true, SCROLL_STYLE_FAST_SCROLL);
+
+ __pListViewSubMenu->SetItemProvider(*this);
+ __pListViewSubMenu->AddListViewItemEventListener(*this);
+ __pCamraInfoSubPanel->AddControl(*__pListViewSubMenu);
+
+ __pListViewSubMenu->UpdateList();
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ if (__pCamraInfoSubPanel)
+ {
+ RemoveControl(*__pCamraInfoSubPanel);
+ SetSubMenuListviewState(MENU_COUNT_CLEAR, CAMERA_SUB_MENU_CONTENT_MAX);
+ }
+ else
+ {
+ delete __pListViewSubMenu;
+ }
+
+ __pCamraInfoSubPanel = null;
+ __pListViewSubMenu = null;
+
+ return r;
+}
+
+result
+CameraForm::ProcessSubListPopup(int index)
+{
+ AppLogDebug("ENTER");
+ int regVal = 0;
+ String strRegKey = IDS_INIT_REG_KEY;
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ CameraSubMenuContent idx = CAMERA_SUB_MENU_CONTENT_MAX;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "Reg GetValue() fail[%s]", GetErrorMessage(r));
+ idx = GetSettingSubMenuMode();
+
+ switch (idx)
+ {
+ case CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE:
+ {
+ AppLogDebug("Setting - EXPOSURE");
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_TIMER_MODE:
+ {
+ r = __pCameraPresentationModel->SetValue(TIMER_INTERVAL, index);
+ TryCatch(r == E_SUCCESS, , "Faled to set value to registry [%s]", GetErrorMessage(r));
+
+ __settingTimeInterval = index;
+ regVal = index;
+ strRegKey = TIMER_INTERVAL;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_ISO_MODE:
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+ }
+
+ if (r == E_SUCCESS)
+ {
+ __pCameraPresentationModel->SetIsoLevel((CameraIsoLevel)index);
+ }
+
+ __settingIsoIndex = index;
+ regVal = __settingIsoIndex;
+ strRegKey = ISO_VALUE;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_WB_MODE:
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ __pCameraPresentationModel->SetWhiteBalance((CameraWhiteBalance)index);
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Target unsupport - white balance");
+ }
+ }
+
+ __settingWhiteBalance = index;
+
+ regVal = __settingWhiteBalance;
+ strRegKey = WHITE_BALANCE_TYPE;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE:
+ {
+ int value = SUBMENU_MODE_OFF;
+
+ switch (index)
+ {
+ case SUBMENU_MODE_OFF:
+ {
+ AppLogDebug("Setting - Guideline = off");
+ value = SUBMENU_MODE_OFF;
+ r = DrawMarker(false);
+ TryCatch(r == E_SUCCESS, , "DrawMarker() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case SUBMENU_MODE_ON:
+ {
+ AppLogDebug("Setting - Guideline = on");
+ value = SUBMENU_MODE_ON;
+ r = DrawMarker(true);
+ TryCatch(r == E_SUCCESS, , "DrawMarker() fail[%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("Setting - Guideline, Invail element id");
+ }
+ break;
+ }
+
+ strRegKey = GUIDELINE_ENABLE;
+ SetGuideLine(value);
+ regVal = value;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE:
+ {
+ IList* pList = __pCameraPresentationModel->GetCaptureResolutionList();
+ int resolutionCnt = 0;
+ BufferInfo bufferinfo;
+ int resolutionRatio = 0;
+
+ if (pList)
+ {
+ resolutionCnt = pList->GetCount() - INDEX_UNIT_ONE;
+ Dimension dimCaptureResolution = *(static_cast<Dimension*>(pList->GetAt(resolutionCnt - index)));
+
+ AppLogDebug("SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE :: dimCaptureResolution(W:%d, H:%d)", dimCaptureResolution.width, dimCaptureResolution.height);
+ AppLogDebug("SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE :: __captureResolution(W:%d, H:%d)", __captureResolutionWidth, __captureResolutionHeight);
+
+ if ((__captureResolutionWidth == dimCaptureResolution.width )&& (__captureResolutionHeight == dimCaptureResolution.height))
+ {
+ AppLogDebug("CAPTURE RESOLUTION Same");
+ }
+ else
+ {
+ __pCameraPresentationModel->StopPreview();
+
+ __pCameraPresentationModel->SetCaptureResolution(dimCaptureResolution);
+
+ AppLogDebug("dimCaptureResolution(W:%d, H:%d)", dimCaptureResolution.width, dimCaptureResolution.height);
+
+ resolutionRatio = (dimCaptureResolution.width * MULTIPLY_BY_TEN) / (dimCaptureResolution.height);
+
+ AppLogDebug("resolutionRatio (W:%d)", resolutionRatio);
+
+ __resolutionChange = true;
+
+ __captureResolutionWidth = dimCaptureResolution.width;
+
+ __captureResolutionHeight = dimCaptureResolution.height;
+
+ if (resolutionRatio > NORMAL_MODE_RATIO)
+ {
+ r = SetScreenMode(SCREEN_MODE_FULL, true);
+ }
+ else
+ {
+ r = SetScreenMode(SCREEN_MODE_NORMAL, true);
+ }
+ TryCatch(r == E_SUCCESS, , "SetScreenMode fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("__screenMode [%d]", __screenMode);
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ __primaryCurrentResolutionIndex = index;
+ regVal = __primaryCurrentResolutionIndex;
+ }
+ else
+ {
+ __secondaryCurrentResolutionIndex = index;
+ regVal = __secondaryCurrentResolutionIndex;
+ }
+ __resolutionChange = false;
+
+ strRegKey = IDS_INIT_REG_KEY;
+ }
+ break;
+
+ case CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE:
+ {
+ int storage = STORAGE_TYPE_PHONE;
+
+ switch (index)
+ {
+ case SUBMENU_STORAGE_TYPE_PHONE:
+ {
+ AppLogDebug("Setting - Storage type = Phone");
+ storage = STORAGE_TYPE_PHONE;
+ SetStorageType(storage);
+ }
+ break;
+
+ case SUBMENU_STORAGE_TYPE_MEMORYCARD:
+ {
+ AppLogDebug("Setting - Storage type = card");
+ storage = STORAGE_TYPE_MEMORYCARD;
+
+ if (__pCameraPresentationModel->IsStorageCardMounted() == true)
+ {
+ SetStorageType(storage);
+ }
+ else
+ {
+ storage = SUBMENU_STORAGE_TYPE_PHONE;
+ AppLogDebug("Setting - dont draw t-flash icon");
+ }
+ }
+ break;
+
+ default:
+ {
+ AppLogDebug("Setting - Storage, Invail element id");
+ }
+ break;
+ }
+
+ __pCameraPresentationModel->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+
+ Update();
+
+ __pCameraInfoPanel->SetStorageType(storage);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (strRegKey != IDS_INIT_REG_KEY)
+ {
+ AppLogDebug("Set vaule");
+ r = __pCameraPresentationModel->SetValue(strRegKey, regVal);
+ TryCatch(r == E_SUCCESS, , "Faled to set value to registry");
+ }
+
+ HidePopup();
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ HidePopup();
+
+ return r;
+}
+
+result
+CameraForm::StartPopupTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int settingTimer = 0;
+
+ __timeCount = 0;
+
+ __pPopupTimer = new (std::nothrow) Timer();
+
+ __pPopupTimer->Construct(*this);
+
+ r = __pPopupTimer->StartAsRepeatable(CAMERA_TIMER_1_SEC);
+ TryCatch(r == E_SUCCESS, , "__pPopupTimer start fail[%s]", GetErrorMessage(r));
+
+ settingTimer = GetShootTimerValue();
+
+ if (settingTimer == SETTING_TIMER_CAPTURE_2_SEC)
+ {
+ __timeCount = SETTING_TIMER_2_SEC_COUNT;
+ }
+ else if (settingTimer == SETTING_TIMER_CAPTURE_5_SEC)
+ {
+ __timeCount = SETTING_TIMER_5_SEC_COUNT;
+ }
+ else if (settingTimer == SETTING_TIMER_CAPTURE_10_SEC)
+ {
+ __timeCount = SETTING_TIMER_10_SEC_COUNT;
+ }
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(true);
+ __pCameraInfoPanel->SetDrawPopupTimerCount(__timeCount);
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+
+ return r;
+}
+
+result
+CameraForm::EndPopupTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ TryCatch(__pPopupTimer != null, r = E_SYSTEM, "__pPopupTimer is null");
+
+ r = __pPopupTimer->Cancel();
+
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CameraForm::SetCameraSettingsDevice(void)
+{
+ AppLogDebug("ENTER");
+ int brightness = 0;
+ int exposure = 0;
+ int isoIndex = 0;
+ int wbIndex = 0;
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(EXPOSURE_VALUE, exposure);
+ TryReturnVoid(r == E_SUCCESS, "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetExposure(exposure);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(BRIGHTNESS_VALUE, brightness);
+ TryReturnVoid(r == E_SUCCESS, "brightness Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetBrightness(brightness);
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_ISO_LEVEL);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_ISO_LEVEL);
+ }
+
+ if (r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(ISO_VALUE, isoIndex);
+ TryReturnVoid(r == E_SUCCESS, "isoIndex Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetIsoLevel((CameraIsoLevel)isoIndex);
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ r =__pCameraPresentationModel->GetValue(WHITE_BALANCE_TYPE, wbIndex);
+ TryReturnVoid(r == E_SUCCESS, "WB Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetWhiteBalance((CameraWhiteBalance)wbIndex);
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_WHITE_BALANCE);
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("Target unsupport");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+Bitmap*
+CameraForm::RotationImageN(Bitmap* pSrcBitmap, ImageRotationType rotationType)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Bitmap* pBitmap = new (std::nothrow) Bitmap();
+
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+ TryCatch(pSrcBitmap != null, r = E_SYSTEM, "pSrcBitmap is null");
+
+ if (rotationType == IMAGE_ROTATION_90
+ || rotationType == IMAGE_ROTATION_270)
+ {
+ BufferInfo bufferinfo;
+ Canvas canvas;
+ Dimension dim(pSrcBitmap->GetHeight(), pSrcBitmap->GetWidth());
+
+ r = pBitmap->Construct(dim, BITMAP_PIXEL_FORMAT_ARGB8888);
+ TryCatch(r == E_SUCCESS, , "pBitmap->Construct() fail[%s]", GetErrorMessage(r));
+
+ pBitmap->Lock(bufferinfo);
+
+ r = canvas.Construct(bufferinfo);
+ TryCatch(r == E_SUCCESS, , "canvas.Construct() fail[%s]", GetErrorMessage(r));
+
+ Point pointStart((pSrcBitmap->GetHeight() / DIVIDE_BY_TWO - pSrcBitmap->GetWidth() / DIVIDE_BY_TWO), INDEX_UNIT_ZERO);
+ Point pointPivot(pSrcBitmap->GetHeight() / DIVIDE_BY_TWO, pSrcBitmap->GetWidth() / DIVIDE_BY_TWO);
+
+ switch (rotationType)
+ {
+ case IMAGE_ROTATION_90:
+ {
+ AppLogDebug("IMAGE_ROTATION_90");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_90);
+ }
+ break;
+
+ case IMAGE_ROTATION_180:
+ {
+ AppLogDebug("IMAGE_ROTATION_180");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_180);
+ }
+ break;
+
+ case IMAGE_ROTATION_270:
+ {
+ AppLogDebug("IMAGE_ROTATION_270");
+ canvas.DrawBitmap(pointStart, *pSrcBitmap, pointPivot, ROTATION_IN_DEGREE_270);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ pBitmap->Unlock();
+
+ return pBitmap;
+ }
+
+ pBitmap->Construct(*pSrcBitmap, Rectangle(X_BASE_POS, Y_BASE_POS, pSrcBitmap->GetWidth(), pSrcBitmap->GetHeight()));
+
+ AppLogDebug("EXIT");
+ return pBitmap;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+ AppLogDebug("CATCH - EXIT");
+ return null;
+}
+
+Bitmap*
+CameraForm::ThumbnailRotationImageN(Bitmap* pSrcBitmap, ImageRotationType rotationType)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ ByteBuffer* pSrcByteBuff = null;
+ ByteBuffer dstByteBuff;
+ BufferInfo buffInfo;
+ result r = E_SUCCESS;
+ Dimension dim;
+ int size = 0;
+
+ TryCatch(pSrcBitmap != null, r = E_SYSTEM, "pSrcBitmap is null");
+
+ if (rotationType == IMAGE_ROTATION_0)
+ {
+ pBitmap = new (std::nothrow) Bitmap();
+ pBitmap->Construct(*pSrcBitmap, Rectangle(X_BASE_POS, Y_BASE_POS, pSrcBitmap->GetWidth(), pSrcBitmap->GetHeight()));
+
+ AppLogDebug("IMAGE_ROTATION_0 - EXIT");
+ return pBitmap;
+ }
+
+ dim.width = pSrcBitmap->GetWidth();
+ dim.height = pSrcBitmap->GetHeight();
+
+ size = dim.width * dim.height * (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE);
+
+ r = dstByteBuff.Construct(size);
+ TryCatch(r == E_SUCCESS, r = GetLastResult(), "dstByteBuff.Construct failed:%s %d %d %f", GetErrorMessage(GetLastResult()), dim.width, dim.height, (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE));
+
+ r = dstByteBuff.SetPosition(BYTE_BUFFER_START_POS);
+ TryCatch(r == E_SUCCESS, , "dstByteBuff SetPosition() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcBitmap->Lock(buffInfo, CAMERA_TIMER_ONE_MILLI_SEC);
+ TryCatch(r == E_SUCCESS, , "pSrcBitmap Lock() fail[%s]", GetErrorMessage(r));
+
+ pSrcByteBuff = new (std::nothrow) ByteBuffer();
+ TryCatch(pSrcByteBuff, , "pSrcByteBuff failed:%s", GetErrorMessage(GetLastResult()));
+
+ r = pSrcByteBuff->Construct(size);
+ TryCatch(r == E_SUCCESS, r = GetLastResult(), "pSrcByteBuff->Construct() failed:%s %d %d %f", GetErrorMessage(GetLastResult()), dim.width, dim.height, (pSrcBitmap->GetBitsPerPixel() / BITS_PER_BYTE));
+
+ r = pSrcByteBuff->SetPosition(BYTE_BUFFER_START_POS);
+ TryCatch(r == E_SUCCESS, , "pSrcByteBuff SetPosition() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcByteBuff->SetArray(static_cast<byte*>(buffInfo.pPixels), BYTE_ARRAY_START_POS, size);
+ TryCatch(r == E_SUCCESS, , "pSrcByteBuff SetArray() fail[%s]", GetErrorMessage(r));
+
+ r = pSrcBitmap->Unlock();
+ TryCatch(r == E_SUCCESS, , "pSrcBitmap Unlock() fail[%s]", GetErrorMessage(r));
+
+ r = ImageUtil::Rotate(*pSrcByteBuff, dstByteBuff, dim, rotationType, MEDIA_PIXEL_FORMAT_RGBA8888);
+ TryCatch(r == E_SUCCESS, , "Rotate() fail[%s]", GetErrorMessage(r));
+
+ if (rotationType == IMAGE_ROTATION_90
+ || rotationType == IMAGE_ROTATION_270)
+ {
+ dim.width = pSrcBitmap->GetHeight();
+ dim.height = pSrcBitmap->GetWidth();
+ }
+ else
+ {
+ dim.width = pSrcBitmap->GetWidth();
+ dim.height = pSrcBitmap->GetHeight();
+ }
+
+ pBitmap = new (std::nothrow) Bitmap();
+ pBitmap->Construct(dstByteBuff, dim, pSrcBitmap->GetPixelColorFormat());
+
+ delete pSrcByteBuff;
+ pSrcByteBuff = null;
+
+ AppLogDebug("EXIT");
+ return pBitmap;
+
+CATCH:
+ AppLogDebug("Image rotation process fail[%s]", GetErrorMessage(r));
+ if (pSrcByteBuff != null)
+ {
+ delete pSrcByteBuff;
+ pSrcByteBuff = null;
+ }
+
+ return null;
+}
+
+result
+CameraForm::SetSliderAdjustValue(const Tizen::Graphics::Point& currentPosition, const Tizen::Graphics::Rectangle& movableValidRect, const Tizen::Base::String& entryName, const int maxEntryValue)
+{
+ AppLogDebug("ENTER SliderAdjustValue %ls", entryName.GetPointer());
+ result r = E_SUCCESS;
+ int adjustEntryValue = 0;
+ int currentEntryValue = 0;
+ int step = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ int selfPortraitEnable = 0;
+ bool IsSliderAdjustValue = false;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ step = movableValidRect.width / maxEntryValue;
+ if (currentPosition.x > movableValidRect.x)
+ {
+ if (currentPosition.x > SLIDER_RECTVALID_X_POS)
+ {
+ adjustEntryValue = maxEntryValue - ((currentPosition.x - movableValidRect.x) / step);
+ AppLogDebug("currentEntryValue = %d , adjustEntryValue = %d", currentEntryValue, adjustEntryValue);
+ if (adjustEntryValue == CAMERA_EXPOSURE_VALUE_ONE)
+ {
+ adjustEntryValue = CAMERA_EXPOSURE_VALUE_ZERO;
+ }
+ }
+ else
+ {
+ adjustEntryValue = maxEntryValue - ((currentPosition.x - movableValidRect.x) / step);
+ }
+
+ IsSliderAdjustValue = true;
+ }
+ else
+ {
+ IsSliderAdjustValue = false;
+ }
+ }
+ else
+ {
+ step = movableValidRect.height / maxEntryValue;
+ if (currentPosition.y > movableValidRect.y)
+ {
+ adjustEntryValue = ((currentPosition.y - movableValidRect.y) / step);
+ IsSliderAdjustValue = true;
+ }
+ else
+ {
+ IsSliderAdjustValue = false;
+ }
+ }
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (entryName.Equals(String(EXPOSURE_VALUE)))
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(EXPOSURE_VALUE, currentEntryValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(BRIGHTNESS_VALUE, currentEntryValue);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ AppLogDebug("currentEntryValue = %d , adjustEntryValue = %d", currentEntryValue, adjustEntryValue);
+ if (currentEntryValue != adjustEntryValue && IsSliderAdjustValue)
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->SetValue(EXPOSURE_VALUE, adjustEntryValue);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->SetValue(BRIGHTNESS_VALUE, adjustEntryValue);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ __pCameraPresentationModel->SetExposure(adjustEntryValue);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ __pCameraPresentationModel->SetBrightness(adjustEntryValue);
+ }
+ else
+ {
+ AppLogDebug("Exposure do not support");
+ }
+ }
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::CreateExposureSlider(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ __closeTimerValue = 0;
+ __pExposureCloseTimer = new (std::nothrow) Timer();
+ __pExposureCloseTimer->Construct(*this);
+
+ __pExposureCloseTimer->StartAsRepeatable(CAMERA_EXPOSURE_TIMER_VALUE);
+ TryCatch(r == E_SUCCESS, , "Timer::start fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetDrawExposure(true);
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pExposureCloseTimer;
+ __pExposureCloseTimer = null;
+
+ return r;
+}
+
+result
+CameraForm::DrawExposureSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point buttonPosition;
+ result r = E_SUCCESS;
+ Rectangle rectSlider;
+ int exposure = 0;
+ int step = 0;
+ int selfPortraitEnable = 0;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(EXPOSURE_VALUE, exposure);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("Exposure value %d", exposure);
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = __pCameraPresentationModel->GetValue(BRIGHTNESS_VALUE, exposure);
+ TryCatch(r == E_SUCCESS, , "exposure Faled to Get value to registry[%s]", GetErrorMessage(r));
+ AppLogDebug("Exposure value %d", exposure);
+ }
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectSlider = Rectangle(X_EXPOSURE_PANEL_SIDER_PORTRAIT, Y_EXPOSURE_PANEL_SIDER_PORTRAIT,
+ W_EXPOSURE_PANEL_SIDER_PORTRAIT, H_EXPOSURE_PANEL_SIDER_PORTRAIT);
+ step = rectSlider.width / MAX_CAMERA_EXPOSURE_VALUE;
+
+ buttonPosition.x = (step * (MAX_CAMERA_EXPOSURE_VALUE - exposure)) + rectSlider.x;
+ buttonPosition.y = rectSlider.y;
+ AppLogDebug("DrawExposureSlider X Point %d", buttonPosition.x);
+ }
+ else
+ {
+ rectSlider = Rectangle(X_EXPOSURE_PANEL_SIDER_LANDSCAPE, Y_EXPOSURE_PANEL_SIDER_LANDSCAPE,
+ W_EXPOSURE_PANEL_SIDER_LANDSCAPE, H_EXPOSURE_PANEL_SIDER_LANDSCAPE);
+ step = rectSlider.height / MAX_CAMERA_EXPOSURE_VALUE;
+
+ buttonPosition.x = rectSlider.x;
+ buttonPosition.y = (step * exposure) + rectSlider.y;
+ AppLogDebug("DrawExposureSlider Y Point %d", buttonPosition.y);
+ }
+
+ r = DrawExposureSlider(buttonPosition, DRAW_INITIALIZED);
+ TryCatch(r == E_SUCCESS, , "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::DrawExposureSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point buttonPosition;
+ Rectangle rectSlider;
+
+ bool IsSliderRectValid = false;
+
+ AppLogDebug("DrawExposureSlider DrawMode %d, X Point %d, Y Point %d", DrawMode, currentPosition.x, currentPosition.y);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectSlider = Rectangle(X_EXPOSURE_PANEL_SIDER_PORTRAIT, Y_EXPOSURE_PANEL_SIDER_PORTRAIT,
+ W_EXPOSURE_PANEL_SIDER_PORTRAIT, H_EXPOSURE_PANEL_SIDER_PORTRAIT);
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = currentPosition.y;
+ IsSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= rectSlider.x) && (currentPosition.x <= (rectSlider.x + rectSlider.width)))
+ {
+ if ((currentPosition.y >= rectSlider.y) && (currentPosition.y <= (rectSlider.y + rectSlider.height)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = rectSlider.y;
+ IsSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, rectSlider, EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= rectSlider.x) && (currentPosition.x <= (rectSlider.x + rectSlider.width)))
+ {
+ if ((currentPosition.y >= rectSlider.y) && (currentPosition.y <= (rectSlider.y + rectSlider.height)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = rectSlider.y;
+ IsSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, rectSlider, EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ rectSlider = Rectangle(X_EXPOSURE_PANEL_SIDER_LANDSCAPE, Y_EXPOSURE_PANEL_SIDER_LANDSCAPE,
+ W_EXPOSURE_PANEL_SIDER_LANDSCAPE, H_EXPOSURE_PANEL_SIDER_LANDSCAPE);
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= rectSlider.x) && (currentPosition.x <= (rectSlider.x + rectSlider.width)))
+ {
+ if ((currentPosition.y >= rectSlider.y) && (currentPosition.y <= (rectSlider.y + rectSlider.height)))
+ {
+ buttonPosition.x = rectSlider.x;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, rectSlider, EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= rectSlider.x) && (currentPosition.x <= (rectSlider.x + rectSlider.width)))
+ {
+ if ((currentPosition.y >= rectSlider.y) && (currentPosition.y <= (rectSlider.y + rectSlider.height)))
+ {
+ buttonPosition.x = rectSlider.x;
+ buttonPosition.y = currentPosition.y - OFFSET_EXPOSURE_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+ r = SetSliderAdjustValue(currentPosition, rectSlider, EXPOSURE_VALUE, MAX_CAMERA_EXPOSURE_VALUE);
+ TryCatch(r == E_SUCCESS, , "SliderAdjustValue() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (IsSliderRectValid)
+ {
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::CreateZoomSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point point;
+ result r = E_SUCCESS;
+
+ TryCatch(__pCameraInfoPanel != null, r = E_FAILURE, "__pCameraInfoPanel is null");
+
+ __closeTimerValue = 0;
+ __pZoomCloseTimer = new (std::nothrow) Timer();
+ __pZoomCloseTimer->Construct(*this);
+
+ __pZoomCloseTimer->StartAsRepeatable(CAMERA_ZOOM_TIMER_VALUE);
+ TryCatch(r == E_SUCCESS, , "Timer::start fail[%s]", GetErrorMessage(r));
+
+ __pCameraInfoPanel->SetDrawZoom(true);
+ __pCameraInfoPanel->Invalidate(true);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pZoomCloseTimer;
+ __pZoomCloseTimer = null;
+
+ return r;
+}
+
+result
+CameraForm::DrawZoomSlider(void)
+{
+ AppLogDebug("ENTER");
+ Point buttonPosition;
+ result r = E_SUCCESS;
+ Rectangle rectSlider = Rectangle(X_ZOOM_PANEL_SLIDER_LANDSCAPE, Y_ZOOM_PANEL_SLIDER_LANDSCAPE,
+ W_ZOOM_PANEL_SLIDER_LANDSCAPE, H_ZOOM_PANEL_SLIDER_LANDSCAPE);
+ int zoomStep = 0;
+ int maxZoomLevel = 0;
+ int currentZoomLevel = 0;
+
+ maxZoomLevel = __pCameraPresentationModel->GetMaxZoomLevel();
+ currentZoomLevel = __pCameraPresentationModel->GetZoomLevel();
+
+ AppLogDebug("maxZoomLevel =%d, currentZoomLevel=%d, zoomStep=%d", maxZoomLevel, currentZoomLevel, zoomStep);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ zoomStep = W_ZOOM_PANEL_SLIDER_PORTRAIT / maxZoomLevel;
+
+ buttonPosition.x = (zoomStep * currentZoomLevel) + X_ZOOM_PANEL_SLIDER_PORTRAIT;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+
+ AppLogDebug("DrawZoomSlider X Point %d", buttonPosition.x);
+ }
+ else
+ {
+ zoomStep = H_ZOOM_PANEL_SLIDER_LANDSCAPE / maxZoomLevel;
+
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = OFFSET_ZOOM_PANEL_SLIDER_BUTTON_LANDSCAPE - (zoomStep * currentZoomLevel);
+ AppLogDebug("DrawZoomSlider Y Point %d", buttonPosition.y);
+ }
+
+ AppLogDebug("DrawZoomSlider Y Point %d", buttonPosition.y);
+
+ r = DrawZoomSlider(buttonPosition, DRAW_INITIALIZED);
+ TryCatch(r == E_SUCCESS, , "DrawZoomSlider() fail[%s]", GetErrorMessage(r));
+
+ SetZoomButtonPoint(buttonPosition);
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+result
+CameraForm::DrawZoomSlider(const Tizen::Graphics::Point& currentPosition, int DrawMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point buttonPosition;
+ Point ptPanelDraw = Point(X_ZOOM_PANEL_DRAW, Y_ZOOM_PANEL_DRAW);
+ Rectangle rectSlider;
+
+ bool IsSliderRectValid = false;
+ int zoomStep = 0;
+ int getZoomLevel = 0;
+ int maxZoomLevel = 0;
+ int zoomLevel = 0;
+
+ AppLogDebug("DrawZoomSlider DrawMode %d, X Point %d, Y Point %d", DrawMode, currentPosition.x, currentPosition.y);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectSlider = Rectangle(X_ZOOM_PANEL_SLIDER_PORTRAIT, Y_ZOOM_PANEL_SLIDER_PORTRAIT,
+ W_ZOOM_PANEL_SLIDER_PORTRAIT, H_ZOOM_PANEL_SLIDER_PORTRAIT);
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = currentPosition.y;
+ IsSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_ZOOM_PANEL_SLIDER_PORTRAIT + W_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= MULTIPLY_BY_TWO * (Y_ZOOM_PANEL_SLIDER_PORTRAIT + H_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+ IsSliderRectValid = true;
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.x <= (X_ZOOM_PANEL_SLIDER_PORTRAIT + W_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_PORTRAIT) && (currentPosition.y <= MULTIPLY_BY_TWO * (Y_ZOOM_PANEL_SLIDER_PORTRAIT + H_ZOOM_PANEL_SLIDER_PORTRAIT)))
+ {
+ buttonPosition.x = currentPosition.x - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ buttonPosition.y = Y_ZOOM_PANEL_SLIDER_PORTRAIT;
+ IsSliderRectValid = true;
+
+ maxZoomLevel = __pCameraPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCameraPresentationModel->GetZoomLevel();
+ zoomStep = CAMERA_ZOOM_SLIDER_RANGE / maxZoomLevel;
+ zoomLevel = (currentPosition.x - X_ZOOM_PANEL_SLIDER_PORTRAIT) / zoomStep;
+ AppLogDebug("DrawZoomSlider:maxZoomLevel=%d", maxZoomLevel);
+ AppLogDebug("DrawZoomSlider:getZoomLevel=%d", getZoomLevel);
+ AppLogDebug("DrawZoomSlider:zoomLevel=%d", zoomLevel);
+
+ __pCameraPresentationModel->SetZoomValue(zoomLevel);
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ rectSlider = Rectangle(X_ZOOM_PANEL_SLIDER_LANDSCAPE, Y_ZOOM_PANEL_SLIDER_LANDSCAPE,
+ W_ZOOM_PANEL_SLIDER_LANDSCAPE, H_ZOOM_PANEL_SLIDER_LANDSCAPE);
+
+ switch (DrawMode)
+ {
+ case DRAW_INITIALIZED:
+ {
+ buttonPosition.x = currentPosition.x;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+ }
+ break;
+
+ case DRAW_RELEASED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= MULTIPLY_BY_TWO * (X_ZOOM_PANEL_SLIDER_LANDSCAPE + W_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_ZOOM_PANEL_SLIDER_LANDSCAPE + H_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ case DRAW_MOVED:
+ {
+ if ((currentPosition.x >= X_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.x <= MULTIPLY_BY_TWO * (X_ZOOM_PANEL_SLIDER_LANDSCAPE + W_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ if ((currentPosition.y >= Y_ZOOM_PANEL_SLIDER_LANDSCAPE) && (currentPosition.y <= (Y_ZOOM_PANEL_SLIDER_LANDSCAPE + H_ZOOM_PANEL_SLIDER_LANDSCAPE)))
+ {
+ buttonPosition.x = X_ZOOM_PANEL_SLIDER_LANDSCAPE;
+ buttonPosition.y = currentPosition.y - OFFSET_ZOOM_PANEL_SLIDER_BUTTON;
+ IsSliderRectValid = true;
+
+ maxZoomLevel = __pCameraPresentationModel->GetMaxZoomLevel();
+ getZoomLevel = __pCameraPresentationModel->GetZoomLevel();
+ zoomStep = CAMERA_ZOOM_SLIDER_RANGE / maxZoomLevel;
+ zoomLevel = maxZoomLevel - ((currentPosition.y - Y_ZOOM_PANEL_SLIDER_LANDSCAPE) / zoomStep);
+ AppLogDebug("DrawZoomSlider:zoomLevel=%d", zoomLevel);
+ __pCameraPresentationModel->SetZoomValue(zoomLevel);
+ }
+ }
+ else
+ {
+ IsSliderRectValid = false;
+ }
+
+ if ((buttonPosition.y % FRAME_SKIP) != 0)
+ {
+ IsSliderRectValid = false;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ if (IsSliderRectValid)
+ {
+ __pCameraInfoPanel->SetButtonPoint(buttonPosition);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CameraForm::ShowMessageBox(const String& text, MessageBoxStyle style, const String& title)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ MessageBox messageBox;
+ int result = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ int guideLineEnable = 0;
+
+ messageBox.Construct(title, text, style, MESSAGEBOX_DISPLAY_TIME_2_SEC);
+ r = messageBox.ShowAndWait(result);
+ TryReturnVoid(r == E_SUCCESS, "ShowAndWait() fail(%s)", GetErrorMessage(r));
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_YES:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_YES");
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "GetValue() fail(%s)", GetErrorMessage(r));
+
+ if (guideLineEnable == CAMERA_GUIDELINE_ENABLE)
+ {
+ r = DrawMarker(false);
+ TryReturnVoid(r == E_SUCCESS, "DrawMarker() fail(%s)", GetErrorMessage(r));
+
+ SetGuideLine(SUBMENU_MODE_OFF);
+ }
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "GetValue() fail(%s)", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ AppLogDebug("SUBMENU_RESET_MODE : CAMERA_FORM_SECONDARY_MODE");
+
+ r = __pCameraPresentationModel->SetValue(SELF_PORTRAIT_ENABLE, CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+ TryReturnVoid(r == E_SUCCESS, "SetValue() fail(%s)", GetErrorMessage(r));
+
+ ToggleCameraDirection(CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY);
+
+ MakePreviewResolutionList(true);
+
+ MakeCaptrueResolutionList(true);
+
+ MakeIsoList(true);
+ }
+
+ RestoreDefaultSetting();
+
+ r = RestoreResolutionDefault();
+ TryReturnVoid(r == E_SUCCESS, "RestoreResolutionDefault() fail(%s)", GetErrorMessage(r));
+
+ r = UpdateUiPanelIcon();
+ TryReturnVoid(r == E_SUCCESS, "UpdateUiPanelIcon() fail(%s)", GetErrorMessage(r));
+
+ TryReturnVoid(__pFlashButton != null, "__pFlashButton is null");
+ __pFlashButton->Invalidate(true);
+ }
+ break;
+
+ case MSGBOX_RESULT_NO:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_NO");
+ }
+ break;
+
+ case MSGBOX_RESULT_CLOSE:
+ {
+ AppLogDebug("ShowMessageBox : MSGBOX_RESULT_CLOSE");
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ HidePopup();
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ BufferInfo bufferinfo;
+ String listName = L"";
+ int selfPortraitEnable = CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY;
+ int guideLineEnable = DISABLE_GUIDELINE;
+ bool exposureValue = false;
+ bool brighnesstValue = false;
+ bool isValidRect = false;
+ bool modified = false;
+
+ if (__dir != orientationStatus)
+ {
+ __isOrientationChanged = true;
+
+ if (__pAppTimer != null)
+ {
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ }
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ {
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ AppLogDebug("SCREEN_MODE_NORMAL");
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_FULL_PREVIEW_OVERLAY_PORTRAIT, Y_FULL_PREVIEW_OVERLAY_PORTRAIT,
+ W_FULL_PREVIEW_OVERLAY_PORTRAIT, H_FULL_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ }
+ else
+ {
+ if (__screenMode == SCREEN_MODE_NORMAL)
+ {
+ AppLogDebug("SCREEN_MODE_NORMAL");
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ else
+ {
+ rect = Rectangle(X_FULL_PREVIEW_OVERLAY_LANDSCAPE, Y_FULL_PREVIEW_OVERLAY_LANDSCAPE,
+ W_FULL_PREVIEW_OVERLAY_LANDSCAPE, H_FULL_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+ }
+
+ if (__pOverlayPanel)
+ {
+ switch (orientationStatus)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT_REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE_REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+ __pOverlayPanel->SetBounds(rect);
+ }
+
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ AppLogDebug("OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ HidePanel(true, true);
+ }
+ else
+ {
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+ }
+
+ __dir = orientationStatus;
+ __deviceOrientation = orientationStatus;
+
+ __pCameraPresentationModel->SetOrientation(__dir);
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (guideLineEnable == DISABLE_GUIDELINE)
+ {
+ DrawMarker(false);
+ }
+ else
+ {
+ DrawMarker(true);
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom())
+ {
+ DrawZoomSlider();
+ }
+
+ UpdateUiPanelIcon();
+ UpdateUiActionPanelIcon();
+
+ if (__pListViewMainMenu != null)
+ {
+ listName = __pListViewMainMenu->GetName();
+ if (listName.Equals(String(IDS_MENU_SETTING_MAIN_MENU_NAME)) && __pListViewMainMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pListFlashMainMenu != null)
+ {
+ listName = __pListFlashMainMenu->GetName();
+
+ if (listName.Equals(String(IDS_MENU_FLASH_MENU_NAME))&& __pListFlashMainMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pListViewSubMenu != null)
+ {
+ if (__pListViewSubMenu->GetShowState() == true)
+ {
+ HidePopup();
+ }
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ if (__pExposureCloseTimer->Cancel() == E_SUCCESS)
+ {
+ HidePopup();
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_EXPOSURE, exposureValue);
+ }
+
+ if (exposureValue == true && r == E_SUCCESS)
+ {
+ r = CreateExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_BRIGHTNESS, brighnesstValue);
+ }
+
+ if (brighnesstValue == true && r == E_SUCCESS)
+ {
+ r = CreateExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "CreateExposureSlider() fail[%s]", GetErrorMessage(r));
+
+ r = DrawExposureSlider();
+ TryReturnVoid(r == E_SUCCESS, "DrawExposureSlider() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ }
+ }
+ Invalidate(true);
+ __isOrientationChanged = false;
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::HidePopup(void)
+{
+ AppLogDebug("ENTER");
+
+ TryReturnVoid(__pCameraInfoPanel != null, "__pCameraInfoPanel is null");
+
+ if (__pListViewSubMenu)
+ {
+ if (__pCamraInfoSubPanel != null)
+ {
+ __pCamraInfoSubPanel->SetShowState(false);
+ }
+
+ __pListViewSubMenu->SetShowState(false);
+ }
+
+ if (__pListViewMainMenu)
+ {
+ __pListViewMainMenu->SetShowState(false);
+ }
+
+ if (__pListFlashMainMenu)
+ {
+ __pListFlashMainMenu->SetShowState(false);
+ }
+
+ __pCameraInfoPanel->SetDrawFlashMenuBackground(false);
+ __pCameraInfoPanel->SetDrawSettingMenuBackground(false);
+
+ if (__isOrientationChanged)
+ {
+ __isOrientationChanged = false;
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ __resolutionChange = false;
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::CheckStorageInfo(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ MessageBox messageBox;
+ int result = 0;
+ String strTemp = L"";
+ int remainedNum = 0;
+
+ remainedNum = __pCameraInfoPanel->GetRemainedPhoto();
+ AppLogDebug("CheckStorageInfo remainedNum = %d", remainedNum);
+
+ if (remainedNum == STORAGE_VALUE_ZERO)
+ {
+ if (__lowMemoryCapacity == false)
+ {
+ __lowMemoryCapacity = true;
+
+ __isMemoryFull = false;
+
+ messageBox.Construct(L"", L"Low Memory Left. You may take some photo depending on the subject", MSGBOX_STYLE_OK, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ }
+ else if (__lowMemoryCapacity == true)
+ {
+ __isMemoryFull = true;
+
+ messageBox.Construct(L"", L"Memory Full", MSGBOX_STYLE_OK, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ }
+
+ r = messageBox.ShowAndWait(result);
+ TryReturnVoid(r == E_SUCCESS, "ShowAndWait() fail(%s)", GetErrorMessage(r));
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_OK:
+ {
+ if (__lowMemoryCapacity == true)
+ {
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ __pCameraInfoPanel->SetStorageTitle(strTemp);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ if (__isMemoryFull == true)
+ {
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ __pCameraInfoPanel->SetStorageTitle(strTemp);
+
+ __pCameraInfoPanel->SetDrawIndicatorStroageInfo(true);
+
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ CaptureMode(CAMERA_CAPTURE_NORMAL);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::HideUiModeChangedButton(void)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ if (__pCameraIconLabel)
+ {
+ __pCameraIconLabel->SetShowState(false);
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ __pCamcoderIconLabel->SetShowState(false);
+ }
+
+ if (__pSwButton)
+ {
+ __pSwButton->SetShowState(false);
+ }
+ }
+ else
+ {
+ if (__pCameraIconLabel)
+ {
+ __pCameraIconLabel->SetShowState(true);
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ __pCamcoderIconLabel->SetShowState(true);
+ }
+
+ if (__pSwButton)
+ {
+ __pSwButton->SetShowState(true);
+ }
+ }
+ Invalidate(true);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::HideUiPanel(bool state)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+ if (state == true)
+ {
+ __pFlashButton->SetShowState(false);
+ __pSelfShotButton->SetShowState(false);
+ __pSettingButton->SetShowState(false);
+ __pCameraIconLabel->SetShowState(false);
+ __pCamcoderIconLabel->SetShowState(false);
+ __pSwButton->SetShowState(false);
+ __pShutterButton->SetShowState(false);
+ __pBackButton->SetShowState(false);
+ __pThumbnailPanel->SetShowState(false);
+
+ __pSettingPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ __pActionPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_BLACK);
+ }
+ else
+ {
+ __pFlashButton->SetShowState(true);
+ __pSelfShotButton->SetShowState(true);
+ __pSettingButton->SetShowState(true);
+
+ if (isAppControl)
+ {
+ __pCameraIconLabel->SetShowState(false);
+ __pCamcoderIconLabel->SetShowState(false);
+ __pSwButton->SetShowState(false);
+ }
+ else
+ {
+ __pCameraIconLabel->SetShowState(true);
+ __pCamcoderIconLabel->SetShowState(true);
+ __pSwButton->SetShowState(true);
+ }
+ __pShutterButton->SetShowState(true);
+ __pBackButton->SetShowState(true);
+ __pThumbnailPanel->SetShowState(true);
+
+ __pSettingPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_GRAY);
+ __pActionPanel->SetBackgroundColor(COLOR_PANEL_BACKGROUND_GRAY);
+ }
+
+ if (__screenMode == SCREEN_MODE_FULL)
+ {
+ Invalidate(true);
+ }
+ else
+ {
+ Draw();
+ Show();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SetCameraMode(bool isWideMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Dimension normalMode(PREVIEW_RESOLOTION_WIDTH, PREVIEW_RESOLOTION_HEIGHT);
+ Dimension resolutionDim;
+ Dimension captureResolutionDim;
+ BufferInfo bufferinfo;
+ IList* pList = null;
+ int previewResolutionSize = 0;
+ int resolutionCnt = 0;
+ int resolutionRatio = 0;
+ int index = 0;
+ int tempResolutionIndex = 0;
+ int count = 0;
+ int selfPortraitEnable = 0;
+
+ if (__pCameraPresentationModel->IsCameraInstance())
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+ else
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+
+ if (isWideMode == true)
+ {
+ pList = __pCameraPresentationModel->GetPreviewResolutionList();
+
+ if (pList)
+ {
+ resolutionCnt = pList->GetCount();
+
+ if (resolutionCnt > 0)
+ {
+ for (index = 0; index < resolutionCnt; index++)
+ {
+ resolutionDim = *(static_cast<Dimension*>(pList->GetAt(index)));
+
+ resolutionRatio = (resolutionDim.width * MULTIPLY_BY_TEN) / (resolutionDim.height);
+
+ if (resolutionRatio > NORMAL_MODE_RATIO)
+ {
+ count++;
+ }
+ }
+ }
+
+ resolutionDim = *(static_cast<Dimension*>(pList->GetAt(count - INDEX_UNIT_ONE)));
+ __previewResolutionWidth = resolutionDim.width;
+ __previewResolutionHeight = resolutionDim.height;
+ }
+ else
+ {
+ __previewResolutionWidth = PREVIEW_RESOLOTION_WIDTH;
+ __previewResolutionHeight = PREVIEW_RESOLOTION_HEIGHT;
+ }
+
+ AppLogDebug("Wide Mode W[%d] x H[%d]", resolutionDim.width, resolutionDim.height);
+
+ __pCameraPresentationModel->SetPreviewResolution(resolutionDim);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Faled to set value to registry[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->SetPreviewResolution(normalMode);
+
+ __previewResolutionWidth = normalMode.width;
+ __previewResolutionHeight = normalMode.height;
+
+ AppLogDebug("Normal Mode W[%d] x H[%d]", normalMode.width, normalMode.height);
+
+ if (__isToggleCameraDirection)
+ {
+ pList = __pCameraPresentationModel->GetPreviewResolutionList();
+
+ resolutionCnt = pList->GetCount();
+
+ AppLogDebug("pList resolutionCnt = %d", resolutionCnt);
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ captureResolutionDim.width = __captureResolutionWidth;
+
+ captureResolutionDim.height = __captureResolutionHeight;
+
+ if (resolutionCnt > 0)
+ {
+ for (index = 0; index < resolutionCnt; index++)
+ {
+ resolutionDim = *(static_cast<Dimension*>(pList->GetAt(index)));
+
+ if (resolutionDim == captureResolutionDim)
+ {
+ tempResolutionIndex = index;
+
+ AppLogDebug("primary captureResolutionDim == W:%d H:%d for index = %d", resolutionDim.width, resolutionDim.height, index);
+ }
+ }
+
+ __primaryCurrentResolutionIndex = resolutionCnt - tempResolutionIndex;
+ }
+
+ AppLogDebug("__primaryCurrentResolutionIndex = %d", __primaryCurrentResolutionIndex);
+ }
+ else
+ {
+ captureResolutionDim = __pCameraPresentationModel->GetCaptureResolution();
+ __captureResolutionWidth = captureResolutionDim.width;
+ __captureResolutionHeight = captureResolutionDim.height;
+
+ AppLogDebug("secondary captureResolutionDim : w->%d x h->%d", captureResolutionDim.width, captureResolutionDim.height);
+ }
+ }
+ }
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SetNormalOverlayPanel(bool destory)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ bool modified = false;
+ bool isValidRect = false;
+
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ int selfPortraitEnable = 0;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (destory == true)
+ {
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ __pOverlayPanel = new (std::nothrow) OverlayPanel();
+ __pOverlayPanel->Construct(rect);
+ AddControl(*__pOverlayPanel);
+
+ AppLogDebug("Client area rect (%d, %d, %d, %d)", clientRect.x, clientRect.y, clientRect.width, clientRect.height);
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ if (rect.width > clientRect.width
+ || rect.height > clientRect.height)
+ {
+ rect.width = clientRect.width;
+ rect.height = clientRect.height;
+ }
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("ORIENTATION_STATUS_PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("ORIENTATION_STATUS_PORTRAIT_REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("ORIENTATION_STATUS_LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("ORIENTATION_STATUS_LANDSCAPE_REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ if (__pOverlayPanel)
+ {
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ r = __pOverlayPanel->SetBounds(rect);
+ AppLogDebug("pOverlayPanel->SetBounds() [%s]", GetErrorMessage(r));
+ }
+
+ if (rect.width > clientRect.width
+ || rect.height > clientRect.height)
+ {
+ rect.width = clientRect.width;
+ rect.height = clientRect.height;
+ }
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_LESS_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SetWideOverlayPanel(bool destory)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ bool modified = false;
+ bool isValidRect = false;
+
+ Rectangle rect = Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height);
+
+ if (destory == true)
+ {
+ if (__pOverlayPanel)
+ {
+ RemoveControl(*__pOverlayPanel);
+ __pOverlayPanel = null;
+ }
+ __pOverlayPanel = new (std::nothrow) OverlayPanel();
+ __pOverlayPanel->Construct(rect);
+ AddControl(*__pOverlayPanel);
+
+ AppLogDebug("Input bounds (%d, %d, %d, %d)", rect.x, rect.y, rect.width, rect.height);
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_FULL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ else
+ {
+ if (__pOverlayPanel)
+ {
+ switch (__dir)
+ {
+ case ORIENTATION_STATUS_PORTRAIT:
+ {
+ AppLogDebug("PORTRAIT");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_90);
+ }
+ break;
+
+ case ORIENTATION_STATUS_PORTRAIT_REVERSE:
+ {
+ AppLogDebug("PORTRAIT REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_270);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE:
+ {
+ AppLogDebug("LANDSCAPE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_NONE);
+ }
+ break;
+
+ case ORIENTATION_STATUS_LANDSCAPE_REVERSE:
+ {
+ AppLogDebug("LANDSCAPE REVERSE");
+ __pOverlayPanel->SetRendererRotation(__pOverlayPanel->ROTATION_180);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ r = __pOverlayPanel->SetBounds(rect);
+ AppLogDebug("pOverlayPanel->SetBounds() [%s]", GetErrorMessage(r));
+ }
+
+ isValidRect = OverlayRegion::EvaluateBounds(OVERLAY_REGION_EVALUATION_OPTION_GREATER_THAN, rect, modified);
+ AppLogDebug("SCREEN_MODE_NORMAL Bounds is modified to (%d,%d,%d,%d)", rect.x, rect.y, rect.width, rect.height);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::HidePanel(bool isWideMode, bool isInvalidated)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pSettingPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pSettingPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSettingPanel");
+ SetControlAlwaysOnTop(*__pSettingPanel, true);
+ }
+ }
+
+ if (__pActionPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pActionPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pActionPanel");
+ SetControlAlwaysOnTop(*__pActionPanel, true);
+ }
+ }
+
+ if (__pFlashButton)
+ {
+ if (IsControlAlwaysOnTop(*__pFlashButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pFlashButton");
+ SetControlAlwaysOnTop(*__pFlashButton, true);
+ }
+ }
+
+ if (__pSelfShotButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSelfShotButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSelfShotButton");
+ SetControlAlwaysOnTop(*__pSelfShotButton, true);
+ }
+ }
+
+ if (__pSettingButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSettingButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSelfShotButton");
+ SetControlAlwaysOnTop(*__pSettingButton, true);
+ }
+ }
+
+ if (__pCameraIconLabel)
+ {
+ if (IsControlAlwaysOnTop(*__pCameraIconLabel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSelfShotButton");
+ SetControlAlwaysOnTop(*__pCameraIconLabel, true);
+ }
+ }
+
+ if (__pCamcoderIconLabel)
+ {
+ if (IsControlAlwaysOnTop(*__pCamcoderIconLabel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pCamcoderIconLabel");
+ SetControlAlwaysOnTop(*__pCamcoderIconLabel, true);
+ }
+ }
+
+ if (__pSwButton)
+ {
+ if (IsControlAlwaysOnTop(*__pSwButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pSwButton");
+ SetControlAlwaysOnTop(*__pSwButton, true);
+ }
+ }
+
+ if (__pShutterButton)
+ {
+ if (IsControlAlwaysOnTop(*__pShutterButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pShutterButton");
+ SetControlAlwaysOnTop(*__pShutterButton, true);
+ }
+ }
+
+ if (__pBackButton)
+ {
+ if (IsControlAlwaysOnTop(*__pBackButton) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pBackButton");
+ SetControlAlwaysOnTop(*__pBackButton, true);
+ }
+ }
+
+ if (__pThumbnailPanel)
+ {
+ if (IsControlAlwaysOnTop(*__pThumbnailPanel) == false)
+ {
+ AppLogDebug("IsControlAlwaysOnTop __pThumbnailPanel");
+ SetControlAlwaysOnTop(*__pThumbnailPanel, true);
+ }
+ }
+
+ if (isWideMode == true)
+ {
+ AppLogDebug("Wide MODE");
+
+ if (__pSettingPanel)
+ {
+ r = __pSettingPanel->SetShowState(false);
+ AppLogDebug("__pSettingPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+
+ if (__pActionPanel)
+ {
+ r = __pActionPanel->SetShowState(false);
+ AppLogDebug("__pActionPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ AppLogDebug("Normal MODE");
+
+ if (__pSettingPanel)
+ {
+ r = __pSettingPanel->SetShowState(true);
+ AppLogDebug("__pSettingPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+
+ if (__pActionPanel)
+ {
+ r = __pActionPanel->SetShowState(true);
+ AppLogDebug("__pActionPanel->SetShowState(false) fail[%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (isInvalidated == true)
+ {
+ Invalidate(true);
+ }
+ else
+ {
+ Draw();
+ Show();
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::SetScreenMode(const ScreenMode mode, bool destory)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AppLogDebug("__screenMode[%d] mode[%d]", __screenMode, mode);
+
+ switch (mode)
+ {
+ case SCREEN_MODE_NORMAL:
+ {
+ if (destory == true)
+ {
+ if (__screenMode != mode)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ __pCameraPresentationModel->StopCamera();
+ }
+ else
+ {
+ if (__isToggleCameraDirection || __resolutionChange)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ __pCameraPresentationModel->StopCamera();
+ }
+ }
+
+ SetNormalOverlayPanel(true);
+
+ if (__screenMode != mode)
+ {
+ SetCameraMode(false);
+ }
+ else
+ {
+ if (__isToggleCameraDirection || __resolutionChange)
+ {
+ SetCameraMode(false);
+ }
+ }
+
+ __screenMode = SCREEN_MODE_NORMAL;
+ }
+ else
+ {
+ SetNormalOverlayPanel(false);
+
+ __screenMode = SCREEN_MODE_NORMAL;
+ }
+
+ if (__pOverlayPanel != null)
+ {
+ __pOverlayPanel->RemoveTouchEventListener(*this);
+ }
+
+ __pCameraInfoPanel->SetOverlayPanelMode(__screenMode);
+ HidePanel(false, false);
+ }
+ break;
+
+ case SCREEN_MODE_FULL:
+ {
+ if (destory == true)
+ {
+ if (__screenMode != mode)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ __pCameraPresentationModel->StopCamera();
+ }
+ else
+ {
+ if (__isToggleCameraDirection || __resolutionChange)
+ {
+ TryCatch(__pAppTimer != null, r = E_SYSTEM, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryCatch(r == E_SUCCESS, , "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ __pCameraPresentationModel->StopCamera();
+ }
+ }
+
+ SetWideOverlayPanel(true);
+
+ if (__screenMode != mode)
+ {
+ SetCameraMode(true);
+ }
+ else
+ {
+ if (__isToggleCameraDirection || __resolutionChange)
+ {
+ SetCameraMode(true);
+ }
+ }
+
+ __screenMode = SCREEN_MODE_FULL;
+ }
+ else
+ {
+ SetWideOverlayPanel(false);
+
+ __screenMode = SCREEN_MODE_FULL;
+ }
+
+ if (__pOverlayPanel != null)
+ {
+ __pOverlayPanel->AddTouchEventListener(*this);
+ }
+
+ __pCameraInfoPanel->SetOverlayPanelMode(__screenMode);
+ HidePanel(true, false);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ __pCameraInfoPanel->SetOverlayPanelMode(SCREEN_MODE_NORMAL);
+ __screenMode = SCREEN_MODE_NORMAL;
+ return r;
+}
+
+result
+CameraForm::SetThumbNailButton(void)
+{
+ bool isAppControl = false;
+ Point ptThumbnailImg = Point(X_THUMBNAIL_BUTTON_IMG, Y_THUMBNAIL_BUTTON_IMG);
+ Bitmap* pBitmap = null;
+ result r = E_SUCCESS;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ AppLogDebug("CameraForm::Update :: Not thummail");
+
+ TryCatch(__pBackButton != null, r = E_FAILURE, "__pBackButton is null");
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ __pBackButton->SetNormalBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_ICON_BACK_PRESS);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ __pBackButton->SetPressedBitmap(ptThumbnailImg, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ __pBackButton->Invalidate(true);
+ Invalidate(true);
+
+ if (__pCameraPresentationModel->GetCameraState()!= CAMERA_STATE_CAPTURED)
+ {
+ __pCameraPresentationModel->SetAppControlRequestType(CameraPresentationModel::APP_CONTROL_REQUEST_TYPE_CANCELED);
+ }
+
+ AppLogDebug("IDA_BUTTON_CAMERA_THUMBNAIL : Back to the App");
+ CameraForm::OnFormBackRequested(*this);
+ }
+
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CameraForm::DrawTouchAutoFocus(const Tizen::Graphics::Point& currentPosition)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ bool focusSupport = false;
+ int selfPortraitEnable = 0;
+
+ if (__isTimerRunning == false)
+ {
+ AppLogDebug("__isTimerRunning:false");
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getValue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ __pCameraPresentationModel->SetAutoFocusPoint(currentPosition);
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+ __pCameraInfoPanel->Invalidate(true);
+ }
+
+ __pCameraPresentationModel->SetAutoFocusPoint(currentPosition);
+ }
+ }
+ else
+ {
+ AppLogDebug("__isTimerRunning:true");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::DoCapture(void)
+{
+ AppLogDebug("ENTER");
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ if (__pPopupTimer)
+ {
+ __timeCount = 0;
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawExposure() == true)
+ {
+ __pCameraInfoPanel->SetDrawExposure(false);
+ Invalidate(true);
+ }
+
+ if (__pZoomCloseTimer)
+ {
+ __pZoomCloseTimer->Cancel();
+ }
+
+ if (__pCameraInfoPanel->GetDrawZoom() == true)
+ {
+ __pCameraInfoPanel->SetDrawZoom(false);
+ Invalidate(true);
+ }
+
+ if (__pTouchAutoFocusTimer)
+ {
+ __pTouchAutoFocusTimer->Cancel();
+ }
+
+ HidePopup();
+
+ CheckStorageInfo();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::LaunchImageview(void)
+{
+ AppLogDebug("ENTER");
+ String fullFileName = L"";
+ result r = E_SUCCESS;
+ int contentCount = 0;
+ String listIndex;
+
+ if (__pPopupTimer)
+ {
+ __timeCount = 0;
+ __pPopupTimer->Cancel();
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+ }
+
+ if (__pZoomCloseTimer)
+ {
+ __pZoomCloseTimer->Cancel();
+ }
+
+ HidePopup();
+
+ 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));
+
+ fullFileName = __pCameraPresentationModel->GetContentFilePath(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ AppLogDebug("fullFileName = %ls", fullFileName.GetPointer());
+ contentCount = __pCameraPresentationModel->GetContentCount();
+ AppLogDebug("contentCount : %d", contentCount);
+
+ listIndex.Format(10, L"%d", contentCount - INDEX_UNIT_ONE);
+ AppLogDebug("listIndex : %ls", listIndex.GetPointer());
+
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), new (std::nothrow) String(fullFileName));
+ pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_INDEX), new (std::nothrow) String(listIndex));
+
+ r = LaunchAppControl(APPCONTROL_PROVIDER_ID_IMAGEVIEW, APPCONTROL_OPERATION_ID_IMAGEVIEW, null, null, pDataList);
+ TryReturnVoid(r == E_SUCCESS, "Faled to LaunchAppControl[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::InDrawFocus(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+ Point currentPosition;
+ bool focusSupport = false;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ currentPosition.x = (rect.width / DIVIDE_BY_TWO);
+ currentPosition.y = (rect.height / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ currentPosition.x = (rect.width / DIVIDE_BY_TWO);
+ currentPosition.y = (rect.height / DIVIDE_BY_TWO);
+ }
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ AppLogDebug("focus is Support");
+
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+// __pCameraInfoPanel->Invalidate(true);
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ }
+ else
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_SECONDARY_SUPPORT_FOCUS, focusSupport);
+
+ if (focusSupport == true && r == E_SUCCESS)
+ {
+ __pCameraInfoPanel->SetCurrentPoint(currentPosition);
+ __pCameraInfoPanel->SetDrawMarkerFocus(true);
+ __pCameraInfoPanel->SetDrawMarkerFocusType(CAMERA_FOCUS_NOT_READY);
+ }
+ else
+ {
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ //__pCameraInfoPanel->Invalidate(true);
+ __pCameraInfoPanel->Draw();
+ __pCameraInfoPanel->Show();
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::GetCameraToForeground(void)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Rectangle clientRect = GetClientAreaBounds();
+ result r = E_SUCCESS;
+ Dimension previewResolutionDim;
+ Dimension captureResolutionDim;
+ BufferInfo bufferinfo;
+ int previewResolutionSize = 0;
+
+ __isLockScreenMode = false;
+
+ __pCameraPresentationModel->KeepScreenOnState(true, false);
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ if (__pCameraPresentationModel->IsCameraInstance())
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+ else
+ {
+ __pCameraPresentationModel->SetMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+
+ Update();
+
+ previewResolutionDim = __pCameraPresentationModel->GetPreviewResolution();
+ AppLogDebug("CameraForm::GetPreviewResolution(W:%d, H:%d)", previewResolutionDim.width, previewResolutionDim.height);
+
+ __previewResolutionWidth = previewResolutionDim.width;
+ __previewResolutionHeight = previewResolutionDim.height;
+
+ captureResolutionDim = __pCameraPresentationModel->GetCaptureResolution();
+ AppLogDebug("CameraForm::captureResolutionDim(W:%d, H:%d)", previewResolutionDim.width, previewResolutionDim.height);
+
+ AppLogDebug("__screenMode [%d]", __screenMode);
+
+ r = SetScreenMode(__screenMode, false);
+ TryReturnVoid(r == E_SUCCESS, "SetScreenMode() failed:%s", GetErrorMessage(r));
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ InDrawFocus();
+
+ r = __pCameraPresentationModel->SetValue(CURRENT_MODE, CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "Write Reg fail[%s]", GetErrorMessage(r));
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ previewResolutionSize = __previewResolutionWidth * __previewResolutionHeight;
+
+ __pCameraInfoPanel->SetPreviewResolutionSize(previewResolutionSize);
+
+ SetCameraSettingsDevice();
+
+ __pCameraInfoPanel->StartCheckStorageInfoTimer();
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SendCameraToBackground(void)
+{
+ AppLogDebug("ENTER");
+
+ if (__isTimerRunning == true)
+ {
+ EndPopupTimer();
+
+ __timeCount = INDEX_UNIT_ZERO;
+
+ __isTimerRunning = false;
+
+ __isUsedTimerCaptured = false;
+
+ if (__pSettingTimer != null)
+ {
+ __pSettingTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->SetDrawPopupTimerUpdate(false);
+
+ __pCameraInfoPanel->SetDrawPopupTimerCount(0);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCameraInfoPanel->SetDrawPopupTimer(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ __pCameraPresentationModel->Capture();
+
+ HideUiPanel(false);
+ }
+
+ if (__pAppTimer != null)
+ {
+ __pAppTimer->Cancel();
+ }
+
+ __pCameraInfoPanel->EndCheckStorageInfoTimer();
+
+ __pCameraInfoPanel->SetDrawMarkerFocus(false);
+
+ __pCameraInfoPanel->Invalidate(true);
+
+ HidePopup();
+
+ __pCameraPresentationModel->StopCamera();
+
+ __pCameraPresentationModel->KeepScreenOnState(false, true);
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::DrawThumbnail(void)
+{
+ AppLogDebug("ENTER");
+ bool isAppControl = false;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(true);
+ __pBackButton->Draw();
+ __pBackButton->Show();
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(false);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+ }
+ }
+ else
+ {
+ if (__pBackButton)
+ {
+ __pBackButton->SetShowState(false);
+ __pBackButton->Draw();
+ __pBackButton->Show();
+ }
+
+ if (__pThumbnailPanel)
+ {
+ __pThumbnailPanel->SetShowState(true);
+ __pThumbnailPanel->Draw();
+ __pThumbnailPanel->Show();
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::SetCameraErrorOccurred(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ BufferInfo bufferinfo;
+ Point currentPosition;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ int guideLineEnable = 0;
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+ bool value = false;
+ int selfPortraitEnable = 0;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ TryReturnVoid(__pAppTimer != null, "__pAppTimer is null");
+ __pAppTimer->Cancel();
+
+ r = __pAppTimer->Start(CAMERA_TIMER_LIMIT);
+ TryReturnVoid(r == E_SUCCESS, "__pAppTimer start fail[%s]", GetErrorMessage(r));
+
+ r = __pOverlayPanel->GetBackgroundBufferInfo(bufferinfo);
+ TryReturnVoid(r == E_SUCCESS, "GetBackgroundBufferInfo fail[%s]", GetErrorMessage(r));
+
+ __pCameraPresentationModel->StartPreview(&bufferinfo);
+
+ __pCameraPresentationModel->SetContinuousAutoFocus();
+
+ r = __pCameraPresentationModel->GetValue(GUIDELINE_ENABLE, guideLineEnable);
+ TryReturnVoid(r == E_SUCCESS, "Read Reg fail[%s]", GetErrorMessage(r));
+
+ if (guideLineEnable == DISABLE_GUIDELINE)
+ {
+ DrawMarker(false);
+ }
+ else
+ {
+ DrawMarker(true);
+ }
+
+ InDrawFocus();
+
+ EndPopupTimer();
+
+ __isUsedTimerCaptured = false;
+
+ r = __pCameraPresentationModel->GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryReturnVoid(r == E_SUCCESS, "Reg getvalue fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CameraPresentationModel::CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ r = __pCameraPresentationModel->GetMediaCapability(CAMERA_PRIMARY_SUPPORT_FLASH, value);
+
+ if (value == true && r == E_SUCCESS)
+ {
+ cameraFlashMode = __pCameraPresentationModel->GetFlashMode();
+
+ AppLogDebug("PRIMARY_SUPPORT_FLASH");
+
+ if (cameraFlashMode != CAMERA_FLASH_MODE_OFF)
+ {
+ __pCameraPresentationModel->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+ }
+ else
+ {
+ AppLogDebug("PRIMARY_FLASH NOT SUPPORT");
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::ShowUnlaunchPopup(void)
+{
+ AppLogDebug("ENTER");
+ int result = 0;
+ MessageBox msgBox;
+ String tmpString;
+ String* pItemText=null;
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+
+ pItemText = new (std::nothrow) String();
+
+ pAppResource->GetString(L"IDS_CAM_POP_UNABLE_TO_START_CAMERA_DURING_CALL", tmpString);
+
+ msgBox.Construct(L"", tmpString, MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ msgBox.ShowAndWait(result);
+
+ delete pItemText;
+ pItemText = null;
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_CLOSE:
+ {
+ CameraForm::OnFormBackRequested(*this);
+ }
+ break;
+
+ default:
+ {
+ }
+ break;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+Tizen::Telephony::CallStatus
+CameraForm::GetCurrentCallStatus(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ CallStatus callStatus = CALL_STATUS_UNDEFINED;
+
+ CallManager* pCallManager = new (std::nothrow) CallManager();
+
+ r = pCallManager->Construct();
+ TryCatch(r == E_SUCCESS, , "pCallManager::Construct() failed by [%s]", GetErrorMessage(r));
+
+ callStatus = pCallManager->GetCurrentCallStatus();
+
+ AppLogDebug("callStatus = %d", callStatus);
+
+ delete pCallManager;
+
+ AppLogDebug("EXIT");
+ return callStatus;
+
+CATCH:
+ AppLogDebug("EXIT");
+ delete pCallManager;
+ return CALL_STATUS_UNDEFINED;
+}
+
+Tizen::Telephony::CallType
+CameraForm::GetCurrentCallType(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ CallType callType = TYPE_UNDEFINED_CALL;
+
+ CallManager* pCallManager = new (std::nothrow) CallManager();
+
+ r = pCallManager->Construct();
+ TryCatch(r == E_SUCCESS, , "pCallManager::Construct() failed by [%s]", GetErrorMessage(r));
+
+ callType = pCallManager->GetCurrentCallType();
+ AppLogDebug("callType = %d", callType);
+
+ delete pCallManager;
+
+ AppLogDebug("EXIT");
+ return callType;
+
+CATCH:
+ AppLogDebug("EXIT");
+ delete pCallManager;
+ return TYPE_UNDEFINED_CALL;
+}
+
+void
+CameraForm::CheckLowBatteryStatus(void)
+{
+ AppLogDebug("ENTER");
+ int result = 0;
+ MessageBox msgBox;
+ bool isCharging = false;
+ BatteryLevel batteryLevel;
+
+ batteryLevel = __pCameraPresentationModel->GetBatteryLevel();
+ isCharging = __pCameraPresentationModel->IsCharging();
+
+ AppLogDebug("batteryLevel = %d", batteryLevel);
+
+ if (batteryLevel == BATTERY_CRITICAL || batteryLevel == BATTERY_EMPTY)// || batteryLevel == BATTERY_LOW)
+ {
+ if (isCharging == false)
+ {
+ msgBox.Construct(L"", L"Unable to start camera.Low battery", MSGBOX_STYLE_NONE, MESSAGEBOX_DISPLAY_TIME_3_SEC);
+ msgBox.ShowAndWait(result);
+
+ switch (result)
+ {
+ case MSGBOX_RESULT_CLOSE:
+ {
+ AppLogDebug("MSGBOX_RESULT_CLOSE");
+ CameraForm::OnFormBackRequested(*this);
+ }
+ break;
+
+ default:
+ {
+ }
+ break;
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraForm::DeleteTimer(void)
+{
+ AppLogDebug("ENTER");
+
+ if (__pAppTimer != null)
+ {
+ __pAppTimer->Cancel();
+ delete __pAppTimer;
+ __pAppTimer = null;
+ }
+
+ if (__pSettingTimer != null)
+ {
+ __pSettingTimer->Cancel();
+ delete __pSettingTimer;
+ __pSettingTimer = null;
+ }
+
+ if (__pCaptureStartTimer != null)
+ {
+ __pCaptureStartTimer->Cancel();
+ delete __pCaptureStartTimer;
+ __pCaptureStartTimer = null;
+ }
+
+ if (__pTouchAutoFocusTimer != null)
+ {
+ __pTouchAutoFocusTimer->Cancel();
+ delete __pTouchAutoFocusTimer;
+ __pTouchAutoFocusTimer = null;
+ }
+
+ if (__pPopupTimer)
+ {
+ __pPopupTimer->Cancel();
+
+ delete __pPopupTimer;
+ __pPopupTimer = null;
+ }
+
+ if (__pExposureCloseTimer)
+ {
+ __pExposureCloseTimer->Cancel();
+
+ delete __pExposureCloseTimer;
+ __pExposureCloseTimer = null;
+ }
+
+ if (__pZoomCloseTimer)
+ {
+ __pZoomCloseTimer->Cancel();
+
+ delete __pZoomCloseTimer;
+ __pZoomCloseTimer = null;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+result
+CameraForm::MakeMenuString(void)
+{
+ AppLogDebug("ENTER");
+ int idx = 0;
+ String tmpString;
+ result r = E_SUCCESS;
+
+ if (__pSettingMenuString == null)
+ {
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ __pSettingMenuString = new (std::nothrow) String*[MAX_SETTING_MENU_COUNT];
+
+ TryCatch(__pSettingMenuString != null, r = E_FAILURE, "__pSettingMenuString is null");
+
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ __pSettingMenuString[idx] = new (std::nothrow) String[MAX_SUBMENU_CONTENT];
+ TryCatch(__pSettingMenuString[idx] != null, r = E_FAILURE, "__pSettingMenuString[%d] is null", idx);
+ }
+
+ pAppResource->GetString(IDS_CAM_OPT_EXPOSURE_VALUE, tmpString);
+
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_01] = tmpString;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_02] = IDS_MENU_EXPOSURE_P20;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_03] = IDS_MENU_EXPOSURE_P15;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_04] = IDS_MENU_EXPOSURE_P10;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_05] = IDS_MENU_EXPOSURE_P05;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_06] = IDS_MENU_EXPOSURE_00;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_07] = IDS_MENU_EXPOSURE_M05;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_08] = IDS_MENU_EXPOSURE_M10;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_09] = IDS_MENU_EXPOSURE_M15;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_EXPOSURE_MODE][MENU_IDX_10] = IDS_MENU_EXPOSURE_M20;
+
+ pAppResource->GetString(IDS_CAM_BODY_TIMER, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_TIMER_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_OFF, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_TIMER_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_2_SEC, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_TIMER_MODE][MENU_IDX_03] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_5_SEC, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_TIMER_MODE][MENU_IDX_04] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_10_SEC, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_TIMER_MODE][MENU_IDX_05] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_ISO, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_AUTO, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_02] = tmpString;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_03] = IDS_MENU_ISO_50;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_04] = IDS_MENU_ISO_100;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_05] = IDS_MENU_ISO_200;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_06] = IDS_MENU_ISO_400;
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_ISO_MODE][MENU_IDX_07] = IDS_MENU_ISO_800;
+
+ pAppResource->GetString(IDS_CAM_OPT_WHITE_BALANCE_ABB, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_AUTO, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_03] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_FLUORESCENT, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_04] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_DAYLIGHT, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_05] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_CLOUDY, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_WB_MODE][MENU_IDX_07] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_GUIDELINE, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_OFF, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_BODY_ON, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_GUIDELINE_MODE][MENU_IDX_03] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_RESOLUTION, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_CAPTURE_RESOLUTION_MODE][MENU_IDX_01] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_STORAGE, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE][MENU_IDX_01] = tmpString;
+ pAppResource->GetString(IDS_COM_BODY_PHONE, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE][MENU_IDX_02] = tmpString;
+ pAppResource->GetString(IDS_CAM_OPT_MEMORY_CARD, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_STORAGE_TYPE_MODE][MENU_IDX_03] = tmpString;
+
+ pAppResource->GetString(IDS_CAM_BODY_RESET_SETTINGS_RESET, tmpString);
+ __pSettingMenuString[CAMERA_SUB_MENU_CONTENT_RESET_MODE][MENU_IDX_01] = tmpString;
+ }
+ AppLogDebug("EXIT");
+
+ return r;
+
+CATCH:
+ if (__pSettingMenuString)
+ {
+ for (idx = 0; idx < MAX_SETTING_MENU_COUNT; ++idx)
+ {
+ if (__pSettingMenuString[idx])
+ {
+ delete [] __pSettingMenuString[idx];
+ __pSettingMenuString[idx] = null;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ delete __pSettingMenuString;
+ __pSettingMenuString = null;
+ }
+
+ return r;
+}
+
+bool
+CameraForm::IsDisplayResolutionWvga(void)
+{
+ AppLogDebug("ENTER");
+ if (__displayResolution == DISPLAY_RESOLUTION_WVGA)
+ {
+ AppLogDebug("DISPLAY_RESOLUTION_WVGA - EXIT");
+ return true;
+ }
+ else
+ {
+ AppLogDebug("EXIT");
+ return false;
+ }
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraInfoPanel.cpp
+ * @brief This is the implementation file for Camera Information Panel class.
+ */
+
+#include "CmCameraInfoPanel.h"
+#include "CmCameraPresentationModel.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+static const int UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN = 2048;
+static const int STORAGE_VALUE_ZERO = 0;
+static const int STORAGE_DISPLAY_PLACE = 300;
+static const int MAX_STORAGE_VALUE = 5000;
+static const int PREVIEW_RESOLUTION_DEFAULT_SIZE = 307200;
+
+static const int H_SETTING_MENU_PANEL_TITLE = 50;
+static const int FONT_SIZE_SETTING_MENU_TITLE = 34;
+static const int FONT_SIZE_ZOOM_LEVEL_FREE_SPACE = 38;
+static const int H_SETTING_MENU_PANEL_MARGIN = 6;
+static const int H_SETTING_MENU_TEXT_MARGIN = 18;
+
+static const int X_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT = 0;
+static const int Y_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT = 160;
+static const int W_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT = 720;
+static const int H_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT = 960;
+
+static const int X_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE = 160;
+static const int Y_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE = 0;
+static const int W_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE = 960;
+static const int H_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE = 720;
+
+static const int X_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT = 288;
+static const int Y_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT = 26;
+static const int W_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT = 432;
+static const int H_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT = 325;
+
+static const int X_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE = 26;
+static const int Y_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE = 28;
+static const int W_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE = 432;
+static const int H_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE = 330;
+
+static const int X_FLASH_MODE_SETTING_ANKER_PORTRAIT = 630;
+static const int Y_FLASH_MODE_SETTING_ANKER_PORTRAIT = 0;
+
+static const int X_FLASH_MODE_SETTING_ANKER_LANDSCAPE = 0;
+static const int Y_FLASH_MODE_SETTING_ANKER_LANDSCAPE = 45;
+
+static const int X_SETTING_MENU_ANKER_PORTRAIT = 10;
+static const int X_SETTING_MENU_ANKER_MARGIN = 34;
+static const int Y_SETTING_MENU_ANKER_PORTRAIT = 0;
+
+static const int X_SETTING_MENU_ANKER_LANDSCAPE = 0;
+static const int Y_SETTING_MENU_ANKER_LANDSCAPE = 584;
+static const int Y_SETTING_MENU_ANKER_LANDSCAPE_MARGIN = 45;
+static const int X_MENU_TITLE_MARGIN = 18;
+
+static const int X_SETTING_MENU_MAIN_PANEL_PORTRAIT = 0;
+static const int Y_SETTING_MENU_MAIN_PANEL_PORTRAIT = 0;
+static const int W_SETTING_MENU_MAIN_PANEL_PORTRAIT = 720;
+static const int H_SETTING_MENU_MAIN_PANEL_PORTRAIT = 960;
+
+static const int X_SETTING_MENU_MAIN_PANEL_LANDSCAPE = 0;
+static const int Y_SETTING_MENU_MAIN_PANEL_LANDSCAPE = 0;
+static const int W_SETTING_MENU_MAIN_PANEL_LANDSCAPE = 960;
+static const int H_SETTING_MENU_MAIN_PANEL_LANDSCAPE = 720;
+
+static const int X_SETTING_MENU_BG_IMG_PORTRAIT = 26;
+static const int Y_SETTING_MENU_BG_IMG_PORTRAIT = 26;
+static const int W_SETTING_MENU_BG_IMG_PORTRAIT = 560;
+static const int H_SETTING_MENU_BG_IMG_PORTRAIT = 600;
+static const int X_SETTING_MENU_BG_IMG_LANDSCAPE = 26;
+static const int Y_SETTING_MENU_BG_IMG_LANDSCAPE = 10;
+static const int Y_SETTING_MENU_BG_IMG_LANDSCAPE_MARGIN = 80;
+static const int W_SETTING_MENU_BG_IMG_LANDSCAPE = 560;
+static const int H_SETTING_MENU_BG_IMG_LANDSCAPE = 591;
+static const int X_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE = 26;
+static const int Y_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE = 286;
+static const int W_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE = 560;
+static const int H_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE = 402;
+
+static const int X_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT = 26;
+static const int Y_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT = 26;
+static const int W_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT = 560;
+static const int H_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT = 402;
+
+static const int X_CAMCORDER_SETTING_MENU_ANKER_LANDSCAPE = 0;
+static const int Y_CAMCORDER_SETTING_MENU_ANKER_LANDSCAPE = 630;
+static const int X_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT = 10;
+static const int X_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT_MARGIN = 34;
+static const int Y_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT = 0;
+
+static const int X_GUIDELINE_HOR_LINE_TOP_START_POS_LANDSCAPE = 0;
+static const int Y_GUIDELINE_HOR_LINE_TOP_START_POS_LANDSCAPE = 239;
+static const int X_GUIDELINE_HOR_LINE_TOP_END_POS_LANDSCAPE = 960;
+
+static const int X_GUIDELINE_HOR_LINE_BOTTOM_START_POS_LANDSCAPE = 0;
+static const int Y_GUIDELINE_HOR_LINE_BOTTOM_START_POS_LANDSCAPE = 479;
+static const int X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_LANDSCAPE = 960;
+
+static const int X_GUIDELINE_VER_LINE_LEFT_START_POS_LANDSCAPE = 319;
+static const int Y_GUIDELINE_VER_LINE_LEFT_START_POS_LANDSCAPE = 0;
+static const int Y_GUIDELINE_VER_LINE_LEFT_END_POS_LANDSCAPE = 720;
+
+static const int X_GUIDELINE_VER_LINE_RIGHT_START_POS_LANDSCAPE = 641;
+static const int Y_GUIDELINE_VER_LINE_RIGHT_START_POS_LANDSCAPE = 0;
+static const int Y_GUIDELINE_VER_LINE_RIGHT_END_POS_LANDSCAPE = 720;
+
+static const int X_GUIDELINE_VER_LINE_LEFT_START_POS_PORTRAIT = 239;
+static const int Y_GUIDELINE_VER_LINE_LEFT_START_POS_PORTRAIT = 0;
+
+static const int Y_GUIDELINE_VER_LINE_LEFT_END_POS_PORTRAIT = 960;
+static const int X_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN = 1;
+static const int Y_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN = 1;
+
+static const int X_GUIDELINE_VER_LINE_RIGHT_START_POS_PORTRAIT = 479;
+static const int Y_GUIDELINE_VER_LINE_RIGHT_START_POS_PORTRAIT = 0;
+static const int Y_GUIDELINE_VER_LINE_RIGHT_END_POS_PORTRAIT = 960;
+
+static const int X_GUIDELINE_HOR_LINE_TOP_START_POS_PORTRAIT = 0;
+static const int Y_GUIDELINE_HOR_LINE_TOP_START_POS_PORTRAIT = 319;
+static const int X_GUIDELINE_HOR_LINE_TOP_END_POS_PORTRAIT = 720;
+
+static const int X_GUIDELINE_HOR_LINE_BOTTOM_START_POS_PORTRAIT = 0;
+static const int Y_GUIDELINE_HOR_LINE_BOTTOM_START_POS_PORTRAIT = 641;
+static const int X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_PORTRAIT = 720;
+
+static const int X_EXPOSURE_PANEL_SIDER_LANDSCAPE = 28;
+static const int Y_EXPOSURE_PANEL_SIDER_LANDSCAPE = 120;
+static const int W_EXPOSURE_PANEL_SIDER_LANDSCAPE = 60;
+static const int H_EXPOSURE_PANEL_SIDER_LANDSCAPE = 336;
+static const int X_EXPOSURE_PANEL_SIDER_PORTRAIT = 120;
+static const int Y_EXPOSURE_PANEL_SIDER_PORTRAIT = 28;
+static const int W_EXPOSURE_PANEL_SIDER_PORTRAIT = 336;
+static const int H_EXPOSURE_PANEL_SIDER_PORTRAIT = 60;
+
+static const int X_START_POSITION = 0;
+static const int Y_START_POSITION = 0;
+
+static const int X_PREVIEW_OVERLAY_PORTRAIT = 0;
+static const int Y_PREVIEW_OVERLAY_PORTRAIT = 160;
+static const int W_PREVIEW_OVERLAY_PORTRAIT = 720;
+static const int H_PREVIEW_OVERLAY_PORTRAIT = 960;
+
+static const int X_PREVIEW_OVERLAY_LANDSCAPE = 160;
+static const int Y_PREVIEW_OVERLAY_LANDSCAPE = 0;
+static const int W_PREVIEW_OVERLAY_LANDSCAPE = 960;
+static const int H_PREVIEW_OVERLAY_LANDSCAPE = 720;
+
+static const int X_INDICATOR_BATTERY_PORTRAIT = 656;
+static const int Y_INDICATOR_BATTERY_PORTRAIT = 6;
+static const int X_INDICATOR_BATTERY_LANDSCAPE = 856;
+static const int Y_INDICATOR_BATTERY_LANDSCAPE = 0;
+
+static const int X_INDICATOR_STORAGE_PORTRAIT = 608;
+static const int Y_INDICATOR_STORAGE_PORTRAIT = 6;
+static const int X_INDICATOR_STORAGE_LANDSCAPE = 806;
+static const int Y_INDICATOR_STORAGE_LANDSCAPE = 0;
+static const int W_INDICATOR = 50;
+static const int H_INDICATOR = 50;
+
+static const int X_EXPOSURE_PANEL_START = 0;
+static const int Y_EXPOSURE_PANEL_START = 0;
+
+static const int X_EXPOSURE_PANEL_BAR_LANDSCAPE = 46;
+static const int Y_EXPOSURE_PANEL_BAR_LANDSCAPE = 120;
+static const int X_EXPOSURE_PANEL_BAR_PORTRAIT = 120;
+static const int Y_EXPOSURE_PANEL_BAR_PORTRAIT = 46;
+
+static const int X_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE = 15;
+static const int Y_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE = 14;
+static const int X_EXPOSURE_PANEL_TOP_LEVEL_PORTRAIT = 14;
+static const int Y_EXPOSURE_PANEL_TOP_LEVEL_PORTRAIT = 15;
+
+static const int X_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE = 15;
+static const int Y_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE = 476;
+static const int X_EXPOSURE_PANEL_BOTTOM_LEVEL_PORTRAIT = 476;
+static const int Y_EXPOSURE_PANEL_BOTTOM_LEVEL_PORTRAIT = 15;
+
+static const int X_EXPOSURE_PANEL_LINE_LANDSCAPE = 23;
+static const int Y_EXPOSURE_PANEL_LINE_LANDSCAPE = 285;
+static const int X_EXPOSURE_PANEL_LINE_PORTRAIT = 285;
+static const int Y_EXPOSURE_PANEL_LINE_PORTRAIT = 23;
+
+static const int X_ZOOM_PANEL_START_LANDSCAPE = 0;
+static const int Y_ZOOM_PANEL_START_LANDSCAPE = 0;
+static const int X_ZOOM_PANEL_START_PORTRAIT = 0;
+static const int Y_ZOOM_PANEL_START_PORTRAIT = 0;
+
+static const int X_ZOOM_PANEL_BAR_LANDSCAPE = 40;
+static const int Y_ZOOM_PANEL_BAR_LANDSCAPE = 104;
+static const int X_ZOOM_PANEL_BAR_PORTRAIT = 104;
+static const int Y_ZOOM_PANEL_BAR_PORTRAIT = 40;
+
+static const int X_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE = 27;
+static const int Y_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE = 26;
+static const int X_ZOOM_PANEL_TOP_LEVEL_PORTRAIT = 26;
+static const int Y_ZOOM_PANEL_TOP_LEVEL_PORTRAIT = 27;
+
+static const int X_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE = 27;
+static const int Y_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE = 466;
+static const int X_ZOOM_PANEL_BOTTOM_LEVEL_PORTRAIT = 466;
+static const int Y_ZOOM_PANEL_BOTTOM_LEVEL_PORTRAIT = 27;
+
+static const int X_ZOOM_PANEL_LINE_LANDSCAPE = 23;
+static const int Y_ZOOM_PANEL_LINE_LANDSCAPE = 285;
+static const int X_ZOOM_PANEL_LINE_PORTRAIT = 285;
+static const int Y_ZOOM_PANEL_LINE_PORTRAIT = 23;
+
+static const int X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT = 550;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT = 6;
+static const int X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE = 750;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE = 0;
+static const int X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT = 365;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT = 6;
+static const int X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE = 565;
+static const int Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE = 0;
+static const int FONT_SIZE_INDICATOR_STORAGE_FREE_SPACE = 38;
+static const int H_TIMER_TITLE_TOP_MARGIN_TENLESS = 25;
+static const int H_TIMER_TITLE_TOP_MARGIN = 15;
+static const int UI_POPUP_TIMER_UPDATE_BUFFER_LEN = 50;
+
+static const int X_INDICATOR_REC_ICON_LANDSCAPE = 617;
+static const int Y_INDICATOR_REC_ICON_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_HOUR_1_LANDSCAPE = 653;
+static const int Y_INDICATOR_TIMER_HOUR_1_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_HOUR_2_LANDSCAPE = 671;
+static const int Y_INDICATOR_TIMER_HOUR_2_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_MINUTE_1_LANDSCAPE = 701;
+static const int Y_INDICATOR_TIMER_MINUTE_1_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_MINUTE_2_LANDSCAPE = 719;
+static const int Y_INDICATOR_TIMER_MINUTE_2_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_SEC_1_LANDSCAPE = 749;
+static const int Y_INDICATOR_TIMER_SEC_1_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_SEC_2_LANDSCAPE = 767;
+static const int Y_INDICATOR_TIMER_SEC_2_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_CONLON_1_LANDSCAPE = 687;
+static const int Y_INDICATOR_TIMER_CONLON_1_LANDSCAPE = 0;
+static const int X_INDICATOR_TIMER_CONLON_2_LANDSCAPE = 735;
+static const int Y_INDICATOR_TIMER_CONLON_2_LANDSCAPE = 0;
+
+static const int X_INDICATOR_REC_ICON_PORTRAIT = 417;
+static const int Y_INDICATOR_REC_ICON_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_HOUR_1_PORTRAIT = 453;
+static const int Y_INDICATOR_TIMER_HOUR_1_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_HOUR_2_PORTRAIT = 471;
+static const int Y_INDICATOR_TIMER_HOUR_2_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_MINUTE_1_PORTRAIT = 501;
+static const int Y_INDICATOR_TIMER_MINUTE_1_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_MINUTE_2_PORTRAIT = 519;
+static const int Y_INDICATOR_TIMER_MINUTE_2_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_SEC_1_PORTRAIT = 549;
+static const int Y_INDICATOR_TIMER_SEC_1_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_SEC_2_PORTRAIT = 567;
+static const int Y_INDICATOR_TIMER_SEC_2_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_CONLON_1_PORTRAIT = 487;
+static const int Y_INDICATOR_TIMER_CONLON_1_PORTRAIT = 6;
+static const int X_INDICATOR_TIMER_CONLON_2_PORTRAIT = 535;
+static const int Y_INDICATOR_TIMER_CONLON_2_PORTRAIT = 6;
+
+static const int DIVIDE_BY_TWO = 2;
+static const int CAMERA_TIMER_BATTERY = 250;
+static const int CAMERA_TIMER_RECORDER = 250;
+
+static const int MAKER_FOCUS_TYPE_NOT_READY = 0;
+static const int MAKER_FOCUS_TYPE_READY = 1;
+static const int MAKER_FOCUS_TYPE_FAIL = 2;
+
+static const int BATT_LEVEL_FULL = 100;
+static const int BATT_LEVEL_5 = 84;
+static const int BATT_LEVEL_4 = 68;
+static const int BATT_LEVEL_3 = 52;
+static const int BATT_LEVEL_2 = 36;
+static const int BATT_LEVEL_1 = 10;
+static const int BATT_LEVEL_EMPTY = 0;
+
+static const int INDEX_UNIT_ZERO = 0;
+static const int SECONDS_PER_HOUR = 3600;
+static const int SECONDS_PER_MINUTE = 60;
+static const int FRAME_RATE = 2;
+static const int UNIT_TEN = 10;
+
+static const int X_ZERO_POINT = 0;
+static const int Y_ZERO_POINT = 0;
+static const int ZERO_LEN_STRING = 0;
+
+CameraInfoPanel::CameraInfoPanel(void)
+ : __currentMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ , __drawExposure(false)
+ , __drawIndicator(false)
+ , __drawIndicatorStorageInfo(false)
+ , __drawMarkerFocus(false)
+ , __drawMarkerFocusType(MAKER_FOCUS_TYPE_NOT_READY)
+ , __drawMarkerGuideline(false)
+ , __previewResolutionSize(PREVIEW_RESOLUTION_DEFAULT_SIZE)
+ , __remainedNumber(MAX_STORAGE_VALUE)
+ , __drawPopuptimer(false)
+ , __drawPopuptimerUpdate(false)
+ , __drawPopuptimerCount(INDEX_UNIT_ZERO)
+ , __drawSettingMenu(false)
+ , __drawSettingSubMenu(false)
+ , __drawFlashMenu(false)
+ , __drawRecordTimer(false)
+ , __drawZoom(false)
+ , __storageType(STORAGE_TYPE_PHONE)
+ , __recordTimeCount(0)
+ , __OverlayPanelMode(OVERLAY_PANEL_MODE_NORMAL)
+ , __frameRate(0)
+ , __currentPosition(Point(0, 0))
+ , __pCanvas(null)
+ , __buttonPoint(Point(0, 0))
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __pStorageInfoTimer(null)
+ , __storateTitle(L"")
+ , __pStorageTypeBitmap(null)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraInfoPanel::~CameraInfoPanel(void)
+{
+ AppLogDebug("ENTER");
+ if (__pStorageInfoTimer != null)
+ {
+ __pStorageInfoTimer->Cancel();
+
+ delete __pStorageInfoTimer;
+ __pStorageInfoTimer = null;
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraInfoPanel::Initialize(Tizen::Graphics::Rectangle rect)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return Panel::Construct(rect);
+}
+
+result
+CameraInfoPanel::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Form* pForm = static_cast<Form*>(GetParent());
+ __dir = pForm->GetOrientationStatus();
+ __pCanvas = GetCanvasN();
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CameraInfoPanel::OnDraw(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pCanvas != null, r = E_FAILURE, "__pCanvas is null");
+ __pCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ __pCanvas->Clear();
+
+ if (__drawMarkerFocus == true)
+ {
+ DrawMarkerFocus(__pCanvas);
+ }
+
+ if (__drawIndicator == true)
+ {
+ DrawIndicator(__pCanvas);
+ }
+
+ if (__drawMarkerGuideline == true)
+ {
+ DrawMarkerGuideline(__pCanvas);
+ }
+
+ if (__drawIndicatorStorageInfo == true)
+ {
+ UpdateUiIndicatorStorage(__pCanvas);
+ }
+
+ if (__drawPopuptimer == true)
+ {
+ DrawPopupTimer(__pCanvas);
+ }
+
+ if (__drawPopuptimerUpdate == true)
+ {
+ DrawPopupTimerUpdate(__pCanvas);
+ }
+
+ if (__drawSettingMenu == true)
+ {
+ DrawSettingMenuBackground(__pCanvas);
+ }
+
+ if (__drawFlashMenu == true)
+ {
+ DrawFlashMenuBackground(__pCanvas);
+ }
+
+ if (__drawRecordTimer == true)
+ {
+ DrawRecordTimer(__pCanvas);
+ }
+
+ if (__drawExposure == true)
+ {
+ DrawExposure(__pCanvas);
+ }
+
+ if (__drawZoom == true)
+ {
+ DrawZoom(__pCanvas);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ delete __pCanvas;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CameraInfoPanel::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Point pointTemporary;
+ pointTemporary = __currentPosition;
+ result r = E_SUCCESS;
+ if (orientationStatus != __dir)
+ {
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT
+ || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT, W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ {
+ if (__dir == ORIENTATION_STATUS_LANDSCAPE)
+ {
+ __currentPosition.x = H_PREVIEW_OVERLAY_LANDSCAPE - pointTemporary.y;
+ __currentPosition.y = pointTemporary.x;
+ }
+ else
+ {
+ __currentPosition.x = pointTemporary.y;
+ __currentPosition.y = W_PREVIEW_OVERLAY_LANDSCAPE - pointTemporary.x;
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_LANDSCAPE)
+ {
+ __currentPosition.x = pointTemporary.y;
+ __currentPosition.y = W_PREVIEW_OVERLAY_LANDSCAPE - pointTemporary.x;
+ }
+ else
+ {
+ __currentPosition.x = H_PREVIEW_OVERLAY_LANDSCAPE - pointTemporary.y;
+ __currentPosition.y = pointTemporary.x;
+ }
+ }
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE, W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ __currentPosition.x = pointTemporary.y;
+ __currentPosition.y = W_PREVIEW_OVERLAY_PORTRAIT - pointTemporary.x;
+ }
+ else
+ {
+ __currentPosition.x = H_PREVIEW_OVERLAY_PORTRAIT - pointTemporary.y;
+ __currentPosition.y = pointTemporary.x;
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ __currentPosition.x = H_PREVIEW_OVERLAY_PORTRAIT - pointTemporary.y;
+ __currentPosition.y = pointTemporary.x;
+ }
+ else
+ {
+ __currentPosition.x = pointTemporary.y;
+ __currentPosition.y = W_PREVIEW_OVERLAY_PORTRAIT - pointTemporary.x;
+ }
+ }
+ }
+ }
+ __dir = orientationStatus;
+
+ r = SetBounds(rect);
+ AppLogDebug("SetBounds() fail [%s] ", GetErrorMessage(r));
+ if (__pCanvas)
+ {
+ delete __pCanvas;
+ __pCanvas = null;
+ }
+ __pCanvas = GetCanvasN();
+
+ Invalidate(true);
+// Draw();
+// Show();
+ AppLogDebug("EXIT");
+}
+
+result
+CameraInfoPanel::DrawExposure(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Point ptPanelBar = Point(X_EXPOSURE_PANEL_BAR_LANDSCAPE, Y_EXPOSURE_PANEL_BAR_LANDSCAPE);
+ Point ptPanelLine = Point(X_EXPOSURE_PANEL_LINE_LANDSCAPE, Y_EXPOSURE_PANEL_LINE_LANDSCAPE);
+ Point ptButtomLevel = Point(X_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE, Y_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE);
+ Point ptTopLevel = Point(X_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE, Y_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE);
+ Point buttonPosition;
+ Rectangle rectBgPanel;
+ Canvas* pMyCanvas = null;
+
+ buttonPosition = __buttonPoint;
+
+ int resIdExposureBG = RESOURCE_ID_CAMERA_POPUP_EX;
+ int resIdExposureBar = RESOURCE_ID_CAMERA_POPUP_EXP_BAR;
+ int resIdExposureLine = RESOURCE_ID_CAMERA_POPUP_EX_LINE;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptPanelBar = Point(X_EXPOSURE_PANEL_BAR_PORTRAIT, Y_EXPOSURE_PANEL_BAR_PORTRAIT);
+ ptPanelLine = Point(X_EXPOSURE_PANEL_LINE_PORTRAIT, Y_EXPOSURE_PANEL_LINE_PORTRAIT);
+ ptButtomLevel = Point(X_EXPOSURE_PANEL_TOP_LEVEL_PORTRAIT, Y_EXPOSURE_PANEL_TOP_LEVEL_PORTRAIT);
+ ptTopLevel = Point(X_EXPOSURE_PANEL_BOTTOM_LEVEL_PORTRAIT, Y_EXPOSURE_PANEL_BOTTOM_LEVEL_PORTRAIT);
+ rectBgPanel = Rectangle(X_EXPOSURE_PANEL_SIDER_PORTRAIT, Y_EXPOSURE_PANEL_SIDER_PORTRAIT, W_EXPOSURE_PANEL_SIDER_PORTRAIT, H_EXPOSURE_PANEL_SIDER_PORTRAIT);
+
+ resIdExposureBG = RESOURCE_ID_CAMERA_POPUP_EXPOSURE_VER_BG;
+ resIdExposureBar = RESOURCE_ID_CAMERA_POPUP_EXP_BAR_VER;
+ resIdExposureLine = RESOURCE_ID_CAMERA_POPUP_EX_LINE_VER;
+ }
+ else
+ {
+ ptPanelBar = Point(X_EXPOSURE_PANEL_BAR_LANDSCAPE, Y_EXPOSURE_PANEL_BAR_LANDSCAPE);
+ ptPanelLine = Point(X_EXPOSURE_PANEL_LINE_LANDSCAPE, Y_EXPOSURE_PANEL_LINE_LANDSCAPE);
+ ptButtomLevel = Point(X_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE, Y_EXPOSURE_PANEL_BOTTOM_LEVEL_LANDSCAPE);
+ ptTopLevel = Point(X_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE, Y_EXPOSURE_PANEL_TOP_LEVEL_LANDSCAPE);
+ rectBgPanel = Rectangle(X_EXPOSURE_PANEL_SIDER_LANDSCAPE, Y_EXPOSURE_PANEL_SIDER_LANDSCAPE, W_EXPOSURE_PANEL_SIDER_LANDSCAPE, H_EXPOSURE_PANEL_SIDER_LANDSCAPE);
+
+ resIdExposureBG = RESOURCE_ID_CAMERA_POPUP_EX;
+ resIdExposureBar = RESOURCE_ID_CAMERA_POPUP_EXP_BAR;
+ resIdExposureLine = RESOURCE_ID_CAMERA_POPUP_EX_LINE;
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(resIdExposureBG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas = GetCanvasN(Rectangle(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvas->DrawBitmap(Point(X_EXPOSURE_PANEL_START, Y_EXPOSURE_PANEL_START), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_EXPOSIRE_1_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(ptTopLevel, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_EXPOSIRE_9_NOR);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(ptButtomLevel, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(resIdExposureBar);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(ptPanelBar, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(resIdExposureLine);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(ptPanelLine, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BUTTON_VER);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(buttonPosition, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::DrawIndicator(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = UpdateBatteryStatus(pCanvas);
+ r = UpdateStorageIcon(pCanvas);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CameraInfoPanel::DrawMarkerFocus(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Point pointFocus;
+ Canvas* pMyCanvas = null;
+
+ if (__drawMarkerFocusType == MAKER_FOCUS_TYPE_NOT_READY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_FOCUS_NOT_READY);
+ }
+ else if (__drawMarkerFocusType == MAKER_FOCUS_TYPE_READY)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_READY);
+ }
+ else if (__drawMarkerFocusType == MAKER_FOCUS_TYPE_FAIL)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_FOCUS_FIAL);
+ }
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__currentPosition.x <= (pBitmap->GetWidth() / DIVIDE_BY_TWO))
+ {
+ pointFocus.x = X_START_POSITION;
+ }
+ else if (__currentPosition.x <= (W_PREVIEW_OVERLAY_PORTRAIT - (pBitmap->GetWidth() / DIVIDE_BY_TWO)))
+ {
+ pointFocus.x = __currentPosition.x - (pBitmap->GetWidth() / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ pointFocus.x = (W_PREVIEW_OVERLAY_PORTRAIT - pBitmap->GetWidth());
+ }
+
+ if (__currentPosition.y <= (pBitmap->GetHeight() / DIVIDE_BY_TWO))
+ {
+ pointFocus.y = Y_START_POSITION;
+ }
+ else if (__currentPosition.y <= (H_PREVIEW_OVERLAY_PORTRAIT - (pBitmap->GetHeight() / DIVIDE_BY_TWO)))
+ {
+ pointFocus.y = __currentPosition.y - (pBitmap->GetHeight() / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ pointFocus.y = (H_PREVIEW_OVERLAY_PORTRAIT - pBitmap->GetHeight());
+ }
+ }
+ else
+ {
+ if (__currentPosition.x <= (pBitmap->GetWidth() / DIVIDE_BY_TWO))
+ {
+ pointFocus.x = X_START_POSITION;
+ }
+ else if (__currentPosition.x <= (W_PREVIEW_OVERLAY_LANDSCAPE - (pBitmap->GetWidth() / DIVIDE_BY_TWO)))
+ {
+ pointFocus.x = __currentPosition.x - (pBitmap->GetWidth() / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ pointFocus.x = (W_PREVIEW_OVERLAY_LANDSCAPE - pBitmap->GetWidth());
+ }
+
+ if (__currentPosition.y <= (pBitmap->GetHeight() / DIVIDE_BY_TWO))
+ {
+ pointFocus.y = Y_START_POSITION;
+ }
+ else if (__currentPosition.y <= (H_PREVIEW_OVERLAY_LANDSCAPE - (pBitmap->GetHeight() / DIVIDE_BY_TWO)))
+ {
+ pointFocus.y = __currentPosition.y - (pBitmap->GetHeight() / DIVIDE_BY_TWO);
+ }
+ else
+ {
+ pointFocus.y = (H_PREVIEW_OVERLAY_LANDSCAPE - pBitmap->GetHeight());
+ }
+ }
+
+ pMyCanvas = GetCanvasN(Rectangle(pointFocus.x, pointFocus.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvas->Clear();
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::DrawMarkerGuideline(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Canvas* pMyCanvas_Line_1 = null;
+ Canvas* pMyCanvas_Line_2 = null;
+ Canvas* pMyCanvas_Line_3 = null;
+ Canvas* pMyCanvas_Line_4 = null;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ pMyCanvas_Line_1 = GetCanvasN(Rectangle(X_GUIDELINE_VER_LINE_LEFT_START_POS_PORTRAIT, Y_GUIDELINE_VER_LINE_LEFT_START_POS_PORTRAIT, X_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN, Y_GUIDELINE_VER_LINE_LEFT_END_POS_PORTRAIT));
+ pMyCanvas_Line_2 = GetCanvasN(Rectangle(X_GUIDELINE_VER_LINE_RIGHT_START_POS_PORTRAIT, Y_GUIDELINE_VER_LINE_RIGHT_START_POS_PORTRAIT, X_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN, Y_GUIDELINE_VER_LINE_RIGHT_END_POS_PORTRAIT));
+ pMyCanvas_Line_3 = GetCanvasN(Rectangle(X_GUIDELINE_HOR_LINE_TOP_START_POS_PORTRAIT, Y_GUIDELINE_HOR_LINE_TOP_START_POS_PORTRAIT, X_GUIDELINE_HOR_LINE_TOP_END_POS_PORTRAIT, Y_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN));
+ pMyCanvas_Line_4 = GetCanvasN(Rectangle(X_GUIDELINE_HOR_LINE_BOTTOM_START_POS_PORTRAIT, Y_GUIDELINE_HOR_LINE_BOTTOM_START_POS_PORTRAIT, X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_PORTRAIT, Y_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN));
+
+ pMyCanvas_Line_1->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_2->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_3->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_4->SetForegroundColor(COLOR_GUIDELINE);
+
+ pMyCanvas_Line_1->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_START_POSITION, Y_GUIDELINE_VER_LINE_LEFT_END_POS_PORTRAIT));
+ pMyCanvas_Line_2->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_START_POSITION, Y_GUIDELINE_VER_LINE_RIGHT_END_POS_PORTRAIT));
+ pMyCanvas_Line_3->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_GUIDELINE_HOR_LINE_TOP_END_POS_PORTRAIT, Y_START_POSITION));
+ pMyCanvas_Line_4->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_PORTRAIT, Y_START_POSITION));
+ }
+ else
+ {
+ pMyCanvas_Line_1 = GetCanvasN(Rectangle(X_GUIDELINE_VER_LINE_LEFT_START_POS_LANDSCAPE, Y_GUIDELINE_VER_LINE_LEFT_START_POS_LANDSCAPE, X_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN, Y_GUIDELINE_VER_LINE_LEFT_END_POS_LANDSCAPE));
+ pMyCanvas_Line_2 = GetCanvasN(Rectangle(X_GUIDELINE_VER_LINE_RIGHT_START_POS_LANDSCAPE, Y_GUIDELINE_VER_LINE_RIGHT_START_POS_LANDSCAPE, X_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN, Y_GUIDELINE_VER_LINE_RIGHT_END_POS_LANDSCAPE));
+ pMyCanvas_Line_3 = GetCanvasN(Rectangle(X_GUIDELINE_HOR_LINE_TOP_START_POS_LANDSCAPE, Y_GUIDELINE_HOR_LINE_TOP_START_POS_LANDSCAPE, X_GUIDELINE_HOR_LINE_TOP_END_POS_LANDSCAPE, Y_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN));
+ pMyCanvas_Line_4 = GetCanvasN(Rectangle(X_GUIDELINE_HOR_LINE_BOTTOM_START_POS_LANDSCAPE, Y_GUIDELINE_HOR_LINE_BOTTOM_START_POS_LANDSCAPE, X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_LANDSCAPE, Y_GUIDELINE_VER_LINE_LEFT_END_POS_MARGIN));
+
+ pMyCanvas_Line_1->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_2->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_3->SetForegroundColor(COLOR_GUIDELINE);
+ pMyCanvas_Line_4->SetForegroundColor(COLOR_GUIDELINE);
+
+ pMyCanvas_Line_1->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_START_POSITION, Y_GUIDELINE_VER_LINE_LEFT_END_POS_LANDSCAPE));
+ pMyCanvas_Line_2->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_START_POSITION, Y_GUIDELINE_VER_LINE_RIGHT_END_POS_LANDSCAPE));
+ pMyCanvas_Line_3->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_GUIDELINE_HOR_LINE_TOP_END_POS_LANDSCAPE, Y_START_POSITION));
+ pMyCanvas_Line_4->DrawLine(Point(X_START_POSITION, Y_START_POSITION), Point(X_GUIDELINE_HOR_LINE_BOTTOM_END_POS_LANDSCAPE, Y_START_POSITION));
+ }
+
+ delete pMyCanvas_Line_1;
+ delete pMyCanvas_Line_2;
+ delete pMyCanvas_Line_3;
+ delete pMyCanvas_Line_4;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CameraInfoPanel::DrawPopupTimer(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Canvas* pMyCanvas= null;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_TIMER_POPUP);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ pMyCanvas = GetCanvasN(Rectangle((rect.width / DIVIDE_BY_TWO) - (pBitmap->GetWidth() / DIVIDE_BY_TWO), (rect.height / DIVIDE_BY_TWO) - (pBitmap->GetHeight() / DIVIDE_BY_TWO), pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::DrawPopupTimerUpdate(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Font font;
+ Point point;
+ int timerCnt = 0;
+ String strTemp = L"";
+ Dimension dim;
+ Bitmap* pBitmap = null;
+ Rectangle rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ Canvas* pMyCanvas = null;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_PORTRAIT, Y_PREVIEW_OVERLAY_PORTRAIT,
+ W_PREVIEW_OVERLAY_PORTRAIT, H_PREVIEW_OVERLAY_PORTRAIT);
+ }
+ else
+ {
+ rect = Rectangle(X_PREVIEW_OVERLAY_LANDSCAPE, Y_PREVIEW_OVERLAY_LANDSCAPE,
+ W_PREVIEW_OVERLAY_LANDSCAPE, H_PREVIEW_OVERLAY_LANDSCAPE);
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_TIMER_POPUP);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ pMyCanvas = GetCanvasN(Rectangle((rect.width / DIVIDE_BY_TWO) - (pBitmap->GetWidth() / DIVIDE_BY_TWO), (rect.height / DIVIDE_BY_TWO) - (pBitmap->GetHeight() / DIVIDE_BY_TWO), pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+
+ delete pBitmap;
+ pBitmap = null;
+
+ timerCnt = __drawPopuptimerCount;
+
+ rect = pMyCanvas->GetBounds();
+ font.Construct(FONT_STYLE_BOLD, FONT_SIZE_SETTING_MENU_TITLE);
+
+ r = font.GetTextExtent(strTemp, strTemp.GetLength(), dim);
+ TryCatch(r == E_SUCCESS, , "Canvas GetTextExtent() fail[%s]", GetErrorMessage(r));
+
+ r = pMyCanvas->SetFont(font);
+ TryCatch(r == E_SUCCESS, , "Canvas SetFont() fail[%s]", GetErrorMessage(r));
+
+ pMyCanvas->SetForegroundColor(COLOR_TIMER_TEXT);
+
+ point.x = (rect.width / DIVIDE_BY_TWO) - (dim.width / DIVIDE_BY_TWO);
+ point.y = (rect.height/ DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO);
+
+ if (timerCnt >= UNIT_TEN)
+ {
+ point.x = point.x + H_TIMER_TITLE_TOP_MARGIN;
+ }
+ else
+ {
+ point.x = point.x + H_TIMER_TITLE_TOP_MARGIN_TENLESS;
+ }
+
+ AppLogDebug("TimeCount = %d", timerCnt);
+
+ r = strTemp.Format(UI_POPUP_TIMER_UPDATE_BUFFER_LEN, L"%d", timerCnt);
+ TryCatch(r == E_SUCCESS, , "String Format() fail[%s]", GetErrorMessage(r));
+
+ r = pMyCanvas->DrawText(point, strTemp);
+ TryCatch(r == E_SUCCESS, , "Canvas DrawText() fail[%s]", GetErrorMessage(r));
+
+ delete pMyCanvas;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ delete pMyCanvas;
+
+ return r;
+}
+
+result
+CameraInfoPanel::DrawSettingMenuBackground(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Rectangle rectPanel = Rectangle(X_SETTING_MENU_MAIN_PANEL_LANDSCAPE, Y_SETTING_MENU_MAIN_PANEL_LANDSCAPE, W_SETTING_MENU_MAIN_PANEL_LANDSCAPE, H_SETTING_MENU_MAIN_PANEL_LANDSCAPE);
+ Rectangle rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_LANDSCAPE, Y_SETTING_MENU_BG_IMG_LANDSCAPE, W_SETTING_MENU_BG_IMG_LANDSCAPE, H_SETTING_MENU_BG_IMG_LANDSCAPE);
+ Point ptAnker;
+ Point ptTitle;
+ Font fnt;
+ Dimension dim;
+ Canvas* pMyCanvas = null;
+ Canvas* pMyCanvasAnker = null;
+ String strTitle;
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ int resId = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(X_SETTING_MENU_MAIN_PANEL_PORTRAIT, Y_SETTING_MENU_MAIN_PANEL_PORTRAIT, W_SETTING_MENU_MAIN_PANEL_PORTRAIT, H_SETTING_MENU_MAIN_PANEL_PORTRAIT);
+ rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT);
+ ptAnker = Point(X_SETTING_MENU_ANKER_PORTRAIT + X_SETTING_MENU_ANKER_MARGIN, Y_SETTING_MENU_ANKER_PORTRAIT);
+ resId = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER_VER;
+ }
+ else
+ {
+ rectPanel = Rectangle(X_SETTING_MENU_MAIN_PANEL_LANDSCAPE, Y_SETTING_MENU_MAIN_PANEL_LANDSCAPE, W_SETTING_MENU_MAIN_PANEL_LANDSCAPE, H_SETTING_MENU_MAIN_PANEL_LANDSCAPE);
+ rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_LANDSCAPE, Y_SETTING_MENU_BG_IMG_LANDSCAPE, W_SETTING_MENU_BG_IMG_LANDSCAPE, H_SETTING_MENU_BG_IMG_LANDSCAPE);
+ ptAnker = Point(X_SETTING_MENU_ANKER_LANDSCAPE, Y_SETTING_MENU_ANKER_LANDSCAPE);
+ resId = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER;
+ }
+
+ if (__currentMode != CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanelBG = Rectangle(X_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT, Y_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT, W_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT, H_CAMCORDER_SETTING_MENU_BG_IMG_PORTRAIT);
+ ptAnker = Point(X_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT + X_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT_MARGIN, Y_CAMCORDER_SETTING_MENU_ANKER_PORTRAIT);
+ }
+ else
+ {
+ rectPanelBG = Rectangle(X_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE, Y_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE, W_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE, H_CAMCORDER_SETTING_MENU_BG_IMG_LANDSCAPE);
+ ptAnker = Point(X_CAMCORDER_SETTING_MENU_ANKER_LANDSCAPE, Y_CAMCORDER_SETTING_MENU_ANKER_LANDSCAPE);
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_PORTRAIT, Y_SETTING_MENU_BG_IMG_PORTRAIT, W_SETTING_MENU_BG_IMG_PORTRAIT, H_SETTING_MENU_BG_IMG_PORTRAIT);
+ ptAnker = Point(X_SETTING_MENU_ANKER_PORTRAIT + X_SETTING_MENU_ANKER_MARGIN, Y_SETTING_MENU_ANKER_PORTRAIT);
+ }
+ else
+ {
+ rectPanelBG = Rectangle(X_SETTING_MENU_BG_IMG_LANDSCAPE, Y_SETTING_MENU_BG_IMG_LANDSCAPE + Y_SETTING_MENU_BG_IMG_LANDSCAPE_MARGIN, W_SETTING_MENU_BG_IMG_LANDSCAPE, H_SETTING_MENU_BG_IMG_LANDSCAPE);
+ ptAnker = Point(X_SETTING_MENU_ANKER_LANDSCAPE, Y_SETTING_MENU_ANKER_LANDSCAPE + Y_SETTING_MENU_ANKER_LANDSCAPE_MARGIN);
+ }
+ }
+
+ pMyCanvas = GetCanvasN(rectPanelBG);
+ pMyCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_OPTION_POPUP_BG_9_);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap != null");
+
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ Rectangle rect = rectPanelBG;
+ rect.x = X_START_POSITION;
+ rect.y = Y_START_POSITION;
+ pMyCanvas->DrawNinePatchedBitmap(rect, *pBitmap);
+ }
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pAppResource->GetString(IDS_CAM_BODY_SETTINGS, strTitle);
+
+ fnt.Construct(FONT_STYLE_PLAIN, FONT_SIZE_SETTING_MENU_TITLE);
+ fnt.GetTextExtent(strTitle, strTitle.GetLength(), dim);
+
+ ptTitle.x = X_MENU_TITLE_MARGIN; //rectPanelBG.x + X_MENU_TITLE_MARGIN;
+
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_RECORD)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + rectPanelBG.y - H_SETTING_MENU_TEXT_MARGIN;
+ }
+ else
+ {
+ AppLogDebug("Before ptTitle.y = %d, rectPanelBG.y = %d", ptTitle.y , rectPanelBG.y);
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + H_SETTING_MENU_PANEL_MARGIN;
+
+ AppLogDebug("After ptTitle.y = %d", ptTitle.y );
+ }
+ }
+ else
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + rectPanelBG.y - H_SETTING_MENU_TEXT_MARGIN;
+ }
+ else
+ {
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + rectPanelBG.y - Y_SETTING_MENU_BG_IMG_LANDSCAPE_MARGIN;
+ }
+ }
+
+ pMyCanvas->SetFont(fnt);
+ pMyCanvas->SetForegroundColor(COLOR_TITLE);
+ pMyCanvas->DrawText(ptTitle, strTitle);
+
+ pMyCanvasAnker = GetCanvasN(rectPanel);
+ pMyCanvasAnker->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+
+ pBitmap = ResourceManager::GetBitmapN(resId);
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap != null");
+
+ pMyCanvasAnker->DrawBitmap(ptAnker, *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+ delete pMyCanvasAnker;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::DrawFlashMenuBackground(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rectPanel = Rectangle(X_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,Y_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,W_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,H_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE);
+ Rectangle rectPanelBG = Rectangle(X_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, Y_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, W_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, H_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE);
+ Point ptAnker = Point(X_FLASH_MODE_SETTING_ANKER_LANDSCAPE, Y_FLASH_MODE_SETTING_ANKER_LANDSCAPE);
+ Bitmap* pBitmap = null;
+ Point ptTitle;
+ Font fnt;
+ Dimension dim;
+ String strTitle;
+ int resID = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rectPanel = Rectangle(X_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT,Y_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT,W_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT,H_FLASH_MODE_SETTING_PANEL_RECT_PORTRAIT);
+ rectPanelBG = Rectangle(X_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT, Y_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT, W_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT, H_FLASH_MODE_SETTING_PANEL_BG_RECT_PORTRAIT);
+ ptAnker = Point(X_FLASH_MODE_SETTING_ANKER_PORTRAIT, Y_FLASH_MODE_SETTING_ANKER_PORTRAIT);
+ resID = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER_VER;
+ }
+ else
+ {
+ rectPanel = Rectangle(X_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,Y_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,W_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE,H_FLASH_MODE_SETTING_PANEL_RECT_LANDSCAPE);
+ rectPanelBG = Rectangle(X_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, Y_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, W_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE, H_FLASH_MODE_SETTING_PANEL_BG_RECT_LANDSCAPE);
+ ptAnker = Point(X_FLASH_MODE_SETTING_ANKER_LANDSCAPE, Y_FLASH_MODE_SETTING_ANKER_LANDSCAPE);
+ resID = RESOURCE_ID_CAMERA_OPTION_POPUP_ANKER;
+ }
+
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ pAppResource->GetString(IDS_CAM_BODY_SETTINGS, strTitle);
+
+ fnt.Construct(FONT_STYLE_PLAIN, FONT_SIZE_SETTING_MENU_TITLE);
+ fnt.GetTextExtent(strTitle, strTitle.GetLength(), dim);
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_OPTION_POPUP_BG_9_);
+ TryCatch(pBitmap != null, r = E_FAILURE, "Bitmap is null");
+
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas->DrawNinePatchedBitmap(rectPanelBG, *pBitmap);
+ }
+
+ delete pBitmap;
+ pBitmap = null;
+
+ ptTitle.x = rectPanelBG.x + X_MENU_TITLE_MARGIN;
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + rectPanelBG.y;
+
+ pCanvas->SetFont(fnt);
+ pCanvas->SetForegroundColor(COLOR_TITLE);
+ pCanvas->DrawText(ptTitle, strTitle);
+
+ pBitmap = ResourceManager::GetBitmapN(resID);
+ TryCatch(pBitmap != null, r = E_FAILURE, "Bitmap is null");
+ pCanvas->DrawBitmap(ptAnker, *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::DrawRecordTimer(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Canvas* pMyCanvasHourDeca = null;
+ Canvas* pMyCanvasHour = null;
+ Canvas* pMyCanvasMinDeca = null;
+ Canvas* pMyCanvasMin = null;
+ Canvas* pMyCanvasSecDeca = null;
+ Canvas* pMyCanvasSec = null;
+ Canvas* pMyCanvasConlon = null;
+ Canvas* pMyCanvasConlon2 = null;
+ Canvas* pMyCanvasRecIcon = null;
+
+ Point ptHourDeca;
+ Point ptHour;
+ Point ptMinDeca;
+ Point ptMin;
+ Point ptSecDeca;
+ Point ptSec;
+ Point ptConlon;
+ Point ptConlon2;
+ Point ptRecIcon;
+
+ int timeCnt = 0;
+ int hour = 0;
+ int min = 0;
+ int sec = 0;
+ int calHourDeca = 0;
+ int calHour = 0;
+ int calMinDeca = 0;
+ int calMin = 0;
+ int calSecDeca = 0;
+ int calSec = 0;
+
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ return r;
+ }
+
+ timeCnt = __recordTimeCount;
+
+ hour = timeCnt / SECONDS_PER_HOUR;
+ min = (timeCnt % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE;
+ sec = timeCnt % SECONDS_PER_MINUTE;
+
+ calHourDeca = hour / UNIT_TEN;
+ calHour = hour % UNIT_TEN;
+ calMinDeca = min / UNIT_TEN;
+ calMin = min % UNIT_TEN;
+ calSecDeca = sec / UNIT_TEN;
+ calSec = sec % UNIT_TEN;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptRecIcon = Point(X_INDICATOR_REC_ICON_PORTRAIT, Y_INDICATOR_REC_ICON_PORTRAIT);
+ ptHourDeca = Point(X_INDICATOR_TIMER_HOUR_1_PORTRAIT, Y_INDICATOR_TIMER_HOUR_1_PORTRAIT);
+ ptHour = Point(X_INDICATOR_TIMER_HOUR_2_PORTRAIT, Y_INDICATOR_TIMER_HOUR_2_PORTRAIT);
+ ptConlon = Point(X_INDICATOR_TIMER_CONLON_1_PORTRAIT, Y_INDICATOR_TIMER_CONLON_1_PORTRAIT);
+ ptMinDeca = Point(X_INDICATOR_TIMER_MINUTE_1_PORTRAIT, Y_INDICATOR_TIMER_MINUTE_1_PORTRAIT);
+ ptMin = Point(X_INDICATOR_TIMER_MINUTE_2_PORTRAIT, Y_INDICATOR_TIMER_MINUTE_2_PORTRAIT);
+ ptConlon2 = Point(X_INDICATOR_TIMER_CONLON_2_PORTRAIT, Y_INDICATOR_TIMER_CONLON_2_PORTRAIT);
+ ptSecDeca= Point(X_INDICATOR_TIMER_SEC_1_PORTRAIT, Y_INDICATOR_TIMER_SEC_1_PORTRAIT);
+ ptSec = Point(X_INDICATOR_TIMER_SEC_2_PORTRAIT, Y_INDICATOR_TIMER_SEC_2_PORTRAIT);
+ }
+ else
+ {
+ ptRecIcon = Point(X_INDICATOR_REC_ICON_LANDSCAPE, Y_INDICATOR_REC_ICON_LANDSCAPE);
+ ptHourDeca = Point(X_INDICATOR_TIMER_HOUR_1_LANDSCAPE, Y_INDICATOR_TIMER_HOUR_1_LANDSCAPE);
+ ptHour = Point(X_INDICATOR_TIMER_HOUR_2_LANDSCAPE, Y_INDICATOR_TIMER_HOUR_2_LANDSCAPE);
+ ptConlon = Point(X_INDICATOR_TIMER_CONLON_1_LANDSCAPE, Y_INDICATOR_TIMER_CONLON_1_LANDSCAPE);
+ ptMinDeca = Point(X_INDICATOR_TIMER_MINUTE_1_LANDSCAPE, Y_INDICATOR_TIMER_MINUTE_1_LANDSCAPE);
+ ptMin = Point(X_INDICATOR_TIMER_MINUTE_2_LANDSCAPE, Y_INDICATOR_TIMER_MINUTE_2_LANDSCAPE);
+ ptConlon2 = Point(X_INDICATOR_TIMER_CONLON_2_LANDSCAPE, Y_INDICATOR_TIMER_CONLON_2_LANDSCAPE);
+ ptSecDeca = Point(X_INDICATOR_TIMER_SEC_1_LANDSCAPE, Y_INDICATOR_TIMER_SEC_1_LANDSCAPE);
+ ptSec = Point(X_INDICATOR_TIMER_SEC_2_LANDSCAPE, Y_INDICATOR_TIMER_SEC_2_LANDSCAPE);
+ }
+
+ if (((++timeCnt) % FRAME_RATE) == 0)
+ {
+ __frameRate = 0;
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_REC);
+ pMyCanvasHourDeca = GetCanvasN(Rectangle(ptRecIcon.x, ptRecIcon.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasHourDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasHourDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calHourDeca);
+ pMyCanvasHour = GetCanvasN(Rectangle(ptHourDeca.x, ptHourDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasHour->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasHour->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calHour);
+ pMyCanvasMinDeca = GetCanvasN(Rectangle(ptHour.x, ptHour.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasMinDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasMinDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_10);
+ pMyCanvasMin = GetCanvasN(Rectangle(ptConlon.x, ptConlon.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasMin->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasMin->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calMinDeca);
+ pMyCanvasSecDeca = GetCanvasN(Rectangle(ptMinDeca.x, ptMinDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasSecDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasSecDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calMin);
+ pMyCanvasSec = GetCanvasN(Rectangle(ptMin.x, ptMin.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasSec->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasSec->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_10);
+ pMyCanvasConlon = GetCanvasN(Rectangle(ptConlon2.x, ptConlon2.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasConlon->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasConlon->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calSecDeca);
+ pMyCanvasConlon2 = GetCanvasN(Rectangle(ptSecDeca.x, ptSecDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasConlon2->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasConlon2->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calSec);
+ pMyCanvasRecIcon = GetCanvasN(Rectangle(ptSec.x, ptSec.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasRecIcon->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasRecIcon->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ delete pMyCanvasHourDeca;
+ delete pMyCanvasHour;
+ delete pMyCanvasMinDeca;
+ delete pMyCanvasMin;
+ delete pMyCanvasSecDeca;
+ delete pMyCanvasSec;
+ delete pMyCanvasConlon;
+ delete pMyCanvasConlon2;
+ delete pMyCanvasRecIcon;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CameraInfoPanel::DrawZoom(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Point ptPanelBar = Point(X_ZOOM_PANEL_BAR_LANDSCAPE, Y_ZOOM_PANEL_BAR_LANDSCAPE);
+ Point ptPanelLine = Point(X_ZOOM_PANEL_LINE_LANDSCAPE, Y_ZOOM_PANEL_LINE_LANDSCAPE);
+ Point ptButtomLevel = Point(X_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE, Y_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE);
+ Point ptTopLevel = Point(X_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE, Y_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE);
+ Point ptPanelStart = Point(X_ZOOM_PANEL_START_LANDSCAPE, Y_ZOOM_PANEL_START_LANDSCAPE);
+ int resIdZoomBG = RESOURCE_ID_CAMERA_POPUP_ZOOM;
+ int resIdZoomBar = RESOURCE_ID_CAMERA_POPUP_ZOOM_BAR;
+ Font* pFnt = null;
+ Point buttonPosition;
+ Bitmap* pBitmap = null;
+ Canvas* pMyCanvas = null;
+
+ buttonPosition = __buttonPoint;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptPanelBar = Point(X_ZOOM_PANEL_BAR_PORTRAIT, Y_ZOOM_PANEL_BAR_PORTRAIT);
+ ptPanelLine = Point(X_ZOOM_PANEL_LINE_PORTRAIT, Y_ZOOM_PANEL_LINE_PORTRAIT);
+ ptButtomLevel = Point(X_ZOOM_PANEL_TOP_LEVEL_PORTRAIT, Y_ZOOM_PANEL_TOP_LEVEL_PORTRAIT);
+ ptTopLevel = Point(X_ZOOM_PANEL_BOTTOM_LEVEL_PORTRAIT, Y_ZOOM_PANEL_BOTTOM_LEVEL_PORTRAIT);
+ ptPanelStart = Point(X_ZOOM_PANEL_START_PORTRAIT, Y_ZOOM_PANEL_START_PORTRAIT);
+ resIdZoomBG = RESOURCE_ID_CAMERA_POPUP_ZOOM_VER;
+ resIdZoomBar = RESOURCE_ID_CAMERA_POPUP_ZOOM_BAR_VER;
+ }
+ else
+ {
+ ptPanelBar = Point(X_ZOOM_PANEL_BAR_LANDSCAPE, Y_ZOOM_PANEL_BAR_LANDSCAPE);
+ ptPanelLine = Point(X_ZOOM_PANEL_LINE_LANDSCAPE, Y_ZOOM_PANEL_LINE_LANDSCAPE);
+ ptButtomLevel = Point(X_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE, Y_ZOOM_PANEL_BOTTOM_LEVEL_LANDSCAPE);
+ ptTopLevel = Point(X_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE, Y_ZOOM_PANEL_TOP_LEVEL_LANDSCAPE);
+ ptPanelStart = Point(X_ZOOM_PANEL_START_LANDSCAPE, Y_ZOOM_PANEL_START_LANDSCAPE);
+ resIdZoomBG = RESOURCE_ID_CAMERA_POPUP_ZOOM;
+ resIdZoomBar = RESOURCE_ID_CAMERA_POPUP_ZOOM_BAR;
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(resIdZoomBG);
+ TryCatch(pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas = GetCanvasN(Rectangle(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvas->DrawBitmap(ptPanelStart, *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pFnt = new (std::nothrow) Font();
+ pFnt->Construct(FONT_STYLE_PLAIN, FONT_SIZE_ZOOM_LEVEL_FREE_SPACE);
+
+ pMyCanvas->SetFont(*pFnt);
+ pMyCanvas->SetForegroundColor(COLOR_TITLE);
+
+ r = pMyCanvas->DrawText(ptTopLevel, String(L"X4"));
+ TryCatch(r == E_SUCCESS, , "pCanvas::DrawText() fail[%s]", GetErrorMessage(r));
+
+ r = pMyCanvas->DrawText(ptButtomLevel, String(L"X1"));
+ TryCatch(r == E_SUCCESS, , "pCanvas::DrawText() fail[%s]", GetErrorMessage(r));
+
+ pBitmap = ResourceManager::GetBitmapN(resIdZoomBar);
+ TryCatch( pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(ptPanelBar, *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_BUTTON_VER);
+ TryCatch( pBitmap != null, r = E_SYSTEM, "pBitmap is null");
+
+ pMyCanvas->DrawBitmap(buttonPosition, *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pFnt;
+ pFnt = null;
+
+ delete pMyCanvas;
+ pMyCanvas = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pFnt;
+ pFnt = null;
+
+ delete pMyCanvas;
+ pMyCanvas = null;
+
+ return r;
+}
+
+bool
+CameraInfoPanel::GetDrawExposure(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __drawExposure;
+}
+
+int
+CameraInfoPanel::GetRemainedPhoto(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __remainedNumber;
+}
+
+bool
+CameraInfoPanel::GetDrawPopupTimer(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __drawPopuptimer;
+}
+
+bool
+CameraInfoPanel::GetDrawZoom(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __drawZoom;
+}
+
+void
+CameraInfoPanel::SetCurrentMode(int mode)
+{
+ AppLogDebug("ENTER");
+ __currentMode = mode;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetButtonPoint(const Tizen::Graphics::Point& pt)
+{
+ AppLogDebug("ENTER");
+ __buttonPoint = pt;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawExposure(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawExposure = status;
+
+ __drawSettingMenu = false;
+ __drawFlashMenu = false;
+ __drawZoom = false;
+
+ if (status == false)
+ {
+ SetButtonPoint(Point(0, 0));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawIndicator(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawIndicator = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawIndicatorStroageInfo(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawIndicatorStorageInfo = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetStorageTitle(Tizen::Base::String& title)
+{
+ AppLogDebug("ENTER");
+ __storateTitle = title;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawMarkerFocus(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawMarkerFocus = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawMarkerFocusType(int type)
+{
+ AppLogDebug("ENTER");
+ __drawMarkerFocusType = type;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawMarkerGuideline(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawMarkerGuideline = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetPreviewResolutionSize(int size)
+{
+ AppLogDebug("ENTER");
+ __previewResolutionSize = size;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetRemainedPhoto(int cnt)
+{
+ AppLogDebug("ENTER");
+ __remainedNumber = cnt;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawPopupTimer(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawPopuptimer = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawPopupTimerUpdate(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawPopuptimerUpdate = status;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawPopupTimerCount(int cnt)
+{
+ AppLogDebug("ENTER");
+ __drawPopuptimerCount = cnt;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawSettingMenuBackground(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawSettingMenu = status;
+
+ __drawSettingSubMenu = false;
+ __drawFlashMenu = false;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawFlashMenuBackground(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawFlashMenu = status;
+
+ __drawSettingMenu = false;
+ __drawSettingSubMenu = false;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawRecordTimer(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawRecordTimer = status;
+ __recordTimeCount = 0;
+ __frameRate = 0;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetDrawZoom(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawZoom = status;
+
+ __drawExposure = false;
+ __drawSettingMenu = false;
+ __drawSettingSubMenu = false;
+ __drawFlashMenu = false;
+
+ if (status == false)
+ {
+ SetButtonPoint(Point(X_ZERO_POINT, Y_ZERO_POINT));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetStorageType(int type)
+{
+ AppLogDebug("ENTER");
+ if ((__pStorageTypeBitmap == null) || (__storageType != type))
+ {
+ __storageType = type;
+ if (__storageType == STORAGE_TYPE_PHONE)
+ {
+ __pStorageTypeBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_STORAGE_IN);
+ }
+ else
+ {
+ __pStorageTypeBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_STORAGE_T_FLASH);
+ }
+ TryReturnVoid(__pStorageTypeBitmap != null, "pBitmap is null");
+ }
+ else
+ {
+ AppLogDebug("SetStorageType :: __pStorageTypeBitmap is the same");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetOverlayPanelMode(int mode)
+{
+ AppLogDebug("ENTER");
+ __OverlayPanelMode = mode;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::StartCheckStorageInfo(void)
+{
+ AppLogDebug("ENTER");
+ int previewResolutionSize = 0;
+ long long availableStorageSpace = 0;
+ int remainedNum = 0;
+ String strTemp = L"";
+
+ availableStorageSpace = CameraPresentationModel::GetInstance()->GetAvailableStorageSpace();
+
+ if (availableStorageSpace != STORAGE_VALUE_ZERO)
+ {
+ previewResolutionSize = __previewResolutionSize;
+
+ if (previewResolutionSize != STORAGE_VALUE_ZERO)
+ {
+ remainedNum = availableStorageSpace / previewResolutionSize;
+ }
+
+ SetRemainedPhoto(remainedNum);
+
+ AppLogDebug("remainedNum = %d", remainedNum);
+
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ SetStorageTitle(strTemp);
+
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ if (remainedNum >= STORAGE_VALUE_ZERO && remainedNum <= STORAGE_DISPLAY_PLACE)
+ {
+ SetDrawIndicatorStroageInfo(true);
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ }
+ else
+ {
+ if (remainedNum >= STORAGE_VALUE_ZERO && remainedNum <= STORAGE_DISPLAY_PLACE)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__OverlayPanelMode == OVERLAY_PANEL_MODE_FULL)
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(true);
+ }
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(true);
+ }
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetTimeCount(int cnt)
+{
+ AppLogDebug("ENTER");
+ __recordTimeCount = cnt;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ AppLogDebug("ENTER");
+
+ if (timer.Equals(*__pStorageInfoTimer))
+ {
+ StartCheckStorageInfo();
+
+ Invalidate(true);
+ __frameRate++;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::StartCheckStorageInfoTimer(void)
+{
+ AppLogDebug("ENTER");
+ if (__pStorageInfoTimer == null)
+ {
+ __pStorageInfoTimer = new (std::nothrow) Timer();
+ __pStorageInfoTimer->Construct(*this);
+ }
+
+ __pStorageInfoTimer->Cancel();
+ __pStorageInfoTimer->StartAsRepeatable(CAMERA_TIMER_BATTERY);
+ AppLogDebug("EXIT");
+}
+
+result
+CameraInfoPanel::EndCheckStorageInfoTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pStorageInfoTimer != null, r = E_SYSTEM, "__pStorageInfoTimer is null");
+
+ r = __pStorageInfoTimer->Cancel();
+ delete __pStorageInfoTimer;
+ __pStorageInfoTimer = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::UpdateBatteryStatus(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ result r = E_SUCCESS;
+ Point ptBattIcon = Point(X_INDICATOR_BATTERY_LANDSCAPE, Y_INDICATOR_BATTERY_LANDSCAPE);
+ Canvas* pMyCanvas = null;
+
+ int battState = BATT_LEVEL_EMPTY;
+ bool isCharging = false;
+
+ if (__drawIndicator == true)
+ {
+ TryCatch(pCanvas != null, r = E_FAILURE, "pCanvas is null");
+
+ Battery::IsCharging(isCharging);
+ Battery::GetCurrentLevelInPercentage(battState);
+
+ if (isCharging)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_CHARGE);
+ }
+ else
+ {
+ if (battState == BATT_LEVEL_FULL)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_FULL);
+ }
+ else if (battState >= BATT_LEVEL_5 && battState < BATT_LEVEL_FULL)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_05);
+ }
+ else if (battState >= BATT_LEVEL_4 && battState < BATT_LEVEL_5)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_04);
+ }
+ else if (battState >= BATT_LEVEL_3 && battState < BATT_LEVEL_4)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_03);
+ }
+ else if (battState >= BATT_LEVEL_2 && battState < BATT_LEVEL_3)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_02);
+ }
+ else if (battState >= BATT_LEVEL_1 && battState < BATT_LEVEL_2)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_01);
+ }
+ else if (battState >= BATT_LEVEL_EMPTY && battState < BATT_LEVEL_1)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_00);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptBattIcon = Point(X_INDICATOR_BATTERY_PORTRAIT, Y_INDICATOR_BATTERY_PORTRAIT);
+ }
+ else
+ {
+ ptBattIcon = Point(X_INDICATOR_BATTERY_LANDSCAPE, Y_INDICATOR_BATTERY_LANDSCAPE);
+ }
+
+ pMyCanvas = GetCanvasN(Rectangle(ptBattIcon.x, ptBattIcon.y, W_INDICATOR, H_INDICATOR));
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::UpdateStorageIcon(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point ptStorageIcon = Point(X_INDICATOR_STORAGE_LANDSCAPE, Y_INDICATOR_STORAGE_LANDSCAPE);
+ Canvas* pMyCanvas = null;
+ int storageType = STORAGE_TYPE_PHONE;
+ int storageCardState = CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT;
+
+ TryCatch(pCanvas != null, r = E_FAILURE, "pCanvas is null");
+
+ storageCardState = CameraPresentationModel::GetInstance()->GetStorageCardState();
+
+ r = CameraPresentationModel::GetInstance()->GetValue(STORAGE_TYPE, storageType);
+ if (r != E_SUCCESS)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+ }
+
+ switch (storageCardState)
+ {
+ case CameraPresentationModel::STORAGE_CARD_STATE_UNMOUNT:
+ {
+ AppLogDebug("UpdateStorageIcon :: STORAGE_CARD_STATE_UNMOUNT");
+ if (storageType == STORAGE_TYPE_PHONE && CameraPresentationModel::GetInstance()->IsStorageCardMounted() == false)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+
+ r = CameraPresentationModel::GetInstance()->SetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ SetStorageType(STORAGE_TYPE_PHONE);
+ }
+ }
+ break;
+
+ case CameraPresentationModel::STORAGE_CARD_STATE_MOUNT:
+ {
+ AppLogDebug("STORAGE_CARD_STATE_MOUNT");
+ if (storageType == STORAGE_TYPE_MEMORYCARD && CameraPresentationModel::GetInstance()->IsStorageCardMounted() == true)
+ {
+ storageType = STORAGE_TYPE_MEMORYCARD;
+
+ r = CameraPresentationModel::GetInstance()->SetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ SetStorageType(STORAGE_TYPE_MEMORYCARD);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptStorageIcon = Point(X_INDICATOR_STORAGE_PORTRAIT, Y_INDICATOR_STORAGE_PORTRAIT);
+ }
+ else
+ {
+ ptStorageIcon = Point(X_INDICATOR_STORAGE_LANDSCAPE, Y_INDICATOR_STORAGE_LANDSCAPE);
+ }
+
+ pMyCanvas = GetCanvasN(Rectangle(ptStorageIcon.x, ptStorageIcon.y, W_INDICATOR, H_INDICATOR));
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *__pStorageTypeBitmap);
+
+ delete pMyCanvas;
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraInfoPanel::UpdateUiIndicatorStorage(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ Font* pFnt = null;
+ Point point;
+ Rectangle listRect;
+ Dimension dim;
+ result r = E_SUCCESS;
+ int textClearX = 0;
+ int textClearY = 0;
+
+ String str = __storateTitle;
+
+ listRect = pCanvas->GetBounds();
+
+ pFnt = new (std::nothrow) Font();
+ pFnt->Construct(FONT_STYLE_PLAIN, FONT_SIZE_INDICATOR_STORAGE_FREE_SPACE);
+
+ r = pFnt->GetTextExtent(str, str.GetLength(), dim);
+ TryCatch(pFnt != null, , "pFnt GetTextExtent() fail[%s]", GetErrorMessage(r));
+
+ pCanvas->SetFont(*pFnt);
+ pCanvas->SetForegroundColor(COLOR_SETTING_MENU_TITLE);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT;
+ }
+ else
+ {
+ if (__drawRecordTimer == true)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT;
+ }
+ else
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT;
+ }
+ }
+
+ textClearX = point.x;
+ textClearY = point.y;
+ }
+ else
+ {
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE;
+ }
+ else
+ {
+ if (__drawRecordTimer == true)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE;
+ }
+ else
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE;
+ }
+ }
+
+ textClearX = point.x;
+ textClearY = point.y;
+ }
+
+ r = pCanvas->DrawText(point, str);
+ TryCatch(r == E_SUCCESS, , "Canvas::DrawText() fail[%s]", GetErrorMessage(r));
+
+ delete pFnt;
+ pFnt = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pFnt;
+ pFnt = null;
+
+ return r;
+}
+
+CamraInfoSubPanel::CamraInfoSubPanel(void)
+ : __drawSubMenuBG(0)
+ , __subMenuTitle(L"")
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CamraInfoSubPanel::~CamraInfoSubPanel(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubPanel::Initialize(Tizen::Graphics::Rectangle rect)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return Panel::Construct(rect);
+}
+
+result
+CamraInfoSubPanel::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CamraInfoSubPanel::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CamraInfoSubPanel::OnDraw(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Canvas* pCanvas = GetCanvasN();
+ pCanvas->Clear();
+ DrawSettingSubMenuBackground(pCanvas);
+
+ delete pCanvas;
+ pCanvas = null;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamraInfoSubPanel::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubPanel::DrawSettingSubMenuBackground(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Rectangle rectPanelBG = pCanvas->GetBounds();
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_OPTION_POPUP_BG_2DEPTH_9_);
+ TryCatch(pBitmap != null, r = E_FAILURE, "Bitmap is null");
+
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas->DrawNinePatchedBitmap(rectPanelBG, *pBitmap);
+ }
+
+ DrawSubMenuTile(pCanvas);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CamraInfoSubPanel::DrawSubMenuTile(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect = pCanvas->GetBounds();
+ Dimension dim;
+ Font fnt;
+ Point ptTitle;
+ String strTitle = __subMenuTitle;
+
+ TryCatch(strTitle.GetLength() > ZERO_LEN_STRING, r = E_FAILURE, "Title is empty");
+
+ fnt.Construct(FONT_STYLE_PLAIN, FONT_SIZE_SETTING_MENU_TITLE);
+ fnt.GetTextExtent(strTitle, strTitle.GetLength(), dim);
+
+ ptTitle.x = rect.x + X_MENU_TITLE_MARGIN;
+ ptTitle.y = ((H_SETTING_MENU_PANEL_TITLE / DIVIDE_BY_TWO) - (dim.height / DIVIDE_BY_TWO)) + rect.y;
+
+ pCanvas->SetFont(fnt);
+ pCanvas->SetForegroundColor(COLOR_TITLE);
+ pCanvas->DrawText(ptTitle, strTitle);
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return E_FAILURE;
+}
+
+void
+CamraInfoSubPanel::SetMenuTitle(Tizen::Base::String& title)
+{
+ AppLogDebug("ENTER");
+ __subMenuTitle = title;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraInfoPanel::SetCurrentPoint(Tizen::Graphics::Point currentPosition)
+{
+ AppLogDebug("ENTER");
+ __currentPosition = currentPosition;
+ AppLogDebug("EXIT");
+}
+
+CamraInfoSubIndicatorPanel::CamraInfoSubIndicatorPanel(void)
+ : __currentMode(CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ , __currentPosition(Point(0, 0))
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __drawIndicator(false)
+ , __drawIndicatorStorageInfo(false)
+ , __drawRecordTimer(false)
+ , __frameRate(0)
+ , __OverlayPanelMode(OVERLAY_PANEL_MODE_NORMAL)
+ , __pCanvas(null)
+ , __pRecordTimer(null)
+ , __pStorageTypeBitmap(null)
+ , __storageType(STORAGE_TYPE_PHONE)
+ , __storateTitle(L"")
+ , __pStorageInfoTimer(null)
+ , __previewResolutionSize(PREVIEW_RESOLUTION_DEFAULT_SIZE)
+ , __recordTimeCount(0)
+ , __remainedNumber(MAX_STORAGE_VALUE)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CamraInfoSubIndicatorPanel::~CamraInfoSubIndicatorPanel(void)
+{
+ AppLogDebug("ENTER");
+ if (__pRecordTimer != null)
+ {
+ __pRecordTimer->Cancel();
+ delete __pRecordTimer;
+ __pRecordTimer = null;
+ }
+
+ if (__pStorageInfoTimer != null)
+ {
+ __pStorageInfoTimer->Cancel();
+ delete __pStorageInfoTimer;
+ __pStorageInfoTimer = null;
+ }
+
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::Initialize(Tizen::Graphics::Rectangle rect)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return Panel::Construct(rect);
+}
+
+result
+CamraInfoSubIndicatorPanel::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ Form* pForm = static_cast<Form*>(GetParent());
+ __dir = pForm->GetOrientationStatus();
+ __pCanvas = GetCanvasN();
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+CamraInfoSubIndicatorPanel::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ delete __pCanvas;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+int
+CamraInfoSubIndicatorPanel::GetRemainedPhoto(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __remainedNumber;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetPreviewResolutionSize(int size)
+{
+ AppLogDebug("ENTER");
+ __previewResolutionSize = size;
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::SetRemainedPhoto(int cnt)
+{
+ AppLogDebug("ENTER");
+ __remainedNumber = cnt;
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::StartCheckStorageInfo(void)
+{
+ AppLogDebug("ENTER");
+ int previewResolutionSize = 0;
+ long long availableStorageSpace = 0;
+ int remainedNum = 0;
+ String strTemp = L"";
+
+ availableStorageSpace = CameraPresentationModel::GetInstance()->GetAvailableStorageSpace();
+
+ if (availableStorageSpace != STORAGE_VALUE_ZERO)
+ {
+ previewResolutionSize = __previewResolutionSize;
+
+ if (previewResolutionSize != STORAGE_VALUE_ZERO)
+ {
+ remainedNum = availableStorageSpace / previewResolutionSize;
+ }
+
+ SetRemainedPhoto(remainedNum);
+
+ AppLogDebug("remainedNum = %d", remainedNum);
+
+ strTemp.Format(UI_INDICATOR_STORAGE_FREE_SPACE_BUFFER_LEN, L"%d", remainedNum);
+
+ SetStorageTitle(strTemp);
+
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ AppLogDebug("CAMERA_MODE_SNAPSHOT");
+ }
+ else
+ {
+ if (remainedNum >= STORAGE_VALUE_ZERO && remainedNum <= STORAGE_DISPLAY_PLACE)
+ {
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__OverlayPanelMode == OVERLAY_PANEL_MODE_FULL)
+ {
+ SetDrawIndicatorStroageInfo(true);
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ }
+ else
+ {
+ SetDrawIndicatorStroageInfo(false);
+ }
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::SetStorageTitle(Tizen::Base::String& title)
+{
+ AppLogDebug("ENTER");
+ __storateTitle = title;
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::StartCheckStorageInfoTimer(void)
+{
+ AppLogDebug("ENTER");
+ if (__pStorageInfoTimer == null)
+ {
+ __pStorageInfoTimer = new (std::nothrow) Timer();
+ __pStorageInfoTimer->Construct(*this);
+ }
+
+ __pStorageInfoTimer->Cancel();
+ __pStorageInfoTimer->StartAsRepeatable(CAMERA_TIMER_BATTERY);
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::EndCheckStorageInfoTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pStorageInfoTimer != null, r = E_SYSTEM, "__pStorageInfoTimer is null");
+
+ r = __pStorageInfoTimer->Cancel();
+ delete __pStorageInfoTimer;
+ __pStorageInfoTimer = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetDrawIndicatorStroageInfo(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawIndicatorStorageInfo = status;
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::UpdateUiIndicatorStorage(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ Font* pFnt = null;
+ Point point;
+ Rectangle listRect;
+ Dimension dim;
+ result r = E_SUCCESS;
+ int textClearX = 0;
+ int textClearY = 0;
+
+ String str = __storateTitle;
+
+ listRect = pCanvas->GetBounds();
+
+ pFnt = new (std::nothrow) Font();
+ pFnt->Construct(FONT_STYLE_PLAIN, FONT_SIZE_INDICATOR_STORAGE_FREE_SPACE);
+
+ r = pFnt->GetTextExtent(str, str.GetLength(), dim);
+ TryCatch(pFnt != null, , "pFnt GetTextExtent() fail[%s]", GetErrorMessage(r));
+
+ pCanvas->SetFont(*pFnt);
+ pCanvas->SetForegroundColor(COLOR_SETTING_MENU_TITLE);
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT;
+ }
+ else
+ {
+ if (__drawRecordTimer == true)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_PORTRAIT;
+ }
+ else
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_PORTRAIT;
+ }
+ }
+
+ textClearX = point.x;
+ textClearY = point.y;
+ }
+ else
+ {
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE;
+ }
+ else
+ {
+ if (__drawRecordTimer == true)
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_RECORDING_LANDSCAPE;
+ }
+ else
+ {
+ point.x = X_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE - (dim.width / DIVIDE_BY_TWO);
+ point.y = Y_INDICATOR_STORAGE_FREE_SPACE_LANDSCAPE;
+ }
+ }
+
+ textClearX = point.x;
+ textClearY = point.y;
+ }
+
+ r = pCanvas->DrawText(point, str);
+ TryCatch(r == E_SUCCESS, , "Canvas::DrawText() fail[%s]", GetErrorMessage(r));
+
+ delete pFnt;
+ pFnt = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pFnt;
+ pFnt = null;
+
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetCurrentPoint(Tizen::Graphics::Point currentPosition)
+{
+ AppLogDebug("ENTER");
+ __currentPosition = currentPosition;
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::SetCurrentMode(int mode)
+{
+ AppLogDebug("ENTER");
+ __currentMode = mode;
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::SetTimeCount(int cnt)
+{
+ AppLogDebug("ENTER");
+ __recordTimeCount = cnt;
+ AppLogDebug("EXIT");
+}
+
+bool
+CamraInfoSubIndicatorPanel::GetDrawRecordTimer(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __drawRecordTimer;
+}
+
+void
+CamraInfoSubIndicatorPanel::StartDrawRecordTimer(void)
+{
+ AppLogDebug("ENTER");
+ if (__pRecordTimer == null)
+ {
+ __pRecordTimer = new (std::nothrow) Timer();
+ __pRecordTimer->Construct(*this);
+ }
+
+ __pRecordTimer->Cancel();
+ __pRecordTimer->StartAsRepeatable(CAMERA_TIMER_RECORDER);
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::StopDrawRecordTimer(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pRecordTimer != null, r = E_SYSTEM, "__pStorageInfoTimer is null");
+
+ r = __pRecordTimer->Cancel();
+ delete __pRecordTimer;
+ __pRecordTimer = null;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetDrawRecordTimer(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawRecordTimer = status;
+ __recordTimeCount = 0;
+ __frameRate = 0;
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::DrawRecordTimer(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Bitmap* pBitmap = null;
+ Canvas* pMyCanvasHourDeca = null;
+ Canvas* pMyCanvasHour = null;
+ Canvas* pMyCanvasMinDeca = null;
+ Canvas* pMyCanvasMin = null;
+ Canvas* pMyCanvasSecDeca = null;
+ Canvas* pMyCanvasSec = null;
+ Canvas* pMyCanvasConlon = null;
+ Canvas* pMyCanvasConlon2 = null;
+ Canvas* pMyCanvasRecIcon = null;
+
+ Point ptHourDeca;
+ Point ptHour;
+ Point ptMinDeca;
+ Point ptMin;
+ Point ptSecDeca;
+ Point ptSec;
+ Point ptConlon;
+ Point ptConlon2;
+ Point ptRecIcon;
+
+ int timeCnt = 0;
+ int hour = 0;
+ int min = 0;
+ int sec = 0;
+ int calHourDeca = 0;
+ int calHour = 0;
+ int calMinDeca = 0;
+ int calMin = 0;
+ int calSecDeca = 0;
+ int calSec = 0;
+
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ return r;
+ }
+
+ timeCnt = __recordTimeCount;
+
+ hour = timeCnt / SECONDS_PER_HOUR;
+ min = (timeCnt % SECONDS_PER_HOUR) / SECONDS_PER_MINUTE;
+ sec = timeCnt % SECONDS_PER_MINUTE;
+
+ calHourDeca = hour / UNIT_TEN;
+ calHour = hour % UNIT_TEN;
+ calMinDeca = min / UNIT_TEN;
+ calMin = min % UNIT_TEN;
+ calSecDeca = sec / UNIT_TEN;
+ calSec = sec % UNIT_TEN;
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptRecIcon = Point(X_INDICATOR_REC_ICON_PORTRAIT, Y_INDICATOR_REC_ICON_PORTRAIT);
+ ptHourDeca = Point(X_INDICATOR_TIMER_HOUR_1_PORTRAIT, Y_INDICATOR_TIMER_HOUR_1_PORTRAIT);
+ ptHour = Point(X_INDICATOR_TIMER_HOUR_2_PORTRAIT, Y_INDICATOR_TIMER_HOUR_2_PORTRAIT);
+ ptConlon = Point(X_INDICATOR_TIMER_CONLON_1_PORTRAIT, Y_INDICATOR_TIMER_CONLON_1_PORTRAIT);
+ ptMinDeca = Point(X_INDICATOR_TIMER_MINUTE_1_PORTRAIT, Y_INDICATOR_TIMER_MINUTE_1_PORTRAIT);
+ ptMin = Point(X_INDICATOR_TIMER_MINUTE_2_PORTRAIT, Y_INDICATOR_TIMER_MINUTE_2_PORTRAIT);
+ ptConlon2 = Point(X_INDICATOR_TIMER_CONLON_2_PORTRAIT, Y_INDICATOR_TIMER_CONLON_2_PORTRAIT);
+ ptSecDeca= Point(X_INDICATOR_TIMER_SEC_1_PORTRAIT, Y_INDICATOR_TIMER_SEC_1_PORTRAIT);
+ ptSec = Point(X_INDICATOR_TIMER_SEC_2_PORTRAIT, Y_INDICATOR_TIMER_SEC_2_PORTRAIT);
+ }
+ else
+ {
+ ptRecIcon = Point(X_INDICATOR_REC_ICON_LANDSCAPE, Y_INDICATOR_REC_ICON_LANDSCAPE);
+ ptHourDeca = Point(X_INDICATOR_TIMER_HOUR_1_LANDSCAPE, Y_INDICATOR_TIMER_HOUR_1_LANDSCAPE);
+ ptHour = Point(X_INDICATOR_TIMER_HOUR_2_LANDSCAPE, Y_INDICATOR_TIMER_HOUR_2_LANDSCAPE);
+ ptConlon = Point(X_INDICATOR_TIMER_CONLON_1_LANDSCAPE, Y_INDICATOR_TIMER_CONLON_1_LANDSCAPE);
+ ptMinDeca = Point(X_INDICATOR_TIMER_MINUTE_1_LANDSCAPE, Y_INDICATOR_TIMER_MINUTE_1_LANDSCAPE);
+ ptMin = Point(X_INDICATOR_TIMER_MINUTE_2_LANDSCAPE, Y_INDICATOR_TIMER_MINUTE_2_LANDSCAPE);
+ ptConlon2 = Point(X_INDICATOR_TIMER_CONLON_2_LANDSCAPE, Y_INDICATOR_TIMER_CONLON_2_LANDSCAPE);
+ ptSecDeca = Point(X_INDICATOR_TIMER_SEC_1_LANDSCAPE, Y_INDICATOR_TIMER_SEC_1_LANDSCAPE);
+ ptSec = Point(X_INDICATOR_TIMER_SEC_2_LANDSCAPE, Y_INDICATOR_TIMER_SEC_2_LANDSCAPE);
+ }
+
+ if (((++timeCnt) % FRAME_RATE) == 0)
+ {
+ __frameRate = 0;
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_REC);
+ pMyCanvasHourDeca = GetCanvasN(Rectangle(ptRecIcon.x, ptRecIcon.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasHourDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasHourDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+ }
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calHourDeca);
+ pMyCanvasHour = GetCanvasN(Rectangle(ptHourDeca.x, ptHourDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasHour->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasHour->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calHour);
+ pMyCanvasMinDeca = GetCanvasN(Rectangle(ptHour.x, ptHour.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasMinDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasMinDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_10);
+ pMyCanvasMin = GetCanvasN(Rectangle(ptConlon.x, ptConlon.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasMin->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasMin->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calMinDeca);
+ pMyCanvasSecDeca = GetCanvasN(Rectangle(ptMinDeca.x, ptMinDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasSecDeca->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasSecDeca->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calMin);
+ pMyCanvasSec = GetCanvasN(Rectangle(ptMin.x, ptMin.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasSec->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasSec->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_10);
+ pMyCanvasConlon = GetCanvasN(Rectangle(ptConlon2.x, ptConlon2.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasConlon->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasConlon->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calSecDeca);
+ pMyCanvasConlon2 = GetCanvasN(Rectangle(ptSecDeca.x, ptSecDeca.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasConlon2->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasConlon2->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_NUM_0 + calSec);
+ pMyCanvasRecIcon = GetCanvasN(Rectangle(ptSec.x, ptSec.y, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ pMyCanvasRecIcon->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvasRecIcon->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+ delete pBitmap;
+
+ delete pMyCanvasHourDeca;
+ delete pMyCanvasHour;
+ delete pMyCanvasMinDeca;
+ delete pMyCanvasMin;
+ delete pMyCanvasSecDeca;
+ delete pMyCanvasSec;
+ delete pMyCanvasConlon;
+ delete pMyCanvasConlon2;
+ delete pMyCanvasRecIcon;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetDrawIndicator(bool status)
+{
+ AppLogDebug("ENTER");
+ __drawIndicator = status;
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::UpdateBatteryStatus(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ result r = E_SUCCESS;
+ Point ptBattIcon = Point(X_INDICATOR_BATTERY_LANDSCAPE, Y_INDICATOR_BATTERY_LANDSCAPE);
+ Canvas* pMyCanvas = null;
+
+ int battState = BATT_LEVEL_EMPTY;
+ bool isCharging = false;
+
+ if (__drawIndicator == true)
+ {
+ TryCatch(pCanvas != null, r = E_FAILURE, "pCanvas is null");
+
+ Battery::IsCharging(isCharging);
+ Battery::GetCurrentLevelInPercentage(battState);
+
+ if (isCharging)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_CHARGE);
+ }
+ else
+ {
+ if (battState == BATT_LEVEL_FULL)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_FULL);
+ }
+ else if (battState >= BATT_LEVEL_5 && battState < BATT_LEVEL_FULL)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_05);
+ }
+ else if (battState >= BATT_LEVEL_4 && battState < BATT_LEVEL_5)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_04);
+ }
+ else if (battState >= BATT_LEVEL_3 && battState < BATT_LEVEL_4)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_03);
+ }
+ else if (battState >= BATT_LEVEL_2 && battState < BATT_LEVEL_3)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_02);
+ }
+ else if (battState >= BATT_LEVEL_1 && battState < BATT_LEVEL_2)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_01);
+ }
+ else if (battState >= BATT_LEVEL_EMPTY && battState < BATT_LEVEL_1)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_BATTERY_00);
+ }
+ }
+ TryCatch(pBitmap != null, r = E_FAILURE, "pBitmap is null");
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ if (__currentMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ ptBattIcon = Point(X_INDICATOR_BATTERY_PORTRAIT, Y_INDICATOR_BATTERY_PORTRAIT);
+ }
+ else
+ {
+ ptBattIcon = Point(X_INDICATOR_BATTERY_PORTRAIT, Y_INDICATOR_BATTERY_PORTRAIT);
+ }
+ }
+ else
+ {
+ ptBattIcon = Point(X_INDICATOR_BATTERY_LANDSCAPE, Y_INDICATOR_BATTERY_LANDSCAPE);
+ }
+
+ pMyCanvas = GetCanvasN(Rectangle(ptBattIcon.x, ptBattIcon.y, W_INDICATOR, H_INDICATOR));
+ TryCatch(pMyCanvas != null, r = E_FAILURE, "pMyCanvas is null");
+
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *pBitmap);
+
+ delete pBitmap;
+ pBitmap = null;
+
+ delete pMyCanvas;
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ if (pBitmap != null)
+ {
+ delete pBitmap;
+ pBitmap = null;
+ }
+
+ AppLogDebug("EXIT - CATCH");
+ return r;
+}
+
+result
+CamraInfoSubIndicatorPanel::UpdateStorageIcon(Tizen::Graphics::Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Point ptStorageIcon = Point(X_INDICATOR_STORAGE_LANDSCAPE, Y_INDICATOR_STORAGE_LANDSCAPE);
+ Canvas* pMyCanvas = null;
+ int storageType = __storageType;
+
+ TryCatch(pCanvas != null, r = E_FAILURE, "pCanvas is null");
+
+ CameraPresentationModel::GetInstance()->GetValue(STORAGE_TYPE, storageType);
+
+ if (storageType != STORAGE_TYPE_PHONE && CameraPresentationModel::GetInstance()->IsStorageCardMounted() == false)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+
+ r = CameraPresentationModel::GetInstance()->SetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "SetValue() fail[%s]", GetErrorMessage(r));
+
+ SetStorageType(STORAGE_TYPE_PHONE);
+ }
+
+ if (__dir == ORIENTATION_STATUS_PORTRAIT
+ || __dir == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ ptStorageIcon = Point(X_INDICATOR_STORAGE_PORTRAIT, Y_INDICATOR_STORAGE_PORTRAIT);
+ }
+ else
+ {
+ ptStorageIcon = Point(X_INDICATOR_STORAGE_LANDSCAPE, Y_INDICATOR_STORAGE_LANDSCAPE);
+ }
+
+ pMyCanvas = GetCanvasN(Rectangle(ptStorageIcon.x, ptStorageIcon.y, W_INDICATOR, H_INDICATOR));
+ //pMyCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ pMyCanvas->DrawBitmap(Point(X_START_POSITION, Y_START_POSITION), *__pStorageTypeBitmap);
+
+ delete pMyCanvas;
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetStorageType(int type)
+{
+ AppLogDebug("ENTER");
+ if ((__pStorageTypeBitmap == null) || (__storageType != type))
+ {
+ __storageType = type;
+
+ if (__storageType == STORAGE_TYPE_PHONE)
+ {
+ __pStorageTypeBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_STORAGE_IN);
+ }
+ else
+ {
+ __pStorageTypeBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_INDICATOR_STORAGE_T_FLASH);
+ }
+ TryReturnVoid(__pStorageTypeBitmap != null, "pBitmap is null");
+ }
+
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::DrawIndicator(Canvas* pCanvas)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = UpdateBatteryStatus(pCanvas);
+ r = UpdateStorageIcon(pCanvas);
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::SetOverlayPanelMode(int mode)
+{
+ AppLogDebug("ENTER");
+ __OverlayPanelMode = mode;
+ AppLogDebug("EXIT");
+}
+
+result
+CamraInfoSubIndicatorPanel::OnDraw(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ TryCatch(__pCanvas != null, r = E_FAILURE, "__pCanvas is null");
+
+ __pCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ __pCanvas->Clear();
+
+ if (__drawIndicator == true)
+ {
+ DrawIndicator(__pCanvas);
+ }
+
+ if (__drawRecordTimer == true)
+ {
+ DrawRecordTimer(__pCanvas);
+ }
+
+ if (__drawIndicatorStorageInfo == true)
+ {
+ UpdateUiIndicatorStorage(__pCanvas);
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CamraInfoSubIndicatorPanel::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ AppLogDebug("ENTER");
+ if (timer.Equals(*__pRecordTimer))
+ {
+ StartCheckStorageInfo();
+ Invalidate(true);
+ __frameRate++;
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CamraInfoSubIndicatorPanel::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ __dir = orientationStatus;
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraPresentationModel.cpp
+ * @brief This is the implementation file for CameraPresentationModel class.
+ */
+
+#include <cstdlib>
+#include "CmCameraPresentationModel.h"
+#include "CmCameraSettingsPresentationModel.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::Io;
+using namespace Tizen::Locales;
+using namespace Tizen::Media;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+static const long RECORD_DEFAULT_SEC = 60000;
+static const long SECONDS_PER_MINUTE = 60;
+static const int MAX_FULL_FILE_PATH = 100;
+static const int MAX_CONTENTSEARCH_COUNTPERPAGE = 10;
+static const int DOUBLE_DIGIT_NUMBER_TEN = 10;
+static const int MAX_QUERY_LENGTH = 1024;
+static const bool CAPTURE_NORMAL_MODE = 0;
+static const bool CAPTURE_BURST_MODE = 1;
+static const int MAX_CAMERA_EXPOSURE_VALUE = 8;
+static const int PREVIEW_RESOLOTION_WIDTH = 640;
+static const int PREVIEW_RESOLOTION_HEIGHT = 480;
+static const int EXPOSURE_DEFAULT_VALUE = 4;
+static const int BRIGHTNESS_DEFAULT_VALUE = 4;
+static const int DEFAULT_VALUE_ZERO = 0;
+static const int SEARCH_PAGE_NO = 1;
+
+static const wchar_t* STRING_CAMERA_FOLDER_NAME = L"Camera";
+static const wchar_t* STRING_EXTENSION_JPG = L".jpg";
+static const wchar_t* STRING_EXTENSION_MP4 = L".mp4";
+static const wchar_t* STRING_ZERO_CHAR = L"0";
+static const wchar_t* STRING_UNDERBAR_CHAR = L"_";
+static const wchar_t* STRING_QUERY_PREFIX = L"ContentFileName LIKE '%";
+static const wchar_t* STRING_QUERY_SUFFIX = L"'";
+static const wchar_t* STRING_SDCARD_MOUNTED_STATE = L"Mounted";
+static const wchar_t* STRING_KEY_STORAGE_PHONE = L"AvailableMediaStorage";
+static const wchar_t* STRING_KEY_STORAGE_SDCARD = L"AvailableExternalStorage";
+static const wchar_t* STRING_CAMCORDER_TEMPORARY_FILE = L"data/temp.mp4";
+static const wchar_t* STRING_CAMERA_CAPTURED_ERROR = L"Captured Error";
+static const wchar_t* STRING_VIDEO_RECORDER_CLOSED_ERROR = L"Video Recorder Closed Error";
+static const wchar_t* STRING_VIDEO_RECORDER_END_REACHED_ERROR = L"Video Recorder End Reached Error";
+static const String STRING_CONTENT_CAMERA_PATH = Environment::GetMediaPath() + L"Camera";
+static const String STRING_CONTENT_CAMERA_PATH_EXT = Environment::GetExternalStoragePath() + L"Camera";
+static const String CONTENT_INFO_ORDER = L"ContentName";
+static const wchar_t* EMPTY_SPACE = L"";
+
+CameraPresentationModel* CameraPresentationModel::__pPresentationModel = null;
+
+enum CamSetExifOrientationMode
+{
+ CAM_SET_EXIF_ORIENTATION_MODE_NONE = 0,
+ CAM_SET_EXIF_ORIENTATION_MODE_PORTRAIT,
+ CAM_SET_EXIF_ORIENTATION_MODE_LANDSCAPE,
+ CAM_SET_EXIF_ORIENTATION_MODE_PORTRAIT_REVERSE,
+ CAM_SET_EXIF_ORIENTATION_MODE_LANDSCAPE_REVERSE,
+};
+
+result
+GetDirectoryPath(int storageType, Tizen::Base::String& directoryPath)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ r = directoryPath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetExternalStoragePath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ else if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = directoryPath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetMediaPath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = directoryPath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", Environment::GetMediaPath().GetPointer(), STRING_CAMERA_FOLDER);
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("FilePath %ls", directoryPath.GetPointer());
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+GetFileName(int currentCameraMode, Tizen::Base::String& fileName)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ DateTime currentDateTime;
+
+ r = SystemTime::GetCurrentTime(currentDateTime);
+ TryCatch(r == E_SUCCESS, , "SystemTime::GetCurrentTime() fail[%s]", GetErrorMessage(r));
+
+ fileName.Clear();
+ r = fileName.Append(currentDateTime.GetYear());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ if (currentDateTime.GetMonth() < DOUBLE_DIGIT_NUMBER_TEN)
+ {
+ r = fileName.Append(STRING_ZERO_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ r = fileName.Append(currentDateTime.GetMonth());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(currentDateTime.GetMonth());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ if (currentDateTime.GetDay() < DOUBLE_DIGIT_NUMBER_TEN)
+ {
+ r = fileName.Append(STRING_ZERO_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+
+ r = fileName.Append(currentDateTime.GetDay());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(currentDateTime.GetDay());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ r = fileName.Append(STRING_UNDERBAR_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+
+ if (currentDateTime.GetHour() < DOUBLE_DIGIT_NUMBER_TEN)
+ {
+ r = fileName.Append(STRING_ZERO_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+
+ r = fileName.Append(currentDateTime.GetHour());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(currentDateTime.GetHour());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ if (currentDateTime.GetMinute() < DOUBLE_DIGIT_NUMBER_TEN)
+ {
+ r = fileName.Append(STRING_ZERO_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+
+ r = fileName.Append(currentDateTime.GetMinute());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(currentDateTime.GetMinute());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ if (currentDateTime.GetSecond() < DOUBLE_DIGIT_NUMBER_TEN)
+ {
+ r = fileName.Append(STRING_ZERO_CHAR);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+
+ r = fileName.Append(currentDateTime.GetSecond());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(currentDateTime.GetSecond());
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ if (currentCameraMode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ r = fileName.Append(STRING_EXTENSION_JPG);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileName.Append(STRING_EXTENSION_MP4);
+ TryCatch(r == E_SUCCESS, , "fileName::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("FileName %ls", fileName.GetPointer());
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+Tizen::Base::String
+MakeQuerybyContentFileName(const Tizen::Base::String& QueryString)
+{
+ AppLogDebug("ENTER");
+ String contentNameTypeQuery = L"";
+ String sourceFileName = L"";
+ result r = E_SUCCESS;
+
+ sourceFileName = QueryString;
+
+ AppLogDebug("strTemp %ls", sourceFileName.GetPointer());
+ r = contentNameTypeQuery.SetCapacity(MAX_QUERY_LENGTH);
+ TryCatch(r == E_SUCCESS, , "String::SetCapacity() fail[%s]", GetErrorMessage(r));
+
+ r = sourceFileName.SetCapacity(MAX_QUERY_LENGTH);
+ TryCatch(r == E_SUCCESS, , "String::SetCapacity() fail[%s]", GetErrorMessage(r));
+
+ if (!sourceFileName.IsEmpty())
+ {
+ r = contentNameTypeQuery.Append(STRING_QUERY_PREFIX);
+ TryCatch(r == E_SUCCESS, , "String::SetCapacity() fail[%s]", GetErrorMessage(r));
+
+ r = contentNameTypeQuery.Append(sourceFileName);
+ TryCatch(r == E_SUCCESS, , "String::SetCapacity() fail[%s]", GetErrorMessage(r));
+
+ r = contentNameTypeQuery.Append(STRING_QUERY_SUFFIX);
+ TryCatch(r == E_SUCCESS, , "String::SetCapacity() fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("strQuery %ls", contentNameTypeQuery.GetPointer());
+ AppLogDebug("EXIT");
+ return contentNameTypeQuery;
+
+CATCH:
+ contentNameTypeQuery.Clear();
+ return contentNameTypeQuery;
+}
+
+Tizen::Graphics::Bitmap*
+CreateThumbnailN(Tizen::Base::String& pFilename, ContentType contentType)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pThumbnailImage = null;
+ ContentSearch contentSearch;
+ IList* pSearchResultList = null;
+ ContentSearchResult* pContentSearchResult = null;
+
+ String strQuery = L"";
+ String sortColumn = L"";
+ int totalPage = 0;
+ int totalCount = 0;
+ int page = 1;
+ result r = E_SUCCESS;
+
+ contentSearch.Construct(contentType);
+ strQuery = MakeQuerybyContentFileName(pFilename);
+
+ pSearchResultList = contentSearch.SearchN(page, MAX_CONTENTSEARCH_COUNTPERPAGE, totalPage, totalCount, strQuery, sortColumn, SORT_ORDER_NONE);
+ TryCatch(pSearchResultList != null, r = E_SYSTEM, "pSearchResultList is null");
+
+ AppLogDebug("SearchN Err = %s %d %d", GetErrorMessage(GetLastResult()), totalPage, totalCount);
+
+ if ((pSearchResultList != null) && (pSearchResultList->GetCount() > 0))
+ {
+ pContentSearchResult = static_cast<ContentSearchResult*>(pSearchResultList->GetAt(0));
+ TryCatch(pContentSearchResult != null, r = E_SYSTEM, "pContentSearchResult is null");
+
+ pThumbnailImage = pContentSearchResult->GetContentInfo()->GetThumbnailN();
+ TryCatch(pThumbnailImage != null, r = E_SYSTEM, "pThumbnailImage is null");
+
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+
+ if (pSearchResultList)
+ {
+ pSearchResultList->RemoveAll(true);
+ delete pSearchResultList;
+ pSearchResultList = null;
+ }
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("EXIT");
+ return pThumbnailImage;
+ }
+ else
+ {
+ AppLogDebug("EXIT");
+ return null;
+ }
+
+CATCH:
+ if (pSearchResultList)
+ {
+ pSearchResultList->RemoveAll(true);
+ delete pSearchResultList;
+ pSearchResultList = null;
+ }
+ return null;
+}
+
+CameraPresentationModel::CameraPresentationModel(void)
+ : __pCamera(null)
+ , __pPreviewResolutionList(null)
+ , __pCaptureResolutionList(null)
+ , __pIsoList(null)
+ , __pVideoRecorder(null)
+ , __pCameraListener(null)
+ , __pContentManager(null)
+ , __pImageContentInfo(null)
+ , __pVideoContentInfo(null)
+ , __pCameraSettingsPresentationModel(null)
+ , __pBitmap(null)
+ , __lastestContentName(L"")
+ , __errorResult(L"")
+ , __appControlRequestType(APP_CONTROL_REQUEST_TYPE_CANCELED)
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __cameraMode(CAMERA_MODE_SNAPSHOT)
+ , __storageCardState(STORAGE_CARD_STATE_UNMOUNT)
+ , __storageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN)
+ , __isStopCaptured(false)
+ , __contentCount(0)
+ , __onVideoRecorderStarted(false)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraPresentationModel::~CameraPresentationModel(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pVideoRecorder != null)
+ {
+ AppLogDebug("VideoRecorder State[%d]", __pVideoRecorder->GetState());
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_RECORDING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STARTING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSED
+ )
+ {
+ r = __pVideoRecorder->Stop();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Stop() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_STOPPING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STOPPED
+ )
+ {
+ r = __pVideoRecorder->Close();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Close() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pVideoRecorder;
+ __pVideoRecorder = null;
+ }
+
+ if (__pCamera != null)
+ {
+ AppLogDebug("Camera State[%d]", __pCamera->GetState());
+
+ if (__pCamera->GetState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->StopPreview();
+ TryReturnVoid(r == E_SUCCESS, "Camera::StopPreview() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pCamera->IsPoweredOn() == true)
+ {
+ r = __pCamera->PowerOff();
+ TryReturnVoid(r == E_SUCCESS, "Camera::PowerOff() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pCamera;
+ __pCamera = null;
+ }
+
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ }
+
+ delete __pPreviewResolutionList;
+ __pPreviewResolutionList = null;
+
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ }
+
+ delete __pCaptureResolutionList;
+ __pCaptureResolutionList = null;
+
+ if (__pIsoList)
+ {
+ __pIsoList->RemoveAll(true);
+ }
+
+ delete __pIsoList;
+ __pIsoList = null;
+
+ delete __pContentManager;
+
+ delete __pImageContentInfo;
+
+ delete __pVideoContentInfo;
+
+ delete __pBitmap;
+
+ __isStopCaptured = false;
+
+ __contentCount = 0;
+
+ __onVideoRecorderStarted = false;
+
+ RemoveDeviceManagerEventListner();
+
+ __pCameraSettingsPresentationModel = null;
+ AppLogDebug("EXIT");
+}
+
+result
+CameraPresentationModel::CreateThumbnail(int currentCameraMode)
+{
+ AppLogDebug("ENTER");
+ String latestContentName = L"";
+ result r = E_SUCCESS;
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ r = GetLatestContentName(currentCameraMode, latestContentName);
+ TryCatch(r == E_SUCCESS, , "GetLatestContentName() fail[%s]", GetErrorMessage(r));
+
+ if (currentCameraMode == CAMERA_MODE_SNAPSHOT)
+ {
+ __pBitmap = CreateThumbnailN(latestContentName, CONTENT_TYPE_IMAGE);
+
+ if (latestContentName == L"")
+ {
+ __pBitmap = null;
+ }
+ }
+ else
+ {
+ __pBitmap = CreateThumbnailN(latestContentName, CONTENT_TYPE_VIDEO);
+
+ if (latestContentName == L"")
+ {
+ __pBitmap = null;
+ }
+ }
+
+ if (__pBitmap == null)
+ {
+ AppLogDebug("CreateThumbnailN return null");
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::CreateFileName(Tizen::Base::String& fullFileName)
+{
+ AppLogDebug("ENTER");
+ String* pFilePath = null;
+ String* pFileName = null;
+ int storageType = 0;
+ int currentCameraMode = 0;
+ result r = E_SUCCESS;
+
+ r = GetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ r = GetValue(CURRENT_MODE, currentCameraMode);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ pFilePath = new (std::nothrow) String();
+
+ pFileName = new (std::nothrow) String();
+
+ r = GetDirectoryPath(storageType, *pFilePath);
+ TryCatch(r == E_SUCCESS, , "GetDirectoryPath() fail[%s]", GetErrorMessage(r));
+
+ r = GetFileName(currentCameraMode, *pFileName);
+ TryCatch(r == E_SUCCESS, , "GetFileName() fail[%s]", GetErrorMessage(r));
+
+ fullFileName.Clear();
+ r = fullFileName.Format(MAX_FULL_FILE_PATH, L"%ls%ls", pFilePath->GetPointer(), pFileName->GetPointer());
+ TryCatch(r == E_SUCCESS, , "String::Format() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("pFullFileName %ls", fullFileName.GetPointer());
+
+ delete pFilePath;
+ pFilePath = null;
+
+ delete pFileName;
+ pFileName = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pFilePath;
+ pFilePath = null;
+
+ delete pFileName;
+ pFileName = null;
+
+ return r;
+}
+
+void
+CameraPresentationModel::CreateInstance(void)
+{
+ __pPresentationModel = new (std::nothrow) CameraPresentationModel();
+
+ result r = __pPresentationModel->Construct();
+
+ if (IsFailed(r))
+ {
+ delete __pPresentationModel;
+ __pPresentationModel = null;
+ return;
+ }
+
+// std::atexit(DestroyInstance);
+}
+
+void
+CameraPresentationModel::DestroyInstance(void)
+{
+ delete __pPresentationModel;
+ __pPresentationModel = null;
+}
+
+CameraPresentationModel*
+CameraPresentationModel::GetInstance(void)
+{
+ AppLogDebug("ENTER");
+ if (__pPresentationModel == null)
+ {
+ CreateInstance();
+ }
+
+ AppLogDebug("EXIT");
+ return __pPresentationModel;
+}
+
+result
+CameraPresentationModel::Construct(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __pCameraSettingsPresentationModel = CameraSettingsPresentationModel::GetInstance();
+ TryCatch(__pCameraSettingsPresentationModel != null, r = E_SYSTEM, "__pCameraSettingsPresentationModel is null");
+
+ SetDeviceManagerEventListner();
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CameraPresentationModel::Terminate(int mode)
+{
+ AppLogDebug("ENTER Terminate :: mode = %d", mode);
+ result r = E_SUCCESS;
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ if (__pVideoRecorder != null)
+ {
+ AppLogDebug("VideoRecorder State[%d]", __pVideoRecorder->GetState());
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_RECORDING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STARTING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSED
+ )
+ {
+ r = __pVideoRecorder->Stop();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Stop() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_STOPPING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STOPPED
+ )
+ {
+ r = __pVideoRecorder->Close();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Close() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pVideoRecorder;
+ __pVideoRecorder = null;
+ }
+
+ if (__pCamera != null)
+ {
+ AppLogDebug("Camera State[%d]", __pCamera->GetState());
+
+ if (__pCamera->GetState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->StopPreview();
+ TryReturnVoid(r == E_SUCCESS, "Camera::StopPreview() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pCamera->IsPoweredOn() == true)
+ {
+ r = __pCamera->PowerOff();
+ TryReturnVoid(r == E_SUCCESS, "Camera::PowerOff() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pCamera;
+ __pCamera = null;
+ }
+ }
+ else if (mode == CAMERA_MODE_RECORD)
+ {
+ if (__pCamera != null)
+ {
+ AppLogDebug("Camera State[%d]", __pCamera->GetState());
+
+ if (__pCamera->GetState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->StopPreview();
+ TryReturnVoid(r == E_SUCCESS, "Camera::StopPreview() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pCamera->IsPoweredOn() == true)
+ {
+ r = __pCamera->PowerOff();
+ TryReturnVoid(r == E_SUCCESS, "Camera::PowerOff() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pCamera;
+ __pCamera = null;
+ }
+
+ if (__pVideoRecorder != null)
+ {
+ AppLogDebug("VideoRecorder State[%d]", __pVideoRecorder->GetState());
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_RECORDING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STARTING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSED
+ )
+ {
+ r = __pVideoRecorder->Stop();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Stop() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_STOPPING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_STOPPED
+ )
+ {
+ r = __pVideoRecorder->Close();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Close() [%s]", GetErrorMessage(r));
+ }
+
+ delete __pVideoRecorder;
+ __pVideoRecorder = null;
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::InitializeCamera(void)
+{
+ AppLogDebug("ENTER");
+ Dimension* pPreviewResolution = null;
+ Dimension* pCaptureResolution = null;
+ Dimension tempDimention(PREVIEW_RESOLOTION_WIDTH, PREVIEW_RESOLOTION_HEIGHT);
+ int selfPortraitEnable = 0;
+ int previewResolutionCount = 0;
+ int captureResolutionCount = 0;
+ int idx = 0;
+ int previewResolutionIdx = 0;
+ result r = E_SUCCESS;
+
+ r = GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__pCamera == null)
+ {
+ __pCamera = new (std::nothrow) Camera();
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_MODE !!!");
+
+ __pCamera->Construct(*this, CAMERA_PRIMARY);
+ }
+ else
+ {
+ AppLogDebug("CAMERA_SECONDARY_MODE !!!");
+
+ __pCamera->Construct(*this, CAMERA_SECONDARY);
+ }
+ }
+
+ r = __pCamera->PowerOn();
+ TryCatch(r == E_SUCCESS, , "Camera::PowerOn fail[%s]", GetErrorMessage(r));
+
+ __pPreviewResolutionList = __pCamera->GetSupportedPreviewResolutionListN();
+ TryCatch(__pPreviewResolutionList != null, , "pPreviewResolutionList is null");
+
+ previewResolutionCount = __pPreviewResolutionList->GetCount();
+ AppLogDebug("__pPreviewResolutionList Count : %d", previewResolutionCount);
+
+ if (previewResolutionCount > 0)
+ {
+ for (idx = 0; idx < previewResolutionCount; idx++)
+ {
+ pPreviewResolution = static_cast<Dimension*>(__pPreviewResolutionList->GetAt(idx));
+
+ AppLogDebug("InitializeCamera pPreviewResolution w:%d,h:%d", pPreviewResolution->width, pPreviewResolution->height);
+
+ if (*pPreviewResolution == tempDimention)
+ {
+ previewResolutionIdx = idx;
+ break;
+ }
+ }
+ }
+
+ pPreviewResolution = static_cast<Dimension*>(__pPreviewResolutionList->GetAt(previewResolutionIdx));
+ TryCatch(pPreviewResolution != null, , "pPreviewResolution is null");
+
+ AppLogDebug("InitializeCamera::pPreviewResolution w:%d,h:%d", pPreviewResolution->width, pPreviewResolution->height);
+
+ r = __pCamera->SetPreviewResolution(*pPreviewResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetPreviewResolution fail[%s]", GetErrorMessage(r));
+
+ __pCaptureResolutionList = __pCamera->GetSupportedCaptureResolutionListN();
+ TryCatch(__pCaptureResolutionList != null, , "pCaptureResolutionList is null");
+
+ captureResolutionCount = __pCaptureResolutionList->GetCount();
+ AppLogDebug("__pCaptureResolutionList Count : %d", captureResolutionCount);
+
+ pCaptureResolution = static_cast< Dimension*>(__pCaptureResolutionList->GetAt(captureResolutionCount - 1));
+ TryCatch(pCaptureResolution != null, , "pCaptureResolution is null");
+
+ r = __pCamera->SetCaptureResolution(*pCaptureResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetCaptureResolution fail[%s]", GetErrorMessage(r));
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ __pCamera->SetFlip(CAMERA_FLIP_HORIZONTAL);
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ }
+
+ delete __pPreviewResolutionList;
+ __pPreviewResolutionList = null;
+
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ }
+
+ delete __pCaptureResolutionList;
+ __pCaptureResolutionList = null;
+}
+
+void
+CameraPresentationModel::InitializeCamcorder(void)
+{
+ AppLogDebug("ENTER");
+ Dimension* pPreviewResolution = null;
+ Dimension PreviewResolutionDim;
+ Dimension tempDimention(PREVIEW_RESOLOTION_WIDTH, PREVIEW_RESOLOTION_HEIGHT);
+ int selfPortraitEnable = 0;
+ int previewResolutionCount = 0;
+ int previewResolutionIdx = 0;
+ int idx = 0;
+ result r = E_SUCCESS;
+
+ r = GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+ TryCatch(r == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (__pCamera == null)
+ {
+ __pCamera = new (std::nothrow) Camera();
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ AppLogDebug("CAMERA_PRIMARY_MODE !!!");
+
+ __pCamera->Construct(*this, CAMERA_PRIMARY);
+ }
+ else
+ {
+ AppLogDebug("CAMERA_SECONDARY_MODE !!!");
+
+ __pCamera->Construct(*this, CAMERA_SECONDARY);
+ }
+ }
+
+ r = __pCamera->PowerOn();
+ TryCatch(r == E_SUCCESS, , "Camera::PowerOn fail[%s]", GetErrorMessage(r));
+
+ if (__pVideoRecorder == null)
+ {
+ __pVideoRecorder = new (std::nothrow) VideoRecorder();
+ __pVideoRecorder->Construct(*this, *__pCamera);
+ }
+
+ if (__pPreviewResolutionList == null)
+ {
+ __pPreviewResolutionList = __pCamera->GetSupportedPreviewResolutionListN();
+ TryCatch(__pPreviewResolutionList != null, , "__pPreviewResolutionList is null");
+
+ previewResolutionCount = __pPreviewResolutionList->GetCount();
+ AppLogDebug("pPreviewResolutionList Count : %d", previewResolutionCount);
+
+ if (previewResolutionCount > 0)
+ {
+ for (idx = 0; idx < previewResolutionCount; idx++)
+ {
+ pPreviewResolution = static_cast<Dimension*>(__pPreviewResolutionList->GetAt(idx));
+
+ AppLogDebug("InitializeCamcorder pPreviewResolution w:%d,h:%d", pPreviewResolution->width, pPreviewResolution->height);
+
+ if (*pPreviewResolution == tempDimention)
+ {
+ previewResolutionIdx = idx;
+ break;
+ }
+ }
+ }
+
+ pPreviewResolution = static_cast<Dimension*>(__pPreviewResolutionList->GetAt(previewResolutionIdx));
+ TryCatch(pPreviewResolution != null, , "pPreviewResolution is null");
+
+ AppLogDebug("InitializeCamcorder::pPreviewResolution w:%d,h:%d", pPreviewResolution->width, pPreviewResolution->height);
+
+ r = __pCamera->SetPreviewResolution(*pPreviewResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetPreviewResolution fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->SetRecordingResolution(*pPreviewResolution);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetRecordingResolution() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ PreviewResolutionDim = __pCamera->GetPreviewResolution();
+
+ AppLogDebug("InitializeCamcorder::pPreviewResolution w:%d,h:%d", PreviewResolutionDim.width, PreviewResolutionDim.height);
+
+ r = __pCamera->SetPreviewResolution(PreviewResolutionDim);
+ TryCatch(r == E_SUCCESS, , "Camera::SetPreviewResolution fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->SetRecordingResolution(PreviewResolutionDim);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetRecordingResolution() fail[%s]", GetErrorMessage(r));
+ }
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ {
+ __pCamera->SetFlip(CAMERA_FLIP_HORIZONTAL);
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ }
+
+ delete __pPreviewResolutionList;
+ __pPreviewResolutionList = null;
+}
+
+void
+CameraPresentationModel::ToggleCameraCamcorder(int mode)
+{
+ AppLogDebug("ENTER");
+ Dimension PreviewResolutionDim;
+ result r = E_SUCCESS;
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ r = __pCamera->PowerOn();
+ TryCatch(r == E_SUCCESS, , "Camera::PowerOn fail[%s]", GetErrorMessage(r));
+ }
+ else if (mode == CAMERA_MODE_RECORD)
+ {
+ r = __pCamera->PowerOn();
+ TryCatch(r == E_SUCCESS, , "Camera::PowerOn fail[%s]", GetErrorMessage(r));
+
+ PreviewResolutionDim = __pCamera->GetPreviewResolution();
+
+ AppLogDebug("ToggleCamcorder::pPreviewResolution w:%d,h:%d", PreviewResolutionDim.width, PreviewResolutionDim.height);
+
+ r = __pCamera->SetPreviewResolution(PreviewResolutionDim);
+ TryCatch(r == E_SUCCESS, , "Camera::SetPreviewResolution fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->SetRecordingResolution(PreviewResolutionDim);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetRecordingResolution() fail[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+CameraPresentationModel::ToggleCameraDirection(int direction)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int currentMode = 0;
+ int captureResolutionCount = 0;
+ Dimension* pCaptureResolution = null;
+
+ __pCameraSettingsPresentationModel->GetValue(SECTION_CAMERA, CURRENT_MODE, currentMode);
+ AppLogDebug("SetSelfPortraitMode : currentMode = %d", currentMode);
+
+ Terminate(currentMode);
+
+ if (direction == CAMERA_DIRECTION_BACK)
+ {
+ AppLogDebug("CameraDirection::CAMERA_DIRECTION_BACK");
+
+ __pCamera = new (std::nothrow) Camera();
+ __pCamera->Construct(*this, CAMERA_PRIMARY);
+ }
+ else if (direction == CAMERA_DIRECTION_FRONT)
+ {
+ AppLogDebug("CameraDirection::CAMERA_DIRECTION_FRONT");
+
+ __pCamera = new (std::nothrow) Camera();
+ __pCamera->Construct(*this, CAMERA_SECONDARY);
+ }
+
+ r = __pCamera->PowerOn();
+ TryReturnVoid(r == E_SUCCESS, "Camera::PowerOn fail[%s]", GetErrorMessage(r));
+
+ if (currentMode == CAMERA_MODE_RECORD)
+ {
+ if (__pVideoRecorder == null)
+ {
+ __pVideoRecorder = new (std::nothrow) VideoRecorder();
+ __pVideoRecorder->Construct(*this, *__pCamera);
+ }
+ }
+
+ if (currentMode == CAMERA_MODE_SNAPSHOT && direction == CAMERA_DIRECTION_FRONT)
+ {
+ __pCaptureResolutionList = __pCamera->GetSupportedCaptureResolutionListN();
+ TryCatch(__pCaptureResolutionList != null, , "pCaptureResolutionList is null");
+
+ captureResolutionCount = __pCaptureResolutionList->GetCount();
+
+ pCaptureResolution = static_cast< Dimension*>(__pCaptureResolutionList->GetAt(captureResolutionCount - 1));
+ TryCatch(pCaptureResolution != null, , " pCaptureResolution->GetAt()");
+
+ r = __pCamera->SetCaptureResolution(*pCaptureResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetCaptureResolution fail[%s]", GetErrorMessage(r));
+ }
+
+ if (direction == CAMERA_DIRECTION_FRONT)
+ {
+ __pCamera->SetFlip(CAMERA_FLIP_HORIZONTAL);
+ }
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ }
+
+ delete __pCaptureResolutionList;
+ __pCaptureResolutionList = null;
+
+ return;
+}
+
+void
+CameraPresentationModel::SetMode(int mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ String contentSubDirectory = STRING_CAMERA_FOLDER_NAME;
+ Directory contentDirectory;
+ int cameraSelfPortraitEnable = CAM_SELF_PORTRAIT_MODE_PRIMARY;
+ int camcorderSelfPortraitEnable = CAM_SELF_PORTRAIT_MODE_PRIMARY;
+ int direction = CAMERA_DIRECTION_BACK;
+
+ AppLogDebug("SetMode __SetMode = %d && mode = %d", __cameraMode, mode);
+
+ if (__pCamera != null)
+ {
+ if (__pCamera->IsPoweredOn() == true)
+ {
+ AppLogDebug("StopCamera or Terminate");
+
+ __pCameraSettingsPresentationModel->GetValue(SECTION_CAMERA, SELF_PORTRAIT_ENABLE, cameraSelfPortraitEnable);
+
+ __pCameraSettingsPresentationModel->GetValue(SECTION_CAMCORDER, SELF_PORTRAIT_ENABLE, camcorderSelfPortraitEnable);
+
+ AppLogDebug("SECTION_CAMERA mode = %d && SECTION_CAMCORDER mode = %d", cameraSelfPortraitEnable, camcorderSelfPortraitEnable);
+
+ GetMediaCapability(CAMERA_SECONDARY_DIRECTION, direction);
+
+ if ((cameraSelfPortraitEnable == CAM_SELF_PORTRAIT_MODE_SECONDARY && camcorderSelfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ || (cameraSelfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY && camcorderSelfPortraitEnable == CAM_SELF_PORTRAIT_MODE_SECONDARY)
+ )
+ {
+ if (__cameraMode == mode && direction == CAMERA_DIRECTION_FRONT)
+ {
+ AppLogDebug("StopCamera");
+ StopCamera();
+ }
+ else
+ {
+ AppLogDebug("Terminate");
+ Terminate(mode);
+ }
+ }
+ else
+ {
+ AppLogDebug("StopCamera");
+ StopCamera();
+ }
+ }
+ }
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ if (__pCamera == null)
+ {
+ AppLogDebug("CAMERA_MODE::NOT_INITIALIZED");
+
+ if (__pContentManager == null)
+ {
+ __pContentManager = new (std::nothrow) ContentManager();
+ __pContentManager->Construct();
+ }
+
+ if (__pImageContentInfo == null)
+ {
+ __pImageContentInfo = new (std::nothrow) ImageContentInfo();
+ __pImageContentInfo->Construct(null);
+ }
+
+ r = CreateThumbnail(CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "CreateThumbnail() fail[%s]", GetErrorMessage(r));
+
+ InitializeCamera();
+ }
+ else if (__pCamera != null)
+ {
+ AppLogDebug("CAMERA_MODE::INITIALIZED");
+
+ r = CreateThumbnail(CAMERA_MODE_SNAPSHOT);
+ TryReturnVoid(r == E_SUCCESS, "CreateThumbnail() fail[%s]", GetErrorMessage(r));
+
+ ToggleCameraCamcorder(CAMERA_MODE_SNAPSHOT);
+ }
+ }
+ else if (mode == CAMERA_MODE_RECORD)
+ {
+ if (__pCamera == null)
+ {
+ AppLogDebug("CAMCORDER_MODE::NOT_INITIALIZED");
+ if (__pContentManager == null)
+ {
+ __pContentManager = new (std::nothrow) ContentManager();
+ __pContentManager->Construct();
+ }
+
+ if (__pVideoContentInfo == null)
+ {
+ __pVideoContentInfo = new (std::nothrow) VideoContentInfo();
+ __pVideoContentInfo->Construct(null);
+ }
+
+ r = CreateThumbnail(CAMERA_MODE_RECORD);
+ TryReturnVoid(r == E_SUCCESS, "CreateThumbnail() fail[%s]", GetErrorMessage(r));
+
+ InitializeCamcorder();
+ }
+ else if (__pCamera != null)
+ {
+ AppLogDebug("CAMCORDER_MODE::INITIALIZED");
+
+ if (__pVideoRecorder == null)
+ {
+ __pVideoRecorder = new (std::nothrow) VideoRecorder();
+ __pVideoRecorder->Construct(*this, *__pCamera);
+ }
+
+ r = CreateThumbnail(CAMERA_MODE_RECORD);
+ TryReturnVoid(r == E_SUCCESS, "CreateThumbnail() fail[%s]", GetErrorMessage(r));
+
+ ToggleCameraCamcorder(CAMERA_MODE_RECORD);
+ }
+ }
+ __cameraMode = mode;
+ AppLogDebug("EXIT");
+}
+
+Tizen::Graphics::Bitmap*
+CameraPresentationModel::GetLatestThumbnail(void)
+{
+ AppLogDebug("ENTER");
+ if (__pBitmap)
+ {
+ AppLogDebug("__pBitmap NOT null");
+ AppLogDebug("EXIT");
+ return __pBitmap;
+ }
+ else
+ {
+ AppLogDebug("__pBitmap null");
+ AppLogDebug("EXIT");
+ return null;
+ }
+}
+
+int
+CameraPresentationModel::GetContentCount(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __contentCount;
+}
+
+Tizen::Base::String
+CameraPresentationModel::SearchContentFilePath(int mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ ContentDirectory contentDirectory;
+ IList* pContentList = null;
+ String contentFullPath = L"";
+ String filePath = L"";
+ String combineText = L"";
+ int storageType = 0;
+ int countPerPage = 0;
+
+ r = GetValue(STORAGE_TYPE, storageType);
+ if (r != E_SUCCESS)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+ }
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ filePath = STRING_CONTENT_CAMERA_PATH_EXT;
+ }
+ else if (storageType == STORAGE_TYPE_PHONE)
+ {
+ filePath = STRING_CONTENT_CAMERA_PATH;
+ }
+ AppLogDebug("SearchContentFilePath :: pFilePath = %ls", filePath.GetPointer());
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ r = contentDirectory.Construct(CONTENT_TYPE_IMAGE);
+ }
+ else
+ {
+ r = contentDirectory.Construct(CONTENT_TYPE_VIDEO);
+ }
+ TryCatch(r == E_SUCCESS, , "contentDirectory.Construct[%s]", GetErrorMessage(r));
+
+ countPerPage = contentDirectory.GetContentDirectoryItemCount(filePath);
+ AppLogDebug("SearchContentFilePath :: countPerPage = %d", countPerPage);
+
+ pContentList = contentDirectory.GetContentDirectoryItemListN(filePath,
+ SEARCH_PAGE_NO,
+ countPerPage,
+ CONTENT_INFO_ORDER,
+ SORT_ORDER_ASCENDING);
+ TryCatch(pContentList != null, , "pContentList is null");
+
+ __contentCount = pContentList->GetCount();
+ AppLogDebug("SearchContentFilePath :: __contentCount = %d", __contentCount);
+
+ if ((pContentList != null) && (pContentList->GetCount() > 0))
+ {
+ IEnumerator* pEnum = pContentList->GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ ContentInfo* pContentInfo = static_cast<ContentInfo*>(pEnum->GetCurrent());
+ contentFullPath = pContentInfo->GetContentPath();
+
+ if (combineText.CompareTo(EMPTY_SPACE) != 0)
+ {
+ combineText.Append(L";");
+ }
+
+ combineText.Append(contentFullPath);
+ }
+
+ delete pEnum;
+ pEnum = null;
+ }
+
+ AppLogDebug("SearchContentFilePath :: combineText = %ls", combineText.GetPointer());
+
+ if (pContentList != null)
+ {
+ pContentList->RemoveAll(true);
+ delete pContentList;
+ }
+
+ AppLogDebug("EXIT");
+ return combineText;
+
+CATCH:
+ AppLogDebug("EXIT - CATCH");
+ return combineText;
+}
+
+Tizen::Base::String
+CameraPresentationModel::GetContentFilePath(int currentCameraMode)
+{
+ AppLogDebug("ENTER");
+ String contentFullName = L"";
+
+ contentFullName = SearchContentFilePath(currentCameraMode);
+
+ AppLogDebug("EXIT");
+ return contentFullName;
+}
+
+result
+CameraPresentationModel::GetLatestContentName(int currentCameraMode, Tizen::Base::String& latestContentName)
+{
+ AppLogDebug("ENTER");
+ String contentSubDirectory = STRING_CAMERA_FOLDER_NAME;
+ String fileExtension = L"";
+ String directoryEntryName = L"";
+ String temporaryEntryName = L"";
+ Directory contentDirectory;
+ result r = E_SUCCESS;
+ DirEnumerator* pDirEnum = null;
+ DateTime directoryEntryDateTime;
+ DateTime temporaryEntryDateTime = DateTime::GetMinValue();
+ int storageType = STORAGE_TYPE_PHONE;
+
+ r = GetValue(STORAGE_TYPE, storageType);
+ TryCatch(r == E_SUCCESS, , "Err catch [%s]", GetErrorMessage(r));
+
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ r = contentDirectory.Construct(Environment::GetMediaPath().GetPointer() + contentSubDirectory);
+
+ AppLogDebug("GetLatestContentName::contentDirectory.Construct r = %s", GetErrorMessage(r));
+ if (r == E_FILE_NOT_FOUND)
+ {
+ r = contentDirectory.Create((Environment::GetMediaPath().GetPointer() + contentSubDirectory), true);
+ TryCatch(r == E_SUCCESS, , "contentDirectory Create Fail");
+
+ contentDirectory.Construct(Environment::GetMediaPath().GetPointer() + contentSubDirectory);
+ }
+ }
+ else if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ r = contentDirectory.Construct(Environment::GetExternalStoragePath().GetPointer() + contentSubDirectory);
+
+ if (r == E_FILE_NOT_FOUND)
+ {
+ r = contentDirectory.Create((Environment::GetExternalStoragePath().GetPointer() + contentSubDirectory), true);
+ TryCatch(r == E_SUCCESS, , "contentDirectory Create Fail");
+
+ contentDirectory.Construct(Environment::GetExternalStoragePath().GetPointer() + contentSubDirectory);
+ }
+ }
+
+ pDirEnum = contentDirectory.ReadN();
+ AppLogDebug("contentDirectory.ReadN()r = %s", GetErrorMessage(GetLastResult()));
+ TryCatch(pDirEnum != null, r = E_SYSTEM, "pDirEnum is null");
+
+ if (currentCameraMode == CAMERA_MODE_SNAPSHOT)
+ {
+ r = fileExtension.Append(STRING_EXTENSION_JPG);
+ TryCatch(r == E_SUCCESS, , "String::Append() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ r = fileExtension.Append(STRING_EXTENSION_MP4);
+ TryCatch(r == E_SUCCESS, , "String::Append() fail[%s]", GetErrorMessage(r));
+ }
+
+ while (pDirEnum->MoveNext() == E_SUCCESS)
+ {
+ DirEntry directoryEntry = pDirEnum->GetCurrentDirEntry();
+ directoryEntryName = directoryEntry.GetName();
+ if (directoryEntryName.Contains(fileExtension))
+ {
+ directoryEntryDateTime = directoryEntry.GetDateTime();
+ AppLogDebug("DirEntry::GetDateTime() name %ls Time %ls", directoryEntryName.GetPointer(), directoryEntryDateTime.ToString().GetPointer());
+
+ if (directoryEntryDateTime > temporaryEntryDateTime)
+ {
+ temporaryEntryDateTime = directoryEntryDateTime;
+ temporaryEntryName = directoryEntryName;
+ AppLogDebug("dt_temp change Str %ls Time %ls", temporaryEntryName.GetPointer(), temporaryEntryDateTime.ToString().GetPointer());
+ }
+ }
+ else
+ {
+ AppLogDebug("Dont Contains(fileExtension)");
+ }
+ }
+
+ if (!(temporaryEntryName.IsEmpty()))
+ {
+ latestContentName.Clear();
+ r = latestContentName.Append(temporaryEntryName);
+ TryCatch(r == E_SUCCESS, , "String::Append() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("latestContentName = %ls", latestContentName.GetPointer());
+ }
+
+ delete pDirEnum;
+ pDirEnum = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete pDirEnum;
+ pDirEnum = null;
+
+ return r;
+}
+
+Tizen::Graphics::Dimension
+CameraPresentationModel::GetPreviewResolution(void) const
+{
+ AppLogDebug("ENTER");
+ Dimension dimension;
+
+ dimension = __pCamera->GetPreviewResolution();
+
+ AppLogDebug("CameraPresentationModel::GetPreviewResolution(%d, %d)", dimension.width, dimension.height);
+
+ AppLogDebug("EXIT");
+ return dimension;
+}
+
+result
+CameraPresentationModel::SetPreviewResolution(Tizen::Graphics::Dimension previewResolution)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetPreviewResolution(previewResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetPreviewResolution fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+Tizen::Graphics::Dimension
+CameraPresentationModel::GetCaptureResolution(void) const
+{
+ AppLogDebug("ENTER");
+ Dimension dimension;
+
+ dimension = __pCamera->GetCaptureResolution();
+
+ AppLogDebug("CameraPresentationModel::GetCaptureResolution(%d, %d)", dimension.width, dimension.height);
+
+ AppLogDebug("EXIT");
+ return dimension;
+}
+
+result
+CameraPresentationModel::SetCaptureResolution(Tizen::Graphics::Dimension captureResolution)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetCaptureResolution(captureResolution);
+ TryCatch(r == E_SUCCESS, , "Camera::SetCaptureResolution fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+Tizen::Base::Collection::IList*
+CameraPresentationModel::GetCaptureResolutionList(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+
+ r = GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ AppLogDebug("CAM_SELF_PORTRAIT_MODE_PRIMARY");
+ __pCaptureResolutionList = MediaCapability::GetValueN(CAMERA_PRIMARY_CAPTURE_RESOLUTION);
+ TryCatch(__pCaptureResolutionList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+ else
+ {
+ AppLogDebug("CAM_SELF_PORTRAIT_MODE_SECONDARY");
+ __pCaptureResolutionList = MediaCapability::GetValueN(CAMERA_SECONDARY_CAPTURE_RESOLUTION);
+ TryCatch(__pCaptureResolutionList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+ AppLogDebug("EXIT");
+ return __pCaptureResolutionList;
+
+CATCH:
+ if (__pCaptureResolutionList)
+ {
+ __pCaptureResolutionList->RemoveAll(true);
+ }
+
+ delete __pCaptureResolutionList;
+
+ __pCaptureResolutionList = null;
+
+ return __pCaptureResolutionList;
+}
+
+Tizen::Base::Collection::IList*
+CameraPresentationModel::GetPreviewResolutionList(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+
+ r = GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ __pPreviewResolutionList = MediaCapability::GetValueN(CAMERA_PRIMARY_PREVIEW_RESOLUTION);
+ TryCatch(__pPreviewResolutionList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+ else
+ {
+ __pPreviewResolutionList = MediaCapability::GetValueN(CAMERA_SECONDARY_PREVIEW_RESOLUTION);
+ TryCatch(__pPreviewResolutionList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+ AppLogDebug("EXIT");
+ return __pPreviewResolutionList;
+
+CATCH:
+ if (__pPreviewResolutionList)
+ {
+ __pPreviewResolutionList->RemoveAll(true);
+ }
+
+ delete __pPreviewResolutionList;
+
+ __pPreviewResolutionList = null;
+
+ return __pPreviewResolutionList;
+}
+
+bool
+CameraPresentationModel::IsPreviewState(void)
+{
+ AppLogDebug("ENTER");
+ if (GetCameraState() == CAMERA_STATE_PREVIEW)
+ {
+ AppLogDebug("IsPreviewState YES");
+ AppLogDebug("EXIT");
+ return true;
+ }
+ else
+ {
+ AppLogDebug("IsPreviewState NOT");
+ AppLogDebug("EXIT");
+ return false;
+ }
+
+ AppLogDebug("EXIT");
+ return false;
+}
+
+bool
+CameraPresentationModel::IsCameraInstance(void)
+{
+ AppLogDebug("ENTER");
+ if (__pCamera == null)
+ {
+ AppLogDebug("EXIT");
+ return false;
+ }
+
+ AppLogDebug("EXIT");
+ return true;
+}
+
+bool
+CameraPresentationModel::IsCameraPoweredOn(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("IsPoweredOn State[%d]", __pCamera->IsPoweredOn());
+ AppLogDebug("EXIT");
+
+ return __pCamera->IsPoweredOn();
+}
+
+bool
+CameraPresentationModel::IsStorageCardMounted(void) const
+{
+ AppLogDebug("ENTER");
+ String strState = L"";
+
+ DeviceManager::GetState(StorageCard, strState);
+
+ if (strState == STRING_SDCARD_MOUNTED_STATE)
+ {
+ AppLogDebug("EXIT");
+ return true;
+ }
+ else
+ {
+ AppLogDebug("EXIT");
+ return false;
+ }
+}
+
+bool
+CameraPresentationModel::IsCharging(void)
+{
+ AppLogDebug("ENTER");
+ bool isCharging = false;
+
+ Battery::IsCharging(isCharging);
+
+ AppLogDebug("EXIT");
+ return isCharging;
+}
+
+void
+CameraPresentationModel::StartPreview(const Tizen::Graphics::BufferInfo* pBufferInfo)
+{
+ AppLogDebug("ENTER StartPreview state=%d", __pCamera->GetState());
+ result r = E_SUCCESS;
+ if (GetCameraState() == CAMERA_STATE_INITIALIZED || GetCameraState() == CAMERA_STATE_CAPTURED)
+ {
+ r = __pCamera->StartPreview(pBufferInfo, false);
+ TryReturnVoid(r == E_SUCCESS, "Camera::StartPreview() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("Before the StartPreview() method is called, camera state should be CAMERA_STATE_INITIALIZED or CAMERA_STATE_CAPTURED");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::StopPreview(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pCamera != null)
+ {
+ if (__pCamera->GetState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->StopPreview();
+ TryReturnVoid(r == E_SUCCESS, "Camera::StopPreview() [%s]", GetErrorMessage(r));
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::StopCamera(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pVideoRecorder != null)
+ {
+ AppLogDebug("VideoRecorder State[%d]", __pVideoRecorder->GetState());
+
+ if (__pVideoRecorder->GetState()== RECORDER_STATE_RECORDING
+ || __pVideoRecorder->GetState() == RECORDER_STATE_PAUSED
+ )
+ {
+ r = __pVideoRecorder->Stop();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoRecorder::Stop() [%s]", GetErrorMessage(r));
+ }
+ }
+
+ if (__pCamera != null)
+ {
+ AppLogDebug("Camera State[%d]", __pCamera->GetState());
+
+ if (__pCamera->GetState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->StopPreview();
+ TryReturnVoid(r == E_SUCCESS, "Camera::StopPreview() [%s]", GetErrorMessage(r));
+ }
+
+ if (__pCamera->IsPoweredOn() == true)
+ {
+ r = __pCamera->PowerOff();
+ TryReturnVoid(r == E_SUCCESS, "Camera::PowerOff() [%s]", GetErrorMessage(r));
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::Capture(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (GetCameraState() == CAMERA_STATE_PREVIEW)
+ {
+ r = __pCamera->Capture();
+ TryReturnVoid( r == E_SUCCESS, "Camera::Capture() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("Before the Capture() method is called, camera state should be CAMERA_STATE_PREVIEW");
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::StartRecord(void)
+{
+ AppLogDebug("ENTER");
+
+ String* pFullFileName = null;
+ result r = E_SUCCESS;
+ long maxRecordDefaultTime = 0;
+ String camcorderTemporaryFilePath;
+
+ __onVideoRecorderStarted = true;
+
+ camcorderTemporaryFilePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", App::GetInstance()->GetAppRootPath().GetPointer(), STRING_CAMCORDER_TEMPORARY_FILE);
+
+ pFullFileName = new (std::nothrow) String();
+ r = CreateFileName(*pFullFileName);
+ TryCatch(r == E_SUCCESS, , "pFullFileName is null");
+
+ __lastestContentName.Clear();
+ r = __lastestContentName.Append(pFullFileName->GetPointer());
+ TryCatch(r == E_SUCCESS, , "String::Append() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("Record pFullFileName = %ls", pFullFileName->GetPointer());
+ if (__pVideoRecorder == null)
+ {
+ __pVideoRecorder = new (std::nothrow) VideoRecorder();
+ __pVideoRecorder->Construct(*this, *__pCamera);
+ }
+
+ r = __pVideoRecorder->SetQuality(RECORDING_QUALITY_HIGH);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetQuality() fail[%s]", GetErrorMessage(r));
+
+ maxRecordDefaultTime = RECORD_DEFAULT_SEC * SECONDS_PER_MINUTE;
+
+ r = __pVideoRecorder->SetMaxRecordingTime(maxRecordDefaultTime);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetMaxRecordingTime() fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->SetFormat(CODEC_AAC, CODEC_MPEG4, MEDIA_CONTAINER_MP4);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::SetFormat() fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->CreateVideoFile(camcorderTemporaryFilePath, true);
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::CreateVideoFile() fail[%s]", GetErrorMessage(r));
+
+ r = __pVideoRecorder->Record();
+ TryCatch(r == E_SUCCESS, , "VideoRecorder::Record() fail[%s]", GetErrorMessage(r));
+
+ delete pFullFileName;
+ pFullFileName = null;
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ delete pFullFileName;
+ pFullFileName = null;
+}
+
+void
+CameraPresentationModel::StopRecord(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pVideoRecorder != null)
+ {
+ r = __pVideoRecorder->Stop();
+ TryReturnVoid(r == E_SUCCESS, "VideoRecorder::Stop() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::CancelRecord(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ if (__pVideoRecorder != null)
+ {
+ r = __pVideoRecorder->Cancel();
+ TryReturnVoid(r == E_SUCCESS, "VideoRecorder::Cancel() fail[%s]", GetErrorMessage(r));
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetFocusMode(CameraFocusMode mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetFocusMode(mode);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetFocusMode() [%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetContinuousAutoFocus(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetFocusMode(CAMERA_FOCUS_MODE_CONTINUOUS_AUTO);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetFocusMode() [%s]", GetErrorMessage(r));
+
+ r = __pCamera->SetAutoFocus(true);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetAutoFocus() [%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetAutoFocusPoint(const Tizen::Graphics::Point& currentPosition)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ ArrayList currentPositionList;
+ currentPositionList.Construct();
+ currentPositionList.Add(currentPosition);
+
+ r = __pCamera->SetFocusMode(CAMERA_FOCUS_MODE_NORMAL);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetFocusMode() [%s]", GetErrorMessage(r));
+
+ r = __pCamera->SetAutoFocusPoint(currentPositionList);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetAutoFocusPoint() [%s]", GetErrorMessage(r));
+
+ r = __pCamera->SetAutoFocus(true);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetAutoFocus() [%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+int
+CameraPresentationModel::GetExposure(void) const
+{
+ AppLogDebug("ENTER");
+ int exposureValue = 0;
+
+ exposureValue = __pCamera->GetExposure();
+
+ AppLogDebug("EXIT");
+ return exposureValue;
+}
+
+void
+CameraPresentationModel::SetExposure(int exposureValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ exposureValue = MAX_CAMERA_EXPOSURE_VALUE - exposureValue;
+
+ r = __pCamera->SetExposure(exposureValue);
+ TryReturnVoid(r == E_SUCCESS, "SetExposure() fail[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+int
+CameraPresentationModel::GetBrightness(void) const
+{
+ AppLogDebug("ENTER");
+ int brightnessValue = 0;
+
+ brightnessValue = __pCamera->GetBrightness();
+
+ AppLogDebug("EXIT");
+ return brightnessValue;
+}
+
+void
+CameraPresentationModel::SetBrightness(int brightnessValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ brightnessValue = MAX_CAMERA_EXPOSURE_VALUE - brightnessValue;
+
+ r = __pCamera->SetBrightness(brightnessValue);
+ TryReturnVoid(r == E_SUCCESS, "Camera::SetBrightness() fail[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+CameraWhiteBalance
+CameraPresentationModel::GetWhiteBalance(void) const
+{
+ AppLogDebug("ENTER");
+ CameraWhiteBalance whiteBalanceValue = CAMERA_WHITE_BALANCE_AUTO;
+
+ whiteBalanceValue = __pCamera->GetWhiteBalance();
+
+ AppLogDebug("EXIT");
+ return whiteBalanceValue;
+}
+
+void
+CameraPresentationModel::SetWhiteBalance(CameraWhiteBalance whitebalanceValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetWhiteBalance(whitebalanceValue);
+ TryReturnVoid(r == E_SUCCESS, "SetWhiteBalance() fail[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+Tizen::Base::Collection::IList*
+CameraPresentationModel::GetIsoList(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int selfPortraitEnable = 0;
+
+ r = GetValue(SELF_PORTRAIT_ENABLE, selfPortraitEnable);
+
+ if (selfPortraitEnable == CAM_SELF_PORTRAIT_MODE_PRIMARY)
+ {
+ __pIsoList = MediaCapability::GetValueN(CAMERA_PRIMARY_ISO_LEVEL);
+ TryCatch(__pIsoList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+ else
+ {
+ __pIsoList = MediaCapability::GetValueN(CAMERA_SECONDARY_ISO_LEVEL);
+ TryCatch(__pIsoList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(GetLastResult()));
+ }
+
+ AppLogDebug("EXIT");
+ return __pIsoList;
+
+CATCH:
+ if (__pIsoList)
+ {
+ __pIsoList->RemoveAll(true);
+ }
+
+ delete __pIsoList;
+
+ __pIsoList = null;
+
+ return __pIsoList;
+}
+
+CameraIsoLevel
+CameraPresentationModel::GetIsoLevel(void) const
+{
+ AppLogDebug("ENTER");
+ CameraIsoLevel isoValue = CAMERA_ISO_DEFAULT;
+
+ isoValue = __pCamera->GetIsoLevel();
+
+ AppLogDebug("EXIT");
+ return isoValue;
+}
+
+void
+CameraPresentationModel::SetIsoLevel(CameraIsoLevel isoValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->SetIsoLevel(isoValue);
+ TryReturnVoid(r == E_SUCCESS, "SetIsoLevel() fail[%s]", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+int
+CameraPresentationModel::GetMaxZoomLevel(void) const
+{
+ AppLogDebug("ENTER");
+ int zoomLevel = 0;
+
+ zoomLevel = __pCamera->GetMaxZoomLevel();
+
+ AppLogDebug("EXIT");
+ return zoomLevel;
+}
+
+int
+CameraPresentationModel::GetZoomLevel(void) const
+{
+ AppLogDebug("ENTER");
+ int zoomLevel = 0;
+
+ zoomLevel = __pCamera->GetZoomLevel();
+
+ AppLogDebug("EXIT");
+ return zoomLevel;
+}
+
+void
+CameraPresentationModel::SetZoomValue(int zoomValue)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ int currentZoomValue = __pCamera->GetZoomLevel();
+
+ if (currentZoomValue < zoomValue)
+ {
+ for (int i = currentZoomValue; i < zoomValue; i++)
+ {
+ r = __pCamera->ZoomIn();
+ TryReturnVoid(r == E_SUCCESS, "ZoomIn() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ else
+ {
+ for (int i = currentZoomValue; i > zoomValue; i--)
+ {
+ r = __pCamera->ZoomOut();
+ TryReturnVoid(r == E_SUCCESS, "ZoomOut() fail[%s]", GetErrorMessage(r));
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+CameraFlashMode
+CameraPresentationModel::GetFlashMode(void) const
+{
+ AppLogDebug("ENTER");
+ CameraFlashMode cameraFlashMode = CAMERA_FLASH_MODE_OFF;
+
+ cameraFlashMode = __pCamera->GetFlashMode();
+
+ AppLogDebug("Get flashMode = %d", cameraFlashMode);
+
+ AppLogDebug("EXIT");
+ return cameraFlashMode;
+}
+
+void
+CameraPresentationModel::SetFlashMode(CameraFlashMode mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AppLogDebug("Set flashMode = %d", mode);
+
+ if (__pCamera != null)
+ {
+ if (mode == CAMERA_FLASH_MODE_OFF)
+ {
+ if (__pCamera->IsFlashOn())
+ {
+ r = __pCamera->SetFlashMode(CAMERA_FLASH_MODE_OFF);
+ }
+ }
+ else
+ {
+ r = __pCamera->SetFlashMode(mode);
+ }
+ TryReturnVoid(r == E_SUCCESS, "SetFlashMode() fail[%s]", GetErrorMessage(r));
+ }
+ else
+ {
+ AppLogDebug("__pCamera is null");
+ }
+ AppLogDebug("EXIT");
+}
+
+Tizen::Ui::OrientationStatus
+CameraPresentationModel::GetOrientation(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __dir;
+}
+
+void
+CameraPresentationModel::SetOrientation(Tizen::Ui::OrientationStatus dir)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ __dir = dir;
+}
+
+int
+CameraPresentationModel::GetAppControlRequestType(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __appControlRequestType;
+}
+
+void
+CameraPresentationModel::SetAppControlRequestType(int requestType)
+{
+ AppLogDebug("ENTER");
+ __appControlRequestType = requestType;
+ AppLogDebug("EXIT");
+}
+
+Tizen::Base::String
+CameraPresentationModel::GetErrorResult(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __errorResult;
+}
+
+void
+CameraPresentationModel::SetErrorResult(const Tizen::Base::String& string)
+{
+ AppLogDebug("ENTER");
+ __errorResult = string;
+ AppLogDebug("EXIT");
+}
+
+Tizen::System::BatteryLevel
+CameraPresentationModel::GetBatteryLevel(void) const
+{
+ AppLogDebug("ENTER");
+ BatteryLevel batteryLevel;
+
+ Battery::GetCurrentLevel(batteryLevel);
+
+ AppLogDebug("EXIT");
+ return batteryLevel;
+}
+
+Tizen::Media::CameraState
+CameraPresentationModel::GetCameraState(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __pCamera->GetState();
+}
+
+Tizen::Media::RecorderState
+CameraPresentationModel::GetRecorderState(void) const
+{
+ AppLogDebug("ENTER");
+ TryCatch(__pVideoRecorder != null, , "__pVideoRecorder is null");
+
+ AppLogDebug("EXIT");
+ return __pVideoRecorder->GetState();
+
+CATCH:
+ return RECORDER_STATE_ERROR;
+}
+
+long long
+CameraPresentationModel::GetAvailableStorageSpace(void) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int storageType;
+ long long availableStorageSpace = 0;
+
+ r = GetValue(STORAGE_TYPE, storageType);
+ if (r != E_SUCCESS)
+ {
+ storageType = STORAGE_TYPE_PHONE;
+ }
+
+ if (storageType == STORAGE_TYPE_PHONE)
+ {
+ String key(STRING_KEY_STORAGE_PHONE);
+ r = RuntimeInfo::GetValue(key, availableStorageSpace);
+ TryCatch(r == E_SUCCESS, , "To get a value is fail");
+ }
+ else if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ if (IsStorageCardMounted() == true)
+ {
+ String key(STRING_KEY_STORAGE_SDCARD);
+
+ r = RuntimeInfo::GetValue(key, availableStorageSpace);
+ TryCatch(r == E_SUCCESS, , "To get a value is fail");
+ }
+ else
+ {
+ availableStorageSpace = 0;
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return availableStorageSpace;
+
+CATCH:
+ availableStorageSpace = 0;
+ return availableStorageSpace;
+}
+
+void
+CameraPresentationModel::ZoomIn(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->ZoomIn();
+ TryReturnVoid(r == E_SUCCESS, "ZoomIn() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::ZoomOut(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCamera->ZoomOut();
+ TryReturnVoid(r == E_SUCCESS, "ZoomOut() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetExifOrientation(int orientation)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ switch (orientation)
+ {
+ case CAM_SET_EXIF_ORIENTATION_MODE_PORTRAIT:
+ {
+ r = __pCamera->SetExifOrientation(CAMERA_EXIF_ORIENTATION_RIGHT_TOP);
+ }
+ break;
+
+ case CAM_SET_EXIF_ORIENTATION_MODE_PORTRAIT_REVERSE:
+ {
+ r = __pCamera->SetExifOrientation(CAMERA_EXIF_ORIENTATION_LEFT_BOTTOM);
+ }
+ break;
+
+ case CAM_SET_EXIF_ORIENTATION_MODE_LANDSCAPE:
+ {
+ r = __pCamera->SetExifOrientation(CAMERA_EXIF_ORIENTATION_TOP_LEFT);
+ }
+ break;
+
+ case CAM_SET_EXIF_ORIENTATION_MODE_LANDSCAPE_REVERSE:
+ {
+ r = __pCamera->SetExifOrientation(CAMERA_EXIF_ORIENTATION_BOTTOM_RIGHT);
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::KeepScreenOnState(bool keepOn, bool dimming)
+{
+ result r = E_FAILURE;
+ AppLogDebug("ENTER");
+
+ AppLogDebug("PowerManager keepOn : %d dimming : %d", keepOn, dimming);
+
+ r = PowerManager::KeepScreenOnState(keepOn, dimming);
+ TryReturnVoid(r == E_SUCCESS, "PowerManager::KeepScreenOnState() failed:%s", GetErrorMessage(r));
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetPresentationChangedEventListener(ICameraEventListner* pObserverListener)
+{
+ AppLogDebug("ENTER");
+ __pCameraListener = pObserverListener;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::CallOnPresentationModeChanged(CameraActionEvent event)
+{
+ AppLogDebug("ENTER");
+ __pCameraListener->OnCameraActionPerformed(event);
+ AppLogDebug("EXIT");
+}
+
+result
+CameraPresentationModel::ResetCameraSettingsRegistry(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCameraSettingsPresentationModel->ResetCameraSettingsRegistry();
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::SetDefaultValueItems(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMERA, EXPOSURE_VALUE, EXPOSURE_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMERA, BRIGHTNESS_VALUE, BRIGHTNESS_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMERA, WHITE_BALANCE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMCORDER, EXPOSURE_VALUE, EXPOSURE_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMCORDER, BRIGHTNESS_VALUE, BRIGHTNESS_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pCameraSettingsPresentationModel->SetValue(SECTION_CAMCORDER, WHITE_BALANCE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::GetValue(const Tizen::Base::String& entryName, int& value) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int mode = 0;
+ String strSectionName = SECTION_CAMERA;
+
+ if (entryName.Equals(String(CURRENT_MODE)))
+ {
+ strSectionName = SECTION_CAMERA;
+ }
+ else
+ {
+ r = __pCameraSettingsPresentationModel->GetValue(SECTION_CAMERA, CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ strSectionName = SECTION_CAMERA;
+ }
+ else
+ {
+ strSectionName = SECTION_CAMCORDER;
+ }
+ }
+
+ r = __pCameraSettingsPresentationModel->GetValue(strSectionName, entryName, value);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::SetValue(const Tizen::Base::String& entryName, const int value)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int mode = 0;
+ String strSectionName = SECTION_CAMERA;
+
+ if (entryName.Equals(String(CURRENT_MODE)))
+ {
+ strSectionName = SECTION_CAMERA;
+ }
+ else
+ {
+ r = __pCameraSettingsPresentationModel->GetValue(SECTION_CAMERA, CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ if (mode == CAMERA_MODE_SNAPSHOT)
+ {
+ strSectionName = SECTION_CAMERA;
+ }
+ else
+ {
+ strSectionName = SECTION_CAMCORDER;
+ }
+ }
+
+ r = __pCameraSettingsPresentationModel->SetValue(strSectionName, entryName, value);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::GetMediaCapability(Tizen::Base::String key, bool& value) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ r = MediaCapability::GetValue(key, value);
+
+ AppLogDebug("GetMediaCapability for %ls return = %ls", key.GetPointer(), GetErrorMessage(r));
+ TryCatch(r == E_SUCCESS, , "MediaCapability::GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::GetMediaCapability(Tizen::Base::String key, int& value) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ r = MediaCapability::GetValue(key, value);
+
+ AppLogDebug("GetMediaCapability for %ls return = %ls", key.GetPointer(), GetErrorMessage(r));
+ TryCatch(r == E_SUCCESS, , "MediaCapability::GetValue() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraPresentationModel::GetMediaCapability(Tizen::Base::String key) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ IList* pList = null;
+ pList = MediaCapability::GetValueN(key);
+ r = GetLastResult();
+ AppLogDebug("GetMediaCapability for %ls return = %ls", key.GetPointer(), GetErrorMessage(r));
+ TryCatch(pList != null, , "MediaCapability::GetValueN() fail[%s]", GetErrorMessage(r));
+
+ pList->RemoveAll(true);
+ delete pList;
+ pList = null;
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ AppLogDebug("EXIT - CATCH");
+ return r;
+}
+
+void
+CameraPresentationModel::OnCameraAutoFocused(bool completeCondition)
+{
+ AppLogDebug("ENTER");
+ CameraFocusMode focusMode = CAMERA_FOCUS_MODE_NONE;
+
+ if (completeCondition == true)
+ {
+ focusMode = __pCamera->GetFocusMode();
+
+ if (focusMode == CAMERA_FOCUS_MODE_CONTINUOUS_AUTO)
+ {
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_AUTO_FOCUSED);
+ }
+ else if (focusMode == CAMERA_FOCUS_MODE_NORMAL)
+ {
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_TOUCH_AUTO_FOCUSED);
+ }
+ }
+ else
+ {
+ AppLogDebug("completeCondition:false");
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_AUTO_FOCUS_FAILED);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r)
+{
+ AppLogDebug("ENTER");
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_PREVIEWED);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r)
+{
+ AppLogDebug("ENTER");
+ int shootingMode = 0;
+ String* pFullFileName = null;
+ ContentManager* pContentManager = null;
+ ImageContentInfo* pImageContentInfo = null;
+ result ret = E_SUCCESS;
+
+ AppLogDebug("OnCameraCaptured :: StopCaptured = %d", __isStopCaptured);
+
+ if (__isStopCaptured == true)
+ {
+ AppLogDebug("OnCameraCaptured :: StopCaptured");
+ __isStopCaptured = false;
+
+ SetErrorResult(STRING_CAMERA_CAPTURED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_ERROR_OCCURRED);
+ }
+ else
+ {
+ ret = GetValue(SHOOTING_MODE, shootingMode);
+ TryCatch(ret == E_SUCCESS, , "GetValue() fail[%s]", GetErrorMessage(ret));
+
+ if (shootingMode == CAPTURE_NORMAL_MODE)
+ {
+ if (r == E_SUCCESS)
+ {
+ ContentId contentId;
+
+ pFullFileName = new (std::nothrow) String();
+ ret = CreateFileName(*pFullFileName);
+ TryCatch(ret == E_SUCCESS, , "pFullFileName is null");
+
+ __lastestContentName.Clear();
+ ret = __lastestContentName.Append(pFullFileName->GetPointer());
+ TryCatch(ret == E_SUCCESS, , "String::Append() fail[%s]", GetErrorMessage(ret));
+
+ AppLogDebug("OnCameraCaptured pFullFileName = %ls", pFullFileName->GetPointer());
+ pContentManager = new (std::nothrow) ContentManager();
+ ret = pContentManager->Construct();
+
+ contentId = pContentManager->CreateContent(capturedData, pFullFileName->GetPointer());
+
+ pImageContentInfo = static_cast<ImageContentInfo*>(pContentManager->GetContentInfoN(contentId));
+ TryCatch(pImageContentInfo != null, , "pImageContentInfo is null");
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ __pBitmap = pImageContentInfo->GetThumbnailN();
+ TryCatch(__pBitmap != null, , "__pBitmap is null");
+
+ delete pContentManager;
+ pContentManager = null;
+
+ delete pImageContentInfo;
+ pImageContentInfo = null;
+
+ delete pFullFileName;
+ pFullFileName = null;
+
+ AppLogDebug("ENTER:E_SUCCESS");
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_SUCCEEDED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_CAPTURED);
+ }
+ else
+ {
+ AppLogDebug("ENTER:E_FAILED");
+ SetErrorResult(STRING_CAMERA_CAPTURED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_ERROR_OCCURRED);
+ }
+ }
+ else if (shootingMode == CAPTURE_BURST_MODE)
+ {
+ // Empty statement
+ }
+ }
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ if (__pBitmap != null)
+ {
+ delete __pBitmap;
+ __pBitmap = null;
+ }
+
+ if (pContentManager != null)
+ {
+ delete pContentManager;
+ pContentManager = null;
+ }
+
+ if (pImageContentInfo)
+ {
+ delete pImageContentInfo;
+ pImageContentInfo = null;
+ }
+
+ if (pFullFileName)
+ {
+ delete pFullFileName;
+ pFullFileName = null;
+ }
+
+ SetErrorResult(STRING_CAMERA_CAPTURED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_ERROR_OCCURRED);
+}
+
+void
+CameraPresentationModel::OnCameraErrorOccurred(Tizen::Media::CameraErrorReason r)
+{
+ AppLogDebug("ENTER");
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_ERROR_OCCURRED);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderCanceled(result r)
+{
+ AppLogDebug("ENTER");
+ if (__pVideoRecorder != null)
+ {
+ __pVideoRecorder->Close();
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderClosed(result r)
+{
+ AppLogDebug("ENTER");
+ ContentManager* pContentManager = null;
+ VideoContentInfo* videoContentInfo = null;
+ ContentId contentId;
+ String camcorderTemporaryFilePath;
+
+ if (r == E_SUCCESS)
+ {
+ AppLogDebug("ENTER: E_SUCCESS");
+
+ camcorderTemporaryFilePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", App::GetInstance()->GetAppRootPath().GetPointer(), STRING_CAMCORDER_TEMPORARY_FILE);
+
+ pContentManager = new (std::nothrow) ContentManager();
+ pContentManager->Construct();
+
+ contentId = pContentManager->CreateContent(camcorderTemporaryFilePath, __lastestContentName, true);
+
+ videoContentInfo = static_cast<VideoContentInfo*>(pContentManager->GetContentInfoN(contentId));
+ TryCatch(videoContentInfo != null, , "videoContentInfo is null");
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ __pBitmap = videoContentInfo->GetThumbnailN();
+ TryCatch(__pBitmap != null, , "__pBitmap is null");
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_SUCCEEDED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_CLOSED);
+ }
+ else
+ {
+ AppLogDebug("ENTER: E_FAILED");
+
+ SetErrorResult(STRING_VIDEO_RECORDER_CLOSED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED);
+ }
+
+ __onVideoRecorderStarted = false;
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ delete pContentManager;
+ pContentManager = null;
+
+ delete videoContentInfo;
+ videoContentInfo = null;
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ SetErrorResult(STRING_VIDEO_RECORDER_CLOSED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED);
+}
+
+void
+CameraPresentationModel::OnVideoRecorderEndReached(RecordingEndCondition endCondition)
+{
+ AppLogDebug("ENTER");
+ ContentManager* pContentManager = null;
+ VideoContentInfo* videoContentInfo = null;
+ ContentId contentId;
+ String camcorderTemporaryFilePath;
+
+ StopRecord();
+
+ camcorderTemporaryFilePath.Format(MAX_DIRECTORY_PATH_LENGTH, L"%ls%ls", App::GetInstance()->GetAppRootPath().GetPointer(), STRING_CAMCORDER_TEMPORARY_FILE);
+
+ pContentManager = new (std::nothrow) ContentManager();
+ pContentManager->Construct();
+
+ contentId = pContentManager->CreateContent(camcorderTemporaryFilePath, __lastestContentName, true);
+
+ videoContentInfo = static_cast<VideoContentInfo*>(pContentManager->GetContentInfoN(contentId));
+ TryCatch(videoContentInfo != null, , "videoContentInfo is null");
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ __pBitmap = videoContentInfo->GetThumbnailN();
+ TryCatch(__pBitmap != null, , "__pBitmap is null");
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_SUCCEEDED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_END_REACHED);
+
+ __onVideoRecorderStarted = false;
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ delete pContentManager;
+ pContentManager = null;
+
+ delete videoContentInfo;
+ videoContentInfo = null;
+
+ delete __pBitmap;
+ __pBitmap = null;
+
+ SetErrorResult(STRING_VIDEO_RECORDER_END_REACHED_ERROR);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED);
+ AppLogDebug("EXIT - CATCH");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderErrorOccurred(RecorderErrorReason r)
+{
+ AppLogDebug("ENTER OnVideoRecorderErrorOccurred (%s)", GetErrorMessage(r));
+
+ __pVideoRecorder->Close();
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED);
+
+ __onVideoRecorderStarted = false;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderPaused(result r)
+{
+ AppLogDebug("ENTER");
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_PAUSED);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderStarted(result r)
+{
+ AppLogDebug("ENTER");
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_STARTED);
+ AppLogDebug("EXIT");
+}
+
+bool
+CameraPresentationModel::GetOnVideoRecorderStopped(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __onVideoRecorderStarted;
+}
+
+void
+CameraPresentationModel::SetOnVideoRecorderStopped(bool isCompleted)
+{
+ AppLogDebug("ENTER");
+ __onVideoRecorderStarted = isCompleted;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnVideoRecorderStopped(result r)
+{
+ AppLogDebug("ENTER");
+ result localResult = E_SUCCESS;
+
+ if (__pVideoRecorder != null)
+ {
+ localResult = __pVideoRecorder->Close();
+ TryCatch(localResult == E_SUCCESS, , "__pVideoRecorder::Close() fail[%s]", GetErrorMessage(localResult));
+ }
+ __onVideoRecorderStarted = true;
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_STOPPED);
+
+ AppLogDebug("EXIT");
+ return;
+
+CATCH:
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_RECORDER_ERROR_OCCURRED);
+ AppLogDebug("EXIT - CATCH");
+}
+
+void
+CameraPresentationModel::DestroyPresentationModelInstance(void)
+{
+ AppLogDebug("ENTER");
+ CameraPresentationModel* pCameraPresentationModel = CameraPresentationModel::GetInstance();
+
+ delete pCameraPresentationModel;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::UpdateThumbnail(int currentCameraMode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = CreateThumbnail(currentCameraMode);
+ TryReturnVoid(r == E_SUCCESS, "CreateThumbnail() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
+
+int
+CameraPresentationModel::GetStorageCardState(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __storageCardState;
+}
+
+void
+CameraPresentationModel::SetStorageCardState(int storageCardState)
+{
+ AppLogDebug("ENTER");
+ __storageCardState = storageCardState;
+ AppLogDebug("EXIT");
+}
+
+int
+CameraPresentationModel::GetStorageCardChageState(void) const
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __storageCardChageState;
+}
+
+void
+CameraPresentationModel::SetStorageCardChageState(int storageCardChageState)
+{
+ AppLogDebug("ENTER");
+ __storageCardChageState = storageCardChageState;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::StorageCardStateChaged(bool isMounted)
+{
+ AppLogDebug("ENTER");
+
+ if (isMounted)
+ {
+ __storageCardState = STORAGE_CARD_STATE_MOUNT;
+ }
+ else
+ {
+ __storageCardState = STORAGE_CARD_STATE_UNMOUNT;
+
+ __pCameraSettingsPresentationModel->SetValue(SECTION_CAMERA, STORAGE_TYPE, STORAGE_TYPE_PHONE);
+
+ __pCameraSettingsPresentationModel->SetValue(SECTION_CAMCORDER, STORAGE_TYPE, STORAGE_TYPE_PHONE);
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::SetDeviceManagerEventListner(void)
+{
+ AppLogDebug("ENTER");
+ DeviceManager::AddDeviceEventListener(DEVICE_TYPE_STORAGE_CARD, *this);
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::RemoveDeviceManagerEventListner(void)
+{
+ AppLogDebug("ENTER");
+ DeviceManager::RemoveAllDeviceEventListeners();
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::OnDeviceStateChanged(Tizen::System::DeviceType deviceType, const Tizen::Base::String& state)
+{
+ AppLogDebug("ENTER");
+ int currentCameraMode = 0;
+ int storageType = STORAGE_TYPE_PHONE;
+
+ result r = E_SUCCESS;
+ r = GetValue(CURRENT_MODE, currentCameraMode);
+ TryReturnVoid(r == E_SUCCESS, "GetValue returns not E_SUCCESS", GetErrorMessage(r));
+
+ if (deviceType == DEVICE_TYPE_STORAGE_CARD)
+ {
+ switch (currentCameraMode)
+ {
+ case CAMERA_MODE_RECORD:
+ {
+ __pCameraSettingsPresentationModel->GetValue(SECTION_CAMCORDER, STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ if ( IsStorageCardMounted()== false)
+ {
+ if (GetRecorderState() == RECORDER_STATE_RECORDING)
+ {
+ RemoveVideoFile();
+ }
+
+ StorageCardStateChaged(false);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT);
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT);
+ }
+ else
+ {
+ StorageCardStateChaged(true);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ }
+ else
+ {
+ if ( IsStorageCardMounted()== false)
+ {
+ StorageCardStateChaged(false);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ else
+ {
+ StorageCardStateChaged(true);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ }
+ }
+ break;
+
+ case CAMERA_MODE_SNAPSHOT:
+ {
+ __pCameraSettingsPresentationModel->GetValue(SECTION_CAMERA, STORAGE_TYPE, storageType);
+
+ if (storageType == STORAGE_TYPE_MEMORYCARD)
+ {
+ if ( IsStorageCardMounted()== false)
+ {
+ AppLogDebug("OnDeviceStateChanged state=%d", __pCamera->GetState());
+
+ if (GetCameraState() == CAMERA_STATE_CAPTURED || GetCameraState() == CAMERA_STATE_CAPTURING)
+ {
+ __isStopCaptured = true;
+ }
+ else
+ {
+ __isStopCaptured = false;
+ }
+
+ StorageCardStateChaged(false);
+
+ SetAppControlRequestType(APP_CONTROL_REQUEST_TYPE_FAILED);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_MOUNT_TO_UNMOUNT);
+ CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_STORAGE_CARD_UNMOUNT);
+ }
+ else
+ {
+ StorageCardStateChaged(true);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ }
+ else
+ {
+ __isStopCaptured = false;
+
+ if ( IsStorageCardMounted()== false)
+ {
+ StorageCardStateChaged(false);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ else
+ {
+ StorageCardStateChaged(true);
+ SetStorageCardChageState(STORAGE_CARD_CHAGE_STATE_UNKNOWN);
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CameraPresentationModel::RemoveVideoFile(void)
+{
+ AppLogDebug("ENTER");
+ String removeFileName;
+ File file;
+ result r = E_SUCCESS;
+
+ removeFileName = App::GetInstance()->GetAppRootPath() + STRING_CAMCORDER_TEMPORARY_FILE;
+
+ StopRecord();
+
+ r = file.Construct(removeFileName, "w+");
+ TryReturnVoid(r == E_SUCCESS, "file::file() failed:%s", GetErrorMessage(r));
+
+ r = file.Remove(removeFileName);
+ TryReturnVoid(r == E_SUCCESS, "file::Remove() failed:%s", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraResourceManager.cpp
+ * @brief This is the implementation file for ResourceManager class.
+ */
+
+#include "CmCameraResourceManager.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+
+Variant ResourceManager::__resource[RESOURCE_ID_MAX] =
+{
+ L"camera_mode_flash_auto_nor.png",
+ L"camera_mode_flash_auto_press.png",
+ L"camera_mode_flash_on_nor.png",
+ L"camera_mode_flash_on_press.png",
+ L"camera_mode_flash_off_nor.png",
+ L"camera_mode_flash_off_press.png",
+ L"camera_mode_self_shot_nor.png",
+ L"camera_mode_self_shot_press.png",
+ L"camera_mode_burstshot_nor.png",
+ L"camera_mode_burstshot_press.png",
+ L"camera_mode_shooting_mode_single_shot_nor.png",
+ L"camera_mode_shooting_mode_single_shot_press.png",
+ L"camera_mode_setting_nor.png",
+ L"camera_mode_setting_press.png",
+ L"camera_mode_camcorder_on.png",
+ L"camera_mode_camera_on.png",
+ L"camera_mode_bg.png",
+ L"camera_mode_button_ver.png",
+ L"camera_mode_shutter_icon.png",
+ L"camera_mode_shutter_normal.png",
+ L"camera_mode_shutter_press.png",
+ L"camera_mode_thumbnail_bg.png",
+ L"camera_mode_thumbnail_bg_press.png",
+ L"camera_mode_option_bg_ver.PNG",
+ L"camera_mode_option_bg_ver_press.PNG",
+ L"camera_effect_image_02.png",
+ L"camera_lock.png",
+ L"camera_normal_bg_ver.png",
+ L"camera_normal_bg_ver_01.png",
+ L"camera_normal_bg_ver2.png",
+ L"camera_normal_bg_ver2_01.png",
+ L"camera_pause.png",
+ L"camera_rec.png",
+ L"camera_radio_btn_off.png",
+ L"camera_radio_btn_on.png",
+ L"camera_icon_back.png",
+ L"camera_icon_back_press.png",
+ L"camera_focus_notready.png",
+ L"camera_ready.png",
+ L"camera_focus_fail.png",
+ L"camcorder_standby_shutter_normal.png",
+ L"camcorder_standby_shutter_press.png",
+ L"camcorder_recording_shutter_normal.png",
+ L"camera_recording_btn_caf.png",
+ L"camera_recording_btn_caf_press.png",
+ L"camera_indicator_battery_00.png",
+ L"camera_indicator_battery_01.png",
+ L"camera_indicator_battery_02.png",
+ L"camera_indicator_battery_03.png",
+ L"camera_indicator_battery_04.png",
+ L"camera_indicator_battery_05.png",
+ L"camera_indicator_battery_full.png",
+ L"camera_indicator_battery_charge.png",
+ L"camera_indicator_storage_in.png",
+ L"camera_indicator_storage_phonefull.png",
+ L"camera_indicator_storage_t_flash.png",
+ L"camera_indicator_storage_memoryfull.png",
+ L"camera_indicator_iso50.png",
+ L"camera_indicator_iso60.png",
+ L"camera_indicator_iso100.png",
+ L"camera_indicator_iso200.png",
+ L"camera_indicator_iso400.png",
+ L"camera_indicator_iso800.png",
+ L"camera_indicator_iso1600.png",
+ L"camera_indicator_iso3200.png",
+ L"camera_indicator_iso_auto.png",
+ L"camera_indicator_iso-night.png",
+ L"camera_indicator_iso-sports.png",
+ L"camera_indicator_size_0_1m.png",
+ L"camera_indicator_size_0_3m.png",
+ L"camera_indicator_size_0_5m.png",
+ L"camera_indicator_size_0_8m.png",
+ L"camera_indicator_size_1_3m.png",
+ L"camera_indicator_size_2m.png",
+ L"camera_indicator_size_3m.png",
+ L"camera_indicator_size_3_2m.png",
+ L"camera_indicator_size_3_6m.png",
+ L"camera_indicator_size_5m.png",
+ L"camera_indicator_size_7m.png",
+ L"camera_indicator_size_8m.png",
+ L"camera_indicator_size_10m.png",
+ L"camera_indicator_size_12m.png",
+ L"camera_indicator_size_12_4m.png",
+ L"camera_indicator_size_w0_1m.png",
+ L"camera_indicator_size_w0_3m.png",
+ L"camera_indicator_size_w0_4m.png",
+ L"camera_indicator_size_w1m.png",
+ L"camera_indicator_size_w1_0m.png",
+ L"camera_indicator_size_w1_5m.png",
+ L"camera_indicator_size_w2_4m.png",
+ L"camera_indicator_size_w3m.png",
+ L"camera_indicator_size_w4m.png",
+ L"camera_indicator_size_w5_7m.png",
+ L"camera_indicator_size_w6m.png",
+ L"camera_indicator_size_w6_5m.png",
+ L"camera_indicator_size_w8m.png",
+ L"camera_indicator_size_w10m.png",
+ L"camera_indicator_size_176_144.png",
+ L"camera_indicator_size_320_240.png",
+ L"camera_indicator_size_640_480.png",
+ L"camera_indicator_size_720_480.png",
+ L"camera_indicator_size_1024_760.png",
+ L"camera_indicator_size_1024_780.png",
+ L"camera_indicator_size_1280_720.png",
+ L"camera_indicator_size_1920_1080.png",
+ L"camera_indicator_timer2.png",
+ L"camera_indicator_timer5.png",
+ L"camera_indicator_timer10.png",
+ L"camera_indicator_timeroff.png",
+ L"camera_indicator_wb_cloudy.png",
+ L"camera_indicator_wb_daylight.png",
+ L"camera_indicator_wb_tungsten.png",
+ L"camera_indicator_whitebalance_auto.png",
+ L"camera_indicator_whitebalance_cloud.png",
+ L"camera_indicator_whitebalance_flou.png",
+ L"camera_indicator_whitebalance_horizon.png",
+ L"camera_indicator_whitebalance_incandescent.png",
+ L"camera_indicator_whitebalance_shade.png",
+ L"camera_indicator_whitebalance_sun.png",
+ L"camera_indicator_anti_shake.png",
+ L"camera_indicator_anti_shake_high.png",
+ L"camera_indicator_anti_shake_off.png",
+ L"camera_indicator_autocontrast.png",
+ L"camera_indicator_auto_recording.png",
+ L"camera_indicator_wifi_01.png",
+ L"camera_indicator_wifi_02.png",
+ L"camera_indicator_wifi_03.png",
+ L"camera_indicator_wifi_04.png",
+ L"camera_indicator_wifi_05.png",
+ L"camera_indicator_wifi_mobileap_01.png",
+ L"camera_indicator_wifi_mobileap_02.png",
+ L"camera_indicator_wifi_mobileap_03.png",
+ L"camera_indicator_wifi_mobileap_04.png",
+ L"camera_indicator_wifi_mobileap_05.png",
+ L"camera_indicator_wifi_noconnected_01.png",
+ L"camera_indicator_wifi_noconnected_02.png",
+ L"camera_indicator_wifi_noconnected_03.png",
+ L"camera_indicator_wifi_noconnected_04.png",
+ L"camera_indicator_wifi_noconnected_05.png",
+ L"camera_indicator_num_0.png",
+ L"camera_indicator_num_1.png",
+ L"camera_indicator_num_2.png",
+ L"camera_indicator_num_3.png",
+ L"camera_indicator_num_4.png",
+ L"camera_indicator_num_5.png",
+ L"camera_indicator_num_6.png",
+ L"camera_indicator_num_7.png",
+ L"camera_indicator_num_8.png",
+ L"camera_indicator_num_9.png",
+ L"camera_indicator_num_10.png",
+ L"camera_shrtcut_edit_bg_ver.png",
+ L"camera_shrtcut_edit_bg_02_ver.png",
+ L"camera_shrtcut_menubar_bg_ver.png",
+ L"camera_shrtcut_text_bg_ver.png",
+ L"camera_mode_exposure_1_nor.png",
+ L"camera_mode_exposure_1_press.png",
+ L"camera_mode_exposure_2_nor.png",
+ L"camera_mode_exposure_2_press.png",
+ L"camera_mode_exposure_3_nor.png",
+ L"camera_mode_exposure_3_press.png",
+ L"camera_mode_exposure_4_nor.png",
+ L"camera_mode_exposure_4_press.png",
+ L"camera_mode_exposure_5_nor.png",
+ L"camera_mode_exposure_5_press.png",
+ L"camera_mode_exposure_6_nor.png",
+ L"camera_mode_exposure_6_press.png",
+ L"camera_mode_exposure_7_nor.png",
+ L"camera_mode_exposure_7_press.png",
+ L"camera_mode_exposure_8_nor.png",
+ L"camera_mode_exposure_8_press.png",
+ L"camera_mode_exposure_9_nor.png",
+ L"camera_mode_exposure_9_press.png",
+ L"camera_mode_exposure_minus.png",
+ L"camera_mode_exposure_minus_press.png",
+ L"camera_mode_exposure_plus.png",
+ L"camera_mode_exposure_plus_press.png",
+ L"camera_mode_exposure_nor.png",
+ L"camera_mode_exposure_press.png",
+ L"camera_mode_iso_60_nor.png",
+ L"camera_mode_iso_60_press.png",
+ L"camera_mode_iso_100_nor.png",
+ L"camera_mode_iso_100_press.png",
+ L"camera_mode_iso_200_nor.png",
+ L"camera_mode_iso_200_press.png",
+ L"camera_mode_iso_400_nor.png",
+ L"camera_mode_iso_400_press.png",
+ L"camera_mode_iso_800_nor.png",
+ L"camera_mode_iso_800_press.png",
+ L"camera_mode_iso_auto_nor.png",
+ L"camera_mode_iso_auto_press.png",
+ L"camera_mode_iso_night_nor.png",
+ L"camera_mode_iso_night_press.png",
+ L"camera_mode_iso_sports_nor.png",
+ L"camera_mode_iso_sports_press.png",
+ L"camera_mode_whitebalance_auto_nor.png",
+ L"camera_mode_whitebalance_auto_press.png",
+ L"camera_mode_whitebalance_incandescent_nor.png",
+ L"camera_mode_whitebalance_incandescent_press.png",
+ L"camera_mode_whitebalance_fluorescen_nor.png",
+ L"camera_mode_whitebalance_fluorescen_press.png",
+ L"camera_mode_whitebalance_day_light_nor.png",
+ L"camera_mode_whitebalance_day_light_press.png",
+ L"camera_mode_whitebalance_cloudy_nor.png",
+ L"camera_mode_whitebalance_cloudy_press.png",
+ L"camera_mode_whitebalance_horizon_nor.png",
+ L"camera_mode_whitebalance_horizon_press.png",
+ L"camera_mode_whitebalance_shade_nor.png",
+ L"camera_mode_whitebalance_shade_press.png",
+ L"camera_mode_whitebalance_tungsten_nor.png",
+ L"camera_mode_whitebalance_tungsten_press.png",
+ L"camera_option_popup_anker.png",
+ L"camera_option_popup_anker_vertical.png",
+ L"camera_option_popup_bg.png",
+ L"camera_option_popup_bg.9.png",
+ L"camera_option_popup_bg_2depth.png",
+ L"camera_option_popup_bg_2depth.9.png",
+ L"camera_option_popup_scroll.png",
+ L"camera_option_popup_shadow_01.png",
+ L"camera_option_popup_shadow_02.png",
+ L"camera_popup_bg.9.png",
+ L"camera_popup_ex.png",
+ L"camera_popup_exposure_vertical_bg.png",
+ L"camera_popup_ex_bar.png",
+ L"camera_popup_ex_bar_ver.png",
+ L"camera_popup_ex_line.png",
+ L"camera_popup_ex_line_ver.png",
+ L"camera_popup_zoom.png",
+ L"camera_popup_zoom_bar.png",
+ L"camera_popup_zoom_bar_ver.png",
+ L"camera_popup_zoom_ver.png",
+ L"camera_shoot_share_popup.png",
+ L"camera_timer_popup.png",
+ L"camera_indicator_blink_detection.png",
+ L"camera_indicator_face_detection.png",
+ L"camera_indicator_gps.png",
+ L"camera_indicator_guideline.png",
+ L"camera_indicator_lock.png",
+ L"camera_indicator_macro.png",
+ L"camera_indicator_mb.png",
+ L"camera_indicator_metering_center.png",
+ L"camera_indicator_metering_matrix.png",
+ L"camera_indicator_metering_spot.png",
+ L"camera_indicator_outdoor_visibility.png",
+ L"camera_indicator_review.png",
+ L"camera_indicator_smile_shot.png",
+};
+
+Bitmap*
+ResourceManager::GetBitmapN(int id)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pBitmap = null;
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ pBitmap = pAppResource->GetBitmapN(__resource[(static_cast<ResourceId>(id))].ToString());
+ AppLogDebug("EXIT");
+ return pBitmap;
+}
+
+Rectangle
+ResourceManager::GetBounds(ResourceId id)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __resource[id].ToRectangle();
+}
+
+Point
+ResourceManager::GetPosition(ResourceId id)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __resource[id].ToPoint();
+}
+
+Dimension
+ResourceManager::GetSize(ResourceId id)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __resource[id].ToDimension();
+}
+
+String
+ResourceManager::GetString(ResourceId id)
+{
+ AppLogDebug("ENTER");
+ String str;
+ AppResource* pAppResource = Application::GetInstance()->GetAppResource();
+ pAppResource->GetString(__resource[id].ToString(), str);
+ AppLogDebug("EXIT");
+ return str;
+}
+
+String
+ResourceManager::GetSceneId(ResourceId id)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return __resource[id].ToString();
+}
--- /dev/null
+//
+// 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 CmCameraSettingsPresentationModel.cpp
+ * @brief This is the implementation file for CameraSettingsPresentationModel class.
+ */
+
+#include <cstdlib>
+#include "CmCameraSettingsPresentationModel.h"
+#include "CmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Io;
+
+static const int EXPOSURE_DEFAULT_VALUE = 4;
+static const int BRIGHTNESS_DEFAULT_VALUE = 4;
+static const int DEFAULT_VALUE_ZERO = 0;
+static const int DEFAULT_VALUE_ONE = 1;
+
+const wchar_t* PATH_CAMERA_DEFAULT_SETTINGS = L"data/CameraDefaultSettings.ini";
+const wchar_t* PATH_CAMERA_SETTINGS = L"data/CameraSettings.ini";
+
+const wchar_t* PATH_CAMCORDER_DEFAULT_SETTINGS = L"data/CamcorderDefaultSettings.ini";
+const wchar_t* PATH_CAMCORDER_SETTINGS = L"data/CamcorderSettings.ini";
+
+CameraSettingsPresentationModel* CameraSettingsPresentationModel::__pCameraSettingsPresentationModel = null;
+
+CameraSettingsPresentationModel::CameraSettingsPresentationModel(void)
+ : __pDefaultCameraRegistry(null)
+ , __pAppCameraRegistry(null)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraSettingsPresentationModel::~CameraSettingsPresentationModel(void)
+{
+ AppLogDebug("ENTER");
+ if (__pDefaultCameraRegistry !=null)
+ {
+ __pDefaultCameraRegistry->Flush();
+ delete __pDefaultCameraRegistry;
+ }
+
+ if (__pAppCameraRegistry !=null)
+ {
+ __pAppCameraRegistry->Flush();
+ delete __pAppCameraRegistry;
+ }
+ AppLogDebug("EXIT");
+}
+
+CameraSettingsPresentationModel*
+CameraSettingsPresentationModel::GetInstance(void)
+{
+ AppLogDebug("ENTER");
+ if (__pCameraSettingsPresentationModel == null)
+ {
+ AppLogDebug("CameraSettingsPresentationModel GetInstance");
+
+ CreateInstance();
+ }
+
+ AppLogDebug("EXIT");
+ return __pCameraSettingsPresentationModel;
+}
+
+void
+CameraSettingsPresentationModel::CreateInstance(void)
+{
+ __pCameraSettingsPresentationModel = new (std::nothrow) CameraSettingsPresentationModel();
+
+ result r = __pCameraSettingsPresentationModel->Construct();
+
+ if (IsFailed(r))
+ {
+ delete __pCameraSettingsPresentationModel;
+ __pCameraSettingsPresentationModel = null;
+ return;
+ }
+
+// std::atexit(DestroyInstance);
+}
+
+void
+CameraSettingsPresentationModel::DestroyInstance(void)
+{
+ delete __pCameraSettingsPresentationModel;
+ __pCameraSettingsPresentationModel = null;
+}
+
+result
+CameraSettingsPresentationModel::GetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, int& value) const
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ r = __pAppCameraRegistry->GetValue(strSectionName, entryName, value);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraSettingsPresentationModel::SetValue(const Tizen::Base::String& strSectionName, const Tizen::Base::String& entryName, const int value)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AppLogDebug("SetValue set value to registry");
+
+ r = __pAppCameraRegistry->SetValue(strSectionName, entryName, value);
+ TryCatch(r == E_SUCCESS, , "Registry::SetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->Flush();
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraSettingsPresentationModel::CreateDefaultRegistry(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ String pathCameraDefaultSetting = App::GetInstance()->GetAppRootPath() + PATH_CAMERA_DEFAULT_SETTINGS;
+
+ if (File::IsFileExist(pathCameraDefaultSetting))
+ {
+ AppLogDebug("Already exist default camera settings file");
+
+ __pDefaultCameraRegistry->Construct(pathCameraDefaultSetting, false);
+ }
+ else
+ {
+ __pDefaultCameraRegistry->Construct(pathCameraDefaultSetting, true);
+ r = __pDefaultCameraRegistry->AddSection(SECTION_CAMERA);
+ TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, CURRENT_MODE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, FLASH_MODE, DEFAULT_VALUE_ONE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, SELF_PORTRAIT_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, SHOOTING_MODE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, EXPOSURE_VALUE, EXPOSURE_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, BRIGHTNESS_VALUE, BRIGHTNESS_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, TIMER_INTERVAL, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, ISO_VALUE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, WHITE_BALANCE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, EXPOSURE_METERING_TYPE, DEFAULT_VALUE_ONE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, GEO_TAGGING_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, GUIDELINE_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, STORAGE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMERA, RECORDING_MODE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddSection(SECTION_CAMCORDER);
+ TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, FLASH_MODE, DEFAULT_VALUE_ONE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, SELF_PORTRAIT_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, SHOOTING_MODE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, EXPOSURE_VALUE, EXPOSURE_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, BRIGHTNESS_VALUE, BRIGHTNESS_DEFAULT_VALUE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, TIMER_INTERVAL, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, ISO_VALUE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, WHITE_BALANCE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, EXPOSURE_METERING_TYPE, DEFAULT_VALUE_ONE);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, GEO_TAGGING_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, GUIDELINE_ENABLE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, STORAGE_TYPE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->AddValue(SECTION_CAMCORDER, RECORDING_MODE, DEFAULT_VALUE_ZERO);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->Flush();
+ TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+CameraSettingsPresentationModel::Construct(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ int valueRegistry = 0;
+ String pathCameraSetting = App::GetInstance()->GetAppRootPath() + PATH_CAMERA_SETTINGS;
+
+ __pDefaultCameraRegistry = new (std::nothrow) Registry();
+
+ __pAppCameraRegistry = new (std::nothrow) Registry();
+
+ r = CreateDefaultRegistry();
+ TryCatch(r == E_SUCCESS, , "CreateDefaultRegistry() failed[%s]", GetErrorMessage(r));
+
+ if (File::IsFileExist(pathCameraSetting))
+ {
+ AppLogDebug("Already exist camcorder settings file");
+
+ __pAppCameraRegistry->Construct(pathCameraSetting, false);
+ }
+ else
+ {
+ __pAppCameraRegistry->Construct(pathCameraSetting, true);
+ r = __pAppCameraRegistry->AddSection(SECTION_CAMERA);
+ TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, CURRENT_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, CURRENT_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, FLASH_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, FLASH_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, SELF_PORTRAIT_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, SELF_PORTRAIT_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, SHOOTING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, SHOOTING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, EXPOSURE_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, EXPOSURE_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, BRIGHTNESS_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, BRIGHTNESS_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, TIMER_INTERVAL, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, TIMER_INTERVAL, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, ISO_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, ISO_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, WHITE_BALANCE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, WHITE_BALANCE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, EXPOSURE_METERING_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, EXPOSURE_METERING_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, GEO_TAGGING_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, GEO_TAGGING_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, GUIDELINE_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, GUIDELINE_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, STORAGE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, STORAGE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMERA, RECORDING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMERA, RECORDING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddSection(SECTION_CAMCORDER);
+ TryCatch(r == E_SUCCESS, , "Registry::AddSection() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, FLASH_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, FLASH_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, SELF_PORTRAIT_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, SELF_PORTRAIT_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, SHOOTING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, SHOOTING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, EXPOSURE_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, EXPOSURE_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, BRIGHTNESS_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, BRIGHTNESS_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, TIMER_INTERVAL, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, TIMER_INTERVAL, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, ISO_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, ISO_VALUE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, WHITE_BALANCE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, WHITE_BALANCE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, EXPOSURE_METERING_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, EXPOSURE_METERING_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, GEO_TAGGING_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, GEO_TAGGING_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, GUIDELINE_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, GUIDELINE_ENABLE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, STORAGE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, STORAGE_TYPE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->GetValue(SECTION_CAMCORDER, RECORDING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::GetValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->AddValue(SECTION_CAMCORDER, RECORDING_MODE, valueRegistry);
+ TryCatch(r == E_SUCCESS, , "Registry::AddValue() failed[%s]", GetErrorMessage(r));
+
+ r = __pAppCameraRegistry->Flush();
+ TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r));
+
+ r = __pDefaultCameraRegistry->Flush();
+ TryCatch(r == E_SUCCESS, , "Registry::Flush() failed[%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ delete __pDefaultCameraRegistry;
+ __pDefaultCameraRegistry = null;
+
+ delete __pAppCameraRegistry;
+ __pAppCameraRegistry = null;
+
+ return r;
+}
+
+result
+CameraSettingsPresentationModel::ResetCameraSettingsRegistry(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ String pathCameraSetting = App::GetInstance()->GetAppRootPath() + PATH_CAMERA_SETTINGS;
+
+ if (File::IsFileExist(pathCameraSetting))
+ {
+ AppLogDebug("Camera setting file Remove");
+
+ File::Remove(pathCameraSetting);
+ }
+
+ AppLogDebug("Camera ResetSettingsRegistry");
+ r = __pCameraSettingsPresentationModel->Construct();
+ TryCatch(r == E_SUCCESS, , "CameraSettingsPresentationModel::Construct() failed[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CameraSettingsPresentationModel::DestroyCameraSettingInstance(void)
+{
+ AppLogDebug("ENTER");
+ CameraSettingsPresentationModel* pCameraSettingsPresentationModel = CameraSettingsPresentationModel::GetInstance();
+
+ delete pCameraSettingsPresentationModel;
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmCameraCameraThumbnailPanel.cpp
+ * @brief This is the implementation file for CamcorderForm class.
+ */
+
+#include "CmCamcorderForm.h"
+#include "CmCameraForm.h"
+#include "CmCameraPresentationModel.h"
+#include "CmCameraThumbnailPanel.h"
+#include "CmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+static const int X_MARGIN = 14;
+static const int Y_MARGIN = 14;
+static const int X_START = 0;
+static const int Y_START = 0;
+static const int DRAWING_TIMER_INTERVAL = 25;
+
+static const int START_FRAME = 1;
+static const int FRAME_RATE = 16;
+
+CameraThumbnailPanel::CameraThumbnailPanel(void)
+ : __pOldBitmap(null)
+ , __pNewBitmap(null)
+ , __pBackUpBitmap(null)
+ , __pBackgroundBitmap(null)
+ , __pCAFBitmap(null)
+ , __pCanvas(null)
+ , __pAnimationTimer(null)
+ , __dir(ORIENTATION_STATUS_NONE)
+ , __count(null)
+ , __ImgSilder(false)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+CameraThumbnailPanel::~CameraThumbnailPanel(void)
+{
+ AppLogDebug("ENTER");
+ if (__pAnimationTimer != null)
+ {
+ __pAnimationTimer->Cancel();
+
+ delete __pAnimationTimer;
+ __pAnimationTimer = null;
+ }
+ AppLogDebug("EXIT");
+}
+
+result
+CameraThumbnailPanel::Initialize(Tizen::Graphics::Rectangle rect)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+ return Panel::Construct(rect);
+}
+
+result
+CameraThumbnailPanel::OnDraw(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ Rectangle rect;
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pBitmap = null;
+ int mode = 0;
+
+ int firstImgWidth = 0;
+ int firstImgHeight = 0;
+ int secondImgWidth = 0;
+ int secondImgHeight = 0;
+
+ int dstStartX = 0;
+ int dstStartY = 0;
+ int dstWidth = 0;
+ int dstHeight = 0;
+
+ int srcStartX = 0;
+ int srcStartY = 0;
+ int srcWidth = 0;
+ int srcHeight = 0;
+
+ int calVal = 0;
+
+ r = CameraPresentationModel::GetInstance()->GetValue(CURRENT_MODE, mode);
+ TryCatch(r == E_SUCCESS, , "Read register GetValue() fail[%s]", GetErrorMessage(r));
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ AppLogDebug("CAMERA_MODE_SNAPSHOT");
+ CameraPresentationModel::GetInstance()->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_SNAPSHOT);
+ }
+ else
+ {
+ AppLogDebug("CAMERA_MODE_RECORD");
+ CameraPresentationModel::GetInstance()->UpdateThumbnail(CameraPresentationModel::CAMERA_MODE_RECORD);
+ }
+
+ pThumbnailBitmap = CameraPresentationModel::GetInstance()->GetLatestThumbnail();
+
+ TryCatch(__pCanvas != null, r = E_FAILURE, "__pCanvas is null");
+ __pCanvas->SetBackgroundColor(Color(COLOR_ID_WHITE, true));
+ __pCanvas->Clear();
+ rect = __pCanvas->GetBounds();
+
+ TryCatch(__pBackgroundBitmap != null, r = E_FAILURE, "__pBackgroundBitmap is null");
+
+ __pCanvas->DrawBitmap(Point(X_START, Y_START), *__pBackgroundBitmap);
+
+ if (__pBackUpBitmap)
+ {
+ if (pThumbnailBitmap == null)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pCanvas->DrawBitmap(Point(X_START, X_START), *pBitmap);
+
+ if (__pOldBitmap)
+ {
+ delete __pOldBitmap;
+ __pOldBitmap = null;
+ }
+ }
+ else
+ {
+ __pCanvas->DrawBitmap(Point(X_MARGIN, Y_MARGIN), *__pBackUpBitmap);
+ }
+ }
+
+ if (__ImgSilder == true)
+ {
+ TryCatch(__pBackUpBitmap != null, r = E_FAILURE, "__pBackUpBitmap is null");
+
+ firstImgWidth = __pBackUpBitmap->GetWidth();
+ firstImgHeight = __pBackUpBitmap->GetHeight();
+
+ secondImgWidth = __pNewBitmap->GetWidth();
+ secondImgHeight = __pNewBitmap->GetHeight();
+ if (__dir == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || __dir == ORIENTATION_STATUS_PORTRAIT)
+ {
+ calVal = (firstImgHeight / FRAME_RATE) * (__count - START_FRAME);
+
+ dstStartX = X_MARGIN;
+ dstStartY = secondImgHeight - calVal + Y_MARGIN;
+ dstWidth = secondImgWidth;
+ dstHeight = calVal;
+
+ srcStartX = X_START;
+ srcStartY = Y_START;
+ srcWidth = secondImgWidth;
+ srcHeight = calVal;
+ __pCanvas->DrawBitmap(Rectangle(dstStartX, dstStartY, dstWidth, dstHeight), *__pNewBitmap, Rectangle(srcStartX, srcStartY, srcWidth, srcHeight));
+ }
+ else
+ {
+ calVal = (firstImgWidth / FRAME_RATE) * (__count - START_FRAME);
+
+ dstStartX = secondImgWidth - calVal + X_MARGIN;
+ dstStartY = Y_MARGIN;
+ dstWidth = calVal;
+ dstHeight = secondImgHeight;
+
+ srcStartX = X_START;
+ srcStartY = Y_START;
+ srcWidth = calVal;
+ srcHeight = secondImgHeight;
+ __pCanvas->DrawBitmap(Rectangle(dstStartX, dstStartY, dstWidth, dstHeight), *__pNewBitmap, Rectangle(srcStartX, srcStartY, srcWidth, srcHeight));
+ }
+ }
+ else
+ {
+ if (__pOldBitmap != null)
+ {
+ if (pThumbnailBitmap == null)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ TryCatch(pBitmap != null, , "pBitmap is null");
+
+ __pCanvas->DrawBitmap(Point(X_START, X_START), *pBitmap);
+
+ if (__pOldBitmap)
+ {
+ delete __pOldBitmap;
+ __pOldBitmap = null;
+ }
+ }
+ else
+ {
+ __pCanvas->DrawBitmap(Point(X_MARGIN, Y_MARGIN), *__pOldBitmap);
+ }
+ }
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+void
+CameraThumbnailPanel::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("ENTER");
+ Rectangle rectThumbnailButton;
+ int mode = 0;
+ result r = E_SUCCESS;
+ bool isDisplayResolutionWvga = false;
+ Container* pContainer = this->GetParent();
+
+ r = CameraPresentationModel::GetInstance()->GetValue(CURRENT_MODE, mode);
+ if (r != E_SUCCESS)
+ {
+ mode = CameraPresentationModel::CAMERA_MODE_SNAPSHOT;
+ }
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ CameraForm* pForm = static_cast<CameraForm*>(pContainer);
+ isDisplayResolutionWvga = pForm->IsDisplayResolutionWvga();
+ }
+ else
+ {
+ CamcorderForm* pForm = static_cast<CamcorderForm*>(pContainer);
+ isDisplayResolutionWvga = pForm->IsDisplayResolutionWvga();
+ }
+
+ AppLogDebug("CameraThumbnailPanel::OnOrientationChanged() isDisplayResolutionWvga = %d", isDisplayResolutionWvga);
+
+ if (isDisplayResolutionWvga == true)
+ {
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, 1060,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else
+ {
+ rectThumbnailButton = Rectangle(1060, 604,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+ else
+ {
+ if (orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE
+ || orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_PORTRAIT, Y_THUMBNAIL_IMG_PANEL_PORTRAIT,
+ W_THUMBNAIL_IMG_PANEL_PORTRAIT, H_THUMBNAIL_IMG_PANEL_PORTRAIT);
+ }
+ else
+ {
+ rectThumbnailButton = Rectangle(X_THUMBNAIL_IMG_PANEL_LANDSCPAE, Y_THUMBNAIL_IMG_PANEL_LANDSCPAE,
+ W_THUMBNAIL_IMG_PANEL_LANDSCPAE, H_THUMBNAIL_IMG_PANEL_LANDSCPAE);
+ }
+ }
+
+ __dir = orientationStatus;
+ SetBounds(rectThumbnailButton);
+ AppLogDebug("EXIT");
+}
+
+result
+CameraThumbnailPanel::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ __pBackgroundBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ __pCanvas = GetCanvasN();
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+}
+
+result
+CameraThumbnailPanel::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ delete __pNewBitmap;
+ delete __pOldBitmap;
+ delete __pBackgroundBitmap;
+ delete __pCanvas;
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+}
+
+void
+CameraThumbnailPanel::SetOldBitmap(Tizen::Graphics::Bitmap* pBmp)
+{
+ AppLogDebug("ENTER");
+ Bitmap* pThumbnailBitmap = null;
+ Bitmap* pBitmap = null;
+
+ delete __pOldBitmap;
+ __pOldBitmap = null;
+
+ TryReturnVoid(pBmp != null, "pBmp is null")
+
+ pThumbnailBitmap = CameraPresentationModel::GetInstance()->GetLatestThumbnail();
+
+ if (pThumbnailBitmap == null)
+ {
+ pBitmap = ResourceManager::GetBitmapN(RESOURCE_ID_CAMERA_MODE_THUMBNAIL_BG);
+ TryReturnVoid(pBitmap != null, "pBitmap is null");
+
+ __pOldBitmap = new (std::nothrow) Bitmap();
+ __pOldBitmap->Construct(*pBitmap, Rectangle(X_START, Y_START, pBitmap->GetWidth(), pBitmap->GetHeight()));
+ }
+ else
+ {
+ __pOldBitmap = new (std::nothrow) Bitmap();
+ __pOldBitmap->Construct(*pBmp, Rectangle(X_START, Y_START, pBmp->GetWidth(), pBmp->GetHeight()));
+ }
+
+ AppLogDebug("EXIT");
+}
+
+void
+CameraThumbnailPanel::SetNewBitmap(Tizen::Graphics::Bitmap* pBmp)
+{
+ AppLogDebug("ENTER");
+ delete __pNewBitmap;
+ __pNewBitmap = null;
+
+ TryReturnVoid(pBmp != null, "pBmp is null")
+
+ __pNewBitmap = new (std::nothrow) Bitmap();
+ __pNewBitmap->Construct(*pBmp, Rectangle(X_START, Y_START, pBmp->GetWidth(), pBmp->GetHeight()));
+ AppLogDebug("EXIT");
+}
+
+void
+CameraThumbnailPanel::SetCAFBitmap(Tizen::Graphics::Bitmap* pBmp)
+{
+ AppLogDebug("ENTER");
+ __pCAFBitmap = pBmp;
+ AppLogDebug("EXIT");
+}
+
+void
+CameraThumbnailPanel::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ AppLogDebug("ENTER");
+ if (__count >= FRAME_RATE)
+ {
+ __pAnimationTimer->Cancel();
+ __ImgSilder = false;
+ }
+ __count++;
+ //Invalidate(true);
+ Draw();
+ Show();
+ AppLogDebug("EXIT");
+}
+
+void
+CameraThumbnailPanel::SetDrawSliderImg(void)
+{
+ AppLogDebug("ENTER");
+ if (__pAnimationTimer != null)
+ {
+ __pAnimationTimer->Cancel();
+ delete __pAnimationTimer;
+ __pAnimationTimer = null;
+ }
+ delete __pBackUpBitmap;
+
+ __pBackUpBitmap = new (std::nothrow) Bitmap();
+ if (__pOldBitmap)
+ {
+ __pBackUpBitmap->Construct(*__pOldBitmap, Rectangle(X_START, Y_START, __pOldBitmap->GetWidth(), __pOldBitmap->GetHeight()));
+ }
+ else
+ {
+ Canvas* pCanvas = GetCanvasN();
+ Rectangle rect = pCanvas->GetBounds();
+
+ __pBackUpBitmap->Construct(*pCanvas, Rectangle(X_MARGIN, Y_MARGIN, rect.width - X_MARGIN, rect.height - Y_MARGIN));
+ delete pCanvas;
+ }
+
+ __count = START_FRAME;
+ __ImgSilder = true;
+
+ __pAnimationTimer = new (std::nothrow) Timer();
+ __pAnimationTimer->Construct(*this);
+ __pAnimationTimer->StartAsRepeatable(DRAWING_TIMER_INTERVAL);
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmFormFactory.cpp
+ * @brief This is the implementation file for CameraFormFactory class.
+ */
+
+#include "CmCameraPresentationModel.h"
+#include "CmFormFactory.h"
+#include "CmTypes.h"
+
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+const wchar_t* IDSCN_CAMERA = L"Camera";
+const wchar_t* IDSCN_CAMCORDER = L"Camcorder";
+const wchar_t* IDC_FORM_CAMERA = L"CameraForm";
+const wchar_t* IDC_FORM_CAMCORDER = L"CamcorderForm";
+
+FormFactory::FormFactory(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+FormFactory::~FormFactory(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+Tizen::Ui::Controls::Form*
+FormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ Form* pNewForm = null;
+
+ if (formId == IDC_FORM_CAMERA)
+ {
+ CameraForm* pForm = new (std::nothrow) CameraForm();
+
+ r = pForm->Initialize();
+ TryCatch(r == E_SUCCESS, , "CameraForm::Initialize() fail[%s]", GetErrorMessage(r));
+
+ r = pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ TryCatch(r == E_SUCCESS, , "SceneManager::AddSceneEventListener() fail[%s]", GetErrorMessage(r));
+
+ pNewForm = pForm;
+
+ AppLogDebug("CameraForm Create");
+ }
+ else if (formId == IDC_FORM_CAMCORDER)
+ {
+ CamcorderForm* pForm = new (std::nothrow) CamcorderForm();
+
+ r = pForm->Initialize();
+ TryCatch(r == E_SUCCESS, , "CamcorderForm::Initialize() fail[%s]", GetErrorMessage(r));
+
+ r = pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ TryCatch(r == E_SUCCESS, , "SceneManager::AddSceneEventListener() fail[%s]", GetErrorMessage(r));
+
+ pNewForm = pForm;
+ AppLogDebug("CamcorderForm Create");
+ }
+
+ AppLogDebug("EXIT");
+ return pNewForm;
+
+CATCH:
+ return null;
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmMainFrame.cpp
+ * @brief This is the implementation file for MainFrame class.
+ */
+
+#include "CmCameraApp.h"
+#include "CmCameraPresentationModel.h"
+#include "CmCameraSettingsPresentationModel.h"
+#include "CmMainFrame.h"
+#include "CmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Io;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+MainFrame::MainFrame(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+MainFrame::~MainFrame(void)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
+
+result
+MainFrame::OnInitializing(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ AddFrameEventListener(*this);
+
+ SceneManager* pSceneManager = null;
+ static FormFactory formFactory;
+ pSceneManager = SceneManager::GetInstance();
+ TryCatch(pSceneManager != null, r = E_SYSTEM, "pSceneManager is null");
+
+ r = pSceneManager->RegisterFormFactory(formFactory);
+ TryCatch(r == E_SUCCESS, , "SceneManager::RegisterFormFactory() fail[%s]", GetErrorMessage(r));
+
+ r = pSceneManager->RegisterScene(IDSCN_CAMERA, IDC_FORM_CAMERA, L"");
+ TryCatch(r == E_SUCCESS, , "SceneManager::RegisterScene() fail[%s]", GetErrorMessage(r));
+
+ r = pSceneManager->RegisterScene(IDSCN_CAMCORDER, IDC_FORM_CAMCORDER , L"");
+ TryCatch(r == E_SUCCESS, , "SceneManager::RegisterScene() fail[%s]", GetErrorMessage(r));
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ return r;
+}
+
+result
+MainFrame::OnTerminating(void)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+
+ __isAppControlRequst = false;
+
+ AppLogDebug("EXIT");
+ return r;
+}
+
+result
+MainFrame::Initialize(const int mode)
+{
+ AppLogDebug("ENTER");
+ result r = E_SUCCESS;
+ bool isAppControl = false;
+ SceneManager* pSceneManager = null;
+ pSceneManager = SceneManager::GetInstance();
+ TryCatch(pSceneManager != null, r = E_SYSTEM, "pSceneManager is null");
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl)
+ {
+ AppLogDebug("__isAppControlRequst = true");
+ __isAppControlRequst = true;
+ }
+ else
+ {
+ AppLogDebug("__isAppControlRequst = false");
+ __isAppControlRequst = false;
+ }
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMERA));
+ TryCatch(r == E_SUCCESS, , "SceneManager::GoForward() failed by [%s]", GetErrorMessage(r));
+ }
+ else if (mode == CameraPresentationModel::CAMERA_MODE_RECORD)
+ {
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMCORDER));
+ TryCatch(r == E_SUCCESS, , "SceneManager::GoForward() failed by [%s]", GetErrorMessage(r));
+ }
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ r = E_FAILURE;
+ return r;
+}
+
+result
+MainFrame::StartAppControl(RequestId requestId, Tizen::Base::Collection::ArrayList* pArgs)
+{
+ AppLogDebug("ENTER StartAppControl %d", requestId);
+ result r = E_SUCCESS;
+ SceneManager* pSceneManager = null;
+ pSceneManager = SceneManager::GetInstance();
+ TryCatch(pSceneManager != null, r = E_SYSTEM, "pSceneManager is null");
+
+ switch (requestId)
+ {
+ case IDA_FORM_CAMERA:
+ {
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMERA));
+ TryCatch(r == E_SUCCESS, , "SceneManager::GoForward() failed by [%s]", GetErrorMessage(r));
+ }
+ break;
+
+ case IDA_FORM_CAMCORDER:
+ {
+ r = pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CAMCORDER));
+ TryCatch(r == E_SUCCESS, , "SceneManager::GoForward() failed by [%s]", GetErrorMessage(r));
+ }
+ break;
+
+ default:
+ {
+ r = E_INVALID_ARG;
+ }
+ break;
+ }
+
+ //Invalidate(true);
+ Draw();
+ Show();
+ TryCatch(GetLastResult() == E_SUCCESS, r = GetLastResult(), "Failed Show()");
+
+ AppLogDebug("EXIT");
+ return r;
+
+CATCH:
+ AppLogException("Application execution failed-[%s]", GetErrorMessage(r));
+ return r;
+}
+
+void
+MainFrame::OnFrameActivated(const Tizen::Ui::Controls::Frame& source)
+{
+ AppLogDebug("ENTER");
+ int mode = 0;
+ bool isAppControl = false;
+ result r = E_SUCCESS;
+
+ isAppControl = (static_cast<CameraApp*>(UiApp::GetInstance()))->IsAppControl();
+
+ if (isAppControl == true)
+ {
+ r = CameraPresentationModel::GetInstance()->GetValue(CURRENT_MODE, mode);
+ if (r != E_SUCCESS)
+ {
+ AppLogDebug("CameraPresentationModel::GetInstance()->GetValue fail %s", GetErrorMessage(r));
+
+ mode = CameraPresentationModel::CAMERA_MODE_SNAPSHOT;
+ }
+
+ if (mode == CameraPresentationModel::CAMERA_MODE_SNAPSHOT)
+ {
+ CameraPresentationModel::GetInstance()->CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_CAMERA_THUMBNAIL_BUTTON_LOCK);
+ }
+ else if (mode == CameraPresentationModel::CAMERA_MODE_RECORD)
+ {
+ CameraPresentationModel::GetInstance()->CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_VIDEO_THUMBNAIL_BUTTON_LOCK);
+ }
+ }
+
+ CameraPresentationModel::GetInstance()->CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_FRAME_ACTIVATED);
+
+ AppLogDebug("EXIT");
+}
+
+void
+MainFrame::OnFrameDeactivated(const Tizen::Ui::Controls::Frame& source)
+{
+ AppLogDebug("ENTER");
+
+ if (__isAppControlRequst)
+ {
+ AppLogDebug("APP_CONTROL_TYPE_REQUESET");
+ (static_cast<CameraApp*>(UiApp::GetInstance()))->SetAppControlType(APP_CONTROL_TYPE_REQUESET);
+ }
+ else
+ {
+ AppLogDebug("APP_CONTROL_TYPE_STANDARD");
+ (static_cast<CameraApp*>(UiApp::GetInstance()))->SetAppControlType(APP_CONTROL_TYPE_STANDARD);
+ }
+
+ CameraPresentationModel::GetInstance()->CallOnPresentationModeChanged(CAMERA_ACTION_EVENT_FRAME_DEACTIVATED);
+
+ AppLogDebug("EXIT");
+}
+
+void
+MainFrame::OnFrameTerminating(const Tizen::Ui::Controls::Frame& source)
+{
+ AppLogDebug("ENTER");
+ AppLogDebug("EXIT");
+}
\ No newline at end of file
--- /dev/null
+//
+// 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 CmTypes.cpp
+ * @brief This is the implementation file for Types class.
+ */
+
+#include <FGraphics.h>
+#include "CmTypes.h"
+
+using namespace Tizen::Graphics;
+
+const unsigned int COLOR_SETTING_MENU_TITLE = Color32<255, 255, 255>::Value;
+const unsigned int COLOR_SETTING_MENU_VAULE = Color32<0, 192, 255>::Value;
+const unsigned int COLOR_SETTING_MENU_VALUE_DISABLE = Color32<128, 128, 128>::Value;
+const unsigned int COLOR_PANEL_BACKGROUND_BLACK = Color32<0, 0, 0>::Value;
+const unsigned int COLOR_PANEL_BACKGROUND_GRAY = Color32<41, 41, 41>::Value;
+const unsigned int COLOR_GUIDELINE = Color32<255, 255, 255>::Value;
+const unsigned int COLOR_TITLE = Color32<255, 255, 255>::Value;
+const unsigned int COLOR_TIMER_TEXT = Color32<249, 249, 249>::Value;
+
+const int X_THUMBNAIL_IMG_PANEL_LANDSCPAE_WVGA = 1060;
+const int X_THUMBNAIL_IMG_PANEL_LANDSCPAE = 1146;
+const int Y_THUMBNAIL_IMG_PANEL_LANDSCPAE = 604;
+const int W_THUMBNAIL_IMG_PANEL_LANDSCPAE = 108;
+const int H_THUMBNAIL_IMG_PANEL_LANDSCPAE = 108;
+
+const int X_THUMBNAIL_IMG_PANEL_PORTRAIT = 8;
+const int Y_THUMBNAIL_IMG_PANEL_PORTRAIT_WVGA = 1060;
+const int Y_THUMBNAIL_IMG_PANEL_PORTRAIT = 1146;
+const int W_THUMBNAIL_IMG_PANEL_PORTRAIT = 108;
+const int H_THUMBNAIL_IMG_PANEL_PORTRAIT = 108;
+
+const int STORAGE_TYPE_PHONE = 0;
+const int STORAGE_TYPE_MEMORYCARD = 1;
+const int MAX_DIRECTORY_PATH_LENGTH = 100;
+const int APP_CONTROL_TYPE_STANDARD = 0;
+const int APP_CONTROL_TYPE_REQUESET = 1;
+
+const wchar_t* SECTION_CAMERA = L"CAMERA_SETTING";
+const wchar_t* SECTION_CAMCORDER = L"CAMCORDER_SETTING";
+
+const wchar_t* CURRENT_MODE = L"CURRENT_MODE";
+const wchar_t* FLASH_MODE = L"FLASH_MODE";
+const wchar_t* SELF_PORTRAIT_ENABLE = L"SELF_PORTRAIT_ENABLE";
+const wchar_t* SHOOTING_MODE = L"SHOOTING_MODE";
+const wchar_t* EXPOSURE_VALUE = L"EXPOSURE_VALUE";
+const wchar_t* BRIGHTNESS_VALUE = L"BRIGHTNESS_VALUE";
+const wchar_t* TIMER_INTERVAL = L"TIMER_INTERVAL";
+const wchar_t* ISO_VALUE = L"ISO_VALUE";
+const wchar_t* WHITE_BALANCE_TYPE = L"WHITE_BALANCE_TYPE";
+const wchar_t* EXPOSURE_METERING_TYPE = L"EXPOSURE_METERING_TYPE";
+const wchar_t* GEO_TAGGING_ENABLE = L"GEO_TAGGING_ENABLE";
+const wchar_t* GUIDELINE_ENABLE = L"GUIDELINE_ENABLE";
+const wchar_t* CAPTURE_RESOLUTION = L"CAPTURE_RESOLUTION";
+const wchar_t* STORAGE_TYPE = L"STORAGE_TYPE";
+const wchar_t* RECORDING_MODE = L"RECORDING_MODE";
+
+const wchar_t* IDS_TYPE_IMAGE = L"type:image";
+const wchar_t* APPCONTROL_PROVIDER_ID_IMAGEVIEW = L"tizen.imageviewer";
+const wchar_t* APPCONTROL_OPERATION_ID_IMAGEVIEW = L"http://tizen.org/appcontrol/operation/view";
+const wchar_t* STRING_CAMERA_FOLDER = L"Camera/";
+
+const wchar_t* APPCONTROL_KEY_TYPE = L"type";
+const wchar_t* APPCONTROL_KEY_PATH = L"path";
+const wchar_t* APPCONTROL_KEY_INDEX = L"index";
+const wchar_t* APPCONTROL_DATA_CAMERA = L"camera";
+const wchar_t* APPCONTROL_DATA_CAMCORDER = L"camcorder";
+
+const wchar_t* IDS_CAM_BODY_FLASH = L"IDS_CAM_BODY_FLASH";
+const wchar_t* IDS_CAM_BODY_SETTINGS = L"IDS_CAM_BODY_SETTINGS";
+const wchar_t* IDS_CAM_BODY_AUTO = L"IDS_CAM_BODY_AUTO";
+const wchar_t* IDS_CAM_BODY_OFF = L"IDS_CAM_BODY_OFF";
+const wchar_t* IDS_CAM_BODY_ON = L"IDS_CAM_BODY_ON";
+const wchar_t* IDS_CAM_OPT_EXPOSURE_VALUE = L"IDS_CAM_OPT_EXPOSURE_VALUE";
+const wchar_t* IDS_MENU_EXPOSURE_M20 = L"-2.0";
+const wchar_t* IDS_MENU_EXPOSURE_M15 = L"-1.5";
+const wchar_t* IDS_MENU_EXPOSURE_M10 = L"-1.0";
+const wchar_t* IDS_MENU_EXPOSURE_M05 = L"-0.5";
+const wchar_t* IDS_MENU_EXPOSURE_00 = L"0.0";
+const wchar_t* IDS_MENU_EXPOSURE_P05 = L"+0.5";
+const wchar_t* IDS_MENU_EXPOSURE_P10 = L"+1.0";
+const wchar_t* IDS_MENU_EXPOSURE_P15 = L"+1.5";
+const wchar_t* IDS_MENU_EXPOSURE_P20 = L"+2.0";
+const wchar_t* IDS_CAM_BODY_TIMER = L"IDS_CAM_BODY_TIMER";
+const wchar_t* IDS_CAM_BODY_2_SEC = L"IDS_CAM_BODY_2_SEC";
+const wchar_t* IDS_CAM_BODY_5_SEC = L"IDS_CAM_BODY_5_SEC";
+const wchar_t* IDS_CAM_BODY_10_SEC = L"IDS_CAM_BODY_10_SEC";
+const wchar_t* IDS_CAM_BODY_ISO = L"IDS_CAM_BODY_ISO";
+const wchar_t* IDS_MENU_ISO_50 = L"50";
+const wchar_t* IDS_MENU_ISO_100 = L"100";
+const wchar_t* IDS_MENU_ISO_200 = L"200";
+const wchar_t* IDS_MENU_ISO_400 = L"400";
+const wchar_t* IDS_MENU_ISO_800 = L"800";
+const wchar_t* IDS_CAM_OPT_WHITE_BALANCE_ABB = L"IDS_CAM_OPT_WHITE_BALANCE_ABB";
+const wchar_t* IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT = L"IDS_CAM_BODY_WHITEBALANCE_INCANDESCENT";
+const wchar_t* IDS_CAM_BODY_FLUORESCENT = L"IDS_CAM_BODY_FLUORESCENT";
+const wchar_t* IDS_CAM_BODY_DAYLIGHT = L"IDS_CAM_BODY_DAYLIGHT";
+const wchar_t* IDS_CAM_BODY_CLOUDY = L"IDS_CAM_BODY_CLOUDY";
+const wchar_t* IDS_CAM_BODY_GUIDELINE = L"IDS_CAM_BODY_GUIDELINE";
+const wchar_t* IDS_CAM_BODY_STORAGE = L"IDS_CAM_BODY_STORAGE";
+const wchar_t* IDS_COM_BODY_PHONE = L"IDS_COM_BODY_PHONE";
+const wchar_t* IDS_CAM_OPT_MEMORY_CARD = L"IDS_CAM_OPT_MEMORY_CARD";
+const wchar_t* IDS_CAM_BODY_RESOLUTION = L"IDS_CAM_BODY_RESOLUTION";
+const wchar_t* IDS_CAM_BODY_RESET_SETTINGS_RESET = L"IDS_CAM_BODY_RESET_SETTINGS_RESET";
\ No newline at end of file