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 StWifiDirectConnectionForm.cpp
19 * @brief This is the implementation file for WifiDirectConnectionForm class.
22 #include "StResourceManager.h"
24 #include "StWifiDirectConnectionForm.h"
26 using namespace Tizen::App;
27 using namespace Tizen::Base;
28 using namespace Tizen::Base::Collection;
29 using namespace Tizen::Base::Runtime;
30 using namespace Tizen::Graphics;
31 using namespace Tizen::Net::Wifi;
32 using namespace Tizen::Ui;
33 using namespace Tizen::Ui::Controls;
34 using namespace Tizen::Ui::Scenes;
36 #define WIFI_DIRECT_CONNECTION_DEBUG_CODE
38 static const int Y_ITEM_COUNT_DISPLAY = 968;
39 static const int DURATION = 500;
40 static const int FRAME_COUNT = 30;
42 static const int X_SEARCH_ICON = 630;
43 static const int Y_SEARCH_ICON = 10;
44 static const int W_SEARCH_ICON = 62;
45 static const int H_SEARCH_ICON = 62;
47 static const int ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT = 1;
48 static const int ID_WIFI_DIRECT_CONNECTION_ITEM_COUNT_TEXT_LENGTH = 5;
49 static const int ID_WIFI_DIRECT_CONNECTION_BALLOON_POPUP_TIMER_EXPIRED_TIME = 2000;
50 static const int ID_WIFI_DIRECT_IN_PROGRESS_REPEAT_COUNT = 1000;
52 static const int IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE = 100;
53 static const int IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 1;
54 static const int IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 2;
55 static const int IDA_WIFI_DIRECT_CONNECTION_CONNECT = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 3;
56 static const int IDA_WIFI_DIRECT_CONNECTION_SELECTED_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 4;
57 static const int IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 4;
58 static const int IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 5;
60 static const int ID_WIFI_DIRECT_FOOTER_SCAN = 0;
61 static const int ID_WIFI_DIRECT_FOOTER_CONNECT = 1;
63 WifiDirectConnectionForm::WifiDirectConnectionForm(void)
64 : __pWifiDirectManagerInstance(null)
65 , __pLabelItemCount(null)
66 , __pCheckButton(null)
67 , __pAnimationFrameList(null)
69 , __groupScanDeviceListInfoCount(0)
71 __balloonPopuptimer.Construct(*this);
74 WifiDirectConnectionForm::~WifiDirectConnectionForm(void)
79 WifiDirectConnectionForm::CreateFooter(void)
81 Footer* pFooter = GetFooter();
84 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
86 FooterItem footerScan;
87 footerScan.Construct(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN);
88 footerScan.SetText(ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
90 FooterItem footerConnect;
91 footerConnect.Construct(IDA_WIFI_DIRECT_CONNECTION_CONNECT);
92 footerConnect.SetText(ResourceManager::GetString(L"IDS_WIFI_BODY_CONNECT"));
94 pFooter->AddItem(footerScan);
95 pFooter->AddItem(footerConnect);
96 pFooter->AddActionEventListener(*this);
97 pFooter->SetItemEnabled(ID_WIFI_DIRECT_FOOTER_CONNECT, false);
99 SetFormBackEventListener(this);
103 WifiDirectConnectionForm::DisableFooter(unsigned int itemIndex)
105 Footer* pFooter = GetFooter();
108 pFooter->SetItemEnabled(itemIndex, false);
109 pFooter->Invalidate(true);
113 WifiDirectConnectionForm::EnableFooter(unsigned int itemIndex)
115 Footer* pFooter = GetFooter();
118 pFooter->SetItemEnabled(itemIndex, true);
119 pFooter->Invalidate(true);
123 WifiDirectConnectionForm::SetFooterText(const int actionId, Tizen::Base::String itemText)
125 Footer* pFooter = GetFooter();
128 FooterItem footerItem;
129 footerItem.Construct(actionId);
130 footerItem.SetText(itemText);
132 pFooter->RemoveItemAt(0);
133 pFooter->InsertItemAt(0, footerItem);
137 WifiDirectConnectionForm::CreateGroupText(void)
140 Rectangle itemRectLabel = GetClientAreaBounds();
142 itemRectLabel.y = Y_GROUP_DEFAULT;
143 itemRectLabel.height = H_GROUP_INDEX_DEFAULT;
145 String itemLabelText = ResourceManager::GetString(L"IDS_ST_HEADER_AVAILABLE_DEVICES");
147 pLabel = new (std::nothrow) Label();
148 pLabel->Construct(itemRectLabel, itemLabelText);
149 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
150 pLabel->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_BOLD);
151 pLabel->SetTextColor(COLOR_MAIN_TEXT);
157 WifiDirectConnectionForm::CreateTableView(void)
159 Rectangle bounds = GetClientAreaBounds();
160 Rectangle itemRectSelect;
161 Rectangle itemSelectCount;
162 String itemText = ResourceManager::GetString(L"IDS_ST_BODY_SELECT_ALL");
163 String itemSelectedText = ResourceManager::GetString(L"IDS_ST_OPT_SELECTED");
165 bounds.x = X_GROUP_DEFAULT;
166 bounds.y = H_GROUP_ITEM_DEFAULT;
167 bounds.width -= (bounds.x * WIDTH_GAP);
169 itemRectSelect = itemSelectCount = bounds;
171 itemRectSelect.y = H_GROUP_INDEX_DEFAULT;
172 itemRectSelect.height = H_GROUP_ITEM_DEFAULT;
173 bounds.y = itemRectSelect.y + itemRectSelect.height;
174 bounds.height -= bounds.y;
176 __pCheckButton = new (std::nothrow) CheckButton();
177 __pCheckButton->Construct(itemRectSelect, CHECK_BUTTON_STYLE_MARK,
178 BACKGROUND_STYLE_DEFAULT, false, itemText, GROUP_STYLE_NONE);
179 __pCheckButton->SetActionId(IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM,
180 IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM, IDA_WIFI_DIRECT_CONNECTION_SELECTED_GROUP_ITEM);
182 AddControl(__pCheckButton);
184 __pCheckButton->AddActionEventListener(*this);
185 __pCheckButton->SetColor(CHECK_BUTTON_STATUS_NORMAL, COLOR_BG_CHECKBOX);
187 __pTableView = new (std::nothrow) GroupedTableView();
188 __pTableView->Construct(bounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_FIXED);
189 __pTableView->SetItemProvider(this);
191 AddControl(__pTableView);
193 __pTableView->AddGroupedTableViewItemEventListener(*this);
195 itemSelectCount.y = Y_ITEM_COUNT_DISPLAY;
196 itemSelectCount.height = H_GROUP_INDEX_NO_TITLE_DEFAULT;
198 __pLabelItemCount = new (std::nothrow) Label();
199 __pLabelItemCount->Construct(itemSelectCount, itemSelectedText);
200 __pLabelItemCount->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
201 __pLabelItemCount->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_BOLD);
202 __pLabelItemCount->SetTextColor(COLOR_MAIN_TEXT);
203 __pLabelItemCount->SetBackgroundColor(COLOR_BG_CHECKBOX);
204 __pLabelItemCount->SetShowState(false);
206 AddControl(__pLabelItemCount);
207 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(this->GetLayoutN());
208 if (pRelativeLayout != null)
210 pRelativeLayout->SetHorizontalFitPolicy(*__pTableView, FIT_POLICY_PARENT);
211 pRelativeLayout->SetVerticalFitPolicy(*__pTableView, FIT_POLICY_PARENT);
212 delete pRelativeLayout;
217 WifiDirectConnectionForm::CreateInPorgressAnimationFrame(void)
220 long duration = DURATION / FRAME_COUNT;
222 Bitmap* pBitmap = null;
223 AnimationFrame* pAniFrame = null;
225 __pAnimationFrameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
226 __pAnimationFrameList->Construct();
228 for (count = 0; count < FRAME_COUNT; count++)
230 String searchIconFilePath;
231 searchIconFilePath.Format(searchIconFilePath.GetLength(), IDB_SEARCH_ICON_SIZE_LAGER_IMAGE_PATH_FORMAT, count);
232 pBitmap = ResourceManager::GetBitmapN(searchIconFilePath);
235 AppLogDebug("GetBitmapN fail");
238 pAniFrame = new (std::nothrow) AnimationFrame(*pBitmap, duration);
239 __pAnimationFrameList->Add(*pAniFrame);
245 WifiDirectConnectionForm::DestoryInPorgressAnimationFrame(void)
247 if (__pAnimationFrameList != null)
249 delete __pAnimationFrameList;
250 __pAnimationFrameList = null;
255 WifiDirectConnectionForm::SetHandlerInProgressAnimation(void)
257 Rectangle itemRectLabel = Rectangle(X_SEARCH_ICON, Y_SEARCH_ICON, W_SEARCH_ICON, H_SEARCH_ICON);
259 __pAnimation = new (std::nothrow) Animation();
260 result r = __pAnimation->Construct(itemRectLabel, *__pAnimationFrameList);
263 AppLogDebug("__pAnimation->Construct failed(%s)", GetErrorMessage(r));
267 __pAnimation->SetRepeatCount(ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT);
269 __pAnimation->AddAnimationEventListener(*this);
270 __pAnimation->SetShowState(false);
272 AddControl(__pAnimation);
276 WifiDirectConnectionForm::RemoveHandlerInProgressAnimation(void)
278 if (__pAnimation != null)
285 WifiDirectConnectionForm::PlayInPorgressAnimation(void)
287 if (__pAnimation != null)
289 __pAnimation->SetRepeatCount(ID_WIFI_DIRECT_IN_PROGRESS_REPEAT_COUNT);
290 __pAnimation->SetShowState(true);
291 __pAnimation->Play();
296 WifiDirectConnectionForm::StopInPorgressAnimation(void)
298 if (__pAnimation != null)
300 __pAnimation->Stop();
301 __pAnimation->SetShowState(false);
306 WifiDirectConnectionForm::OnInitializing(void)
308 SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER | FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE);
309 CreateHeader(ResourceManager::GetString(L"IDS_WIFI_BUTTON_MULTI_CONNECT"));
313 CreateInPorgressAnimationFrame();
314 SetHandlerInProgressAnimation();
317 __pWifiDirectManagerInstance = GetWifiDirectManagerInstance();
318 result r = E_SUCCESS;
320 if ((__pWifiDirectManagerInstance == null)
321 || IsFailed(GetLastResult()))
323 if (__pWifiDirectManagerInstance == null)
330 if (__pWifiDirectManagerInstance->IsActivated())
332 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
334 ReAdjustScanDeviceListInfoCount();
338 AppLogDebug("WifiDirect is state of Deactivated");
346 WifiDirectConnectionForm::OnTerminating(void)
349 __pLabelItemCount = null;
350 __pCheckButton = null;
351 __pWifiDirectManagerInstance = null;
353 RemoveHandlerInProgressAnimation();
354 DestoryInPorgressAnimationFrame();
356 SetFormBackEventListener(null);
361 WifiDirectConnectionForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
363 __pTableView->UpdateTableView();
367 WifiDirectConnectionForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
372 WifiDirectConnectionForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
374 SceneManager* pSceneManager = SceneManager::GetInstance();
375 AppAssert(pSceneManager);
377 if ((__pWifiDirectManagerInstance != null)
378 && (__pWifiDirectManagerInstance->IsScanInProgress()))
380 __pWifiDirectManagerInstance->CancelRemoteDeviceScan();
383 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
387 WifiDirectConnectionForm::GetGroupCount(void)
389 return ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT;
393 WifiDirectConnectionForm::GetItemCount(int groupIndex)
395 return __groupScanDeviceListInfoCount;
399 WifiDirectConnectionForm::CreateGroupItem(int groupIndex, int itemWidth)
405 WifiDirectConnectionForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
407 TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_MARK;
408 Rectangle itemIconLabelRect;
409 Rectangle itemIconRect;
411 Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_MOBILE_AP);
412 Label* pLabel = null;
413 int fontSize = GetFontSize();
415 TableViewItem* pItem = new (std::nothrow) TableViewItem();
417 WifiDirectDeviceInfo* pScanRemoteDevice = __pWifiDirectManagerInstance->GetScanDeviceListInfoAt(itemIndex);
418 if (pScanRemoteDevice != null)
420 itemText = pScanRemoteDevice->GetDeviceName();
421 if (itemText.IsEmpty() == true)
433 RelativeLayout relativeLayout;
434 relativeLayout.Construct();
436 pItem->Construct(relativeLayout, Dimension(itemWidth, H_GROUP_ITEM_DEFAULT), style);
437 pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT);
439 ItemTypeIconAndOneLine(itemIconRect, itemIconLabelRect);
441 pLabel = new (std::nothrow) Label();
442 pLabel->Construct(itemIconRect, L"");
443 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
444 pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
445 pLabel->SetBackgroundBitmap(*pBitmap);
447 pItem->AddControl(pLabel);
449 pLabel = new (std::nothrow) Label();
450 pLabel->Construct(itemIconLabelRect, itemText);
451 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
452 pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
453 pLabel->SetTextColor(COLOR_MAIN_TEXT);
455 pItem->AddControl(pLabel);
456 relativeLayout.SetMargin(*pLabel, itemIconLabelRect.x, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
457 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
458 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
464 WifiDirectConnectionForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
473 WifiDirectConnectionForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
482 WifiDirectConnectionForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
486 unsigned int checkedItemCount = 0;
490 if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
492 tableView.SetItemChecked(groupIndex, itemIndex, true);
494 else if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
496 tableView.SetItemChecked(groupIndex, itemIndex, false);
503 itemCount = tableView.GetItemCountAt(0);
504 for (count = 0; count < itemCount; count++)
509 if (__pTableView->IsItemChecked(groupIndex, itemIndex))
515 if (checkedItemCount != 0)
517 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
518 ShowBalloonPopup(checkedItemCount);
522 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
527 WifiDirectConnectionForm::OnActionPerformed(const Control& source, int actionId)
529 result r = E_SUCCESS;
530 Footer* pFooter = GetFooter();
535 case IDA_WIFI_DIRECT_CONNECTION_CONNECT:
537 SceneManager* pSceneManager = SceneManager::GetInstance();
538 AppAssert(pSceneManager);
540 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
544 case IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM:
546 SelectAllGroupItem();
547 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
551 case IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN:
553 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
554 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
555 r = __pWifiDirectManagerInstance->RemoteDeviceScan();
558 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP, ResourceManager::GetString(L"IDS_COM_BODY_STOP"));
559 ReAdjustScanDeviceListInfoCount();
560 PlayInPorgressAnimation();
563 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
567 case IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP:
569 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
570 __pWifiDirectManagerInstance->CancelRemoteDeviceScan();
571 StopInPorgressAnimation();
572 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN, ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
573 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
577 case IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM:
579 UnSelectAllGroupItem();
580 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
590 WifiDirectConnectionForm::TableViewItemInit(void)
592 __groupScanDeviceListInfoCount = 0;
596 WifiDirectConnectionForm::ReAdjustScanDeviceListInfoCount(void)
598 if ((__pWifiDirectManagerInstance == null)
599 || (__pTableView == null))
601 AppLogDebug("__pWifiDirectManagerInstance or __pTableView is null");
605 unsigned int itemCount = __pWifiDirectManagerInstance->GetScanDeviceListInfoCount();
608 __groupScanDeviceListInfoCount = itemCount;
613 WifiDirectConnectionForm::UpdateTableView(void)
615 if (__pTableView == null)
617 AppLogDebug("__pTableView is null");
620 __pTableView->UpdateTableView();
624 WifiDirectConnectionForm::OnWifiDirectManagerEventCompleted(WifiDirectManagerEvent requestEvent, result r)
626 if (__pWifiDirectManagerInstance == null)
631 switch (requestEvent)
633 case WIFI_DIRECT_MANAGER_EVENT_SCAN_COMPLETED_N:
635 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
636 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN, ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
637 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
638 StopInPorgressAnimation();
639 ReAdjustScanDeviceListInfoCount();
646 SceneManager* pSceneManager = SceneManager::GetInstance();
647 AppAssert(pSceneManager);
649 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
650 AppLogDebug("Requested Event : [%d], Result : [%d]", requestEvent, r);
657 WifiDirectConnectionForm::GetWifiDirectManagerInstance(void)
659 if (WifiDirectManager::GetInstance() == null)
664 WifiDirectManager::GetInstance()->RemoveIWifiDirectManagerEventListener();
665 WifiDirectManager::GetInstance()->SetIWifiDirectManagerEventListener(*this);
667 return WifiDirectManager::GetInstance();
671 WifiDirectConnectionForm::ShowBalloonPopup(unsigned int itemCount)
673 String itemCountText;
674 String itemSelectedText = ResourceManager::GetString(L"IDS_ST_OPT_SELECTED");
676 if (__pLabelItemCount == null)
678 AppLogDebug("__pLabelItemCount is null");
682 itemCountText.Format(ID_WIFI_DIRECT_CONNECTION_ITEM_COUNT_TEXT_LENGTH, L" (%d)", itemCount);
683 itemSelectedText.Insert(itemCountText, itemSelectedText.GetLength());
685 __pLabelItemCount->SetText(itemSelectedText);
686 __pLabelItemCount->SetShowState(true);
687 __pLabelItemCount->Invalidate(true);
689 __balloonPopuptimer.Start(ID_WIFI_DIRECT_CONNECTION_BALLOON_POPUP_TIMER_EXPIRED_TIME);
693 WifiDirectConnectionForm::SelectAllGroupItem(void)
695 int groupItemCount = 0;
697 int checkedItemCount = 0;
701 if (__pTableView == null)
703 AppLogDebug("__pTableView is null ");
707 groupItemCount = __pTableView->GetItemCountAt(0);
708 __pTableView->UpdateTableView();
710 for (loopCount = 0; loopCount < groupItemCount; loopCount++)
713 localItem = loopCount;
714 __pTableView->SetItemChecked(localGroup, localItem, true);
716 if (__pTableView->IsItemChecked(localGroup, localItem))
722 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
723 ShowBalloonPopup(checkedItemCount);
727 WifiDirectConnectionForm::UnSelectAllGroupItem(void)
729 int GroupItemCount = 0;
734 if ((__pTableView == null)
735 || (__pCheckButton == null))
737 AppLogDebug("__pTableView or __pCheckButton is null ");
741 GroupItemCount = __pTableView->GetItemCountAt(0);
743 __pTableView->UpdateTableView();
744 __pCheckButton->SetSelected(false);
746 for (loopCount = 0; loopCount < GroupItemCount; loopCount++)
749 localItem = loopCount;
751 __pTableView->SetItemChecked(localGroup, localItem, false);
756 WifiDirectConnectionForm::OnTimerExpired(Timer& timer)
758 if (__pLabelItemCount != null)
760 __pLabelItemCount->SetShowState(false);
761 __pLabelItemCount->Invalidate(true);
766 WifiDirectConnectionForm::GetDefaultGroupItemHeight(void)
768 return H_GROUP_INDEX_NO_TITLE_DEFAULT;
772 WifiDirectConnectionForm::GetDefaultItemHeight(void)
774 return H_GROUP_ITEM_DEFAULT;
778 WifiDirectConnectionForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
783 WifiDirectConnectionForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
788 WifiDirectConnectionForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
793 WifiDirectConnectionForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)