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_FOOTER_ITEM_INDEX_1 = 0;
48 static const int ID_FOOTER_ITEM_INDEX_2 = 1;
50 static const int ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT = 1;
51 static const int ID_WIFI_DIRECT_CONNECTION_ITEM_COUNT_TEXT_LENGTH = 5;
52 static const int ID_WIFI_DIRECT_CONNECTION_BALLOON_POPUP_TIMER_EXPIRED_TIME = 2000;
53 static const int ID_WIFI_DIRECT_IN_PROGRESS_REPEAT_COUNT = 1000;
55 static const int IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE = 100;
56 static const int IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 1;
57 static const int IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 2;
58 static const int IDA_WIFI_DIRECT_CONNECTION_CONNECT = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 3;
59 static const int IDA_WIFI_DIRECT_CONNECTION_SELECTED_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 4;
60 static const int IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 4;
61 static const int IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM = IDA_WIFI_DIRECT_CONNECTION_ACTION_ID_BASE + 5;
63 static const int ID_WIFI_DIRECT_FOOTER_SCAN = 0;
64 static const int ID_WIFI_DIRECT_FOOTER_CONNECT = 1;
66 WifiDirectConnectionForm::WifiDirectConnectionForm(void)
67 : __pWifiDirectManagerInstance(null)
68 , __pLabelItemCount(null)
69 , __pCheckButton(null)
70 , __pAnimationFrameList(null)
72 , __groupScanDeviceListInfoCount(0)
74 __balloonPopuptimer.Construct(*this);
77 WifiDirectConnectionForm::~WifiDirectConnectionForm(void)
82 WifiDirectConnectionForm::CreateFooter(void)
84 Footer* pFooter = GetFooter();
87 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
89 FooterItem footerScan;
90 footerScan.Construct(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN);
91 footerScan.SetText(ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
93 FooterItem footerConnect;
94 footerConnect.Construct(IDA_WIFI_DIRECT_CONNECTION_CONNECT);
95 footerConnect.SetText(ResourceManager::GetString(L"IDS_WIFI_BODY_CONNECT"));
97 pFooter->AddItem(footerScan);
98 pFooter->AddItem(footerConnect);
99 pFooter->AddActionEventListener(*this);
100 pFooter->SetItemEnabled(ID_WIFI_DIRECT_FOOTER_CONNECT, false);
102 SetFormBackEventListener(this);
106 WifiDirectConnectionForm::DisableFooter(unsigned int itemIndex)
108 Footer* pFooter = GetFooter();
111 pFooter->SetItemEnabled(itemIndex, false);
112 pFooter->Invalidate(true);
116 WifiDirectConnectionForm::EnableFooter(unsigned int itemIndex)
118 Footer* pFooter = GetFooter();
121 pFooter->SetItemEnabled(itemIndex, true);
122 pFooter->Invalidate(true);
126 WifiDirectConnectionForm::SetFooterText(const int actionId, Tizen::Base::String itemText)
128 Footer* pFooter = GetFooter();
131 FooterItem footerItem;
132 footerItem.Construct(actionId);
133 footerItem.SetText(itemText);
135 pFooter->RemoveItemAt(0);
136 pFooter->InsertItemAt(0, footerItem);
140 WifiDirectConnectionForm::CreateGroupText(void)
143 Rectangle itemRectLabel = GetClientAreaBounds();
145 itemRectLabel.y = Y_GROUP_DEFAULT;
146 itemRectLabel.height = H_GROUP_INDEX_DEFAULT;
148 String itemLabelText = ResourceManager::GetString(L"IDS_ST_HEADER_AVAILABLE_DEVICES");
150 pLabel = new (std::nothrow) Label();
151 pLabel->Construct(itemRectLabel, itemLabelText);
152 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
153 pLabel->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_BOLD);
154 pLabel->SetTextColor(COLOR_MAIN_TEXT);
160 WifiDirectConnectionForm::CreateTableView(void)
162 Rectangle bounds = GetClientAreaBounds();
163 Rectangle itemRectSelect;
164 Rectangle itemSelectCount;
165 String itemText = ResourceManager::GetString(L"IDS_ST_BODY_SELECT_ALL");
166 String itemSelectedText = ResourceManager::GetString(L"IDS_ST_OPT_SELECTED");
168 bounds.x = X_GROUP_DEFAULT;
169 bounds.y = H_GROUP_ITEM_DEFAULT;
170 bounds.width -= (bounds.x * WIDTH_GAP);
172 itemRectSelect = itemSelectCount = bounds;
174 itemRectSelect.y = H_GROUP_INDEX_DEFAULT;
175 itemRectSelect.height = H_GROUP_ITEM_DEFAULT;
176 bounds.y = itemRectSelect.y + itemRectSelect.height;
177 bounds.height -= bounds.y;
179 __pCheckButton = new (std::nothrow) CheckButton();
180 __pCheckButton->Construct(itemRectSelect, CHECK_BUTTON_STYLE_MARK,
181 BACKGROUND_STYLE_DEFAULT, false, itemText, GROUP_STYLE_NONE);
182 __pCheckButton->SetActionId(IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM,
183 IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM, IDA_WIFI_DIRECT_CONNECTION_SELECTED_GROUP_ITEM);
185 AddControl(__pCheckButton);
187 __pCheckButton->AddActionEventListener(*this);
188 __pCheckButton->SetColor(CHECK_BUTTON_STATUS_NORMAL, COLOR_BG_CHECKBOX);
190 __pTableView = new (std::nothrow) GroupedTableView();
191 __pTableView->Construct(bounds, true, TABLE_VIEW_SCROLL_BAR_STYLE_FIXED);
192 __pTableView->SetItemProvider(this);
194 AddControl(__pTableView);
196 __pTableView->AddGroupedTableViewItemEventListener(*this);
198 itemSelectCount.y = Y_ITEM_COUNT_DISPLAY;
199 itemSelectCount.height = H_GROUP_INDEX_NO_TITLE_DEFAULT;
201 __pLabelItemCount = new (std::nothrow) Label();
202 __pLabelItemCount->Construct(itemSelectCount, itemSelectedText);
203 __pLabelItemCount->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
204 __pLabelItemCount->SetTextConfig(FONT_SIZE_MAIN_TEXT, LABEL_TEXT_STYLE_BOLD);
205 __pLabelItemCount->SetTextColor(COLOR_MAIN_TEXT);
206 __pLabelItemCount->SetBackgroundColor(COLOR_BG_CHECKBOX);
207 __pLabelItemCount->SetShowState(false);
209 AddControl(__pLabelItemCount);
210 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(this->GetLayoutN());
211 if (pRelativeLayout != null)
213 pRelativeLayout->SetHorizontalFitPolicy(*__pTableView, FIT_POLICY_PARENT);
214 pRelativeLayout->SetVerticalFitPolicy(*__pTableView, FIT_POLICY_PARENT);
215 delete pRelativeLayout;
220 WifiDirectConnectionForm::CreateInPorgressAnimationFrame(void)
223 long duration = DURATION / FRAME_COUNT;
225 Bitmap* pBitmap = null;
226 AnimationFrame* pAniFrame = null;
228 __pAnimationFrameList = new (std::nothrow) ArrayList(SingleObjectDeleter);
229 __pAnimationFrameList->Construct();
231 for (count = 0; count < FRAME_COUNT; count++)
233 String searchIconFilePath;
234 searchIconFilePath.Format(searchIconFilePath.GetLength(), IDB_SEARCH_ICON_SIZE_LAGER_IMAGE_PATH_FORMAT, count);
235 pBitmap = ResourceManager::GetBitmapN(searchIconFilePath);
238 AppLogDebug("GetBitmapN fail");
241 pAniFrame = new (std::nothrow) AnimationFrame(*pBitmap, duration);
242 __pAnimationFrameList->Add(*pAniFrame);
248 WifiDirectConnectionForm::DestoryInPorgressAnimationFrame(void)
250 if (__pAnimationFrameList != null)
252 delete __pAnimationFrameList;
253 __pAnimationFrameList = null;
258 WifiDirectConnectionForm::SetHandlerInProgressAnimation(void)
260 Rectangle itemRectLabel = Rectangle(X_SEARCH_ICON, Y_SEARCH_ICON, W_SEARCH_ICON, H_SEARCH_ICON);
262 __pAnimation = new (std::nothrow) Animation();
263 result r = __pAnimation->Construct(itemRectLabel, *__pAnimationFrameList);
266 AppLogDebug("__pAnimation->Construct failed(%s)", GetErrorMessage(r));
270 __pAnimation->SetRepeatCount(ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT);
272 __pAnimation->AddAnimationEventListener(*this);
273 __pAnimation->SetShowState(false);
275 AddControl(__pAnimation);
279 WifiDirectConnectionForm::RemoveHandlerInProgressAnimation(void)
281 if (__pAnimation != null)
288 WifiDirectConnectionForm::PlayInPorgressAnimation(void)
290 if (__pAnimation != null)
292 __pAnimation->SetRepeatCount(ID_WIFI_DIRECT_IN_PROGRESS_REPEAT_COUNT);
293 __pAnimation->SetShowState(true);
294 __pAnimation->Play();
299 WifiDirectConnectionForm::StopInPorgressAnimation(void)
301 if (__pAnimation != null)
303 __pAnimation->Stop();
304 __pAnimation->SetShowState(false);
309 WifiDirectConnectionForm::OnInitializing(void)
311 SetFormStyle(FORM_STYLE_NORMAL | FORM_STYLE_INDICATOR | FORM_STYLE_HEADER | FORM_STYLE_FOOTER | FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE);
312 CreateHeader(ResourceManager::GetString(L"IDS_WIFI_BUTTON_MULTI_CONNECT"));
316 CreateInPorgressAnimationFrame();
317 SetHandlerInProgressAnimation();
320 __pWifiDirectManagerInstance = GetWifiDirectManagerInstance();
321 result r = E_SUCCESS;
323 if ((__pWifiDirectManagerInstance == null)
324 || IsFailed(GetLastResult()))
326 if (__pWifiDirectManagerInstance == null)
333 if (__pWifiDirectManagerInstance->IsActivated())
335 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
337 ReAdjustScanDeviceListInfoCount();
341 AppLogDebug("WifiDirect is state of Deactivated");
349 WifiDirectConnectionForm::OnTerminating(void)
352 __pLabelItemCount = null;
353 __pCheckButton = null;
354 __pWifiDirectManagerInstance = null;
356 RemoveHandlerInProgressAnimation();
357 DestoryInPorgressAnimationFrame();
359 SetFormBackEventListener(null);
364 WifiDirectConnectionForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
366 __pTableView->UpdateTableView();
370 WifiDirectConnectionForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
375 WifiDirectConnectionForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
377 SceneManager* pSceneManager = SceneManager::GetInstance();
378 AppAssert(pSceneManager);
380 if ((__pWifiDirectManagerInstance != null)
381 && (__pWifiDirectManagerInstance->IsScanInProgress()))
383 __pWifiDirectManagerInstance->CancelRemoteDeviceScan();
386 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
390 WifiDirectConnectionForm::GetGroupCount(void)
392 return ID_WIFI_DIRECT_CONNECTION_COUNT_DEFAULT;
396 WifiDirectConnectionForm::GetItemCount(int groupIndex)
398 return __groupScanDeviceListInfoCount;
402 WifiDirectConnectionForm::CreateGroupItem(int groupIndex, int itemWidth)
408 WifiDirectConnectionForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
410 TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_MARK;
411 Rectangle itemIconLabelRect;
412 Rectangle itemIconRect;
414 Bitmap* pBitmap = ResourceManager::GetBitmapN(IDB_MOBILE_AP);
415 Label* pLabel = null;
416 int fontSize = GetFontSize();
418 TableViewItem* pItem = new (std::nothrow) TableViewItem();
420 WifiDirectDeviceInfo* pScanRemoteDevice = __pWifiDirectManagerInstance->GetScanDeviceListInfoAt(itemIndex);
421 if (pScanRemoteDevice != null)
423 itemText = pScanRemoteDevice->GetDeviceName();
424 if (itemText.IsEmpty() == true)
436 RelativeLayout relativeLayout;
437 relativeLayout.Construct();
439 pItem->Construct(relativeLayout, Dimension(itemWidth, H_GROUP_ITEM_DEFAULT), style);
440 pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT);
442 ItemTypeIconAndOneLine(itemIconRect, itemIconLabelRect);
444 pLabel = new (std::nothrow) Label();
445 pLabel->Construct(itemIconRect, L"");
446 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
447 pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
448 pLabel->SetBackgroundBitmap(*pBitmap);
450 pItem->AddControl(pLabel);
452 pLabel = new (std::nothrow) Label();
453 pLabel->Construct(itemIconLabelRect, itemText);
454 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
455 pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_BOLD);
456 pLabel->SetTextColor(COLOR_MAIN_TEXT);
458 pItem->AddControl(pLabel);
459 relativeLayout.SetMargin(*pLabel, itemIconLabelRect.x, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
460 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
461 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
467 WifiDirectConnectionForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
476 WifiDirectConnectionForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
485 WifiDirectConnectionForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
489 unsigned int checkedItemCount = 0;
493 if (status == TABLE_VIEW_ITEM_STATUS_CHECKED)
495 tableView.SetItemChecked(groupIndex, itemIndex, true);
497 else if (status == TABLE_VIEW_ITEM_STATUS_UNCHECKED)
499 tableView.SetItemChecked(groupIndex, itemIndex, false);
506 itemCount = tableView.GetItemCountAt(0);
507 for (count = 0; count < itemCount; count++)
512 if (__pTableView->IsItemChecked(groupIndex, itemIndex))
518 if (checkedItemCount != 0)
520 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
521 ShowBalloonPopup(checkedItemCount);
525 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
530 WifiDirectConnectionForm::OnActionPerformed(const Control& source, int actionId)
532 result r = E_SUCCESS;
533 Footer* pFooter = GetFooter();
538 case IDA_WIFI_DIRECT_CONNECTION_CONNECT:
540 SceneManager* pSceneManager = SceneManager::GetInstance();
541 AppAssert(pSceneManager);
543 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
547 case IDA_WIFI_DIRECT_CONNECTION_SELECT_ALL_GROUP_ITEM:
549 SelectAllGroupItem();
550 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
554 case IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN:
556 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
557 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
558 r = __pWifiDirectManagerInstance->RemoteDeviceScan();
561 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP, ResourceManager::GetString(L"IDS_COM_BODY_STOP"));
562 ReAdjustScanDeviceListInfoCount();
563 PlayInPorgressAnimation();
566 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
570 case IDA_WIFI_DIRECT_CONNECTION_FOOTER_STOP:
572 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
573 __pWifiDirectManagerInstance->CancelRemoteDeviceScan();
574 StopInPorgressAnimation();
575 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN, ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
576 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
580 case IDA_WIFI_DIRECT_CONNECTION_UNSELECT_ALL_GROUP_ITEM:
582 UnSelectAllGroupItem();
583 DisableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
593 WifiDirectConnectionForm::TableViewItemInit(void)
595 __groupScanDeviceListInfoCount = 0;
599 WifiDirectConnectionForm::ReAdjustScanDeviceListInfoCount(void)
601 if ((__pWifiDirectManagerInstance == null)
602 || (__pTableView == null))
604 AppLogDebug("__pWifiDirectManagerInstance or __pTableView is null");
608 unsigned int itemCount = __pWifiDirectManagerInstance->GetScanDeviceListInfoCount();
611 __groupScanDeviceListInfoCount = itemCount;
616 WifiDirectConnectionForm::UpdateTableView(void)
618 if (__pTableView == null)
620 AppLogDebug("__pTableView is null");
623 __pTableView->UpdateTableView();
627 WifiDirectConnectionForm::OnWifiDirectManagerEventCompleted(WifiDirectManagerEvent requestEvent, result r)
629 if (__pWifiDirectManagerInstance == null)
634 switch (requestEvent)
636 case WIFI_DIRECT_MANAGER_EVENT_SCAN_COMPLETED_N:
638 DisableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
639 SetFooterText(IDA_WIFI_DIRECT_CONNECTION_FOOTER_SCAN, ResourceManager::GetString(L"IDS_ST_BODY_SCAN"));
640 EnableFooter(ID_WIFI_DIRECT_FOOTER_SCAN);
641 StopInPorgressAnimation();
642 ReAdjustScanDeviceListInfoCount();
649 SceneManager* pSceneManager = SceneManager::GetInstance();
650 AppAssert(pSceneManager);
652 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
653 AppLogDebug("Requested Event : [%d], Result : [%d]", requestEvent, r);
660 WifiDirectConnectionForm::GetWifiDirectManagerInstance(void)
662 if (WifiDirectManager::GetInstance() == null)
667 WifiDirectManager::GetInstance()->RemoveIWifiDirectManagerEventListener();
668 WifiDirectManager::GetInstance()->SetIWifiDirectManagerEventListener(*this);
670 return WifiDirectManager::GetInstance();
674 WifiDirectConnectionForm::ShowBalloonPopup(unsigned int itemCount)
676 String itemCountText;
677 String itemSelectedText = ResourceManager::GetString(L"IDS_ST_OPT_SELECTED");
679 if (__pLabelItemCount == null)
681 AppLogDebug("__pLabelItemCount is null");
685 itemCountText.Format(ID_WIFI_DIRECT_CONNECTION_ITEM_COUNT_TEXT_LENGTH, L" (%d)", itemCount);
686 itemSelectedText.Insert(itemCountText, itemSelectedText.GetLength());
688 __pLabelItemCount->SetText(itemSelectedText);
689 __pLabelItemCount->SetShowState(true);
690 __pLabelItemCount->Invalidate(true);
692 __balloonPopuptimer.Start(ID_WIFI_DIRECT_CONNECTION_BALLOON_POPUP_TIMER_EXPIRED_TIME);
696 WifiDirectConnectionForm::SelectAllGroupItem(void)
698 int groupItemCount = 0;
700 int checkedItemCount = 0;
704 if (__pTableView == null)
706 AppLogDebug("__pTableView is null ");
710 groupItemCount = __pTableView->GetItemCountAt(0);
711 __pTableView->UpdateTableView();
713 for (loopCount = 0; loopCount < groupItemCount; loopCount++)
716 localItem = loopCount;
717 __pTableView->SetItemChecked(localGroup, localItem, true);
719 if (__pTableView->IsItemChecked(localGroup, localItem))
725 EnableFooter(ID_WIFI_DIRECT_FOOTER_CONNECT);
726 ShowBalloonPopup(checkedItemCount);
730 WifiDirectConnectionForm::UnSelectAllGroupItem(void)
732 int GroupItemCount = 0;
737 if ((__pTableView == null)
738 || (__pCheckButton == null))
740 AppLogDebug("__pTableView or __pCheckButton is null ");
744 GroupItemCount = __pTableView->GetItemCountAt(0);
746 __pTableView->UpdateTableView();
747 __pCheckButton->SetSelected(false);
749 for (loopCount = 0; loopCount < GroupItemCount; loopCount++)
752 localItem = loopCount;
754 __pTableView->SetItemChecked(localGroup, localItem, false);
759 WifiDirectConnectionForm::OnTimerExpired(Timer& timer)
761 if (__pLabelItemCount != null)
763 __pLabelItemCount->SetShowState(false);
764 __pLabelItemCount->Invalidate(true);
769 WifiDirectConnectionForm::GetDefaultGroupItemHeight(void)
771 return H_GROUP_INDEX_NO_TITLE_DEFAULT;
775 WifiDirectConnectionForm::GetDefaultItemHeight(void)
777 return H_GROUP_ITEM_DEFAULT;
781 WifiDirectConnectionForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
786 WifiDirectConnectionForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
791 WifiDirectConnectionForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
796 WifiDirectConnectionForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)