Commit graph

6 commits

Author SHA1 Message Date
Berthold Stoeger
d77f254328 statistics: add a skeleton StatsManager class
In analogy to "QMLManager", add a "StatsManager" class,
which manages the statistics module on mobile.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-10 15:16:52 -08:00
Dirk Hohndel
0851224b6c mobile/kirigami: first steps to switching to Kirigami 5.76
Our half-assed manual build of Kirigami was becoming completely unmaintainable.
So let's try to use the build method that the Kirigami team recommends. Which
unfortunately requires us to have access to the KDE extra cmake modules (ECM).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17 09:17:54 -08:00
jan Iversen
9de296f3dd mobile-widgets: add themeInterface
Currently subsurfaceTheme resides in main.qml, where it does not naturally
belong.

Add C++ class that will replace subsurfaceTheme in main.qml in a 1-1 manner.

This opens future posibilities
- on top of the 3 themes, allow users to select colors/fonts
- add stylesheets to Template* components
- make day/night shift automatically.

Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-26 16:42:35 -08:00
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
jan Iversen
360add37a8 mobile-widgets: remove qmlprefs.*
class is not longer used, remove it.
(also from qml)

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 12:20:19 -08:00
jan Iversen
7503242914 build-system: Add CMakeLists.txt to mobile-widgets
In order to make the central CMakeLists cleaner and more consistent
add a CMakeLists.txt to mobile-widgets, like in other root directories.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24 06:18:36 +09:00