Commit graph

28 commits

Author SHA1 Message Date
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
Grace Karanja
f0c7779753 Show dive details when a dive is clicked
When a dive is clicked, show the dive details on the QML page.
This contains basic details, and will be expanded further.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:28:28 -07:00
Grace Karanja
f21d3d558e Add TextButton.qml file
This file contains a styled button for use in QML

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:28:17 -07:00
Grace Karanja
4c40908954 Group dives by location
Group dives on the QML page by location.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:27:47 -07:00
Grace Karanja
28ab1f6413 Better theme for dive list view
Set a rounded blue rectangle on the selected item.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:27:39 -07:00
Grace Karanja
b7e4b35cde Add DiveListModel
This model will be used to show the dives in QML. This commit adds
the model, and the means to link it to QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:26:56 -07:00
Grace Karanja
315a245868 Link QMLManager to the main.qml file
Add a link between the C++ and QML parts of the app using the
qmlRegisterType function.

[Dirk Hohndel: changed the name to org.subsurfacedivelog.mobile]

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:24:25 -07:00
Grace Karanja
59be048549 Add QMLManager class
Add a QMLManager class. This class will be used as a link between
the C++ and QML aspects of the mobile application.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:19:42 -07:00
Grace Karanja
6ba5b45c00 Add FileOpen dialog to QML
Add a dialog to select dive files in the QML interface, and also
add a menu entry to open the dialog.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:19:06 -07:00
Grace Karanja
e2c1d24d02 Add a menu to main.qml
Add a menu with an Exit submenu in the main.qml file. This closes
the application when clicked.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:17:14 -07:00
Grace Karanja
424cf6ca57 Add resource file to hold QML files
Add a resource file to hold any QML files that will be used in the
mobile port.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20 14:16:33 -07:00
Grace Karanja
4e426e3a12 Create empty qt-mobile directory
Create a qt-mobile directory, with a blank main.qml file. This file
will be built up-on to come up with a usable mobile interface.

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