#include <FSocial.h>
#include <FUi.h>
+#include "ClGoToDatePopup.h"
#include "ClICalendarEventChangedEventListener.h"
#include "ClICurrentDateChangedEventListener.h"
#include "ClIDateFocusEventListener.h"
EventListPresentationModel* __pPm;
Tizen::Ui::Controls::Panel* __pPanelDayEvent[VIEW_SCROLL_EFFECT_COUNT];
PanningAnimationManager* __pPanningAnimationManager;
+ GoToDatePopup* __pGoToDatePopup;
}; // DayPanel
#endif // _CL_DAY_PANEL_H_
, public virtual Tizen::Ui::IActionEventListener
{
public:
+ GoToDatePopup(void);
+ virtual ~GoToDatePopup(void);
+
+ result Initialize(void);
+ void RequestPopup(const Tizen::Base::DateTime& initialDate, Tizen::Ui::Control* pTarget);
+
virtual result OnInitializing(void);
virtual result OnTerminating(void);
virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
- static void RequestGoToDate(const Tizen::Base::DateTime& initialDate, Tizen::Ui::Control* pTarget);
-
-private:
- GoToDatePopup(void);
- virtual ~GoToDatePopup(void);
-
private:
Tizen::Base::DateTime __date;
Tizen::Ui::Controls::EditDate* __pEditDate;
#include <FLocales.h>
#include <FUi.h>
+#include "ClGoToDatePopup.h"
#include "ClICalendarEventChangedEventListener.h"
#include "ClICurrentDateChangedEventListener.h"
SharePopup* __pSharePopup;
ThreeButtonPopup* __pThreeButtonPopup;
TwoButtonPopup* __pTwoButtonPopup;
+ GoToDatePopup* __pGoToDatePopup;
}; // ListPanel
#endif // _CL_LIST_PANEL_H_
#include <FSocial.h>
#include <FUi.h>
+#include "ClGoToDatePopup.h"
#include "ClICalendarEventChangedEventListener.h"
#include "ClICurrentDateChangedEventListener.h"
#include "ClIDateFocusEventListener.h"
SharePopup* __pSharePopup;
ThreeButtonPopup* __pThreeButtonPopup;
TwoButtonPopup* __pTwoButtonPopup;
+ GoToDatePopup* __pGoToDatePopup;
}; // MonthPanel
#endif // _CL_MONTH_PANEL_H_
IDA_SUB_MENU_SETTING = 10405,
IDA_GO_TO_DATE_POPUP_DONE = 10801,
+ IDA_GO_TO_DATE_POPUP_CANCEL = 10902,
IDA_EVENT_POPUP_DELETE = 10901,
#include <FGraphics.h>
#include <FUi.h>
+#include "ClGoToDatePopup.h"
#include "ClICurrentDateChangedEventListener.h"
#include "ClIDateFocusEventListener.h"
#include "ClIPanningAnimationControlProvider.h"
Tizen::Graphics::Bitmap* __pBitmapHolidayText[YEAR_PANEL_COUNT_OF_DAY];
Tizen::Graphics::Bitmap* __pBitmapTodayText[YEAR_PANEL_COUNT_OF_DAY];
Tizen::Graphics::Bitmap* __pBitmapFocus;
+ GoToDatePopup* __pGoToDatePopup;
}; // YearPanel
#endif // _CL_YEAR_PANEL_H_
DayPanel::DayPanel(void)
: __pPm(null)
, __pPanningAnimationManager(null)
+ , __pGoToDatePopup(null)
{
memset((void *)__pPanelDayEvent, 0, sizeof(Panel*) * VIEW_SCROLL_EFFECT_COUNT);
}
pPanel->SetScrollEventListener(*this);
__pPanelDayEvent[VIEW_SCROLL_EFFECT_CURRENT] = pPanel;
+ __pGoToDatePopup = new (std::nothrow) GoToDatePopup();
+ __pGoToDatePopup->Initialize();
+
return E_SUCCESS;
}
AppLogDebug("Enter");
__pPm->RemoveCalendarEventChangedEventListener(*this);
__pPm->RemoveCurrentDateChangedEventListener(*this);
+
+ if (__pGoToDatePopup)
+ {
+ __pGoToDatePopup->Destroy();
+ }
+
return E_SUCCESS;
}
__pPm->SetTodayToCurrentDate();
break;
case IDA_SUB_MENU_GO_TO_DATE:
- GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
+ __pGoToDatePopup->RequestPopup(__pPm->GetCurrentDate(), this);
break;
case IDA_MAIN_FORM_FOOTER_CREATE:
{
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
-static const int IDA_GO_TO_DATE_POPUP_CANCEL = 10902;
-
GoToDatePopup::GoToDatePopup(void)
: __pEditDate(null)
, __pTarget(null)
}
result
+GoToDatePopup::Initialize(void)
+{
+ return Construct(L"IDL_GO_TO_DATE_POPUP");
+}
+
+void
+GoToDatePopup::RequestPopup(const DateTime& initialDate, Control* pTarget)
+{
+ __date = initialDate;
+ __pTarget = pTarget;
+
+ SetShowState(true);
+ Show();
+}
+
+result
GoToDatePopup::OnInitializing(void)
{
__pEditDate = dynamic_cast<EditDate*>(GetControl(L"IDC_EDITDATE"));
- AppAssertf(__pEditDate != null, "[E_FAILURE] Unable to get button.");
__pEditDate->SetYearRange(Calendarbook::GetMinDateTime().GetYear() + 1, Calendarbook::GetMaxDateTime().GetYear() - 1);
__pEditDate->SetDate(__date);
SetTitleText(title);
Button* pButtonDone = dynamic_cast<Button*>(GetControl(L"IDC_BUTTON_DONE"));
- AppAssertf(pButtonDone != null, "[E_FAILURE] Unable to get button.");
pButtonDone->SetActionId(IDA_GO_TO_DATE_POPUP_DONE);
pButtonDone->AddActionEventListener(*this);
Button* pButtonCancel = dynamic_cast<Button*>(GetControl(L"IDC_BUTTON_CANCEL"));
- AppAssertf(pButtonCancel != null, "[E_FAILURE] Unable to get button.");
pButtonCancel->SetActionId(IDA_GO_TO_DATE_POPUP_CANCEL);
pButtonCancel->AddActionEventListener(*this);
{
case IDA_GO_TO_DATE_POPUP_DONE:
__date = __pEditDate->GetDate();
- SetShowState(false);
- if (__pTarget != null)
+ if (__pTarget)
{
LinkedList* pArgs = new (std::nothrow) LinkedList();
pArgs->Add(new (std::nothrow) DateTime(__date));
__pTarget->SendUserEvent(IDA_GO_TO_DATE_POPUP_DONE, pArgs);
}
- delete this;
+ SetShowState(false);
break;
case IDA_GO_TO_DATE_POPUP_CANCEL:
SetShowState(false);
- delete this;
break;
}
}
-
-void
-GoToDatePopup::RequestGoToDate(const DateTime& initialDate, Control* pTarget)
-{
- GoToDatePopup* pPopup = new (std::nothrow) GoToDatePopup();
- pPopup->__date = initialDate;
- pPopup->__pTarget = pTarget;
- pPopup->Construct(L"IDL_GO_TO_DATE_POPUP");
- pPopup->Show();
-}
, __pSharePopup(null)
, __pThreeButtonPopup(null)
, __pTwoButtonPopup(null)
+ , __pGoToDatePopup(null)
{
}
__pTwoButtonPopup = new (std::nothrow) TwoButtonPopup();
__pTwoButtonPopup->Initialize();
+ __pGoToDatePopup = new (std::nothrow) GoToDatePopup();
+ __pGoToDatePopup->Initialize();
+
return E_SUCCESS;
}
delete __pContextItem;
delete __pContextItemNoEdit;
delete __pDateFormatter;
- delete __pSharePopup;
- delete __pThreeButtonPopup;
- delete __pTwoButtonPopup;
+
+ if (__pSharePopup)
+ {
+ __pSharePopup->Destroy();
+ }
+ if (__pThreeButtonPopup)
+ {
+ __pThreeButtonPopup->Destroy();
+ }
+ if (__pTwoButtonPopup)
+ {
+ __pTwoButtonPopup->Destroy();
+ }
+ if (__pGoToDatePopup)
+ {
+ __pGoToDatePopup->Destroy();
+ }
return E_SUCCESS;
}
}
break;
case IDA_SUB_MENU_GO_TO_DATE:
- GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
+ __pGoToDatePopup->RequestPopup(__pPm->GetCurrentDate(), this);
break;
case IDA_SUB_MENU_DELETE:
SceneManager::GetInstance()->GoForward(ForwardSceneTransition(IDSCN_EVENT_DELETER,
, __pSharePopup(null)
, __pThreeButtonPopup(null)
, __pTwoButtonPopup(null)
+ , __pGoToDatePopup(null)
{
memset((void *)__pPanelMonthCalendar, 0, sizeof(Panel*) * VIEW_SCROLL_EFFECT_COUNT);
}
__pTwoButtonPopup = new (std::nothrow) TwoButtonPopup();
__pTwoButtonPopup->Initialize();
+ __pGoToDatePopup = new (std::nothrow) GoToDatePopup();
+ __pGoToDatePopup->Initialize();
+
return E_SUCCESS;
}
{
__pTwoButtonPopup->Destroy();
}
+ if (__pGoToDatePopup)
+ {
+ __pGoToDatePopup->Destroy();
+ }
delete __pContextItem;
delete __pContextItemNoEdit;
__pPm->SetTodayToCurrentDate();
break;
case IDA_SUB_MENU_GO_TO_DATE:
- GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
+ __pGoToDatePopup->RequestPopup(__pPm->GetCurrentDate(), this);
break;
case IDA_MAIN_FORM_FOOTER_CREATE:
{
: __pPm(null)
, __pPanningAnimationManager(null)
, __pBitmapFocus(null)
+ , __pGoToDatePopup(null)
{
memset((void *)__pPanelYearCalendar, 0, sizeof(Panel*) * VIEW_SCROLL_EFFECT_COUNT);
memset((void *)__pBitmapWeekText, 0, sizeof(Bitmap*) * YEAR_PANEL_COUNT_OF_WEEK);
pCalendarPanel->SetDateFocusEventListener(*this);
__pPanelYearCalendar[VIEW_SCROLL_EFFECT_CURRENT] = pCalendarPanel;
+ __pGoToDatePopup = new (std::nothrow) GoToDatePopup();
+ __pGoToDatePopup->Initialize();
+
return E_SUCCESS;
}
}
delete __pBitmapFocus;
+ if (__pGoToDatePopup)
+ {
+ __pGoToDatePopup->Destroy();
+ }
+
return E_SUCCESS;
}
__pPm->SetTodayToCurrentDate();
break;
case IDA_SUB_MENU_GO_TO_DATE:
- GoToDatePopup::RequestGoToDate(__pPm->GetCurrentDate(), this);
+ __pGoToDatePopup->RequestPopup(__pPm->GetCurrentDate(), this);
break;
case IDA_MAIN_FORM_FOOTER_CREATE:
{