Another attempt to make it easyer to create the mobile version of
Subsurface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Another attempt to make it easyer to create the mobile version.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
One more step to make it easyer to port the app to Mobile.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is another effort to make it easyer for the mobile
interface of Subsurface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Another change to make it easier to program the mobile ui. This was a
fairly easy patch: just moved the contents of the file and fixed the
includes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Still trying to make it easier for the Mobile Port:
This patch is a bit bigger than I hopped, but it was the smallest that I
could get.
A lot of TODO items where added where I broke the code because the current
implementation would break the QML implementtion on the designer. I'll
most probably fix those myself when I finish the transition to the models
to the new folder.
I only moved both models at once because there's an interdependency
between them (seems inevitable, tough, but I'll take a better look at it
later).
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is an attempt to help share code between the desktop version of
Subsurface and the mobile version.
More code will be moved around and the models will be split in a way that
will help recompile times and also creation of different interfaces for
different form-factors.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Corrects typo in ebaa7d1fd which impeded that changes in dive rating
were saved after editing.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows entering / storing the PIN (aka passphrase) for the ssh key.
The email isn't used, yet - this will be used by the automated backend to
create a unique git repository that will turn into the remote storage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While we don't expose it as this to the user, we'll need an ssh key and
potentially a passphrase in order to communicate with the git server in
our infrastructure. This simply sets up a way to store the passphrase.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This copies peaces from the downloadfromdivecomputer dialog into the
configuredivecomputerdialog and connects them to be able to create a
logfile form the configuration of the divecomputer.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For some reason the file selection dialog box now always adds a default
suffix to the file name we pick - which results in our test for git
storage to fail.
So if the filename looks like "<path>[branch].ssrf" then remove the suffix
that was added.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Emitting the stopFilterDiveSite signal caused us to clean up the UI which
reset currentDs to NULL if this was a new dive site...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It doesn't matter if we first enter coordinates, name, description or
notes. If there is no currentDs we need to handle that gracefully.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When double clicking on the globe on a dive with no dive site we did
almost the right thing - except that we didn't create a dive site.
Not 100% sure this is the right place to do this, but it seems to work and
prevents the crash.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While filtering we would have trips that were collapsed, but this doesn't
really make much sense while managing dive_sites.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Untested code to filter out dives that are not at the active dive_site.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The dive site management requires that we filter all the dives that are on
the current dive_site, this is the preparatory work for that.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old way we set the location and *then* updated the model, so the very
first location that we tried to show was empty.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When triggering the dive_site management, we need to get the uuid that was
send to us and set it as the current dive_site on the combobox, the dialog
can fill all required info for us.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We will however create a new dive site when the user clicks on the add
button - creating it here would led to strange behavior.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
setLocationId will filter the dives, so ignore the visual changes when
accepting / rejecting, it will only be triggered again when we are showing
this dialog again.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should only set the dive_site on the dive site management widget when
we are going to use that information, this is because the dive_site
management widget will filter all dives on the dive list.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The suit field should take up all the remaining space and the stars should
be vertically centered with the text.
This looks much better
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The parent here should have been the mainwindow, but we create this dialog
on the stack instead of the heap and because of that we don't set the
parent to prevent a double free.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch makes the export dialog more consistent with the rest of
Subsurface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is the single filter dialog - the spacing is much better, but when
activated it seems cluttered, this is because the outer layout (the one
that encapsulates everything) has the wrong layouting - I need to find and
fix that. I'll actually change that to a splitter, it will provide a more
flexible resize of the widgets.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also, added tooltips to the Tab Texts.
I need to fix the layout issues of the Equipments, but that's not inside
the UI. Things are much more sane now.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I seem to have found a sane way to create layouts:
If it's the 'outer' layout, the one that encapsulates everything:
- Horizontal Spacing: 5
- Vertical Spacing: 5
If it's a vertical inner layout that is grouping items like label +
control:
- Spacing: 0
This way the label will be 'touching' the item, without empty space, so
you know that the label refers to that widget.
If it's an horizontal inner layout:
- Spacing: 5
Different from the Vertical Layout, we don't want to make horizontal items
touch each other, a bit of space is fundamental to the eyes.
If it's a Grid Layout:
- Vertical Space: 0
- Horizontal Space: 5
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While this worked for a bit, it was very error prone as it relied in
layout having specific names, and layouts in the .ui files are treated as
substandard items. Every time a 'break layout' command is issues (and it's
issued quite a lot when trying to reorganize the items on the widget) all
layout items are removed and new ones are added later, without any of the
names.
Since the new layout can be different the old names are not usefull
anymore - and a clean compilation won't trigger a single warning either:
the name resolution is done at runtime and not at compile time, so it
would just fail silently.
Instead of brute-forcing each layout to have 0,0 or 5,5 margins, we should
put the correct values on the .ui files.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I`m now clearing the code for all use of Qt < 5, since Qt 5 was released
for quite a while and making two versions of Qt to work together is a bit
painfull.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is a bit aggressive as it changes the globe with every single
character that's entered, but it's better than what we had before.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We still don't respond correctly to a user changing them (i.e., the map
doesn't change), but at least once they change the dive to a different
dive and back to this one things get done correctly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a field to the units preferences to have GPS coordinates
show as decimals (as for example Google maps does it).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
so it affect no longer the previous leg but all the following ones
with the same gas (i.e. until the next gaschange).
This makes the add dive/planner behaviour more consistent
with the rest of the program regarding gas changes.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>