equal
deleted
inserted
replaced
94 SLOT(onImageSetFailed())); |
94 SLOT(onImageSetFailed())); |
95 mWallpaper->setImage(fileName); |
95 mWallpaper->setImage(fileName); |
96 } |
96 } |
97 |
97 |
98 /*! |
98 /*! |
|
99 Changes the active page's wallpaper based on the \a portraitFileName and \a landscapeFileName. |
|
100 */ |
|
101 void HsHomeScreenClientServiceProvider::setWallpaper(const QString &portraitFileName, const QString &landscapeFileName) |
|
102 { |
|
103 #ifndef HOMESCREEN_TEST //We can't use QtHighway at unit tests due to missing service client connection |
|
104 mAsyncRequestIndex = setCurrentRequestAsync(); |
|
105 #endif |
|
106 if (!mWaitDialog) { |
|
107 mWaitDialog = new HsSpinnerDialog(); |
|
108 } |
|
109 mWaitDialog->start(); |
|
110 mShowAnimation = true; |
|
111 if (HSCONFIGURATION_GET(sceneType) == HsConfiguration::PageWallpapers) { |
|
112 mWallpaper = HsScene::instance()->activePage()->wallpaper(); |
|
113 } else { |
|
114 mWallpaper = HsScene::instance()->wallpaper(); |
|
115 } |
|
116 connect(mWallpaper, SIGNAL(imageSet()), |
|
117 SLOT(onImageSet())); |
|
118 connect(mWallpaper, SIGNAL(imageSetFailed()), |
|
119 SLOT(onImageSetFailed())); |
|
120 |
|
121 mWallpaper->setImages(portraitFileName, landscapeFileName); |
|
122 } |
|
123 |
|
124 /*! |
99 \internal |
125 \internal |
100 Called when wallpaper image has been set successfully |
126 Called when wallpaper image has been set successfully |
101 */ |
127 */ |
102 void HsHomeScreenClientServiceProvider::onImageSet() |
128 void HsHomeScreenClientServiceProvider::onImageSet() |
103 { |
129 { |
151 /*! |
177 /*! |
152 |
178 |
153 */ |
179 */ |
154 HsWidgetComponentDescriptor HsHomeScreenClientServiceProvider::widgetComponentDescriptor(const QVariantHash& widgetDescriptor) |
180 HsWidgetComponentDescriptor HsHomeScreenClientServiceProvider::widgetComponentDescriptor(const QVariantHash& widgetDescriptor) |
155 { |
181 { |
156 HsWidgetComponentDescriptor widget; |
182 HsWidgetComponentDescriptor widget; |
157 widget.setInstallationPath(widgetDescriptor["installationPath"].toString()); |
183 widget.setInstallationPath(widgetDescriptor["installationPath"].toString()); |
158 widget.setUri(widgetDescriptor["uri"].toString()); |
184 widget.setUri(widgetDescriptor["uri"].toString()); |
159 widget.setTitle(widgetDescriptor["title"].toString()); |
185 widget.setTitle(widgetDescriptor["title"].toString()); |
160 widget.setDescription(widgetDescriptor["description"].toString()); |
186 widget.setDescription(widgetDescriptor["description"].toString()); |
161 widget.setIconUri(widgetDescriptor["iconUri"].toString()); |
187 widget.setIconUri(widgetDescriptor["iconUri"].toString()); |