class AlbumListPresentationModel;
class AlbumListForm
: public BaseForm
- , public Tizen::Base::Runtime::ITimerEventListener
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::Controls::IFormBackEventListener
, public Tizen::Ui::Controls::IIconListViewItemEventListener
virtual result OnTerminating(void);
virtual void OnUpdateContentList(void);
- virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer);
-
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
Tizen::Ui::Controls::IconListView* __pAlbumViewIconList;
Tizen::Ui::Controls::ContextMenu* __pContextMenuMore;
int __itemCount;
- Tizen::Base::Runtime::Timer* __pTimer;
AlbumListPresentationModel* __pPresentationModel;
};
: __pAlbumViewIconList(null)
, __pContextMenuMore(null)
, __itemCount(0)
- , __pTimer(null)
, __pPresentationModel(null)
{
AppLogDebug("ENTER");
__itemCount = __pPresentationModel->GetFolderCount();
CreateIconListView();
-
- if (__itemCount == 0)
- {
- __pTimer = new (std::nothrow) Timer();
- __pTimer->Construct(*this);
- __pTimer->Start(1000);
- }
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return r;
delete __pContextMenuMore;
__pContextMenuMore = null;
}
-
- if (__pTimer != null)
- {
- __pTimer->Cancel();
- delete __pTimer;
- __pTimer = null;
- }
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
return E_SUCCESS;
}
void
-AlbumListForm::OnTimerExpired(Timer &timer)
-{
- AppLogDebug("ENTER");
- if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
- {
- if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_IMAGE)
- {
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_IMAGE);
- }
- else if (__pPresentationModel->GetAppControlMediaType() == APPCONTROL_MEDIA_TYPE_VIDEO)
- {
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO);
- }
- else
- {
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_VIDEO);
- }
- }
- else
- {
- __pPresentationModel->InitializeAlbumInfoList(CONTENT_TYPE_ALL);
- }
-
- __itemCount = __pPresentationModel->GetFolderCount();
-
- static int timerCount = 0;
- if (__itemCount > 1)
- {
- __pAlbumViewIconList->UpdateList();
- }
- else if (timerCount < 30)
- {
- __pTimer->Start(1000);
- ++timerCount;
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
AlbumListForm::OnActionPerformed(const Control& source, int actionId)
{
AppLogDebug("ENTER");