subsurface/mobile-widgets
jan Iversen fdc2fd35bf mobile-widgets: add pure interface for passing values to QML
Add a header file that contains a duplicate of the enums,
that are needed in QML in one class.
the unit enums are added imidiatly, since they are needed
or will be neede shortly in Settings and DivePlannerSettings

This class will also contain Q_PROPERTY and signal/slot for
variables used in QML. This is done to allow e.g.

deco_mode qPrefUnits::planner_deco_mode()
void qPrefUnits::set_planner_deco_mode(deco_mode)
as strongly typed in C++
and
DECO_MODE planner_deco_mode()
void set_planner_deco_mode(DECO_MODE)
as strongly typed in QML
Remark: wrong assignments gives errors in QML

The advantage over using strings or the value directly is that
QML detects typos and flags them as errors/warnings.

It is important to note that the class may only contain
a) a function call to the implementation
b) a reference to a global variable e.g. prefs.

Added note to the original definitions of the enums that they
have been duplicated.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18 17:31:58 -08:00
..
qml mobile-widget/qml: add missing colors to dark theme 2020-01-18 12:44:05 -08:00
CMakeLists.txt mobile-widgets: add pure interface for passing values to QML 2020-01-18 17:31:58 -08:00
qmlinterface.cpp mobile-widgets: add pure interface for passing values to QML 2020-01-18 17:31:58 -08:00
qmlinterface.h mobile-widgets: add pure interface for passing values to QML 2020-01-18 17:31:58 -08:00
qmlmanager.cpp whitespace cleanup 2020-01-10 02:37:03 +09:00
qmlmanager.h mobile-widgets: add oldStatus variable to qmlmanager 2019-12-29 12:20:19 -08:00