aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2020-03-10mobile/divedetails: send current-dive changes up to mobile UIGravatar Berthold Stoeger
To unify mobile and desktop, let's use the current_dive variable of the core to indicate the current dive. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: when clicking on a row, use select_single_dive()Gravatar Berthold Stoeger
This is a small step in unifying mobile and desktop. I'm unsure whether it is correct to play this via the QMLManager or whether we should call form QML directly into the model? Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: switch to the correct modelGravatar Berthold Stoeger
This obviously breaks everything, but now we can start fixing things. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile/divelist: connect click on trip to toggle MobileListModelGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-09mobile/divelist: rewrite the QML dive listGravatar Dirk Hohndel
This isn't perfect yet, but it looks fairly reasonable. This commit was mainly written by Dirk, but includes a few fixes from Berthold which where squashed into this commit as they really should have been part of the initial version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-09mobile/DC-download: be more careful exiting download pageGravatar Dirk Hohndel
Don't just pop the top page off the stack, but pop the download page. Also explicitly switch to the dive list afterwards. Additionally, fix a typo in the code that attempts to deal with the shortcut buttons. I believe that right now this code is completely broken, but while I contemplate how this should work, let's at least fix the stupid typo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile UI: ensure download page is shown if started by plug-in eventGravatar Dirk Hohndel
The order of execution of the various routines is a bit counter intuitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile UI: move code to open download page on device plug-inGravatar Dirk Hohndel
This makes the code easier to reuse and uses the helper we just added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile UI: add consistent way to show a pageGravatar Dirk Hohndel
And have the existing shortcut functions use that helper. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-07mobile UI: remove obsolete access to already removed model roleGravatar Dirk Hohndel
We no longer have a dive role - on the plus side, we also don't use this variable, so I guess this isn't a big deal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-07mobile UI: re-enable download status when restarting downloadGravatar Dirk Hohndel
When tapping on 'retry' we didn't clear the flag that decided which message to display. Fixes: #2651 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-04Mobile UI: fix typo in disabled planner setupGravatar Dirk Hohndel
While this is disabled and is unlikely to be completed, the typo caused confusion with translators. This shows one of the weaknesses of the way we set up our translations, in that always both desktop and mobile are translated together, and disabled code is also included in those translations, causing unnecessary work for the translators. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-01mobile/filter: derive numShown from a new Q_PROPERTYGravatar Berthold Stoeger
The number of dives was updated when the model of the list was changed. Since we removed the multi-threading, the model is not disconnected/connected anymore and therefore we don't get the appropriate signal. Instead of introducing a different signal, make the shown-value a Q_PROPERTY. Thus, we can easily send a changed signal if we have to. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-01mobile: remove filter settingsGravatar Berthold Stoeger
These are not used anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-01filter: don't search in background on mobileGravatar Berthold Stoeger
I experienced weird crashes that seemed timing-related when using the filter. Therefore, remove the multi-threading thing. So far no more crashes, but keep a close eye on that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-01mobile/filter: use more appropriate placeholder textGravatar Dirk Hohndel
This way it matches the filter mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-01filter: introduce people- and tags-filtering in the mobile UIGravatar Berthold Stoeger
Add a combo-box where the user can switch between "fulltext", "people" and "tags" filtering. Connect the combobox to the already existing filter-code. Dirk: make combo-box smaller by using a smaller font and restricting the width. Setting both maximum and preferred widths gives more consistent results. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-25mobile/profile: make the wait before dragging even shorterGravatar Dirk Hohndel
Several users still found the wait too long - this is near instantaneous it just ignores brief taps. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/export: fix styling of radio buttonsGravatar Dirk Hohndel
Use the TemplateRadioButton to get the default styling - and by switching to the RadioButton from Controls.2 we also get exclusivity by default. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: enable zoom and pan for the QML profileGravatar Dirk Hohndel
When running mobile on desktop there are some odd jumps in the mouse position while in drag mode (press and hold, then move). They make the user interface seem jerky. But I haven't observed the same behavior on the mobile device when testing. So I'm not sure what to do with that. Using opacity to indicate that the user is able to pan the profile seems reasonably obvious; not sure if it's the best possible way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/profile: add invisible rectangle around QMLProfileGravatar Dirk Hohndel
This way we can clip the profile to it's designated size. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-18mobile/developer: add menu entry to temporarily enable verbose modeGravatar Dirk Hohndel
One could argue that this should be a preference. I like the fact that it isn't persistent, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: fix horrendous user interfaceGravatar Dirk Hohndel
This should never have been merged as it was. The UI was atrocious and the functionality was by and large untested. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/resources: fix incorrectly coded XSLT stylesheetsGravatar Dirk Hohndel
The prefix meant that on device these weren't found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: don't allow file based exports on AndroidGravatar Dirk Hohndel
There is no native file dialog, access to the file system is highly restricted and will be much more so in Android 11. Let's not even start with this. This should never have been merged as it was. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: remove most of the export optionsGravatar Dirk Hohndel
A tablet or phone is not a computer. What would you do with a CSV or TeX/LaTeX file on a phone. Yeah, I get it, feature parity. This should never have been merged. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-17mobile/export: clean up whitespaceGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13mobile UI: restructure menuGravatar Dirk Hohndel
This changes the 'GPS' entry to be called 'Location', moves the 'Map' entry below that, and reuses the map icon for both the map inside this submenu and for the main menu item. It moves the 'About' entry under 'Help' and both 'Export' and 'Dive summary' under 'Dive management'. This way we have only five (or with 'Developer' enabled, six) entries in the main menu making it much more appropriate for really tiny screens. Additionally, the entrieis moved into sub-menus are ones that are not all that commonly used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: remove some debug outputGravatar Dirk Hohndel
I don't think we need that anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: expand refresh buttonGravatar Dirk Hohndel
Buttons ignore the width of the enclosed label and base their width on the illogically named implicitWidth instead. Also translate the button text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-10mobile/summary: more UI fine tuningGravatar Dirk Hohndel
Creating more space for the header column and a little visual separation for the different sections. The commit is much smaller than it looks - try 'git show -w'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09mobile UI: fix alignment issue in dive details viewGravatar Dirk Hohndel
The 'Map it' button could overlap with the dive number below, depending on font size. This fixes the issue. Reported-by: Peter Reinold <mcc.nash@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-09Correcting typos of the word celsiusGravatar Jason Bramwell
Corrected typo of the word celsius in three files: core/import-csv.c core/divefileter.h mobile-widgets/qml/Settings.qml These were spelled as celcius but corrected these to celsius. The 'core files were just comments but the mobile-widgets file would be 'active' code. Reported by: tormento <turment@gmail.com> Signed-off-by: Jason Bramwell <jb2cool@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile UI: correctly determine the number of columns when screen size changesGravatar Dirk Hohndel
This also deals with a bug we had before where we didn't re-start the calculation for the various sizes from the assumption of 'at least 21 grid units'. Now you can rotate the device and the right thing will happen. Small warning - this checks the orientation of the screen, which is exactly what you want it to do on your device. When running mobile on desktop this may not be what you expect. Even if the window has a portrait aspect ratio, your screen is likely still landscape... so testing this feature in mobile on desktop mode is a bit harder... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/settings: add UI for single column preferenceGravatar Dirk Hohndel
This is placed in the Advanced section as I expect this to be rather unusual for people to enable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: use more intuitive time periodsGravatar Dirk Hohndel
No one will ask you about your dives in the last seven months (and the existing code actually provided the past 210 days in that case). Instead do more intuitive periods. Last month, quarter, half year, year. Use Qt's ability to make sane date calculations easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: improve the spacing of the contentGravatar Dirk Hohndel
Use more idiomatic ways to indent the rows, replace the TemplateLabel with a simple Label since drawing the extra rectangle for the background of the TemplateLabel is obviously redundant and using it doesn't change the number of properties we need to set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: correctly align text to vertical centerGravatar Dirk Hohndel
I keep forgetting that the verticalAlignment is only within the current object, which means that in a single line label it has no meaning at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: add refresh buttonGravatar Berthold Stoeger
On tablet devices, the summary page stays open and therefore the summary is not refreshed. For now, add a button. Later, this should be connected to signals when dives are edited, added or deleted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: add section headersGravatar Berthold Stoeger
Add section headers to the dive summaries on mobile by adding a section-property. Of course, this will not work on desktop. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile/summary: remove dive summary calculationGravatar Berthold Stoeger
Since we now use a model to calculate the dive summary, there is no need to export recalculation of the dive summary via QMLInterface. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: implement frontend code for the new summary modelGravatar Dirk Hohndel
Implements the ListView and its delegate to use the dynamic data provided by the DiveSummaryModel Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: recalculate first and last dive on visibility changeGravatar Berthold Stoeger
Recalcluate not only the statistics for the given period, but also the global first and last dive date. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-08mobile/summary: implement firstDiveDate and lastDiveDateGravatar Berthold Stoeger
Instead of transporting the global first and last dive date in the dive summary, calculate it in an external function. Since we already have time and date functions in qthelper.cpp implement those functions there. Provide a stub in QMLInterface so that QML can access these standalone functions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-07mobile/notes-edit: ensure cursor stays visible editing dive notesGravatar Dirk Hohndel
This seems to work much more reliably as it specifically compares the cursor position to the visible bottom and top of the screen. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile/settings: fix the width of cylinder drop downGravatar Dirk Hohndel
The GridLayout isn't part of a Layout, so set its width and have the combo box fill it's part of the grid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile UI: set correct width for TeplatePageGravatar Dirk Hohndel
A page by default fits in a column. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06random white space fixGravatar Dirk Hohndel
QtCreator fixes that for me after every edit, I'm getting tired of manually removing those hunks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile UI: redo the screen size magicGravatar Dirk Hohndel
This still is way to fragile. Ordering of object completion doesn't appear consistent. Hopefully bringing the properties all into one (now reasonably named) object will help. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile: comment out planner referencesGravatar Dirk Hohndel
I don't expect this to be complieted. I'll keep it in the tree for the moment, but expect to remove all of the related code eventually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>