aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2020-02-06mobile/settings: correctly draw the size buttonsGravatar Dirk Hohndel
With the columnSpan 3 (in a grid with only two columns) they were drawn on top of the drop down for the theme. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: refer to the correct theme objectGravatar Dirk Hohndel
This was missed when switching object names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: white space cleanupGravatar Dirk Hohndel
Some odd empty lines and an unnecessary line break. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: make the color swatches work as color swatchesGravatar Dirk Hohndel
In a color swatch the color of the body of the swatch is the one that matters. And we need to ensure readability. So for each pair of colors, use the combination in the regular order (color/textcolor) for the background swatch, and inverted for the text swatch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: correctly set label backgroundGravatar Dirk Hohndel
The TemplateLabel comes with a set background color which creates a very odd effect and makes the text generally unreadable in the color swatches. Fix this by matching the color of the parent rectangle. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: remove confusing frame around column titlesGravatar Dirk Hohndel
These are not color swatches like the rest, these are the column titles, so don't draw them the same way as the color swatches. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-03mobile-widgets: switch to new subsurfaceThemeGravatar jan Iversen
Remove subsurfaceTheme from main.qml Replace ThemeNew -> subsurfaceTheme change registration ThemeNew -> subsurfaceTheme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: secure subsurfaceTheme.initial*Gravatar jan Iversen
move initialWidth/initialHeight out of subsurfaceTheme to placeHolder, this secures no change in behaviour. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml/settings.qml: show all colorsGravatar jan Iversen
Show all colors in a theme, allowing user to change theme. This is preparation for allowing users to click on the individual colors and change them. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: use new templates in converted pagesGravatar jan Iversen
Use the TemplatePage and TemplateButton in the converted pages. In order to avoid a bigger search/replace all other pages are left untouched (for now). Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: add TemplateButtonGravatar jan Iversen
Do "git mv SsrfButton TemplateButton", and search/replace all uses. The general idea of the templates are to secure common layout, but also to isolate the Kirigami parts (slowly) in the templates. Signed-off-by: Jan Iversen <jani@apache.org>
2020-02-03mobile-widgets/qml: add TemplatePageGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2020-01-30mobile-widgets/qml/divesummary.qml: detect change in unitsGravatar jan Iversen
When either length or volume unit is changed, the text needs to be changed. Let signal lengthChanged and volumeChanged cause a recalcation and therefore new text. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-30mobile-widgets/qml: move fontMetrics to ThemeTestGravatar jan Iversen
fontMetrics is no longer used in production code, but still in the theme test page. Isolate fontMetrics in ThemeTest page. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: do not use fontmetric for heightGravatar jan Iversen
In order to remove fontMetrics from QML, replace references (height) in DownloadFromDiveComputer and Settings Add include kirigami as needed Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move font property to themeInterfaceGravatar jan Iversen
Move setting of font properties used throughout to themeInterface. Add new settings "currentScale". The properties are kept in main (subsurfaceTheme) in order not to do a big search/replace. Update settings to use currectScale and signal changes in themeinterface. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move basePointSize to themeinterfaceGravatar jan Iversen
Check defaultfont and calculate basepointsize in themeinterface instead of in QML. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile/dive summary: rewrite statistics codeGravatar Dirk Hohndel
There were quite a few issues with the code - clearly a complete failure of code review. - all values were '??' if a period contained no dives - imperial units were not calculated at all - significant truncation and data loss in the way totals were added as meters and minutes instead of the higher precision data that is available - several issues in striing conversion methodology, e.g. missing zero padding for minutes - missing maxSac - incorrectly calculated avgSac - incorrectly claculated number of EANx dives - hard to read code with most variables named 'temp' Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-29mobile-widgets/qml: Fix Kirigami error.Gravatar jan Iversen
Solve kirigami error: INFO: qrc:/org/kde/kirigami/ScrollablePage.qml:187: TypeError: Cannot assign to read-only property "parent". Kirigami.scrollPage does not allow a ListModel be defined, even though it is allowed in QtQuick. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-28mobile-widgets/qml: add icon to dive summary entryGravatar jan Iversen
Add sigma icon to menu entry "dive summary". Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-28mobile icons: add sigma svgGravatar jan Iversen
Add svg sigma to be used for dive summary. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-28mobile-widget/qml/Settings.qml: correct theme switchesGravatar jan Iversen
Replace subsurfaceTheme with ThemeNew, since there are still 2 objects subsurfaceTheme in main.qml and ThemeNew in themeinterface.* Replace theme color references with ThemeNew, as they are no longer available in main.qml (subsurfaceTheme). Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-27mobile-widgets/qml: integrate DiveSummary in menu.Gravatar jan Iversen
Add DiveSummary to globalDrawer Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27mobile-widgets/qml: add DiveSummary.qmlGravatar jan Iversen
Add DivePlannerSummary, a page to show in dive centers. Allow user to select period for the 2 colums in DiveSummary. Default is "Total" and "3 month", but allowing the user to change these, make it a very simple tool to view how the user progresses. Variables are taken from Backend. [Dirk Hohndel: adjusted text strings as these aren't really months] Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27mobile-widgets/qml: add background color propertyGravatar jan Iversen
Add property "colorBackground" to allow instances of templateLabel to have background color overwritten. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27mobile-widgets/qml: correct spelling errorGravatar jan Iversen
Correct spelling error in TemplateTitle. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-26mobile-widgets/qml: integrate ThemeNew in qmlGravatar jan Iversen
Update Settings to use ThemeNew (for theme change) Reduce subsurfaceTheme in main 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-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: 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 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-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-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>