qt: add a class interface for custom JavaScript extensions
Advantage:
- Ability to expose single static methods to the JS engine.
- No need to create instances of classes which only have static methods.
- Less cluttering in mainui.cpp.
Disadvantage:
- No import used, limited QML tooling support.
I can also migrate some of the math functions from Helpers.js
to here under MathExt
.