Tizen::Base::String GetFilePathAt(const int index) const;
Tizen::Base::Collection::ArrayList* GetImageCache() const;
ImageInfo* GetImageCacheAt(const int index) const;
+ void SetImageCacheAt(const int index, const Tizen::Base::String& filePath);
int GetFileCount(void) const;
Tizen::Base::String GetType(void) const;
ContentManager::ScanFile(destFilePath);
delete pCropBuffer;
}
- pSceneManager->GoBackward(BackwardSceneTransition());
+ ArrayList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pList->Add(new (std::nothrow) String(destFilePath));
+ AppLog("Manish %ls", destFilePath.GetPointer());
+ pSceneManager->GoBackward(BackwardSceneTransition(), pList);
AppLog("Exit");
}
break;
RotateImage(filePath, rotateMode);
__pPresentationModel->RequestImage(filePath);
//Invalidate(true);
- ContentManager contentManager;
- contentManager.Construct();
- contentManager.ScanFile(filePath);
+ ContentManager::ScanFile(filePath);
}
break;
case ACTION_ID_FOOTER_BUTTON_ROTATE_LEFT:
RotateImage(filePath, rotateMode);
__pPresentationModel->RequestImage(filePath);
//Invalidate(true);
- ContentManager contentManager;
- contentManager.Construct();
- contentManager.ScanFile(filePath);
+ ContentManager::ScanFile(filePath);
}
break;
case ACTION_ID_FOOTER_BUTTON_DETAILS:
Invalidate(true);
}
+ if (previousSceneId == IDSCN_IMAGE_CROP && pArgs != null)
+ {
+ AppLog("Manish hello");
+ String* pFilePath = null;
+ pFilePath = static_cast<String*>(pArgs->GetAt(0));
+ delete pArgs;
+ AppLog("Manish %ls", pFilePath->GetPointer());
+ String filePath;
+ filePath.Append(*pFilePath);
+ int count = __pPresentationModel->GetFileCount();
+ __pPresentationModel->SetImageCacheAt(count, filePath);
+ __pGallery->UpdateGallery();
+ __pGallery->SetCurrentItemIndex(count);
+ __pPresentationModel->RequestImage(filePath);
+ }
+
if (__pGallery->GetCurrentItemIndex() < 0)
{
SetFooterItemState(false);
return static_cast<ImageInfo*>(__pImageCaches->GetAt(index));
}
+void
+ImageViewerPresentationModel::SetImageCacheAt(const int index, const String& filePath)
+{
+ ImageInfo* pImageInfo = null;
+ pImageInfo = new (std::nothrow) ImageInfo();
+ AppLog("Manish %d %ls", index, filePath.GetPointer());
+
+ pImageInfo->Construct(filePath, null);
+ //__pImageCaches->Add(pImageInfo);
+ int count = __pImageCaches->GetCount();
+ AppLog("Manish count %d", count);
+ //__pImageCaches->SetCapacity(++count);
+ __pImageCaches->Add(pImageInfo);
+}
+
int
ImageViewerPresentationModel::GetFileCount(void) const
{