src/hbcore/core/hbapplication.cpp
changeset 28 b7da29130b0e
parent 23 e6ad4ef83b23
child 30 80e4d18b72f5
equal deleted inserted replaced
23:e6ad4ef83b23 28:b7da29130b0e
    26 #include "hbapplication.h"
    26 #include "hbapplication.h"
    27 #include "hbapplication_p.h"
    27 #include "hbapplication_p.h"
    28 #include "hbsplashscreen.h"
    28 #include "hbsplashscreen.h"
    29 #include "hbsplashscreen_generic_p.h"
    29 #include "hbsplashscreen_generic_p.h"
    30 #include "hbactivitymanager.h"
    30 #include "hbactivitymanager.h"
       
    31 #include "hbinputcontextproxy_p.h"
    31 
    32 
    32 #if defined(Q_OS_SYMBIAN)
    33 #if defined(Q_OS_SYMBIAN)
    33 #include <qwindowsstyle.h>
    34 #include <qwindowsstyle.h>
    34 #include <qsymbianevent.h>
    35 #include <qsymbianevent.h>
    35 #include <e32debug.h>
    36 #include <e32debug.h>
   203     QGestureRecognizer::registerRecognizer(new HbTapGestureRecognizer);
   204     QGestureRecognizer::registerRecognizer(new HbTapGestureRecognizer);
   204     QGestureRecognizer::registerRecognizer(new HbTapAndHoldGestureRecognizer);
   205     QGestureRecognizer::registerRecognizer(new HbTapAndHoldGestureRecognizer);
   205     QGestureRecognizer::registerRecognizer(new HbPanGestureRecognizer);
   206     QGestureRecognizer::registerRecognizer(new HbPanGestureRecognizer);
   206     QGestureRecognizer::registerRecognizer(new HbSwipeGestureRecognizer);
   207     QGestureRecognizer::registerRecognizer(new HbSwipeGestureRecognizer);
   207 #endif
   208 #endif
       
   209 
       
   210     // Installs empty input context proxy. It sits there
       
   211     // and monitors if someone wants to focus an editor
       
   212     // before the main window delayed construction is over.
       
   213     // If such a condition is detected, it sets a flag so
       
   214     // that HbInputMethod::initializeFramework knows
       
   215     // to resend the requestSoftwareInputPanel event once
       
   216     // the actual construction is over.
       
   217     qApp->setInputContext(new HbInputContextProxy(0));
   208 }
   218 }
   209 
   219 
   210 /*!
   220 /*!
   211     Constructs the application with \a argc and \a argv.
   221     Constructs the application with \a argc and \a argv.
   212 */
   222 */
   329             break;
   339             break;
   330         case 1:
   340         case 1:
   331             HbApplication::setLayoutDirection(Qt::RightToLeft);
   341             HbApplication::setLayoutDirection(Qt::RightToLeft);
   332             break;
   342             break;
   333         default:
   343         default:
   334             qWarning("HbApplication::s60EventFilter: Unknown layout direction received");
   344             hbWarning("HbApplication::s60EventFilter: Unknown layout direction received");
   335             break;
   345             break;
   336         }
   346         }
   337     }
   347     }
   338     return false;
   348     return false;
   339     case KChangeDeviceProfile: {
   349     case KChangeDeviceProfile: {
   340         TUint8 *dataptr = aEvent->EventData();
   350         TUint8 *dataptr = aEvent->EventData();
   341         QStringList names = HbDeviceProfile::profileNames();
   351         QStringList names = HbDeviceProfile::profileNames();
   342         if (*dataptr > names.count() - 1) {
   352         if (*dataptr > names.count() - 1) {
   343             qWarning("HbApplication::s60EventFilter: Unknown device profile received");
   353             hbWarning("HbApplication::s60EventFilter: Unknown device profile received");
   344         } else {
   354         } else {
   345             HbDeviceProfile profile(names.value(*dataptr));
   355             HbDeviceProfile profile(names.value(*dataptr));
   346             HbDeviceProfileManager::select(profile);
   356             HbDeviceProfileManager::select(profile);
   347             QList<HbMainWindow *> windows = hbInstance->allMainWindows();
   357             QList<HbMainWindow *> windows = hbInstance->allMainWindows();
   348             HbMainWindow *w = windows.at(0);
   358             HbMainWindow *w = windows.at(0);