controlpanelui/src/cpserviceprovider/src/cpservicemainwindow.cpp
changeset 33 0cfa53de576f
parent 22 a5692c68d772
equal deleted inserted replaced
29:313976a11e23 33:0cfa53de576f
    22 #include "cpsplogger.h"
    22 #include "cpsplogger.h"
    23 
    23 
    24 CpServiceMainWindow::CpServiceMainWindow(QWidget *parent /* = 0*/)
    24 CpServiceMainWindow::CpServiceMainWindow(QWidget *parent /* = 0*/)
    25 : HbMainWindow(parent), mLauncherService(0), mPreviousView(0)
    25 : HbMainWindow(parent), mLauncherService(0), mPreviousView(0)
    26 {
    26 {
    27     CPSP_LOG("CpServiceMainWindow Constructing...");
    27     CPSP_LOG_FUNC_ENTRY("CpServiceMainWindow::CpServiceMainWindow")
       
    28         
    28     mLauncherService = new CpLauncherService(this);
    29     mLauncherService = new CpLauncherService(this);
    29 }
    30 }
    30 
    31 
    31 CpServiceMainWindow::~CpServiceMainWindow()
    32 CpServiceMainWindow::~CpServiceMainWindow()
    32 {
    33 {
    33     CPSP_LOG("CpServiceMainWindow Destructing...");
    34     CPSP_LOG_FUNC_ENTRY("CpServiceMainWindow::~CpServiceMainWindow")
    34 }
    35 }
    35 
    36 
    36 void CpServiceMainWindow::setSettingView(CpBaseSettingView *settingView)
    37 void CpServiceMainWindow::setSettingView(CpBaseSettingView *settingView)
    37 {
    38 {
       
    39     CPSP_LOG_FUNC_ENTRY("CpServiceMainWindow::setSettingView")
       
    40     
    38     mSettingViewPointer = settingView;
    41     mSettingViewPointer = settingView;
    39     
    42     
    40     mPreviousView = currentView();
    43     mPreviousView = currentView();
    41     
    44     
    42     connect(settingView, SIGNAL(aboutToClose()), this, SLOT(quit()));    
    45     connect(settingView, SIGNAL(aboutToClose()), this, SLOT(quit()));    
    44     setCurrentView(settingView);
    47     setCurrentView(settingView);
    45 }
    48 }
    46 
    49 
    47 void CpServiceMainWindow::quit()
    50 void CpServiceMainWindow::quit()
    48 {
    51 {
    49     CPSP_LOG("CpServiceMainWindow::quit()");
    52     CPSP_LOG_FUNC_ENTRY("CpServiceMainWindow::quit");
    50     
    53     
    51     closeSettingView();
    54     closeSettingView();
    52     
    55     
    53     connect(mLauncherService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
    56     connect(mLauncherService, SIGNAL(returnValueDelivered()), qApp, SLOT(quit()));
    54     mLauncherService->complete();
    57     mLauncherService->complete();
    63     */
    66     */
    64 }
    67 }
    65 
    68 
    66 void CpServiceMainWindow::closeSettingView()
    69 void CpServiceMainWindow::closeSettingView()
    67 {
    70 {
       
    71     CPSP_LOG_FUNC_ENTRY("CpServiceMainWindow::closeSettingView")
       
    72     
    68     if (mSettingViewPointer) {
    73     if (mSettingViewPointer) {
    69         removeView(mSettingViewPointer);
    74         removeView(mSettingViewPointer);
    70         mSettingViewPointer->deleteLater();
    75         mSettingViewPointer->deleteLater();
    71     }
    76     }
    72     
    77