aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
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>
2020-01-17mobile-widgets/qml: main reference qPrefGeneral.default_cylinder wronglyGravatar jan Iversen
change qPrefGeneral.default_cylinder -> qPrefEquipment.default_cylinder Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-17mobile-widgets/qml: change PrefGeneral -> PrefEquipmentGravatar jan Iversen
default_cylinder was moved from PrefGeneral to PrefEquipment, but Settings was not updated update Settings. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-10whitespace cleanupGravatar Dirk Hohndel
Since writing the file with QtCreator in the previous commit pointed all these out... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-10code cleanup: add empty table structuresGravatar Dirk Hohndel
It seemed to make sense to combine all three types in one commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-04mobile-widgets/qml: secure text on ascent/descend get updatedGravatar jan Iversen
When changing METERS <-> FEET, the text change automatically between "m/min" and "ft/min". Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-04mobile-widgetes/qml: standardize QML/C++ interfaceGravatar jan Iversen
Do not use a.set_b(value); it works, but it introduces yet another way of using the QML/C++ interface, furthermore the function might not be called set_b in some future, which is the reason the function is define in Q_PROPERTY Use a.b = value, that respects Q_PROPERTY, and is slightly more performant, most importantly it's like all the other settings so noone starts wondering why this is special. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-04mobile-widgets/qml: switch between m/min and ft/minGravatar jan Iversen
Set the text of ascent/descent rates. This shows the correct speed units when the user switches between metric and imperial. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-02mobile-widgets/qml: reintroduce showPinGravatar jan Iversen
but the proper way, as a direct check on PrefCloudStorage. This secures PrefCloudStorage is only tested once and not n times. As a sideeffect it saves typing and control. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-31mobile-widgets/qml: add spinbox values to planner setupGravatar jan Iversen
(planning is excluded, due to not finished UI). Connect all spinboxes with plannerShared. This change allows live testing and compare with the desktop version. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-31mobile-widgets/qml: add checkbox valuesGravatar jan Iversen
(planning is excluded, due to not finished UI). Connect all checkboxes with plannerShared. This change allows live testing and compare with the desktop version. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-29mobile-widgets: remove qmlprefs.*Gravatar jan Iversen
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-29mobile-widgets: use oldStatus in qmlmanagerGravatar jan Iversen
Switch oldStatus from qmlprefs to qmlmanager This is the last use of QMLPrefs, which can later be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: add oldStatus variable to qmlmanagerGravatar jan Iversen
oldStatus() is kept in qmlPrefs during the login process to allow for a couple of special cases: - if a user have added dives in NO_CLOUD mode and changes to use the cloud these dives are copied to the Cloud, instead of being lost. - if a user does a bailout from the login process (this should not happen anymore) the old status is restored. The pure solution would be to have oldStatus at the top level (e.g. a property in qml) and only change it when actually being in the login process, however due to way the qmlmanager is written it proved very difficult and not worth the effort. In order to be able to remove qmlPrefs, oldStatus are moved to qmlManager. This commit only contain the creation of the variable and the supporting code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlprefsGravatar jan Iversen
showPin is no longer used so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlmanagerGravatar jan Iversen
Setting showPin is no longer needed, so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: remove prefs.showPinGravatar jan Iversen
prefs.showpin is the same as PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY but is actually implemented as a separate variable. Removing showPin in order to limit use of QMLPrefs, which is the overall goal. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from qmlprefsGravatar jan Iversen
Remove no longer used function setCredentialStatus() from qmlprefs. This is done to secure there are no missing setCredentialStatus calls in the code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove second setCredentialStatus()Gravatar jan Iversen
call setOldStatus() and set_filename(). saveCredentials() will adjust email and password. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove first setCredentialStatus() in finishSetup()Gravatar jan Iversen
This setCredentialStatus() will never do anything, because qPrefCloudStorage is identical to prefs.cloud_verification_status, and can thus be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from saveCloudCredentials()Gravatar jan Iversen
Revert to the divelist by setting oldStatus() directly to set_cloud_verification_status() This is done to further limit the use of setCredentialStatus() and prepare to remove qmlPrefs. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus from revertToNoCloudIfNeededGravatar jan Iversen
Update revertToNoCloudIfNeeded() to not use setCredentialStatus() by adding an extra call to setOldStatus() setOldStatus() is called in setCredentialStatus together with set_cloud_verification_status() therefore these 2 calls need to added when removing setCredentialStatus(). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>