equal
deleted
inserted
replaced
36 |
36 |
37 // User includes |
37 // User includes |
38 |
38 |
39 #include "wlanqtutils.h" |
39 #include "wlanqtutils.h" |
40 #include "wlanqtutilsap.h" |
40 #include "wlanqtutilsap.h" |
41 #include "wlanqtutilsiap.h" |
|
42 |
41 |
43 #include "wlansnifferengine.h" |
42 #include "wlansnifferengine.h" |
44 #include "wlansniffermainwindow.h" |
43 #include "wlansniffermainwindow.h" |
45 #include "wlansnifferlistview.h" |
44 #include "wlansnifferlistview.h" |
46 #include "wlansnifferlistitem.h" |
45 #include "wlansnifferlistitem.h" |
373 { |
372 { |
374 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_UPDATELISTCONTENT_ENTRY); |
373 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_UPDATELISTCONTENT_ENTRY); |
375 |
374 |
376 if (!mIgnoreWlanScanResults) { |
375 if (!mIgnoreWlanScanResults) { |
377 // Get the latest scan results |
376 // Get the latest scan results |
378 QList< QSharedPointer<WlanQtUtilsIap> > iaps; |
377 QList< QSharedPointer<WlanQtUtilsAp> > iaps; |
379 QList< QSharedPointer<WlanQtUtilsAp> > aps; |
378 QList< QSharedPointer<WlanQtUtilsAp> > aps; |
380 mEngine->wlanQtUtils()->availableWlans(iaps, aps); |
379 mEngine->wlanQtUtils()->availableWlans(iaps, aps); |
381 |
380 |
382 // Check for connected IAP |
381 // Check for connected IAP |
383 int iapId = WlanQtUtils::IapIdNone; |
382 int iapId = WlanQtUtils::IapIdNone; |
631 // Show the dialog and wait for user input. |
630 // Show the dialog and wait for user input. |
632 mWlanEnableDialog = QSharedPointer<HbMessageBox>( |
631 mWlanEnableDialog = QSharedPointer<HbMessageBox>( |
633 new HbMessageBox(HbMessageBox::MessageTypeQuestion)); |
632 new HbMessageBox(HbMessageBox::MessageTypeQuestion)); |
634 mWlanEnableDialog->setTimeout(HbPopup::StandardTimeout); |
633 mWlanEnableDialog->setTimeout(HbPopup::StandardTimeout); |
635 mWlanEnableDialog->setText(hbTrId("txt_occ_info_activate_wlan_in_airplane_mode")); |
634 mWlanEnableDialog->setText(hbTrId("txt_occ_info_activate_wlan_in_airplane_mode")); |
|
635 mWlanEnableDialog->setStandardButtons(HbMessageBox::Yes | HbMessageBox::No); |
636 // Open the dialog and connect the result to the handleWlanEnableDialogClosed slot |
636 // Open the dialog and connect the result to the handleWlanEnableDialogClosed slot |
637 mWlanEnableDialog->open(this, SLOT(handleWlanEnableDialogClosed(HbAction*))); |
637 mWlanEnableDialog->open(this, SLOT(handleWlanEnableDialogClosed(int))); |
638 } else { |
638 } else { |
639 // Stop WLAN scanning immediately when switching WLAN OFF. |
639 // Stop WLAN scanning immediately when switching WLAN OFF. |
640 // WLAN might have sent scan results just before disabling WLAN. |
640 // WLAN might have sent scan results just before disabling WLAN. |
641 if (wlanOn) { |
641 if (wlanOn) { |
642 mEngine->stopWlanScanning(); |
642 mEngine->stopWlanScanning(); |
653 |
653 |
654 void WlanSnifferListView::startWlanWizard() |
654 void WlanSnifferListView::startWlanWizard() |
655 { |
655 { |
656 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_ENTRY); |
656 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_ENTRY); |
657 |
657 |
658 // TODO: Stop connections & do other cleanup before wizard can start? |
|
659 |
|
660 emit wizardTriggered(NULL); |
658 emit wizardTriggered(NULL); |
661 |
659 |
662 OstTraceFunctionExit0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_EXIT); |
660 OstTraceFunctionExit0(WLANSNIFFERLISTVIEW_STARTWLANWIZARD_EXIT); |
663 } |
661 } |
664 |
662 |
667 query is closed. |
665 query is closed. |
668 |
666 |
669 @param [in] action The user action received from the dialog. |
667 @param [in] action The user action received from the dialog. |
670 */ |
668 */ |
671 |
669 |
672 void WlanSnifferListView::handleWlanEnableDialogClosed(HbAction *action) |
670 void WlanSnifferListView::handleWlanEnableDialogClosed(int action) |
673 { |
671 { |
674 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_HANDLEWLANENABLEDIALOGCLOSED_ENTRY); |
672 OstTraceFunctionEntry0(WLANSNIFFERLISTVIEW_HANDLEWLANENABLEDIALOGCLOSED_ENTRY); |
675 |
673 |
676 // The dialog must exist |
674 // The dialog must exist |
677 Q_ASSERT(mWlanEnableDialog); |
675 Q_ASSERT(mWlanEnableDialog); |
678 |
676 |
679 // If the user selected yes, then the wlan value is toggled, |
677 // If the user selected yes, then the wlan value is toggled, |
680 // otherwise nothing needs to be done. |
678 // otherwise nothing needs to be done. |
681 // TODO: Update actions().at(0) when a better solution is provided by orbit |
679 if (action == HbMessageBox::Yes) { |
682 if (action == mWlanEnableDialog->actions().at(0)) { |
|
683 mEngine->setMasterWlan(true); |
680 mEngine->setMasterWlan(true); |
684 } |
681 } |
685 |
682 |
686 OstTraceFunctionExit0(WLANSNIFFERLISTVIEW_HANDLEWLANENABLEDIALOGCLOSED_EXIT); |
683 OstTraceFunctionExit0(WLANSNIFFERLISTVIEW_HANDLEWLANENABLEDIALOGCLOSED_EXIT); |
687 } |
684 } |