26 width: 1366 ; height: 768
35 source:
"../ui/images/background.jpg"
37 fillMode: Image.PreserveAspectCrop
43 width: parent.width; height: parent.height/6
46 anchors.top: screen.top
51 width:toolBarTop.width/3.5
52 height:toolBarTop.height/1.5
53 anchors{verticalCenter: toolBarTop.verticalCenter;horizontalCenter: toolBarTop.horizontalCenter }
54 source:
"../ui/images/header.png"
56 fillMode: Image.PreserveAspectCrop
62 height:toolBarTop.height/3
63 anchors{verticalCenter: toolBarTop.verticalCenter;right:toolBarTop.right;rightMargin: toolBarTop.width/24}
64 source:
"../ui/icons/on-off-light.svgz"
65 fillMode: Image.PreserveAspectFit
70 onEntered:powerButton.state=
"onEntered"
71 onExited:powerButton.state=
"onExited"
86 transitions: Transition {
88 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
94 anchors{top:powerButton.bottom;horizontalCenter:powerButton.horizontalCenter}
98 font.pixelSize: parent.width/91
102 id: nextAnagramButton
103 width:blackboard.width/9;height:blackboard.height/7
104 anchors{top:blackboard.top;topMargin:blackboard.height/7;left:blackboard.right}
112 onEntered:nextAnagramButton.state=
"onEntered"
113 onExited:nextAnagramButton.state=
"onExited";
115 if(blackboard.activeTimer)
117 kanagramEngineHelper.increaseScore(kanagramEngineHelper.skippedWordScore());
118 blackboard.totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
120 blackboard.anagramText=kanagramEngineHelper.createNextAnagram();
121 blackboard.hint=kanagramEngineHelper.showHint();
122 if(kanagramEngineHelper.hintHideTime())
123 blackboard.showHintTimeInterval=1;
130 target: nextAnagramButton
131 width:blackboard.width/2.5
134 target: nextAnagramText
137 AnchorChanges{target:nextAnagramIcon;
138 anchors.horizontalCenter: undefined;
139 anchors.right:nextAnagramButton.right
141 PropertyChanges{target:nextAnagramIcon
142 anchors.rightMargin:blackboard.width/50
149 transitions: Transition {
150 AnchorAnimation { duration: 250 }
151 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
157 anchors{verticalCenter: nextAnagramButton.verticalCenter;horizontalCenter:nextAnagramButton.horizontalCenter}
159 text: i18n(
"Next Anagram")
161 font.pixelSize: parent.width/68.5
167 height:nextAnagramButton.height/2; width:nextAnagramText.width/4
168 anchors{verticalCenter: nextAnagramButton.verticalCenter;horizontalCenter: nextAnagramButton.horizontalCenter}
169 source:
"../ui/icons/arrow-light.svgz"
170 fillMode: Image.PreserveAspectFit
175 width:blackboard.width/9;height:blackboard.height/7
176 anchors{verticalCenter:blackboard.verticalCenter;left:blackboard.right}
184 onEntered:configureButton.state=
"onEntered"
185 onExited:configureButton.state=
"onExited";
186 onClicked:{kanagramEngineHelper.slotShowSettings();}
192 target: configureButton
193 width:blackboard.width/2.5
196 target: configureText
199 AnchorChanges{target:configureIcon;
200 anchors.horizontalCenter: undefined;
201 anchors.right:configureButton.right}
202 PropertyChanges{target:configureIcon
203 anchors.rightMargin:blackboard.width/50
210 transitions: Transition {
211 AnchorAnimation { duration: 250 }
212 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
218 anchors{verticalCenter: configureButton.verticalCenter;horizontalCenter:configureButton.horizontalCenter}
220 text:i18n(
"Configure")
222 font.pixelSize: parent.width/68.5
228 height:configureButton.height/2;width:configureText.width/3
229 anchors{verticalCenter: configureButton.verticalCenter;horizontalCenter: configureButton.horizontalCenter}
230 source:
"../ui/icons/spanner-light.svgz"
231 fillMode: Image.PreserveAspectFit
236 width:blackboard.width/9;height:blackboard.height/7
237 anchors{bottom:blackboard.bottom;bottomMargin: blackboard.height/7;left:blackboard.right}
242 property bool flag:
true
244 function toggleMoreOptions()
248 moreOptionsButton.opacity=0.5;
249 moreOptionsButton.width=blackboard.width/2.5;
250 kanagramHandbookIcon.visible=
true;
251 aboutKdeIcon.visible=
true;
252 aboutKanagramIcon.visible=
true;
257 moreOptionsButton.opacity=0;
258 moreOptionsTextBar.opacity=0;
259 moreOptionsText.opacity=0;
260 kanagramHandbookIcon.visible=
false;
261 aboutKdeIcon.visible=
false;
262 aboutKanagramIcon.visible=
false;
270 onEntered:helpButton.state=
"onEntered"
271 onExited:helpButton.state=
"onExited";
272 onClicked:helpButton.toggleMoreOptions();
279 width:blackboard.width/2.5
286 AnchorChanges{target:helpIcon;
287 anchors.horizontalCenter: undefined;
288 anchors.right:helpButton.right}
289 PropertyChanges{target:helpIcon
290 anchors.rightMargin:blackboard.width/50
297 transitions: Transition {
298 AnchorAnimation { duration: 250 }
299 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
304 id: moreOptionsButton
305 width:blackboard.width/9;height:blackboard.height/7
306 anchors{top:helpButton.bottom;topMargin: blackboard.height/50;left:blackboard.right}
313 id: moreOptionsTextBar
314 width:blackboard.width/4;height:blackboard.height/16
315 anchors{top:moreOptionsButton.bottom;horizontalCenter:moreOptionsButton.horizontalCenter}
323 anchors{verticalCenter: moreOptionsTextBar.verticalCenter;horizontalCenter:moreOptionsTextBar.horizontalCenter}
327 font.pixelSize: parent.width/91
332 anchors{verticalCenter: helpButton.verticalCenter;horizontalCenter:helpButton.horizontalCenter}
336 font.pixelSize: parent.width/68.5
342 height:blackboard.height/14
343 anchors{verticalCenter: helpButton.verticalCenter;horizontalCenter:helpButton.horizontalCenter}
344 source:
"../ui/icons/question-light.svgz"
346 fillMode: Image.PreserveAspectFit
352 height:blackboard.height/14;
353 anchors{verticalCenter: moreOptionsButton.verticalCenter;right:moreOptionsButton.right;rightMargin:moreOptionsButton.width/8}
354 source:
"../ui/icons/about-kde.png"
356 fillMode: Image.PreserveAspectFit
361 onEntered:aboutKdeIcon.state=
"onEntered"
362 onExited:aboutKdeIcon.state=
"onExited"
363 onClicked:kanagramEngineHelper.aboutKDE();
370 target: moreOptionsTextBar
374 target: moreOptionsText
375 text:i18n(
"About KDE")
383 transitions: Transition {
384 AnchorAnimation { duration: 250 }
385 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
390 id: aboutKanagramIcon
391 height:blackboard.height/14
392 anchors{verticalCenter: moreOptionsButton.verticalCenter;horizontalCenter:moreOptionsButton.horizontalCenter}
393 source:
"../ui/icons/about-kanagram.png"
396 fillMode: Image.PreserveAspectFit
401 onEntered:aboutKanagramIcon.state=
"onEntered"
402 onExited:aboutKanagramIcon.state=
"onExited"
403 onClicked:kanagramEngineHelper.aboutKanagram();
410 target: moreOptionsTextBar
414 target: moreOptionsText
415 text:i18n(
"About Kanagram")
423 transitions: Transition {
424 AnchorAnimation { duration: 250 }
425 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
430 id: kanagramHandbookIcon
432 height:blackboard.height/14
433 anchors{verticalCenter: moreOptionsButton.verticalCenter;left:moreOptionsButton.left;leftMargin:moreOptionsButton.width/8}
434 source:
"../ui/icons/kanagram-handbook.png"
436 fillMode: Image.PreserveAspectFit
441 onEntered:kanagramHandbookIcon.state=
"onEntered"
442 onExited:kanagramHandbookIcon.state=
"onExited"
443 onClicked:kanagramEngineHelper.kanagramHandbook();
450 target:moreOptionsTextBar
454 target: moreOptionsText
455 text:i18n(
"Kanagram Handbook")
463 transitions: Transition {
464 AnchorAnimation { duration: 250 }
465 PropertyAnimation { properties:
"x,y,width,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
471 border{width:parent.width/68.5;color:
"#613529"}
472 width:parent.width/2; height: parent.height/1.5
473 anchors {horizontalCenter:parent.horizontalCenter; top:toolBarTop.bottom}
478 width:blackboard.width;height:parent.height/10
479 anchors{horizontalCenter: blackboard.horizontalCenter;bottom:parent.bottom;bottomMargin:parent.height/35}
489 color:
"white"; selectionColor:
"white";selectedTextColor:
"black"
490 font.pixelSize: parent.width/40; font.bold:
true
491 width: inputField.width
492 anchors.centerIn: inputField
494 property int countDownTimerValue:0
495 property bool flagCorrectAnswer:
true;
497 if(kanagramEngineHelper.checkWord(text))
500 input.countDownTimerValue=1;
501 input.flagCorrectAnswer=
true;
502 if(blackboard.activeTimer)
504 kanagramEngineHelper.increaseScore(kanagramEngineHelper.correctAnswerScore());
505 blackboard.
totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
507 showAnswerTimer.repeat=
true;
508 showAnswerTimer.start();
513 input.countDownTimerValue=1;
514 input.flagCorrectAnswer=
false;
515 if(blackboard.activeTimer)
517 kanagramEngineHelper.increaseScore(kanagramEngineHelper.incorrectAnswerScore());
518 blackboard.totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
520 showAnswerTimer.repeat=
true;
521 showAnswerTimer.start();
531 triggeredOnStart:
false;
534 if (--input.countDownTimerValue == 0) {
536 if(input.flagCorrectAnswer){
537 blackboard.anagramText=kanagramEngineHelper.createNextAnagram();
538 blackboard.hint=kanagramEngineHelper.showHint();
539 if(kanagramEngineHelper.hintHideTime())
540 blackboard.showHintTimeInterval=1;