2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file PhnSettingsDeleteListForm.h
19 * @brief This is the header file for the %SettingsDeleteListForm class.
21 * This header file contains the declarations for %SettingsDeleteListForm class.
23 #ifndef _PHN_SETTINGS_DELETE_LIST_FORM_H_
24 #define _PHN_SETTINGS_DELETE_LIST_FORM_H_
28 #include "PhnCallRejectInfo.h"
30 class SettingsPresentationModel;
33 * @class SettingsDeleteListForm
34 * @brief This class presents a settings form based UI for call settings - delete numbers to reject,
35 * delete rejection messages.
38 class SettingsDeleteListForm
39 : public Tizen::Ui::IActionEventListener
40 , public Tizen::Ui::Controls::Form
41 , public Tizen::Ui::Controls::IListViewItemProvider
42 , public Tizen::Ui::Controls::IListViewItemEventListener
43 , public Tizen::Ui::Scenes::ISceneEventListener
53 SettingsDeleteListForm(ListOfType listOfType);
54 virtual ~SettingsDeleteListForm(void);
55 void Initialize(void);
58 virtual result OnInitializing(void);
59 virtual result OnTerminating(void);
60 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
61 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
62 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
64 //Initialize list view's main menu
65 result InitializeListView(void);
67 void InitializeSelectLabel();
69 //From IListViewItemEventListener
70 virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
71 virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
72 virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
73 virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
75 //From IListViewItemProvider
76 virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
77 virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
78 virtual int GetItemCount(void);
81 // Funtion is used to fetch list of rejected call numbers.
82 void FetchNumbersRejectList(void);
83 // Funtion is used to fetch list of "reject with messages".
84 void FetchRejectMsgsList(void);
85 // Funtion is used to initialise footer and footer items.
86 void InitializeFooter(void);
87 // Function is used to create "rejected number" items for list view.
88 Tizen::Ui::Controls::CustomItem* CreateListItemForNumbers(int index, int itemWidth);
89 // Function is used to create "reject with message" items for list view.
90 Tizen::Ui::Controls::CustomItem* CreateListItemForMsgs(int index, int itemWidth);
91 //used to select all items when selecting "Select All"
92 void SelectAllItems(bool isSelect);
93 //used to delete rejected numbers list
94 void DeleteRejectNumbersList(void);
95 //used to delete rejected messages list
96 void DeleteRejectMsgsList(void);
99 ListOfType __listOfType;
100 //list of rejected numbers
101 Tizen::Base::Collection::ArrayListT<CallRejectInfo>* __pNumbersList;
102 //list of reject msgs
103 Tizen::Base::Collection::IMapT<int, Tizen::Base::String>* __pMsgsMap;
105 SettingsPresentationModel* __pSettingsPresentor;
106 int __checkedItemCount;
107 //Selected pop up label
108 Tizen::Ui::Controls::Label* __pSelectedLabel;
111 #endif //_PHN_SETTINGS_DELETE_LIST_FORM_H_