Railroadd, implement basic keyboard navigations.

Authored by asagtani on Jan 20 2018, 10:41 AM.

Description

Railroadd, implement basic keyboard navigations.

Implemented basic key navigations into answer zone and sample wagon
zone. Both zones can be transversed as a single element.
Todo: Fix highlight visibilty in some cases.

Implement selection and deletion of wagons with keys.
Fix switching from answer zone to sample wagon zone.
Set proper highlight color according to background.

Details

Committed
asagtaniJan 20 2018, 10:41 AM
Parents
R2:768c4cffff15: Railroad, implement GridView in answer zone
Branches
Unknown
Tags
Unknown
Tasks
T7741: Railroad, implement keyboard navigations
Restricted Application added a subscriber: jjazeix. ยท View Herald TranscriptJan 20 2018, 10:49 AM
jjazeix added inline comments.Jan 21 2018, 10:26 AM
/src/activities/railroad/Railroad.qml
69

you should store in a variable the zone that has the focus instead of adding a boolean keyNavigation

221

tab should also switch the zone

356

4?
>0 instead of >=1, if it's to check it's not empty

379

setting the keyNavigation in handleKeys break this binding. Anyways, you can use a single alias to the current zone which should handle the keys instead of having booleans

asagtani added inline comments.Jan 22 2018, 9:06 AM
/src/activities/railroad/Railroad.qml
356

total 20 wagons in sample zone is divided in 4 rows with 5 wagons each for both portrait and landscape mode. To switch to answer zone when up arrow pressed and current highlited element is in first row i.e.( sampleList.currentIndex <= 4 ).

jjazeix added inline comments.Jan 22 2018, 9:52 AM
/src/activities/railroad/Railroad.qml
356

my point was more to avoid magic numbers and put the variable it corresponds to instead.

asagtani marked 5 inline comments as done.Jan 27 2018, 9:50 PM