aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2020-01-26mobile-widgets: add themeInterfaceGravatar jan Iversen
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-25mobile-widgets/qml: correct backgroundcolor in setupGravatar jan Iversen
Use subsurfaceTheme in DivePlannerSetup. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-25mobile-widgets: update design of TemplateSectionGravatar jan Iversen
Update size and colors. Changing the TemplateSection, automatically changes all sections in the system, converted to the new layout. The styling would be better in a style/theme class, but subsurfaceTheme is in main.qml and not in a C++ class, so for now use primitive styling. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-25mobile-widgets: update design of TemplateSpinBoxGravatar jan Iversen
The standard SpinBox uses far too much real estate. The new SpinBox have a smaller footprint, and more visual effect. Changing the TemplateSpinBox, automatically changes all spinboxes in the system, converted to the new layout. The styling would be better in a style/theme class, but subsurfaceTheme is in main.qml and not in a C++ class, so for now use primitive styling. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-25mobile-widgets/qml: connect QML to Backend.Gravatar jan Iversen
Add property pressureUnit to use as BAR/PSI text. Added slot to catch when user changes BAR <-> PSI. Add Backend variables to Planning section. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25diveplanner: add surface_segment to plannersharedGravatar jan Iversen
Add surface_segment to plannerShared and then update desktop-widgets. Signed-off-by: jan Iversen <jan@casacondor.com> desktop-widgets: use plannerShared for surface_segment Change getter/setter for surface_segment to plannerShared, in order to share the conversion with mobile diveplanner Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25mobile-widgets: make planning vars available to QML.Gravatar jan Iversen
Update qmlinterface.h with the planning variables (calling plannerShared). Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25mobile-widgets: make DECO_MODE and DIVE_MODE available to QMLGravatar jan Iversen
Duplicate deco_mode to DECO_MODE, in order to make it available to QML. Duplicate enum divemode_t to DIVE_MODE in order to make it available to QML. Only part of the enum is made available. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25mobile-widgets/qml: correct reference in TemplateComboBoxGravatar jan Iversen
theme is not available, use older subsurfaceTheme. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25mobile-widgets/qml: graphic layout Planner (Planning)Gravatar jan Iversen
Add all needed graphical elements for DivePlannerSetup planning section. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25diveplanner: add last gas variables to QMLInterfaceGravatar jan Iversen
Add bottompo2, decopo2 and bestmixend to QMLInterface Bestmixend in gas options changing with meter/feet Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25diveplanner: adjust sac-factor calculation.Gravatar jan Iversen
The real values are 1.0 to 10.0, but QML needs int so mobile gets values 10.0 to 100.0 add sacfactor() to QMLInterface and update QML. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25dive planner: correct bottomsac/decosac calc.Gravatar jan Iversen
Move conversion cuft <-> liter from desktop-widget/diveplanner.cpp to plannerShared, to facilitate the same results in mobile diveplanner Use Backend for bottomsac/decosac and update to check for switch LITER <-> CUFT Add bottomsac/decosac to QMLinterface. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-25diveplanner: call planner model directly for simple variables.Gravatar jan Iversen
Variables without conversion, do not need to pass plannerShared (due to the QML interface). Simple variables do not pass plannerShared, but diveplanner in desktop-widgets and qmlinterface in mobile-widgets call the implementation directly. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-24mobile-widgets/qml: add slot for volume changeGravatar jan Iversen
Catch when volume type is changed and update bottomsac/decosac. Also update text l/min <-> cuft/min and add a space between value and unit. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24mobile-widgets/qml: Add drop_stone to ratesGravatar jan Iversen
Drop_stone_mode, when set, affect the descent rate, so place it alongside the descent rate. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24mobile-widgets: add simple part of remaining planner variablesGravatar jan Iversen
Add simple variables, where getter uses prefs. and setters call directly to set function (without using plannerShared). rename last_stop --> last_stop6m Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24mobile: move dive planner notes access to pure interfaceGravatar jan Iversen
Make notes rates available to QML through the Backend interface. Remove the corresponding variables from plannerShared. Getters are from prefs. while setters are linked to diveplan model. Remark: signals from qPrefDivePlanner is used, because the diveplanner model sets qPrefDivePlanner but do not issue special signals. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24mobile-widgets/qml: use Kirigami Units instead of hardcoded valuesGravatar jan Iversen
This allows for better scaling of the UI. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-24mobile-widgets/qml: add radiobuttons for single units.Gravatar jan Iversen
For METRIC and IMPERIAL, show the radiobuttons disabled For PERSONALIZED, allow user to select individual units. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-24mobile-widgets: use radiobuttons for UnitsGravatar jan Iversen
Change to radiobuttons for units, and add a third choice (personalize). Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-20mobile-widgets/qml: use Backend instead of PlannerGravatar jan Iversen
Use Backend instead of Planner for ascent/descent variables. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20mobile-widgets: add asc/desc rates to pure interfaceGravatar jan Iversen
Make ascent/descent rates available to QML through the Backend interface. Remark signals from qPrefDivePlanner is used because the diveplanner model sets qPrefDivePlanner but does not issue its own signals. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20mobile UI: add ability to unset the default cylinderGravatar Dirk Hohndel
This was requested in a 'bug report' by a user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20core/settings:: remove string functions for unitsGravatar jan Iversen
Remove string version of unit_system, duration_units, length, pressure, temperature, vertical_speed_time, and volume, including tests and make signals strongly typed in C++ Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20mobile-widgets/qml: use strongly typed units in QMLGravatar jan Iversen
Change Settings and DivePlannerSetup to use the strongly typed enums Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-20mobile-widgets: allow qPrefUnit strongly typed in QMLGravatar jan Iversen
Add qPrefUnit Q_PROPERTY but using QMLInterface enums, that way all variables become strongly typed in QML. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets: move rest of gridlayout to section advancedGravatar jan Iversen
Create section advanced around the remaining gridlayouts, and adjust. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: create units section and move unit_settingsGravatar jan Iversen
Move gridlayout unit_settings to TemplateSection units, without changing anything (apart from adding a visible: attribute). Removed first label in units_settings, since it is the title of the section Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: create theme section and move themesettingsGravatar jan Iversen
Move gridlayout themesetting to TemplateSection theme and use the TemplateTitle. Also switch from using PrefDisplay.mobile_scale to subsurfaceTheme.currentScale Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: move dive computers to general section.Gravatar jan Iversen
move gridlayout divecomputers to TemplateSection general, without changing anything (apart from adding a visible: attribute and replacing the Rectangle used to draw a line at the bottom with a TemplateLine on top. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: move default cylinder to general section.Gravatar jan Iversen
move gridlayout defaultCylinder to TemplateSection general, without changing anything (apart from adding a visible: attribute and replacing the Rectangle used to draw a line at the end with a TemplateLine at the top). Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: move cloudSettings to general section.Gravatar jan Iversen
move gridlayout cloudSettings to TemplateSection general, without changing anything (apart from adding a visible: attribute and removing the rectangle used to create a line). Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: add General section to SettingsGravatar jan Iversen
ColumnLayout does not work well with TemplateSection, so change to Column Add TemplateSection "General Settings" "General Settings" are open when visiting page first time. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: bump versions for settingsGravatar jan Iversen
bump import versions to reflect Qt 5.12 and remove unused imports remark QtQuick 1 and QtQuick.Controls 1 are depreciated since Qt 5.12 Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: settings Control.TextEdit -> TemplateTextEditGravatar jan Iversen
Replace Control.TextEdit with TemplateTextEdit, in order to use common font/color scheme. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: settings Control.comboBox -> TemplateComboBoxGravatar jan Iversen
Replace Control.ComboBox with TemplateComboBox, in order to use common font/color scheme. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: settings Control.label -> TemplateLabelGravatar jan Iversen
Replace Control.label with TemplateLabel, in order to use common font/color scheme. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: add TemplateTitleGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: add TemplateLineGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-19mobile-widgets/qml: add TemplateTextFieldGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18mobile-widgets/qml: use strongly typed CloudStatusGravatar jan Iversen
Replace CloudStatus.<value> with backend.<value> as part of making enum sharing between C/C++ and QML more robust. Replace PrefCloudStorage.verification_status with backend.verification_status to use the strongly typed function. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18mobile-widgets: make cloud_verification_status type proof in QML.Gravatar jan Iversen
Add CLOUD_STATUS enum to interface. Add cloud_verifification_status variable to interface, and make it strongly typed in QML. using backend.cloud_verification_status = 1 will fail but backend.cloud_verification_status = backend.CS_UNKNOWN is correct. 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-18mobile-widgets: add pure interface for passing values to QMLGravatar jan Iversen
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-18mobile-widget/qml: add missing colors to dark themeGravatar jan Iversen
add missing colors so that dark theme contains the same colors as "colors in use". Update the darkTheme() to correctly copy colors from pink theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widget/qml: add missing colors to pink themeGravatar jan Iversen
add missing colors so that pink theme contains the same colors as "colors in use". Update the pinkTheme() to correctly copy colors from pink theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widget/qml: add missing colors to blue themeGravatar jan Iversen
add missing colors so that blue theme contains the same colors as "colors in use". Update the blueTheme() to correctly copy colors from blue theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widgets/qml: secure block of used colors is correctGravatar jan Iversen
move contrastAccentColor, lightDrawerColor to block of used colors in order to avoid confusion. move darkDrawerColor to dark theme. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widgets/qml: remove M126 warnings in main.qmlGravatar jan Iversen
changed != --> !== and == --> === to make QML happy. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widgets/qml: columnWidth undefinedGravatar jan Iversen
Remove reference to columnWidth, because it is not defined in main.qml (subsurfaceTheme). Signed-off-by: jan Iversen <jan@casacondor.com>