23 import
"qrc:/gcompris/src/core/core.js" as Core
95 signal nextLevelClicked
102 signal previousLevelClicked
134 property variant buttonList: [
137 'contentId': content.exit,
142 'contentId': content.about,
147 'contentId': content.help,
152 'contentId': content.home,
157 'contentId': content.level,
162 'contentId': content.level,
167 'contentId': content.level,
172 'contentId': content.repeat,
177 'contentId': content.reload,
182 'contentId': content.config,
186 'bid': downloadImage,
187 'contentId': content.download,
193 property var buttonModel
196 anchors.bottom: parent.bottom
198 height: openBar.height
201 function show(newContent) {
202 content.
value = newContent
208 onDownloadStarted: content.value |= content.download
209 onDownloadFinished: content.value &= ~content.download
210 onError: content.value &= ~content.download
215 source:
"qrc:/gcompris/src/core/resource/bar_open.svg";
216 anchors.bottom: parent.bottom
217 anchors.left: parent.left
218 sourceSize.width: 66 * barZoom
228 function updateContent() {
229 var newButtonModel =
new Array()
230 for(var def in buttonList) {
231 if((content.value & buttonList[def].contentId) &&
232 buttonList[def].allowed) {
233 newButtonModel.push(buttonList[def])
236 buttonModel = newButtonModel
241 onValueChanged: updateContent()
251 anchors.bottom: parent.bottom
252 anchors.bottomMargin: 10
253 anchors.left: openBar.right
258 sourceComponent: modelData.bid
270 anchors.top: undefined
271 anchors.bottom: parent.bottom
279 anchors.bottom: undefined
280 anchors.top: parent.bottom
285 transitions: Transition {
286 AnchorAnimation { duration: 800; easing.type: Easing.OutBounce }
288 populate: Transition {
290 properties:
"x,y"; from: 200;
291 duration: 1500; easing.type: Easing.OutBounce
296 properties:
"x,y"; from: 200;
297 duration: 1500; easing.type: Easing.OutBounce
303 duration: 1500; easing.type: Easing.OutBounce
313 source:
"qrc:/gcompris/src/core/resource/bar_exit.svg";
314 sourceSize.width: 66 * barZoom
315 onClicked: Core.quit(bar.parent.parent);
321 source:
"qrc:/gcompris/src/core/resource/bar_about.svg";
322 sourceSize.width: 66 * barZoom
323 onClicked: bar.aboutClicked()
329 source:
"qrc:/gcompris/src/core/resource/bar_help.svg";
330 sourceSize.width: 66 * barZoom
331 onClicked: bar.helpClicked()
337 source:
"qrc:/gcompris/src/core/resource/bar_previous.svg";
338 sourceSize.width: 30 * barZoom
339 onClicked: bar.previousLevelClicked()
348 font.weight: Font.DemiBold
352 visible: content.level & content.value
358 source:
"qrc:/gcompris/src/core/resource/bar_next.svg";
359 sourceSize.width: 30 * barZoom
360 onClicked: bar.nextLevelClicked()
366 source:
"qrc:/gcompris/src/core/resource/bar_repeat.svg";
367 sourceSize.width: 66 * barZoom
368 onClicked: bar.repeatClicked()
374 source:
"qrc:/gcompris/src/core/resource/bar_reload.svg";
375 sourceSize.width: 66 * barZoom
376 onClicked: bar.reloadClicked()
382 source:
"qrc:/gcompris/src/core/resource/bar_config.svg";
383 sourceSize.width: 66 * barZoom
384 onClicked: bar.configClicked()
390 source:
"qrc:/gcompris/src/core/resource/bar_home.svg";
391 sourceSize.width: 66 * barZoom
392 onClicked: bar.homeClicked()
398 source:
"qrc:/gcompris/src/core/resource/loader.gif"
404 var downloadDialog = Core.showDownloadDialog(bar.parent, {});
QML container for defining all visible child elements of a Bar.
A QML component unifying text presentation in GCompris.
A singleton class responsible for downloading, updating and maintaining remote resources.
bool isKioskMode
Whether kiosk mode is currently active.
Singleton that contains GCompris' persistent settings.
int value
Bitmask defininig all visible elements of a bar.
A general purpose singleton that exposes miscellaneous native functions to the QML layer...
qreal ratio
Ratio factor used for scaling of sizes on high-dpi devices.