Closed Updownquark closed 7 years ago
A bonus would be to have a variable layout type that would lay out components differently depending on the orientation of the window (e.g. a horizontal layout with width > height would lay out one way, vertical layout with height > width would lay out differently).
For the format piece:
[x] Make AdjustableFormatter, an interface which provides a formatter and increment and decrement actions for a document
[x] Make AdjustableFormatSpinner (name?) which composes spinner, takes an adjustable formatter and populates its spinner with the format's data
[ ] Make ComposedFormatter, an AdjustableFormatter implementation that composes its data object into pieces which are then formatted and potentially adjustable independently
[ ] Make ComposedFormatterModel, a model implementation that creates a ComposedFormatter using model configuration from QML
[ ] Make canned or simple factory ComposedFormatters for instant, duration, integers, floating point numbers, maybe others
[x] Also need to make the regular Spinner respond to the up and down keys and maybe the scroll wheel?
[x] Make an option for button to repeat its actions (after a delay) when the user holds it down. Make spinner use this option.
Went a bit of a different direction with hooking in adjustable formatters to spinner. The way it works now is much better. The rest of the stuff up there is done too.
I think all that's left now is to make the timer flash and beep when it finishes:
The app is done. I've added enough features to it and the original design was complex enough that it's not actually kid-friendly, but it should be good for a simple demo.
I haven't done much with ComposedFormatterModel, not sure how useful that class will end up being, but I'll address that some other time with a different issue or without one.
This is a mega-issue, an issue with multiple small issues in it. I want to write the first semi-useful app in Quick. It's a timer that's kid-friendly. It would consist of a spinner at the top that is formatted with a duration in a flexible format (e.g. 5m, 5 min, 5:00, 00:05:00, etc.) and a Start button. When the start button is clicked, it, the spinner, and a Reset buton are disabled and a Stop button is enabled.
Also a text timer starts counting down and several colored boxes begin changing. One box might be for hours, another for 15 minutes, another for minutes, another for seconds. The boxes would change red to green as time flows. So during any time greater than 1 hour, all boxes but the hour box would be solid red. The red box would phase from red to green in proportion to the time that has passed up to the 1 hour mark. After that, the hour box would stay solid green and the 15 minute box would phase from red to green up to the 15 minute mark, and so on. This would allow children to have a good grasp of the amount of time that has passed and the amount of time that is left on the timer without needing to be able to tell time or understand hours, minutes, seconds, etc. Some widget on the app should also flash and/or play a sound when the timer finishes.
This would require some new features not specified in other issues: