2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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 CtGroupListEditorPanel.cpp
19 * @brief This is the implementation file for the GroupListEditorPanel class.
23 #include "CtContactListItem.h"
24 #include "CtGroupListEditorPanel.h"
25 #include "CtGroupListPresentationModel.h"
26 #include "CtContactsApp.h"
27 #include "CtMainForm.h"
28 #include "CtResourceManager.h"
29 #include "CtSceneRegister.h"
32 using namespace Tizen::App;
33 using namespace Tizen::Base;
34 using namespace Tizen::Base::Collection;
35 using namespace Tizen::Graphics;
36 using namespace Tizen::Ui;
37 using namespace Tizen::Ui::Controls;
38 using namespace Tizen::Ui::Scenes;
39 using namespace Tizen::Social;
41 static const int IDA_FOOTER_REMOVE = 1;
42 static const int IDA_FOOTER_CANCEL = 2;
43 static const int IDA_HEADER_CONTACTS = 10;
44 static const int IDA_HEADER_GROUPS = 11;
45 static const int IDA_HEADER_FAVORITES = 12;
46 static const int IDA_BUTTON_EDIT_GROUP = 20;
47 static const int IDA_CHECK_SELECT_ALL_CHECKED = 30;
48 static const int IDA_CHECK_SELECT_ALL_UNCHECKED = 31;
50 static const wchar_t* IDB_BUTTON_CIRCLE_NORMAL = L"00_circle_button.png";
51 static const wchar_t* IDB_BUTTON_CIRCLE_PRESSED = L"00_circle_button_press.png";
52 static const wchar_t* IDB_BUTTON_RENAME_NORMAL = L"00_button_rename.png";
53 static const wchar_t* IDB_BUTTON_RENAME_PRESSED = L"00_button_rename_press.png";
55 static const unsigned int COLOR_CHECK_LABEL_BG = Color32<220, 218, 211>::Value;
56 static const unsigned int COLOR_BOTTOM_LABEL_BG = Color32<68, 68, 68>::Value;
57 static const unsigned int COLOR_BOTTOM_LABEL_FONT = Color32<255, 255, 255>::Value;
59 static const int FONT_SIZE_BOTTOM_LABEL = 32;
61 static const int H_SELECT_ALL = 112;
62 static const int H_ITEM = 112;
63 static const int H_GROUP_ITEM = 84;
64 static const int W_INITIAL_PANEL = 10;
65 static const int H_INITIAL_PANEL = 10;
66 static const int W_THUMBNAIL = 112;
67 static const int W_BUTTON_EDIT_GROUP = 72;
68 static const int H_BUTTON_EDIT_GROUP = 72;
69 static const int Y_BUTTON_GAP = 20;
70 static const int X_THUMBNAIL_GAP = 16;
71 static const int X_LIST_ITEM_TEXT_MARGIN = 64;
72 static const int H_BOTTOM_LABEL = 48;
73 static const int W_ELEMENT_GAP = 16;
75 GroupListEditorPanel::GroupListEditorPanel(void)
79 , __pBottomLabel(null)
80 , __pPresentationModel(null)
81 , __pSavedCategoryList(null)
85 GroupListEditorPanel::~GroupListEditorPanel(void)
90 GroupListEditorPanel::Initialize(void)
92 Construct(Rectangle(0, 0, W_INITIAL_PANEL, H_INITIAL_PANEL));
96 GroupListEditorPanel::OnInitializing(void)
98 const Form* pForm = dynamic_cast<Form*>(GetParent());
101 FloatRectangle clientBounds = pForm->GetClientAreaBoundsF();
102 SetBounds(FloatRectangle(0, 0, clientBounds.width, clientBounds.height));
104 __pPresentationModel = GroupListPresentationModel::GetInstance();
106 __pCheckLabel = new (std::nothrow) Label();
107 __pCheckLabel->Construct(Rectangle(0, Y_BUTTON_GAP, clientBounds.width, H_BUTTON_EDIT_GROUP), L"");
108 __pCheckLabel->SetBackgroundColor(COLOR_CHECK_LABEL_BG);
109 AddControl(__pCheckLabel);
111 __pSelectAll = new (std::nothrow) CheckButton();
112 __pSelectAll->Construct(Rectangle(0, 0, clientBounds.width, H_SELECT_ALL), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_NONE);
113 __pSelectAll->SetText(ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
114 __pSelectAll->SetActionId(IDA_CHECK_SELECT_ALL_CHECKED, IDA_CHECK_SELECT_ALL_UNCHECKED);
115 __pSelectAll->AddActionEventListener(*this);
116 AddControl(__pSelectAll);
118 __pTableView = new (std::nothrow) GroupedTableView();
119 __pTableView->Construct(Rectangle(0, H_SELECT_ALL, clientBounds.width, clientBounds.height - H_SELECT_ALL - H_BOTTOM_LABEL), true, TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT);
120 __pTableView->SetItemProvider(this);
121 __pTableView->AddGroupedTableViewItemEventListener(*this);
122 AddControl(__pTableView);
124 __pBottomLabel = new (std::nothrow) Label();
125 __pBottomLabel->Construct(FloatRectangle(0, clientBounds.height - H_BOTTOM_LABEL, clientBounds.width, H_BOTTOM_LABEL),
126 ResourceManager::GetString(L"IDS_COM_POP_SELECTED") + INITIAL_SELECTED_COUNT);
127 __pBottomLabel->SetBackgroundColor(Color(COLOR_BOTTOM_LABEL_BG));
128 __pBottomLabel->SetTextColor(Color(COLOR_BOTTOM_LABEL_FONT));
129 __pBottomLabel->SetTextConfig(FONT_SIZE_BOTTOM_LABEL, LABEL_TEXT_STYLE_BOLD);
130 __pBottomLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
131 __pBottomLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
132 AddControl(__pBottomLabel);
134 if (__pSavedCategoryList == null)
136 __pSavedCategoryList = new (std::nothrow) ArrayList();
137 __pSavedCategoryList->Construct();
144 GroupListEditorPanel::OnTerminating(void)
146 result r = E_SUCCESS;
148 if (__pPresentationModel != null)
150 __pPresentationModel->RemoveGroupChangeListener(*this);
153 if (__pSavedCategoryList != null)
155 __pSavedCategoryList->RemoveAll(true);
156 delete __pSavedCategoryList;
157 __pSavedCategoryList = null;
164 GroupListEditorPanel::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
166 SceneManager* pSceneManager = SceneManager::GetInstance();
167 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
171 case IDA_HEADER_CONTACTS:
173 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
175 if (pContactsApp->GetSelectionMode() == APP_CONTROL_SELECTION_MODE_SINGLE)
177 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_LIST));
179 else if (pContactsApp->GetSelectionMode() == APP_CONTROL_SELECTION_MODE_MULTI)
181 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_LIST_EDITOR));
186 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_CONTACT_LIST));
190 case IDA_HEADER_GROUPS:
192 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GROUP_LIST));
195 case IDA_HEADER_FAVORITES:
197 if (pContactsApp->GetOperationId() == OPERATION_ID_PICK)
199 if (pContactsApp->GetSelectionMode() == APP_CONTROL_SELECTION_MODE_SINGLE)
201 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FAVORITE_LIST));
203 else if (pContactsApp->GetSelectionMode() == APP_CONTROL_SELECTION_MODE_MULTI)
205 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FAVORITE_LIST_EDITOR));
210 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FAVORITE_LIST));
214 case IDA_FOOTER_REMOVE:
216 int categoryCount = __pTableView->GetItemCountAt(0);
218 for (int index = categoryCount - 1; index >= 0; index--)
220 if (__pTableView->IsItemChecked(0, index) == true)
222 __pPresentationModel->RemoveCategory(index);
225 __pPresentationModel->UpdateCategoryList();
227 pSceneManager->GoBackward(BackwardSceneTransition(IDSCN_GROUP_LIST));
230 case IDA_FOOTER_CANCEL:
232 pSceneManager->GoBackward(BackwardSceneTransition());
235 case IDA_BUTTON_EDIT_GROUP:
238 ArrayList* pList = new (std::nothrow) ArrayList();
241 Integer::Parse(source.GetName(), index);
242 pList->Add(*(new (std::nothrow) Integer(__pPresentationModel->GetCategoryId(index))));
243 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_GROUP_EDITOR, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), pList);
246 case IDA_CHECK_SELECT_ALL_CHECKED:
248 for (int i = 0; i < __pTableView->GetItemCountAt(0); i++)
250 __pTableView->SetItemChecked(0, i, true);
252 __pTableView->Invalidate(true);
256 case IDA_CHECK_SELECT_ALL_UNCHECKED:
258 for (int i = 0; i < __pTableView->GetItemCountAt(0); i++)
260 __pTableView->SetItemChecked(0, i, false);
262 __pTableView->Invalidate(true);
272 GroupListEditorPanel::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId,
273 const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
275 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
276 pContactsApp->AddContactsAppChangeEventListener(*this);
277 Form* pForm = dynamic_cast<Form*>(GetParent());
280 Header* pHeader = pForm->GetHeader();
281 pHeader->AddActionEventListener(*this);
283 Footer* pFooter = pForm->GetFooter();
284 pFooter->RemoveAllItems();
285 pFooter->RemoveButtonAt(BUTTON_POSITION_LEFT);
286 pForm->SetFormMenuEventListener(null);
287 pFooter->AddActionEventListener(*this);
289 FooterItem footerCancel;
290 footerCancel.Construct(IDA_FOOTER_CANCEL);
291 footerCancel.SetText(ResourceManager::GetString(L"IDS_PB_SK_CANCEL"));
292 pFooter->AddItem(footerCancel);
294 FooterItem footerRemove;
295 footerRemove.Construct(IDA_FOOTER_REMOVE);
296 footerRemove.SetText(ResourceManager::GetString(L"IDS_COM_BODY_REMOVE"));
297 pFooter->AddItem(footerRemove);
299 __pTableView->UpdateTableView();
301 if (previousSceneId.Equals(IDSCN_GROUP_EDITOR, true) == false)
303 __pSelectAll->SetSelected(false);
304 for (int i = 0; i < __pTableView->GetItemCountAt(0); i++)
306 __pTableView->SetItemChecked(0, i, false);
309 else if (previousSceneId.Equals(IDSCN_GROUP_EDITOR, true) == true)
311 ResetSelectedItems();
314 __pPresentationModel->AddGroupChangeListener(*this);
319 pArgs->RemoveAll(true);
325 GroupListEditorPanel::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId,
326 const Tizen::Ui::Scenes::SceneId& nextSceneId)
328 ContactsApp* pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
329 pContactsApp->RemoveContactsAppChangeEventListener(*this);
331 const Form* pForm = dynamic_cast<Form*>(GetParent());
334 Header* pHeader = pForm->GetHeader();
335 pHeader->RemoveActionEventListener(*this);
337 Footer* pFooter = pForm->GetFooter();
338 pFooter->RemoveActionEventListener(*this);
340 __pPresentationModel->RemoveGroupChangeListener(*this);
342 if (__pSavedCategoryList != null)
344 __pSavedCategoryList->RemoveAll(true);
349 Tizen::Ui::Controls::TableViewGroupItem*
350 GroupListEditorPanel::CreateGroupItem(int groupIndex, int itemWidth)
352 TableViewSimpleGroupItem* pItem = new (std::nothrow) TableViewSimpleGroupItem();
353 pItem->Construct(Dimension(itemWidth, H_GROUP_ITEM));
354 pItem->SetItemContents(ResourceManager::GetString(L"IDS_PB_BODY_PHONE"));
355 pItem->SetEnabled(false);
360 Tizen::Ui::Controls::TableViewItem*
361 GroupListEditorPanel::CreateItem(int groupIndex, int itemIndex, int itemWidth)
363 String groupNameString;
364 String contactCountString;
365 Bitmap* pThumbnail = null;
366 Bitmap* pBgBitmap = null;
367 Bitmap* pBitmap = null;
368 bool isNotAssinged = false;
369 int adjustedNameWidth;
371 Dimension groupNameSize;
375 ContactsApp *pContactsApp = static_cast<ContactsApp*>(ContactsApp::GetInstance());
376 TableViewItem* pItem = new (std::nothrow) TableViewItem();
377 pItem->Construct(Dimension(itemWidth, pContactsApp->GetListItemSingleLineHeight()), TABLE_VIEW_ANNEX_STYLE_MARK);
379 result r = __pPresentationModel->UpdatePersonList(itemIndex);
380 TryReturn(r == E_SUCCESS, null, "[%s] Unable to update person list", GetErrorMessage(r));
382 if (__pPresentationModel->GetCategoryCount() == itemIndex)
384 isNotAssinged = true;
385 groupNameString = ResourceManager::GetString(L"IDS_PB_BODY_NOT_ASSIGNED");
386 contactCountString = L"(" + Integer::ToString(__pPresentationModel->GetContactCountInNotAssignedCategory()) + L")";
390 groupNameString = __pPresentationModel->GetCategoryName(itemIndex);
391 contactCountString = L"(" + Integer::ToString(__pPresentationModel->GetContactCountInCategoryN(itemIndex, pList)) + L")";
394 font.Construct(FONT_STYLE_PLAIN, pContactsApp->GetFontSize());
395 font.GetTextExtent(contactCountString, contactCountString.GetLength(), countSize);
396 font.GetTextExtent(groupNameString, groupNameString.GetLength(), groupNameSize);
398 adjustedNameWidth = itemWidth - (TableViewItem::GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_MARK) + X_LIST_ITEM_TEXT_MARGIN + W_BUTTON_EDIT_GROUP + W_THUMBNAIL + (X_THUMBNAIL_GAP * 2) + (countSize.width + W_ELEMENT_GAP * 2));
399 if (groupNameSize.width < adjustedNameWidth)
401 adjustedNameWidth = groupNameSize.width + W_ELEMENT_GAP + 1;
404 Label* pLabelGroupName = new (std::nothrow) Label();
405 pLabelGroupName->Construct(Rectangle(0, Y_BUTTON_GAP, adjustedNameWidth, H_BUTTON_EDIT_GROUP + pContactsApp->GetFontHeightOffset()), groupNameString);
406 pLabelGroupName->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
407 pLabelGroupName->SetTextConfig(pContactsApp->GetFontSize(), LABEL_TEXT_STYLE_NORMAL);
408 pLabelGroupName->SetMargin(0, 0);
409 pItem->AddControl(pLabelGroupName);
411 Label* pLabelCount = new (std::nothrow) Label();
412 pLabelCount->Construct(Rectangle(adjustedNameWidth, Y_BUTTON_GAP, countSize.width + W_ELEMENT_GAP + 1, H_BUTTON_EDIT_GROUP + pContactsApp->GetFontHeightOffset()), contactCountString);
413 pLabelCount->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
414 pLabelCount->SetTextConfig(pContactsApp->GetFontSize(), LABEL_TEXT_STYLE_NORMAL);
415 pLabelCount->SetMargin(0, 0);
416 pItem->AddControl(pLabelCount);
418 int editButtonX = itemWidth - (TableViewItem::GetAnnexWidth(TABLE_VIEW_ANNEX_STYLE_MARK) + X_LIST_ITEM_TEXT_MARGIN + X_THUMBNAIL_GAP + W_BUTTON_EDIT_GROUP);
419 Button* pButtonEdit = new (std::nothrow) Button();
420 pButtonEdit->Construct(Rectangle(editButtonX, (pContactsApp->GetListItemSingleLineHeight() - H_BUTTON_EDIT_GROUP)/2, W_BUTTON_EDIT_GROUP, H_BUTTON_EDIT_GROUP));
421 pButtonEdit->SetActionId(IDA_BUTTON_EDIT_GROUP);
422 pButtonEdit->AddActionEventListener(*this);
423 pButtonEdit->SetName(Integer::ToString(itemIndex));
424 pItem->AddControl(pButtonEdit);
426 Label* pLabelThumbnail = new (std::nothrow) Label();
427 pLabelThumbnail->Construct(Rectangle(editButtonX - (X_THUMBNAIL_GAP + W_THUMBNAIL), 0, W_THUMBNAIL, H_ITEM), L"");
428 pItem->AddControl(pLabelThumbnail);
430 pThumbnail = __pPresentationModel->GetThumbnailN(itemIndex, pList);
432 if(pThumbnail != null)
434 pLabelThumbnail->SetBackgroundBitmap(*pThumbnail);
438 pBgBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_CIRCLE_NORMAL);
439 if (pBgBitmap != null)
441 pButtonEdit->SetNormalBackgroundBitmap(*pBgBitmap);
444 pBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_RENAME_NORMAL);
447 pButtonEdit->SetNormalBitmap(Point(0, 0), *pBitmap);
451 pBgBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_CIRCLE_PRESSED);
452 if (pBgBitmap != null)
454 pButtonEdit->SetPressedBackgroundBitmap(*pBgBitmap);
457 pBitmap = ResourceManager::GetBitmapN(IDB_BUTTON_RENAME_PRESSED);
460 pButtonEdit->SetPressedBitmap(Point(0, 0), *pBitmap);
463 pItem->SetIndividualSelectionEnabled(pButtonEdit, true);
467 pList->RemoveAll(true);
475 GroupListEditorPanel::DeleteGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
484 GroupListEditorPanel::DeleteItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
493 GroupListEditorPanel::GetDefaultGroupItemHeight(void)
499 GroupListEditorPanel::GetDefaultItemHeight(void)
505 GroupListEditorPanel::GetGroupCount(void)
507 int count = __pPresentationModel->GetCategoryCount();
510 __pSelectAll->SetShowState(false);
511 __pCheckLabel->SetShowState(false);
512 __pTableView->SetBounds(0, 0, GetWidth(), GetHeight());
517 __pSelectAll->SetShowState(true);
518 __pCheckLabel->SetShowState(true);
519 if (__pBottomLabel->GetShowState() == false)
521 __pTableView->SetBounds(0, __pSelectAll->GetY() + __pSelectAll->GetHeight(), GetWidth(), GetHeight() - __pSelectAll->GetHeight());
525 __pTableView->SetBounds(0, __pSelectAll->GetY() + __pSelectAll->GetHeight(), GetWidth(), GetHeight() - __pSelectAll->GetHeight() - __pBottomLabel->GetHeight());
532 GroupListEditorPanel::GetItemCount(int groupIndex)
534 return __pPresentationModel->GetCategoryCount();
538 GroupListEditorPanel::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem *pItem)
543 GroupListEditorPanel::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem *pItem)
548 GroupListEditorPanel::UpdateBottomLabel(void)
550 int selectedCount = 0;
551 for (int i = 0; i < __pTableView->GetItemCountAt(0); i++)
553 if (__pTableView->IsItemChecked(0, i) == true)
559 String selected = ResourceManager::GetString(L"IDS_COM_POP_SELECTED");
560 selected.Append(L" (");
561 selected.Append(selectedCount);
562 selected.Append(L")");
563 __pBottomLabel->SetText(selected);
564 __pBottomLabel->Invalidate(false);
566 Form* pForm = dynamic_cast<Form*>(GetParent());
569 Footer* pFooter = pForm->GetFooter();
570 if (selectedCount > 0)
572 if(__pBottomLabel->GetShowState() == false)
574 __pBottomLabel->SetShowState(true);
575 __pTableView->SetSize(__pTableView->GetSize().width, __pTableView->GetSize().height - H_BOTTOM_LABEL);
577 pFooter->SetItemEnabled(1, true);
579 else if (selectedCount == 0 )
581 if (__pBottomLabel->GetShowState() == true)
583 __pBottomLabel->SetShowState(false);
584 __pTableView->SetSize(__pTableView->GetSize().width, __pTableView->GetSize().height + H_BOTTOM_LABEL);
586 pFooter->SetItemEnabled(1, false);
589 pFooter->Invalidate(true);
595 GroupListEditorPanel::ResetSelectedItems(void)
597 for (int index = 0; index < __pTableView->GetItemCountAt(0); index++)
599 __pTableView->SetItemChecked(0, index, false);
600 __pTableView->Invalidate(true);
603 if (__pPresentationModel != null)
605 if (__pSavedCategoryList != null)
607 for (int i = 0; i < __pSavedCategoryList->GetCount(); i++)
609 Integer* pCategoryId = static_cast<Integer*>(__pSavedCategoryList->GetAt(i));
611 bool isCategoryFound = false;
612 if (pCategoryId != null)
614 RecordId recordId = pCategoryId->ToInt();
615 for (int index = 0; index < __pTableView->GetItemCountAt(0); index++)
617 if (recordId == __pPresentationModel->GetCategoryId(index))
619 __pTableView->SetItemChecked(0, index, true);
620 isCategoryFound = true;
623 if (isCategoryFound == false)
625 __pSavedCategoryList->RemoveAt(i);
631 __pTableView->Invalidate(true);
633 if (__pSavedCategoryList->GetCount() == __pTableView->GetItemCountAt(0))
635 __pSelectAll->SetSelected(true);
639 __pSelectAll->SetSelected(false);
642 __pSelectAll->Invalidate(true);
649 GroupListEditorPanel::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView &tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem *pContextItem, bool activated)
654 GroupListEditorPanel::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView &tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem *pItem, Tizen::Ui::Controls::TableViewItemStatus status)
659 GroupListEditorPanel::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView &tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem *pItem, Tizen::Ui::Controls::TableViewItemStatus status)
661 if (tableView.IsItemChecked(groupIndex, itemIndex) == true)
663 bool isChecked = true;
664 for (int i = 0; i < tableView.GetItemCountAt(groupIndex); i++)
666 if (tableView.IsItemChecked(groupIndex, i) == false)
672 __pSelectAll->SetSelected(isChecked);
674 else if (tableView.IsItemChecked(groupIndex, itemIndex) == false)
676 __pSelectAll->SetSelected(false);
683 GroupListEditorPanel::OnContactsChanged(void)
685 __pTableView->UpdateTableView();
689 GroupListEditorPanel::OnCategoriesChanged(void)
691 __pTableView->UpdateTableView();
692 ResetSelectedItems();
696 GroupListEditorPanel::OnForeground(void)
701 GroupListEditorPanel::OnBackground(void)
703 if (__pSavedCategoryList != null)
705 __pSavedCategoryList->RemoveAll(true);
711 GroupListEditorPanel::SaveCategoryList(void)
713 for (int index = 0; index < __pTableView->GetItemCountAt(0); index++)
715 if (__pTableView->IsItemChecked(0, index) == true)
717 __pSavedCategoryList->Add((new (std::nothrow) Integer(__pPresentationModel->GetCategoryId(index))));