Commit graph

61 commits

Author SHA1 Message Date
Grace Karanja
56771159a8 QML UI: Show log correctly
Correctly show the log messages. The log window will display all
messages emitted by the QML Manager class.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
cd28082c39 QML UI: Fix error when closing the log window
When closing the log window, do not try to save the changes. This
should only be done when closing the DiveDetails.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
89c7e4cd67 QML UI: Show message when loading dives
Show a message at the start of fetching dives, so that the user knows
whats going on.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
9e53b3082c QML UI: Add ViewLog menu
Add a menu entry to show the application log.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ee13c5c282 QML UI: Add QML Log viewer
Add the ability to preview the application log in QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ab7db605e5 QML UI: Move top bar to its own file
Move the QML top panel to its own file, so that it can be used in
other files.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
5a7dbf0225 QML UI: Use AddDive instead of clear dive
No need to clear the dives when adding a new one.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
a734a2ee19 QML UI: Dynamically change button text
Dynamically change the text of the show/hide profile button.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
3d5ad19888 QML UI: Add button to hide dive profile
Allow toggling of dive profile visibility

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
1925b3d012 QML UI: Remove clearDetails() function in DiveList.qml
This function is not needed, as we will move all of the logic to
C++.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
a3bdf49b84 QML UI: Clear divelist model before starting new dive
When user clicks on AddDive, we should clear the model.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
8d03d26480 QML UI: Start Add Dive feature
Start working on the add dive feature, to enable the user add a
new dive using the mobile UI.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Joakim Bygdell
fc746c2129 QML UI: move back button back to the left and center text
The top bars on the main page and dive details should be the same height
and keep the same layout.

[Dirk Hohndel: refactored Joakim's patch to work on top of what was
               already in master]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 10:13:25 -07:00
Joakim Bygdell
59a18ab000 QML UI: make the top bars look the same
The top bars on the main page and dive details should be the dame height
and keep the same layout.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 06:14:53 -07:00
Joakim Bygdell
10e531d907 QML UI: dynamic button sizes
Butons are sized based in the text printed on them,
we want our buttons to have a meaningful minimum size and a
preferred size that is similar regardless of screen resolution.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 06:14:34 -07:00
Grace Karanja
d337def212 QML UI: Fix incorrect sizing of dive profile
This resizes the dive profile to always maintain an equal width and
height, so that the sizing is the same in all devices.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-29 15:21:06 -07:00
Dirk Hohndel
4b29cc21fb QML UI: show dive number and date in the detail view
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 12:26:51 -07:00
Dirk Hohndel
16c6ff0089 QML UI: consistent title and attempt of back button for dive details
The back arrow looks terrible. I'm not clear on how this is supposed to be
implemented.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 09:55:18 -07:00
Dirk Hohndel
32e5a8d29a QML UI: if the cloud credentials are set, open the dive list
There's no point opening to an empty screen and asking the user to do this
via the menu.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 09:15:04 -07:00
Dirk Hohndel
975ca2e56a QML UI: prevent crash when trying to set message without window
If we try to set up a message before the window has been instantiated we
should ignore the message, not crash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 09:14:06 -07:00
Robert C. Helling
0ca42ea4a4 Adjusted spacing
and a typo in comment

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-27 06:30:08 -07:00
Joakim Bygdell
3d5232a622 QML UI: add style to the menu button
Add some style to the menu button so that it fits the theme.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26 06:19:53 -07:00
Joakim Bygdell
7be21b1d41 QML UI: add Subsurface mobile to top of app
We have space over so lets add the name to the top.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26 06:19:50 -07:00
Joakim Bygdell
64601672a8 QML UI: make the app blue
White is boring, so lets change the color of the android app to
a more pleasing subsurface blue.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26 06:19:47 -07:00
Joakim Bygdell
f1f13ed407 QML UI: create menu to house the buttons
Runing the android version on a phone the screen must be tilted
sideways to accommodate all buttons.
This creates a single button that triggers a popup menu that houses the buttons.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-26 06:19:43 -07:00
Grace Karanja
ea574b6b11 QML UI: Show profile on Android
This is a better way for showing the profile. The show() and hide()
statements are replaced by a QTransform statement.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-25 19:39:05 +03:00
Dirk Hohndel
a05e37188b QML UI: make sure the dive list is empty before loading dives
When testing subsurface-mobile on the desktop from an account that had a
default file set up in the Subsurface preferences that file would already
be loaded creating rather confusing output.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-24 13:18:30 -07:00
Grace Karanja
e93bb9230f QML UI: Add download from divecomputer window
Add a window to be used when downloading from dive computers.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-23 14:46:52 +03:00
Grace Karanja
ab44c78993 QML UI: Move DiveDetails to the StackView
Add a DiveDetails.qml to hold the dive details, and display it in
the stack view when the user taps on a dive.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22 09:53:19 +03:00
Grace Karanja
ea11eff279 QML UI: Implement saving of cloud password
If the user ticks the 'Save Password' box, then we save the password
for future use.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-22 09:53:19 +03:00
Grace Karanja
0c9756c5d7 QML UI: Implement showing of the dive profile on QML
Link the QMLProfile class to the DiveList.qml file. The profile is
displayed above the dive details.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-17 12:00:38 -07:00
Grace Karanja
59232ca172 QML UI: Add QMLProfile class
Add a C++ class to render the dive profile. The rendered image is then
passed on to QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 12:00:29 -07:00
Grace Karanja
df1a1f7034 QML UI: Implement saving of dives
This implements saving of some dive details to the cloud service. When the
user closes an open dives, any changed details will be cached, and when they
click on the 'Save Changes' button is pressed, the changes will be saved to
the cloud.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-17 19:12:39 +03:00
Dirk Hohndel
15de7f0b71 QML UI: implement a message area to show information to the user
This is just a quick first stab to do this, but it at least allows us to
share some information with the user.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 17:39:13 -07:00
Dirk Hohndel
16759715e6 QML UI: explicitly reference the button for size
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 17:38:01 -07:00
Dirk Hohndel
4491c91b93 Whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 17:36:49 -07:00
Dirk Hohndel
164cafe5d3 QML UI: use stackView to show sub windows
QML on Android doesn't support multiple windows, so dialogs that work on
the desktop are not a good solution on Android. A much more natural way to
present sub windows is a stackView.

In order to do this Preferences needs to be an item and the structure of
the ApplicationWindow needs to change a bit.

This also removes the hard coded sizes and instead tries to design this in
a resolution independent manner.

The diff appears larger than the actual change because of an increase of
indentation for the ApplicationWindow content.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 10:59:33 -07:00
Dirk Hohndel
57e9784d27 QML UI: improve preferences layout
And make it resolution independent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 10:55:45 -07:00
Dirk Hohndel
ac074bf239 QML UI: start making things resolution independent
Don't hard code sizes as devices tend to have much higher pixel density
than desktop computers. Instead make sizes relative to the content.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 10:52:44 -07:00
Dirk Hohndel
4088f9f652 QML UI: set window size on desktop devices
On Android the app figures out the size by itself.

Also change the name to match our naming scheme (Subsurface mobile for the
QML UI).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-12 10:52:15 -07:00
Grace Karanja
ebcf3e67c5 QML UI: whitespace fix
Fix some whitespace issues in the QMLManager and DiveListModel
classes.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:04:18 -07:00
Grace Karanja
c4fda447fd QML UI: show dive details in TextBoxes
Show the dive details in editable text boxes. This will make it easier
for the user to edit the displayed information.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:04:06 -07:00
Grace Karanja
bdf87ff60e QML UI: move the dive list to a separate file
Move the dive list qml code to a separate file for easier management.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:04:01 -07:00
Grace Karanja
866d67c5e7 QML UI: Load dives from cloud
Load dives from the Subsurface cloud service using the user's saved
credentials. This will display the dives in the same way as loading
them from a local file.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:03:56 -07:00
Grace Karanja
f01ec470e7 QML UI: add button to show the preferences window
Add a button in the main qml file to show the preferences window. This
window is linked to the QMLManager class, so any changes made will be
saved to the user's settings file.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:03:43 -07:00
Grace Karanja
956336ae1a QML UI: add QML Preferences Dialog
This will allow the user to edit and save their Subsurface cloud
credentials.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:03:36 -07:00
Grace Karanja
5791f580df QML UI: add cloud credential fields to the QMLManager class
These fields will be used by the QML Ui to save/retrieve the user's
cloud credentials.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-10 06:03:20 -07:00
Grace Karanja
4e9128f847 Display more details
Show more dive info in the extended view of the dive.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:29:14 -07:00
Grace Karanja
e4e6e896c1 Fix bug where dives are shown twice
On the QML page, dives are repeated. Adding process_dives to
QMLManager after calling parse_file solves this.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:28:49 -07:00
Grace Karanja
ee9452ae8a Group dives by trips
Group dives according to the allocated dive trips.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:28:39 -07:00