Adding support for importing .apd files (APD Log Viewer). They are CSV
files and already supported in CSV import, but the file extension .apd
is added here.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of inventing another way to do this (and inevitably forgetting a
path where this should be re-enabled) I renamed the DcShortcup related
function and made them enable/disable the copy and paste shortcuts as
well.
Of course there now is one exception (isn't there always?): in "ADD" state
we don't want to be able to switch DCs, but we do want to be able to
paste.
Fixes#825
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit e219bc70f8 ("Refactor dctype -> divemode") introduced a few issues.
For one thing it causes a warning about incorrect use of zorder - I don't see
why this would be needed here, so I simply removed it.
Secondly, it adds a new, automatically named layout element that therefore gets
handled by our "consistent margin" code which creates a messy layout for the
Dive Notes tab. This patch gives that horizontal layout a useful name and adds
it to the list of "zero margin" layouts. Signed-off-by: Dirk Hohndel
<dirk@hohndel.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead be consistent with other parts of the code and put us in editing
mode so the user can accept / reject the change.
See #800Fixes#801
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Lots and lots and lots of header files were being included without being
needed. This attempts to clean some of that crud up.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Especially on Mac where there is already a lot of padding around the
action buttons.
Also made the spelling of the zeroMargins variable more consistent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is highly dependent on the user, I guess. So I may be totally off
here. But the previous order was pretty much random (and even tried to
push one button in there twice in a row)...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of messing with the margin (which didn't work, anyway), we need to
set the size of the icons. Apparently on Linux this was implicitly done,
but on Mac it didn't scale the icons and provided space for the largest
one (and we have a couple that are twice as big as the others).
What we really need are scalable icons that allow us to set the icon size
relative to the font size. But for now this solves the ugliness on Mac.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
At least on the Mac some objects appear to have generous default margins.
This creates a somewhat less wasteful layout. Still we have those massive
margins around the toolbar buttons.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The goal is to have things look as consistent as possible - so if some
elements have another nested level of layouts, their margins need to be
zero.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This time for the mainwindow.
This includes an adjustment in the C++ code where we actually referenced
one of those weird generic names.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The hard coded margins were random and inconsistent and generally ended up
with a rather unbalanced look. This was worse on Mac than on other
platforms, as there the margins get exaggerated for some reason.
This code is a bit of a hack and a bit brute force, but it seems to work
to create a much more pleasing appearance. It may need some fine tuning
(depending on OS or DE (under Linux)), but it definitely seems like a
massive improvement.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I can't remember why I decided to show the survey immediately if someone
was running a development version. Seems silly to me in retrospect.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Store the last version used, the next time we can check, and the decision
if the user does or does not want these checks in the settings.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes sure the UserSurvey object is removed correctly by the qt
object tracking system.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Back in 71dbcdc0d6 ("Added the option of opening User Survey form
explicitly") a define for not adding the user-survey was created.
This is quite unnecessary and this removes that option.
Based-on-patch-by: Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Earlier, there was no option for the user to explicitly open the User
Survey form. This has been corrected by placing an option in the "Help"
menu by which the user can explicity open the User Survey form.
Signed-off-by: Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clearly the static dialogs don't work. Even with the previous commit the
dialog still said "Save" insted of "Open". So let's just assemble our own
dialog and be done with it. I hope I got all the options right...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Using the SaveFile dialog to open a file caused it to ask the user if they
wanted to overwrite a file when they actually tried to open an existing
file. This fixes that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way we can specify file names that don't exist and therefore make our
git syntax (/path/to/dir[branch]) work.
Thanks to Tomaz for pointing this out.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added a title bar with close button.
Set an appropriate title.
Centred the window relative to mainwindow.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the unused upper widget, set a somewhat random but at least more
reasonable default size and finally support Ctrl-W and Ctrl-Q shortcuts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add the .txt to the list of all dive log files as this is the file we
expect to be opened for Poseidon Mk6 log files.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We already have a bunch of filters, let's pack them together
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And added a missing liquivision item in file open dialog.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When replannig a dive, offer another button that creates a new
dive rather than overwriting the old. This should help in creating
several versions of a planned dive (longer/shorter, deeper/shallower
etc). Note that this makes dives that start at the same time not
influcence each other's deco.
Also, only the first of a row of simultaneous dives contributes to
the tissue loadings of later dives.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The multifilter widget is a container with all the filter
widgets inside of it. currently there's just one.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It was impossible to remove the tag filter after opening it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Disable the possibility to collapse the pannel in the
mainwindow when seeing everything.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This prevented import of log files other than CSV and TXT.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Subsurface can now open CAN files as an alternative to importing.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>