+++ /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 IvImageSetterForm.h
- * @brief This is the header file for ImageSetterForm class.
- */
-
-#ifndef _IV_IMAGE_SETTER_FORM_H_
-#define _IV_IMAGE_SETTER_FORM_H_
-
-#include <FBase.h>
-#include <FGraphics.h>
-#include <FSocial.h>
-#include <FSystem.h>
-#include <FIo.h>
-#include <FUi.h>
-
-#include "IvFileUpdateEventListener.h"
-
-class ImageViewerPresentationModel;
-
-class ImageSetterForm
- : public Tizen::Ui::Controls::Form
- , public Tizen::Ui::IActionEventListener
- , public Tizen::Ui::IOrientationEventListener
- , public Tizen::Ui::Controls::IFormBackEventListener
- , public Tizen::Ui::Controls::IGalleryEventListener
- , public Tizen::Ui::Controls::IGalleryItemProvider
- , public Tizen::Ui::Scenes::ISceneEventListener
- , public IFileUpdateEventListener
-{
-public:
- ImageSetterForm();
- virtual ~ImageSetterForm();
-
- result Initialize(void);
-
- virtual result OnInitializing(void);
- virtual result OnTerminating(void);
-
- virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
-
- virtual void OnOrientationChanged(const Tizen::Ui::Control& source,
- Tizen::Ui::OrientationStatus orientationStatus);
-
- virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
-
- virtual void OnGalleryCurrentItemChanged (Tizen::Ui::Controls::Gallery &view, int index);
- virtual void OnGalleryItemClicked(Tizen::Ui::Controls::Gallery& listView, int index);
- virtual void OnGallerySlideShowStarted(Tizen::Ui::Controls::Gallery& gallery);
- virtual void OnGallerySlideShowStopped(Tizen::Ui::Controls::Gallery& gallery);
-
- virtual Tizen::Ui::Controls::GalleryItem* CreateItem(int index);
- virtual bool DeleteItem(int index, Tizen::Ui::Controls::GalleryItem* pItem);
- virtual int GetItemCount(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 OnFormFileEventOccuered(const int index, const unsigned long eventId);
-
-private:
- result InitializeButton(void);
- void CreateGallery(void);
-
-private:
- Tizen::Ui::Controls::Button* __pSetButton;
- Tizen::Ui::Controls::Button* __pCancelButton;
- Tizen::Ui::Controls::Gallery* __pGallery;
- int __statusValue;
- int __currentImageIndex;
- long long __contentId;
- Tizen::Graphics::Bitmap* __pCurrentBitmap;
- ImageViewerPresentationModel* __pPresentationModel;
-};
-
-#endif /* _IV_IMAGE_SETTER_FORM_H_ */
+++ /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 IvImageSetterForm.cpp
- * @brief This is the implementation file for ImageSetterForm class.
- */
-
-#include <FApp.h>
-#include <FMedia.h>
-#include "IvImageViewerPresentationModel.h"
-#include "IvImageSetterForm.h"
-#include "IvResourceManager.h"
-#include "IvTypes.h"
-
-using namespace Tizen::Base;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::App;
-using namespace Tizen::Ui;
-using namespace Tizen::Ui::Controls;
-using namespace Tizen::Ui::Scenes;
-using namespace Tizen::Graphics;
-using namespace Tizen::Io;
-using namespace Tizen::Media;
-using namespace Tizen::Social;
-using namespace Tizen::System;
-
-static const unsigned int COLOR_SET_BUTTON = Color32<0, 0, 0, 100>::Value;
-
-static const int SET_BUTTON_WIDTH = 86;
-static const int SET_BUTTON_HEIGHT = 86;
-static const int ID_BUTTON_SET = 101;
-static const int ID_BUTTON_CANCEL = 102;
-
-static const int GALLERY_INDEX_ZERO = 0;
-static const int GALLERY_CONTROL_DURATION = 3000;
-
-static const int MAX_GALLEY_ITEM_COUNT = 1;
-
-ImageSetterForm::ImageSetterForm()
- : __pSetButton(null)
- , __pCancelButton(null)
- , __pGallery(null)
- , __statusValue(0)
- , __currentImageIndex(0)
- , __contentId(0)
- , __pCurrentBitmap(null)
- , __pPresentationModel(null)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-ImageSetterForm::~ImageSetterForm()
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-result
-ImageSetterForm::Initialize(void)
-{
- AppLogDebug("ENTER");
- result r = Form::Construct(IDL_FORM_IMAGE_SETTER);
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return r;
-}
-
-result
-ImageSetterForm::OnInitializing(void)
-{
- AppLogDebug("ENTER");
- SetFormBackEventListener(this);
-
- result r = SetActionBarsTranslucent(FORM_ACTION_BAR_INDICATOR, true);
- AddOrientationEventListener(*this);
-
- __pPresentationModel = ImageViewerPresentationModel::GetInstance();
- __currentImageIndex = __pPresentationModel->GetSetterIndex();
- __pPresentationModel->AddFileUpdateListener(this);
- CreateGallery();
- InitializeButton();
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return r;
-}
-
-void
-ImageSetterForm::CreateGallery(void)
-{
- AppLogDebug("ENTER");
- Rectangle clientRect = GetClientAreaBounds();
- Rectangle rect = GetBounds();
-
- __pGallery = new (std::nothrow) Gallery();
- __pGallery->Construct(Rectangle(0, -clientRect.y, rect.width, rect.height));
- __pGallery->SetItemProvider(*this);
- __pGallery->AddGalleryEventListener(*this);
- AddControl(*__pGallery);
-
- __pGallery->SetTextOfEmptyGallery(ResourceManager::GetString(L"IDS_COM_BODY_LOADING"));
- __pGallery->SetSlideShowAnimation(GALLERY_ANIMATION_DISSOLVE);
- __pGallery->SetSlideShowViewDuration(GALLERY_CONTROL_DURATION);
- __pGallery->SetZoomingEnabled(false);
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-result
-ImageSetterForm::InitializeButton(void)
-{
- AppLogDebug("ENTER");
- __pSetButton = new (std::nothrow) Button();
-
- Rectangle rect = GetBounds();
-
- if (__pSetButton != null)
- {
- __pSetButton->Construct(Rectangle(29, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- __pSetButton->SetActionId(ID_BUTTON_SET);
- AddControl(*__pSetButton);
-
- Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_SET);
- Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_SET_PRESS);
-
- __pSetButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap);
- __pSetButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap);
-
- delete pNormalBackgroundBitmap;
- delete pPressedBackgroundBitmap;
-
- __pSetButton->SetColor(BUTTON_STATUS_NORMAL, COLOR_SET_BUTTON);
- __pSetButton->SetColor(BUTTON_STATUS_PRESSED, COLOR_SET_BUTTON);
- __pSetButton->AddActionEventListener(*this);
- }
-
- __pCancelButton = new (std::nothrow) Button();
- if (__pCancelButton != null)
- {
- __pCancelButton->Construct(Rectangle(rect.width - 115, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- __pCancelButton->SetActionId(ID_BUTTON_CANCEL);
- AddControl(*__pCancelButton);
-
- Bitmap* pNormalBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_CANCEL);
- Bitmap* pPressedBackgroundBitmap = ResourceManager::GetBitmapN(IDB_IMAGE_SETTERFORM_BUTTON_CANCEL_PRESS);
-
- __pCancelButton->SetNormalBackgroundBitmap(*pNormalBackgroundBitmap);
- __pCancelButton->SetPressedBackgroundBitmap(*pPressedBackgroundBitmap);
-
- delete pNormalBackgroundBitmap;
- delete pPressedBackgroundBitmap;
-
- __pCancelButton->AddActionEventListener(*this);
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
-}
-
-void
-ImageSetterForm::OnOrientationChanged(const Control &source, OrientationStatus orientationStatus)
-{
- AppLogDebug("ENTER");
- Rectangle clientRect = GetClientAreaBounds();
- Rectangle rect = GetBounds();
-
- if (orientationStatus == ORIENTATION_STATUS_PORTRAIT ||
- orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
- {
- __pSetButton->SetBounds(Rectangle(29, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- __pCancelButton->SetBounds(Rectangle(rect.width - 115, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- }
- else if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE ||
- orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
- {
- __pSetButton->SetBounds(Rectangle(140, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- __pCancelButton->SetBounds(Rectangle(rect.width - 228, rect.height - 168, SET_BUTTON_WIDTH, SET_BUTTON_HEIGHT));
- }
-
- __pGallery->SetBounds(Rectangle(0, -clientRect.y, rect.width, rect.height));
- Draw();
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-int
-ImageSetterForm::GetItemCount(void)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return MAX_GALLEY_ITEM_COUNT;
-}
-
-GalleryItem*
-ImageSetterForm::CreateItem(int index)
-{
- AppLogDebug("ENTER");
- GalleryItem* pGallery = new (std::nothrow) GalleryItem();
-
- String filePath = __pPresentationModel->GetFilePathAt(__currentImageIndex);
- Bitmap* pBitmap = null;
- ImageBuffer pImageBuffer;
- result r = pImageBuffer.Construct(filePath);
- if (r == E_SUCCESS)
- {
- pBitmap = pImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_AUTO);
- }
-
- __pCurrentBitmap = pBitmap;
- pGallery->Construct(*__pCurrentBitmap, filePath);
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return pGallery;
-}
-
-bool
-ImageSetterForm::DeleteItem(int index, GalleryItem* pItem)
-{
- AppLogDebug("ENTER");
- delete pItem;
- pItem = null;
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return true;
-}
-
-void
-ImageSetterForm::OnGalleryCurrentItemChanged(Gallery& view, int index)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnGalleryItemClicked(Gallery& view, int index)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnGallerySlideShowStarted(Gallery& gallery)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnGallerySlideShowStopped(Gallery& gallery)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-result
-ImageSetterForm::OnTerminating(void)
-{
- AppLogDebug("ENTER");
- if (__pCurrentBitmap != null)
- {
- delete __pCurrentBitmap;
- }
- __pPresentationModel->RemoveFileUpdateListener(*this);
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-
- return E_SUCCESS;
-}
-
-void
-ImageSetterForm::OnActionPerformed(const Control& source, int actionId)
-{
- AppLogDebug("ENTER");
- SceneManager* pSceneManager = SceneManager::GetInstance();
-
- int status = __statusValue;
-
- String filePath = __pPresentationModel->GetFilePathAt(__currentImageIndex);
-
- switch (actionId)
- {
- case ID_BUTTON_SET:
- if (status == SET_AT_TYPE_HOME_SCREEN_WALLPAPER)
- {
- Image image;
- result r = image.Construct();
- if (r == E_SUCCESS)
- {
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
- r = image.EncodeToFile(*__pCurrentBitmap, IMG_FORMAT_JPG, destPath, true);
- if (r == E_SUCCESS)
- {
- r = SettingInfo::SetValue(SETTING_VALUE_HOME_SCREEN_WALLPAPER, destPath);
- }
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
- }
- }
- else if (status == SET_AT_TYPE_LOCK_SCREEN_WALLPAPER)
- {
- Image image;
- result r = image.Construct();
- if (r == E_SUCCESS)
- {
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
- r = image.EncodeToFile(*__pCurrentBitmap, IMG_FORMAT_JPG, destPath, true);
- if (r == E_SUCCESS)
- {
- r = SettingInfo::SetValue(SETTING_VALUE_LOCK_SCREEN_WALLPAPER, destPath);
- }
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
- }
- }
- else if (status == SET_AT_TYPE_CALLER_IMAGE)
- {
- Contact* pContact = null;
- AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
- Addressbook* pAddressbook = null;
-
- pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
- pContact = pAddressbook->GetContactN(__contentId);
- pContact->SetThumbnail(filePath);
- pAddressbook->UpdateContact(*pContact);
-
- delete pContact;
- delete pAddressbook;
- }
- else if (status == SET_AT_TYPE_HOME_AND_LOCK_SCREEN_WALLPAPER )
- {
- Image image;
- result r = image.Construct();
- if (r == E_SUCCESS)
- {
- String destPath = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_LOCK_SCREEN_WALLPAPER;
- r = image.EncodeToFile(*__pCurrentBitmap, IMG_FORMAT_JPG, destPath, true);
- if (r == E_SUCCESS)
- {
- r = SettingInfo::SetValue(SETTING_VALUE_LOCK_SCREEN_WALLPAPER, destPath);
- }
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
-
- String destPathHome = App::GetInstance()->GetAppRootPath() + TEMP_FILE_PATH_HOME_SCREEN_WALLPAPER;
- r = image.EncodeToFile(*__pCurrentBitmap, IMG_FORMAT_JPG, destPathHome, true);
- if (r == E_SUCCESS)
- {
- r = SettingInfo::SetValue(SETTING_VALUE_HOME_SCREEN_WALLPAPER, destPathHome);
- }
- else if (r == E_OVERFLOW)
- {
- MessageBox messageBox;
- messageBox.Construct(L"", L"File size is too big", MSGBOX_STYLE_NONE, 3000);
- int modalResult = 0;
- messageBox.ShowAndWait(modalResult);
- }
-
- }
- }
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER));
- break;
- case ID_BUTTON_CANCEL:
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER));
- break;
- default:
- break;
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnFormBackRequested(Form& source)
-{
- AppLogDebug("ENTER");
- UiApp* pApp = UiApp::GetInstance();
- pApp->Terminate();
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnSceneActivatedN(const SceneId& previousSceneId,
- const SceneId& currentSceneId, IList* pArgs)
-{
- AppLogDebug("ENTER");
- if (previousSceneId == IDSCN_IMAGE_VIEWER)
- {
- if (pArgs != null)
- {
- IEnumerator* pEnum = pArgs->GetEnumeratorN();
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
- Integer *pIndex = static_cast<Integer*>(pEnum->GetCurrent());
- if (pIndex != null)
- {
- __currentImageIndex = pIndex->ToInt();
- }
-
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
- Integer *pStatus = static_cast<Integer*>(pEnum->GetCurrent());
- if (pStatus != null)
- {
- __statusValue = pStatus->ToInt();
- }
-
- if (__statusValue == SET_AT_TYPE_CALLER_IMAGE)
- {
- if (pEnum->MoveNext() != E_SUCCESS)
- {
- delete pEnum;
- delete pArgs;
- AppLogDebug("EXIT 3(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
-
- LongLong* pContentId = static_cast<LongLong*>(pEnum->GetCurrent());
- if (pContentId != null)
- {
- __contentId = pContentId->ToLongLong();
- }
- }
-
- delete pEnum;
- delete pArgs;
- }
- }
-
- if (__pGallery != null)
- {
- __pGallery->RefreshGallery(GALLERY_INDEX_ZERO, GALLERY_REFRESH_TYPE_ITEM_MODIFY);
- __pGallery->Draw();
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageSetterForm::OnSceneDeactivated(const SceneId& currentSceneId,
- const SceneId& nextSceneId)
-{
- AppLogDebug("ENTER");
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void ImageSetterForm::OnFormFileEventOccuered(const int index, const unsigned long eventId)
-{
- AppLogDebug(" ENTER");
- if (__currentImageIndex == index && eventId == IV_FILE_DELETE)
- {
- SceneManager* pSceneManager = SceneManager::GetInstance();
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_VIEWER));
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
__pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_OPT_SET_AS"),
ACTION_ID_CONTEXTMENU_SET_AS);
__pContextMenuMore->AddItem(ResourceManager::GetString(L"IDS_IV_BODY_CROP"), ACTION_ID_FOOTER_BUTTON_CROP);
- //__pContextMenuMore->AddItem("Rotate Left", ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT);
- //__pContextMenuMore->AddItem("Rotate Right", ACTION_ID_FOOTER_BUTTON_ROTATE_RIGHT);
}
if (__pGallery->GetItemCount() > 1)
{
String filePath;
String cropMode = L"auto";
- //String cropMode = L"auto";
ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
filePath = __pPresentationModel->GetFilePathAt(__pGallery->GetCurrentItemIndex());
pList->Add(new (std::nothrow) String(filePath));
RotateMode rotateMode = ROTATE_MODE_RIGHT;
__pPresentationModel->SetImageRotateStatus(true);
RotateImage(filePath, rotateMode);
- AppLog("Manish After Rotate");
- //__pPresentationModel->SetImageCacheAt(currentIndex, filePath);
ImageInfo* pImageInfo = null;
pImageInfo->Construct(filePath, null);
pImageInfo->ClearBitmap();
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_HOME_SCREEN_WALLPAPER));
- //__pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
break;
}
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_LOCK_SCREEN_WALLPAPER));
- //__pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
break;
}
pList->Add(new (std::nothrow) String(filePath));
pList->Add(new (std::nothrow) String(cropMode));
pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_HOME_AND_LOCK_SCREEN_WALLPAPER));
- //__pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
break;
}
ImageFormat imageFormat;
Image img;
r = img.Construct();
+
if (r == E_SUCCESS)
{
imageFormat = img.GetImageFormat(filePath);
}
- r = rotateBuffer.Construct(filePath);
- //ImageBuffer::GetImageInfo(filePath, imageFormat, width, height);
+ r = rotateBuffer.Construct(filePath);
if (r == E_SUCCESS)
{
if (rotateMode == ROTATE_MODE_RIGHT)
if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null)
{
- AppLog("Manish hello");
String filePath;
filePath = *(static_cast<String*>(pArgs->GetAt(0)));
delete pArgs;
- AppLog("Manish %ls", filePath.GetPointer());
int count = __pPresentationModel->GetFileCount();
__pPresentationModel->AddImageCache(filePath);
__pGallery->UpdateGallery();
pList->Add(new (std::nothrow) LongLong(lresult));
SceneManager* pSceneManager = SceneManager::GetInstance();
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_CROP), pList);
- /*ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
- pList->Add(new (std::nothrow) Integer(__pGallery->GetCurrentItemIndex()));
- pList->Add(new (std::nothrow) Integer(SET_AT_TYPE_CALLER_IMAGE));
- pList->Add(new (std::nothrow) LongLong(lresult));
- __pPresentationModel->SetSetterIndex(__pGallery->GetCurrentItemIndex());
-
- SceneManager* pSceneManager = SceneManager::GetInstance();
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_SETTER), pList);*/
}
}