{
public:
void RequestImage(const Tizen::Base::String& filePath, const ImageEvent* pRequestEvent);
+ Tizen::Graphics::Bitmap* GetImage(const Tizen::Base::String& filePath);
void ClearImageRequests(bool isAppTerminating = false);
virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList * pArgs);
int GetStartIndex(void) const;
Tizen::Base::String GetFileName(const Tizen::Base::String& filePath, bool isCheckExe = false) const;
- void RequestImage(const Tizen::Base::String& filePath) const;
+ void RequestImage(const Tizen::Base::String& filePath);
+ Tizen::Graphics::Bitmap* GetImage(const Tizen::Base::String& filePath);
Tizen::Content::ContentId GetFileContentId(const Tizen::Base::String& filePath) const;
int GetDurationOfSlideShow(void) const;
virtual void OnImageReceivedN(Tizen::Base::Runtime::IEventArg& eventArg);
- //From IContentUpdateEventListener
virtual void OnContentFileCreated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
virtual void OnContentFileUpdated(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
virtual void OnContentFileDeleted(Tizen::Content::ContentId contentId, Tizen::Content::ContentType contentType, result r);
virtual void OnContentDirectoryScanCompleted(const Tizen::Base::String& directoryPath, result r);
-
private:
ImageViewerPresentationModel(void);
ImageViewerPresentationModel(const ImageViewerPresentationModel&);
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+Bitmap*
+ImageProvider::GetImage(const String& filePath)
+{
+ AppLogDebug("ENTER");
+
+ Bitmap* pBitmap = GetImageByDecodeN(filePath);
+
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+ return pBitmap;
+}
+
void
ImageProvider::ClearImageRequests(bool isAppTerminating)
{
return pBitmap;
}
-
{
pBitmap = GetQuickThumbnailN(filePath);
- if (pBitmap == null)
+ if (pBitmap == null && __pGallery->IsSlideShowStarted() == true)
+ {
+ pBitmap = __pPresentationModel->GetImage(filePath);
+ __pPresentationModel->RequestImage(filePath);
+ }
+ else if (pBitmap == null)
{
pBitmap = new (std::nothrow) Bitmap();
pBitmap->Construct(DUMMY_IMAGE_DIMENSION, BITMAP_PIXEL_FORMAT_RGB565);
curIndex = __pShuffledList[index];
}
-
ImageInfo* pImageInfo = __pPresentationModel->GetImageCacheAt(curIndex);
pImageInfo->ClearBitmap();
delete pItem;
AppLogDebug("ImageViewerForm::OnGalleryCurrentItemChanged index(%d)", index);
String filePath = __pPresentationModel->GetFilePathAt(index);
- AppLogDebug("ENTER index(%d) filePath(%ls)", index, filePath.GetPointer());
__pPresentationModel->RequestImage(filePath);
String strItemIdxText;
{
AppLogDebug("ENTER");
PowerManager::KeepScreenOnState(true, false);
+
+ int index = __pGallery->GetCurrentItemIndex();
+ String filePath = __pPresentationModel->GetFilePathAt(index);
+ __pPresentationModel->RequestImage(filePath);
+
if (__isVisible == true)
{
SetActionBarsVisible(FORM_ACTION_BAR_FOOTER, false);
__pLabel->SetShowState(false);
- int index = __pGallery->GetCurrentItemIndex();
- String filePath = __pPresentationModel->GetFilePathAt(index);
ContentType contentType = ContentManagerUtil::CheckContentType(filePath);
-
if (contentType == CONTENT_TYPE_VIDEO)
{
__pPlayButton->SetShowState(false);
if (__isShuffle == true)
{
-
if (__pShuffelTimer == null)
{
__pShuffelTimer = new (std::nothrow) Timer();
SlideShowStopped(index);
}
-
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
ImageViewerPresentationModel::AddImageCache(const String& filePath)
{
+ AppLogDebug("ENTER");
+
ImageInfo* pImageInfo = null;
pImageInfo = new (std::nothrow) ImageInfo();
pImageInfo->Construct(filePath, null);
__pImageCaches->Add(pImageInfo);
+
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
int
}
void
-ImageViewerPresentationModel::RequestImage(const Tizen::Base::String& filePath) const
+ImageViewerPresentationModel::RequestImage(const Tizen::Base::String& filePath)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
+Bitmap*
+ImageViewerPresentationModel::GetImage(const Tizen::Base::String& filePath)
+{
+ AppLogDebug("ENTER");
+
+ Bitmap* pBitmap = __pImageProvider->GetImage(filePath);
+
+ AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+
+ return pBitmap;
+}
+
ContentId
ImageViewerPresentationModel::GetFileContentId(const String& filePath) const
{