phoneapp/phoneui2/src/phoneuihousehold_p.cpp
changeset 30 ebdbd102c78a
parent 27 2f8f8080a020
child 51 f39ed5e045e0
equal deleted inserted replaced
27:2f8f8080a020 30:ebdbd102c78a
    36 #include "phoneuiqtview.h"
    36 #include "phoneuiqtview.h"
    37 #include "phoneuikeyeventadapter.h"
    37 #include "phoneuikeyeventadapter.h"
    38 #include "phoneuicommandadapter.h"
    38 #include "phoneuicommandadapter.h"
    39 #include "phonenotecontroller.h"
    39 #include "phonenotecontroller.h"
    40 #include "qtphonelog.h"
    40 #include "qtphonelog.h"
       
    41 #include "cphoneclearblacklist.h"
       
    42 #include "hbinstance.h"
    41 
    43 
    42 PhoneUiHouseHoldPrivate::PhoneUiHouseHoldPrivate(HbMainWindow &window) :
    44 PhoneUiHouseHoldPrivate::PhoneUiHouseHoldPrivate(HbMainWindow &window) :
    43     iAppsReady (0), iStartupSignalRecoveryId (0), iLightIdleReached (EFalse),
    45     iAppsReady (0), iStartupSignalRecoveryId (0), iLightIdleReached (EFalse),
    44     iOnScreenDialer (EFalse), iQwertyHandler (0), iPhoneUIController (0),
    46     iOnScreenDialer (EFalse), iQwertyHandler (0), iPhoneUIController (0),
    45     m_window (window)
    47     m_window (window)
   207         m_translators.append(translator3);
   209         m_translators.append(translator3);
   208     } else {
   210     } else {
   209         delete translator3;
   211         delete translator3;
   210         translator3 = 0;
   212         translator3 = 0;
   211     }
   213     }
   212 	
   214 
   213     CEikonEnv* env = CEikonEnv::Static();
       
   214     if ( env ) {
       
   215         env->SetSystem(ETrue);
       
   216     }
       
   217     
       
   218 	
       
   219     PhoneUIQtView *view = new PhoneUIQtView(m_window);
   215     PhoneUIQtView *view = new PhoneUIQtView(m_window);
   220     iViewAdapter = new PhoneUIQtViewAdapter(*view);
   216     iViewAdapter = new PhoneUIQtViewAdapter(*view);
   221     iPhoneUIController = CPhoneUIController::NewL(iViewAdapter);
   217     iPhoneUIController = CPhoneUIController::NewL(iViewAdapter);
   222     
   218     
   223     m_window.addView (view);
   219     m_window.addView (view);
   230     QObject::connect(view, SIGNAL(keyReleased(QKeyEvent *)), iViewAdapter, SLOT(keyReleased (QKeyEvent *)));
   226     QObject::connect(view, SIGNAL(keyReleased(QKeyEvent *)), iViewAdapter, SLOT(keyReleased (QKeyEvent *)));
   231     QObject::connect(view, SIGNAL(keyPressed (QKeyEvent *)), iKeyEventAdapter, SLOT(keyPressed (QKeyEvent *)));
   227     QObject::connect(view, SIGNAL(keyPressed (QKeyEvent *)), iKeyEventAdapter, SLOT(keyPressed (QKeyEvent *)));
   232     QObject::connect(view, SIGNAL(keyReleased (QKeyEvent *)), iKeyEventAdapter, SLOT(keyReleased (QKeyEvent *)));
   228     QObject::connect(view, SIGNAL(keyReleased (QKeyEvent *)), iKeyEventAdapter, SLOT(keyReleased (QKeyEvent *)));
   233     QObject::connect(view, SIGNAL(command (int)), iCommandAdapter, SLOT(handleCommand (int)),
   229     QObject::connect(view, SIGNAL(command (int)), iCommandAdapter, SLOT(handleCommand (int)),
   234                      Qt::QueuedConnection); // async to enable deletion of widget during signal handling
   230                      Qt::QueuedConnection); // async to enable deletion of widget during signal handling
       
   231     QObject::connect(view, SIGNAL(windowActivated()), iViewAdapter, SLOT(handleWindowActivated()));
       
   232     QObject::connect(view, SIGNAL(windowDeactivated()), iViewAdapter, SLOT(handleWindowDeactivated()));
   235     
   233     
   236     QObject::connect(iViewAdapter->noteController(), SIGNAL(command (int)), 
   234     QObject::connect(iViewAdapter->noteController(), SIGNAL(command (int)), 
   237                      iCommandAdapter, SLOT(handleCommand (int))); 
   235                      iCommandAdapter, SLOT(handleCommand (int))); 
   238     
   236     
   239     // Disable default Send key functionality in application framework 
   237     // Disable default Send key functionality in application framework 
   362     
   360     
   363     if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )     
   361     if ( FeatureManager::FeatureSupported( KFeatureIdOnScreenDialer ) )     
   364         {
   362         {
   365         iOnScreenDialer = ETrue;
   363         iOnScreenDialer = ETrue;
   366         }
   364         }
   367 }
   365 
   368 
   366      HbMainWindow *main = hbInstance->allMainWindows().at(0);
       
   367     RWindow *win = static_cast<RWindow *>(main->effectiveWinId()->DrawableWindow());
       
   368 
       
   369     CEikonEnv* env = CEikonEnv::Static();
       
   370     if ( env ) {
       
   371         env->SetSystem(ETrue);
       
   372         // Blacklist singleton is initialized here
       
   373         CPhoneClearBlacklist::CreateL( env->WsSession(), *win);
       
   374     }
       
   375 }
       
   376