phoneengine/networkhandlingstarter/src/networkhandlingstarter_p.cpp
branchGCC_SURGE
changeset 51 f39ed5e045e0
parent 30 ebdbd102c78a
parent 45 6b911d05207e
equal deleted inserted replaced
40:bab96b7ed1a4 51:f39ed5e045e0
    14  * Description:  
    14  * Description:  
    15  *
    15  *
    16  */
    16  */
    17 
    17 
    18 #include <hbdevicemessagebox.h>
    18 #include <hbdevicemessagebox.h>
    19 #include <HbAction.h>
    19 #include <hbaction.h>
    20 #include <CpPluginLauncher.h>
    20 #include <cppluginlauncher.h>
    21 #include <hbinstance.h>
    21 #include <hbinstance.h>
    22 #include <HbView.h>
    22 #include <hbview.h>
    23 #include <xqserviceutil.h>
    23 #include <xqserviceutil.h>
       
    24 #include <cpbasesettingview.h>
    24 
    25 
    25 #include "networkhandlingstarter_p.h"
    26 #include "networkhandlingstarter_p.h"
    26 #include "networkhandlingstarterlogging.h"
    27 #include "networkhandlingstarterlogging.h"
    27 #include "cnetworklistener.h"
    28 #include "cnetworklistener.h"
    28 
    29 
    99 }
   100 }
   100 
   101 
   101 /*!
   102 /*!
   102     NetworkHandlingStarterPrivate::InitaliseCpNetworkPluginView()
   103     NetworkHandlingStarterPrivate::InitaliseCpNetworkPluginView()
   103  */
   104  */
   104 void NetworkHandlingStarterPrivate::InitaliseCpNetworkPluginView()
   105 bool NetworkHandlingStarterPrivate::InitaliseCpNetworkPluginView()
   105 {
   106 {
   106     DPRINT << ": IN";
   107     DPRINT << ": IN";
   107     
   108     
   108     HbMainWindow *mainWnd = MainWindow();
   109     bool ok(false);
   109     if (mainWnd) {
   110     CpBaseSettingView* view = CpPluginLauncher::launchSettingView("cpnetworkplugin");
   110         if (CpPluginLauncher::launchCpPluginView(
   111     if (view) {
   111                 "resource\\qt\\plugins\\controlpanel\\cpnetworkplugin.qtplugin")) {
   112         if (QString(view->metaObject()->className()) == 
   112             foreach (HbView *view, mainWnd->views()) {
   113             QString("CpNetworkPluginView")) {
   113                 if (QString(view->metaObject()->className()) == 
   114             QObject::connect(
   114                     QString("CpNetworkPluginView")) {
   115                 view, SIGNAL(aboutToClose()), 
   115                     QObject::connect(
   116                 this, SLOT(ViewDone()));
   116                         view, SIGNAL(aboutToClose()), 
   117             QObject::connect(
   117                         this, SLOT(ViewDone()));
   118                 this, SIGNAL(SearchAvailableNetworks()), 
   118                     QObject::connect(
   119                 view, SLOT(SearchAvailableNetworks()));
   119                         this, SIGNAL(SearchAvailableNetworks()), 
   120             ok = true;
   120                         view, SLOT(SearchAvailableNetworks()));
       
   121                 }
       
   122             }
       
   123         }
   121         }
   124     }
   122     }
   125     
   123     
   126     DPRINT << ": OUT";
   124     DPRINT << ": OUT";
       
   125     return ok;
   127 }
   126 }
   128 
   127 
   129 /*!
   128 /*!
   130     NetworkHandlingStarterPrivate::LaunchCpNetworkPluginView()
   129     NetworkHandlingStarterPrivate::LaunchCpNetworkPluginView()
   131  */
   130  */
   132 void NetworkHandlingStarterPrivate::LaunchCpNetworkPluginView()
   131 void NetworkHandlingStarterPrivate::LaunchCpNetworkPluginView()
   133 {
   132 {
   134     DPRINT << ": IN";
   133     DPRINT << ": IN";
   135     
   134     
   136     InitaliseCpNetworkPluginView();
   135     if (InitaliseCpNetworkPluginView()) {
   137     HbMainWindow *mainWnd = MainWindow();
   136         DPRINT << ": Show network settings view";
   138     if (mainWnd) {
   137         HbMainWindow *mainWnd = MainWindow();
   139         mainWnd->show();
   138         if (mainWnd) {
   140         XQServiceUtil::toBackground(false);
   139             mainWnd->show();
       
   140             XQServiceUtil::toBackground(false);
       
   141         }
       
   142         emit SearchAvailableNetworks();
   141     }
   143     }
   142     emit SearchAvailableNetworks();
       
   143     
   144     
   144     DPRINT << ": OUT";
   145     DPRINT << ": OUT";
   145 }
   146 }
   146 
   147 
   147 /*!
   148 /*!