phonesettings/cpphonesettingsplugins/cpnetworkplugin/src/cpnetworkplugin.cpp
changeset 56 5bcb308bd24d
parent 46 bc5a64e5bc3c
child 76 cfea66083b62
equal deleted inserted replaced
46:bc5a64e5bc3c 56:5bcb308bd24d
    77 /*!
    77 /*!
    78   CpNetworkPlugin::createSettingView
    78   CpNetworkPlugin::createSettingView
    79  */
    79  */
    80 CpBaseSettingView *CpNetworkPlugin::createSettingView(const QVariant &hint) const 
    80 CpBaseSettingView *CpNetworkPlugin::createSettingView(const QVariant &hint) const 
    81     {
    81     {
    82     Q_UNUSED(hint)
       
    83     DPRINT << ": IN";
    82     DPRINT << ": IN";
    84     
    83     
    85     CpItemDataHelper *itemDataHelper(NULL);
    84     CpItemDataHelper *itemDataHelper(NULL);
    86     QScopedPointer<CpSettingFormEntryItemDataImpl<CpNetworkPluginView> > 
    85     QScopedPointer<CpSettingFormEntryItemDataImpl<CpNetworkPluginView> > 
    87         data( new CpSettingFormEntryItemDataImpl<CpNetworkPluginView>(
    86         data(new CpSettingFormEntryItemDataImpl<CpNetworkPluginView>(
    88                     *itemDataHelper,
    87                     *itemDataHelper,
    89                     hbTrId("txt_cp_dblist_mobile_network"),
    88                     hbTrId("txt_cp_dblist_mobile_network"),
    90                     m_networkStatus->statusText()));
    89                     m_networkStatus->statusText()));
    91     CpBaseSettingView *view = data->createSettingView();
    90     CpBaseSettingView *view = data->createSettingView();
       
    91     
       
    92     CpNetworkPluginView *networkPluginView = qobject_cast<CpNetworkPluginView*>(view);
       
    93     QVariantHash hash = hint.value<QVariantHash>();
       
    94     if ((hash.value("command").toString().compare("searchAvailableNetworks",Qt::CaseInsensitive) == 0) &&
       
    95         networkPluginView){
       
    96         networkPluginView->searchAvailableNetworks();
       
    97     }
    92     
    98     
    93     DPRINT << ": OUT";
    99     DPRINT << ": OUT";
    94     return view;
   100     return view;
    95     }
   101     }
    96     
   102