40 #include "hscontentservice.h" |
40 #include "hscontentservice.h" |
41 #include "hsshortcutservice.h" |
41 #include "hsshortcutservice.h" |
42 #include "hsmenueventtransition.h" |
42 #include "hsmenueventtransition.h" |
43 #include "hswidgetpositioningonorientationchange.h" |
43 #include "hswidgetpositioningonorientationchange.h" |
44 #include "hswidgetpositioningonwidgetadd.h" |
44 #include "hswidgetpositioningonwidgetadd.h" |
|
45 #include "hsconfiguration.h" |
45 #include "hstest_global.h" |
46 #include "hstest_global.h" |
46 #include "hsconfiguration.h" |
|
47 |
47 |
48 QTM_USE_NAMESPACE |
48 QTM_USE_NAMESPACE |
49 #define hbApp qobject_cast<HbApplication*>(qApp) |
49 #define hbApp qobject_cast<HbApplication*>(qApp) |
50 |
50 |
51 #ifdef Q_OS_SYMBIAN |
51 #ifdef Q_OS_SYMBIAN |
99 db->setDatabaseName("private/20022f35/homescreen.db"); |
99 db->setDatabaseName("private/20022f35/homescreen.db"); |
100 #endif |
100 #endif |
101 db->open(); |
101 db->open(); |
102 HsDatabase::setInstance(db); |
102 HsDatabase::setInstance(db); |
103 |
103 |
104 HsConfiguration::loadConfiguration(); |
104 HsConfiguration::setInstance(new HsConfiguration); |
105 |
105 HsConfiguration::instance()->load(); |
|
106 |
106 HsWidgetPositioningOnOrientationChange::setInstance( |
107 HsWidgetPositioningOnOrientationChange::setInstance( |
107 new HsAdvancedWidgetPositioningOnOrientationChange); |
108 new HsAdvancedWidgetPositioningOnOrientationChange); |
108 |
109 |
109 HsWidgetPositioningOnWidgetAdd::setInstance( |
110 HsWidgetPositioningOnWidgetAdd::setInstance( |
110 new HsAnchorPointInBottomRight); |
111 new HsAnchorPointInBottomRight); |
|
112 |
|
113 registerAnimations(); |
111 |
114 |
112 createStatePublisher(); |
115 createStatePublisher(); |
113 createContentServiceParts(); |
116 createContentServiceParts(); |
114 createStates(); |
117 createStates(); |
115 assignServices(); |
118 assignServices(); |
116 |
119 |
117 QCoreApplication::instance()->installEventFilter(this); |
120 // create the instance so that singleton is accessible from elsewhere |
|
121 HsShortcutService::instance(this); |
|
122 |
|
123 QCoreApplication::instance()->installEventFilter(this); |
118 |
124 |
119 if (hbApp) { // Qt test framework uses QApplication. |
125 if (hbApp) { // Qt test framework uses QApplication. |
120 connect(hbApp->activityManager(), SIGNAL(activityRequested(QString)), |
126 connect(hbApp->activityManager(), SIGNAL(activityRequested(QString)), |
121 this, SLOT(activityRequested(QString))); |
127 this, SLOT(activityRequested(QString))); |
122 } |
128 } |
173 result = (ke->key() == applicationKey) || ke->key() == Qt::Key_Launch0; |
179 result = (ke->key() == applicationKey) || ke->key() == Qt::Key_Launch0; |
174 } |
180 } |
175 return result; |
181 return result; |
176 } |
182 } |
177 |
183 |
|
184 |
|
185 /*! |
|
186 Registers framework animations. |
|
187 */ |
|
188 void HsDefaultRuntime::registerAnimations() |
|
189 { |
|
190 HbIconAnimationManager *manager = HbIconAnimationManager::global(); |
|
191 manager->addDefinitionFile(QLatin1String("qtg_anim_loading.axml")); |
|
192 } |
|
193 |
178 /*! |
194 /*! |
179 Creates Home screen state publisher. |
195 Creates Home screen state publisher. |
180 */ |
196 */ |
181 void HsDefaultRuntime::createStatePublisher() |
197 void HsDefaultRuntime::createStatePublisher() |
182 { |
198 { |