3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 /*@file: IntEditHistoryListForm
20 *@brief: This class defines EditHistoryListForm used to edit the history scene
24 #ifndef _INT_EDIT_HISTORY_LIST_FORM_H_
25 #define _INT_EDIT_HISTORY_LIST_FORM_H_
31 class EditHistoryListForm
32 : public Tizen::Ui::Controls::Form
33 , public Tizen::Base::Runtime::ITimerEventListener
34 , public Tizen::Ui::IActionEventListener
35 , public Tizen::Ui::Controls::IFormBackEventListener
36 , public Tizen::Ui::Controls::IGroupedListViewItemEventListener
37 , public Tizen::Ui::Controls::IGroupedListViewItemProvider
38 , public Tizen::Ui::IOrientationEventListener
39 , public Tizen::Ui::Scenes::ISceneEventListener
44 * @brief The Default constructor
46 EditHistoryListForm(void);
49 * @brief The Default Destructor
51 virtual ~EditHistoryListForm(void);
54 * @brief To Create Group Items.
57 void CreateGroupItems(void);
60 * @brief Initializes this instance of EditHistoryListForm.
63 bool Initialize(void);
66 * @brief converts the integer value of month to string value for that corresponding month.
69 Tizen::Base::String GetMonth(int month);
73 // IActionEventListener
74 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
76 // IFormBackEventListener
77 virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
79 //IGroupedListViewItemProvider
80 Tizen::Ui::Controls::GroupItem* CreateGroupItem(int groupIndex, int itemWidth);
81 Tizen::Ui::Controls::ListItemBase* CreateItem(int groupIndex, int itemIndex, int itemWidth);
82 bool DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::GroupItem* pItem, int itemWidth);
83 bool DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
84 int GetGroupCount(void);
85 int GetItemCount(int groupIndex);
88 * Initializes the controls of the UI for EditHistoryListForm.
90 virtual result OnInitializing(void);
92 virtual result OnTerminating(void);
96 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
98 //IGroupedListViewItemEventListener
99 void OnGroupedListViewContextItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListContextItemStatus status);
100 void OnGroupedListViewItemStateChanged(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, int elementId, Tizen::Ui::Controls::ListItemStatus status);
101 void OnGroupedListViewItemSwept(Tizen::Ui::Controls::GroupedListView& listView, int groupIndex, int itemIndex, Tizen::Ui::Controls::SweepDirection direction);
103 //ISceneEventListener
104 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
105 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
107 //IOrientationEventListener
108 virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
111 static const int IDA_TABBAR_ITEM_1;
112 static const int IDA_TABBAR_ITEM_2;
113 static const int IDA_BUTTON_NEXT_FORM;
114 static const int IDA_FORMAT_ICON;
115 static const int IDA_FORMAT_TITLE;
116 static const int IDA_FORMAT_URL;
117 static const int IDA_SELECT_ALL_CHECKED;
118 static const int IDA_SELECT_ALL_UNCHECKED;
119 static const int IDA_DELETE_HISTORY;
120 static const int IDA_CANCEL;
123 bool __isNoHistoryPresent;
124 Tizen::Base::Collection::ArrayList* __pGroupData;
125 Tizen::Base::Runtime::Timer* __pTimer;
126 Tizen::Ui::Controls::GroupedListView* __pListView; // The GroupedListView which contains the history lists
128 Tizen::Ui::Controls::CheckButton* __pSelectAllCheck;
129 Tizen::Ui::Controls::Label* __pSelectedLabel;
133 :public Tizen::Base::Object
136 GroupItemClass() { __pData = NULL ; }
137 ~GroupItemClass(){ if(__pData!=null) __pData->RemoveAll(true); delete __pData; __pData = null;}
138 GroupItemClass(const GroupItemClass& groupItem){__pData = groupItem.__pData; }
139 GroupItemClass& operator =(const GroupItemClass& groupItem){if (this != &groupItem) __pData = groupItem.__pData; return *this;}
141 Tizen::Base::DateTime __endTime;
142 Tizen::Base::Collection::ArrayList* __pData;
143 Tizen::Base::DateTime __startTime;
144 Tizen::Base::String __titleText;
149 #endif /* _INT_EDIT_HISTORY_LIST_FORM_H_ */