26 property alias anagramText:anagram.text;
27 property alias hint:anagramHint.text;
28 property alias showHintTimeInterval:hintButton.countDownTimerValue;
29 property alias activeTimer:scoreTimer.running;
30 property alias totalScore:score.text;
40 source:
"../ui/images/chalkboard.png"
46 width: parent.width; height: parent.height/5
49 anchors.top: parent.top
54 anchors{verticalCenter: categoryBar.verticalCenter;horizontalCenter: categoryBar.horizontalCenter }
56 text: kanagramEngineHelper.categoryName();
57 font.pixelSize: parent.width/19.5
61 id:nextVocabularyButton
64 height:categoryBar.height/2
65 anchors{verticalCenter: categoryBar.verticalCenter;left:categoryName.right;leftMargin:parent.width/20}
66 source:
"../ui/icons/right-arrow.png"
67 fillMode: Image.PreserveAspectFit
72 onEntered:nextVocabularyButton.state=
"onEntered"
73 onExited:nextVocabularyButton.state=
"onExited"
75 if(blackboard.activeTimer)
77 kanagramEngineHelper.increaseScore(kanagramEngineHelper.skippedWordScore());
78 blackboard.totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
80 categoryName.text=kanagramEngineHelper.nextVocabulary();
81 anagram.text=kanagramEngineHelper.createNextAnagram();
82 anagramHint.text=kanagramEngineHelper.showHint();
83 if(kanagramEngineHelper.hintHideTime())
84 hintButton.countDownTimerValue=1;
91 target: nextVocabularyButton
99 transitions: Transition {
100 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
105 id:previousVocabularyButton
108 height:categoryBar.height/2
109 anchors{verticalCenter: categoryBar.verticalCenter;right:categoryName.left;rightMargin:parent.width/20}
110 source:
"../ui/icons/left-arrow.png"
111 fillMode: Image.PreserveAspectFit
116 onEntered:previousVocabularyButton.state=
"onEntered"
117 onExited:previousVocabularyButton.state=
"onExited"
119 if(blackboard.activeTimer)
121 kanagramEngineHelper.increaseScore(kanagramEngineHelper.skippedWordScore());
122 blackboard.totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
124 categoryName.text=kanagramEngineHelper.previousVocabulary();
125 anagram.text=kanagramEngineHelper.createNextAnagram();
126 anagramHint.text=kanagramEngineHelper.showHint();
127 if(kanagramEngineHelper.hintHideTime())
128 hintButton.countDownTimerValue=1;
135 target: previousVocabularyButton
143 transitions: Transition {
144 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear;easing.amplitude: 5.0;easing.period: 1 }
150 text:kanagramEngineHelper.createNextAnagram();
151 anchors{verticalCenter: parent.verticalCenter;horizontalCenter: parent.horizontalCenter}
153 font.pixelSize: parent.width/12.5
158 width: parent.width; height: parent.height/5
161 anchors.bottom: parent.bottom
167 height:optionsBar.height
168 anchors{verticalCenter: optionsBar.verticalCenter;left:optionsBar.left}
169 source:
"../ui/icons/timer.png"
170 fillMode: Image.PreserveAspectFit
171 property int countDownTimerValue:0;
172 property bool flagToggleTimer:
false;
177 onEntered:timerButton.state=
"onEntered"
178 onExited:timerButton.state=
"onExited"
180 if(!timerButton.flagToggleTimer)
182 timerButton.countDownTimerValue=kanagramEngineHelper.scoreTime();
183 scoreTimer.repeat=
true;
185 kanagramEngineHelper.resetTotalScore();
186 score.text=i18n(
"Score : ")+kanagramEngineHelper.totalScore(0);
187 scoreSection.opacity=0.35;
189 timerText.text=i18n(
"Stop Timer")
190 timerButton.flagToggleTimer=true;
194 timerButton.countDownTimerValue = 1;
195 timerButton.flagToggleTimer=
false;
215 transitions: Transition {
216 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
225 triggeredOnStart:
false;
228 if (--timerButton.countDownTimerValue == 0) {
230 timerSection.opacity=0;
231 timeRemaining.opacity=0;
232 scoreTimer.running=
false;
233 timerText.text=i18n(
"Start Timer");
236 scoreTimer.running=
true;
237 timerSection.opacity=0.35;
238 if(timerButton.countDownTimerValue>9)
240 timeRemaining.text=
'00:'+timerButton.countDownTimerValue;
244 timeRemaining.text=
'00:0'+timerButton.countDownTimerValue;
246 timeRemaining.opacity=1;
253 width: parent.width/6; height: parent.height/15
257 anchors{bottom:optionsBar.top;horizontalCenter: timerButton.horizontalCenter}
262 anchors{verticalCenter: timerBar.verticalCenter;horizontalCenter:timerBar.horizontalCenter}
264 text: i18n(
"Start Timer")
266 font.pixelSize: parent.width/40
272 height:optionsBar.height
273 anchors{verticalCenter: optionsBar.verticalCenter;horizontalCenter:optionsBar.horizontalCenter}
274 source:
"../ui/icons/hint.png"
275 fillMode: Image.PreserveAspectFit
276 property int countDownTimerValue:0;
281 onEntered:hintButton.state=
"onEntered"
282 onExited:hintButton.state=
"onExited"
284 hintButton.countDownTimerValue = kanagramEngineHelper.hintHideTime();
285 hintTimer.repeat=
true;
306 transitions: Transition {
307 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
313 width:blackboard.width/9;height:blackboard.height/7
314 anchors{top:blackboard.top;topMargin:blackboard.height/7;right: blackboard.left;rightMargin:blackboard.width/68.5}
321 anchors{verticalCenter: timerSection.verticalCenter;horizontalCenter:timerSection.horizontalCenter}
325 font.pixelSize: parent.width/32
330 width: parent.width/3; height: parent.height/3
333 anchors{verticalCenter: blackboard.verticalCenter;right: blackboard.left;rightMargin:blackboard.width/68.5}
338 anchors{verticalCenter: hintSection.verticalCenter;horizontalCenter:hintSection.horizontalCenter}
340 width:hintSection.width
341 wrapMode: Text.WordWrap
342 text: kanagramEngineHelper.showHint();
344 font.pixelSize: hintSection.width/10
352 triggeredOnStart:
false;
355 if (--hintButton.countDownTimerValue == 0) {
356 hintSection.opacity=0;
357 anagramHint.opacity=0;
361 hintSection.opacity=0.35;
362 anagramHint.opacity=1;
369 width: parent.width/6; height: parent.height/15
373 anchors{bottom:optionsBar.top;horizontalCenter: hintButton.horizontalCenter}
378 anchors{verticalCenter: hintBar.verticalCenter;horizontalCenter:hintBar.horizontalCenter}
382 font.pixelSize: parent.width/40
387 width:blackboard.width/5;height:blackboard.height/7
388 anchors{bottom:blackboard.bottom;bottomMargin:blackboard.height/7;right: blackboard.left;rightMargin:blackboard.width/68.5}
395 anchors{verticalCenter: scoreSection.verticalCenter;horizontalCenter:scoreSection.horizontalCenter}
397 text: i18n(
"Score : ")+kanagramEngineHelper.totalScore();
399 font.pixelSize: parent.width/40
405 height:optionsBar.height
406 anchors{verticalCenter: optionsBar.verticalCenter;right:optionsBar.right}
407 source:
"../ui/icons/reveal.png"
408 fillMode: Image.PreserveAspectFit
409 property int countDownTimerValue:0
414 onEntered:revealButton.state=
"onEntered"
415 onExited:revealButton.state=
"onExited";
417 anagram.text=kanagramEngineHelper.anagramOriginalWord();
418 if(blackboard.activeTimer)
420 kanagramEngineHelper.increaseScore(kanagramEngineHelper.revealAnswerScore());
421 blackboard.totalScore=i18n(
"Score : ")+kanagramEngineHelper.totalScore();
423 revealButton.countDownTimerValue=2;
424 showAnswerTimer.repeat=
true;
425 showAnswerTimer.start();
444 transitions: Transition {
445 PropertyAnimation { properties:
"x,y,opacity"; easing.type: Easing.Linear; easing.amplitude: 5.0; easing.period: 1 }
454 triggeredOnStart:
false;
457 if (--revealButton.countDownTimerValue == 0) {
458 blackboard.anagramText=kanagramEngineHelper.createNextAnagram();
459 blackboard.hint=kanagramEngineHelper.showHint();
460 if(kanagramEngineHelper.hintHideTime())
461 blackboard.showHintTimeInterval=1;
469 width: parent.width/6; height: parent.height/15
473 anchors{bottom:optionsBar.top;horizontalCenter: revealButton.horizontalCenter}
478 anchors{verticalCenter: revealBar.verticalCenter;horizontalCenter:revealBar.horizontalCenter}
480 text: i18n(
"Reveal Word")
482 font.pixelSize: parent.width/40