Commit graph

460 commits

Author SHA1 Message Date
Miika Turkia
9e92d27bd0 Add ssrf as dive log extension on import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-17 08:52:11 -08:00
Miika Turkia
c104ff67e4 Add the .apd file extension to be treated as CSV file
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>
2015-02-10 15:03:28 -08:00
Dirk Hohndel
d34965135a Disable dive component copy/paste shortcuts when no profile show
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>
2015-02-03 07:36:09 -08:00
Dirk Hohndel
cd992bd14a Don't reimplement the clear() method
Much easier and clearer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-29 14:00:19 -08:00
Dirk Hohndel
6a161b532e Fix UI issues and warning
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>
2015-01-27 20:19:21 -08:00
Dirk Hohndel
df46b85ee1 Don't just change the location when double clicking on the globe
Instead be consistent with other parts of the code and put us in editing
mode so the user can accept / reject the change.

See #800
Fixes #801

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19 17:38:17 +12:00
Dirk Hohndel
f9ceff009b Clean up the header files
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>
2015-01-18 21:25:59 +12:00
Tomaz Canabrava
ba30e938b3 Another skeleton: LoadFileContents
Also, do not pass QStringLists by pointer, uneeded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-06 19:37:44 -08:00
Dirk Hohndel
f7b3c8b496 The margin between toolbar and profile looked strange
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>
2015-01-04 08:05:30 -08:00
Dirk Hohndel
371c91f5ea Attempt to move the more frequently used toolbar actions to the top
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>
2015-01-04 07:31:22 -08:00
Dirk Hohndel
a308d2b7b4 Fix toolbar icon size issue
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>
2015-01-04 07:15:23 -08:00
Dirk Hohndel
6d1e44f05c Layout fine-tuning: remove the outermost margin around the window
That added visual distraction on some desktop themes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-03 23:11:54 -08:00
Dirk Hohndel
8a312616b0 Zero out the margins instead of just not changing them
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>
2015-01-02 22:24:51 -08:00
Dirk Hohndel
7482e0540d Layout fine tuning. Exclude a few more layouts.
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>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
17195e44a5 Remove all margins from mainwindow.ui file
And adjust them in code instead. This seems to look nice.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
36ba5d3382 Give more layouts reasonable names
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>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
66c2d3d9da Set up consistent margins in the various layouts
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>
2015-01-02 22:24:50 -08:00
Dirk Hohndel
cef150d7dc User survey: always wait a week
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>
2015-01-01 22:50:03 -08:00
Dirk Hohndel
864c4ce94d Automatic update check with an opt out
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>
2015-01-01 20:49:24 -08:00
Miika Turkia
f3446fadc1 Clear DC information when closing log file
Fixes #799

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-30 15:59:53 -08:00
Anton Lundin
08b5ed14d7 Connect the UserSurvey to its qt-parrent
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>
2014-12-30 07:56:00 -08:00
Anton Lundin
fc63dd90cd Remove NO_USERSURVEY
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>
2014-12-30 07:55:45 -08:00
Miika Turkia
5cb20ee4c9 Add .dlf to known extensions (Divesoft)
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-28 06:42:43 -08:00
nikhil
71dbcdc0d6 Added the option of opening User Survey form explicitly
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>
2014-12-17 21:38:04 -08:00
Dirk Hohndel
4029c87ec7 Hide any pictures shown when closing divelog
Fixes #776

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09 21:16:34 -07:00
Dirk Hohndel
6f231c67a0 Close and clear filters when closing divelog
Otherwise non-sensical information stays behind.

Fixes #777

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09 20:16:39 -07:00
Tim Wootton
93d59c22d7 Match agreed captalisation style
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25 07:57:33 -08:00
Dirk Hohndel
38bbed978a Use our own file open dialog
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>
2014-11-22 16:06:01 -08:00
Dirk Hohndel
ba1631f52d Don't ask confusing questions in open file dialog
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>
2014-11-22 07:47:25 -08:00
Dirk Hohndel
fc7f0c6215 Use getSaveFileName() as the file open dialog
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>
2014-11-21 09:46:24 -08:00
John Van Ostrand
21675de534 Small changes to Yearly Statistics window
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>
2014-11-20 07:47:20 -08:00
Dirk Hohndel
f5bea8fcfd Clean up yearly statistics
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>
2014-11-17 18:19:51 +00:00
Dirk Hohndel
ff193e309c Consistently have a space between file type and extension
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-15 08:01:12 -08:00
Miika Turkia
910d1cff74 Add .txt as dive log file
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>
2014-11-14 08:50:36 -08:00
Dirk Hohndel
d765f7a991 When closing filter dialog via menu / shortcut, also reset them
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 14:24:09 -08:00
Tomaz Canabrava
dee20906e3 Suits Widget created and working.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13 12:09:58 -08:00
Tomaz Canabrava
10fecefddd Move the filters code to it's own file.
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>
2014-11-13 12:01:00 -08:00
John Van Ostrand
f85e406855 Corrected Liquivision name
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>
2014-11-10 12:14:38 -08:00
John Van Ostrand
3fe310e529 Cleaned up file list in open and import dialogs
Lists were getting a little jumbled. I sorted the extensions and added
suitable human readable names.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07 13:15:54 -08:00
John Van Ostrand
8136306911 Added import for Liquivision LVD log files
Support includes cylinder pressures and works for v3.0 log files.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-07 13:15:38 -08:00
Robert C. Helling
20a9db779d Offer to save to a copy in replan mode
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>
2014-11-04 07:21:34 -08:00
Tim Wootton
6fc32f6240 Capitalisation in file type list
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-01 09:27:33 -07:00
Tomaz Canabrava
14bc7dfeeb Repopulate the LocationFilter when lading a dive file.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31 14:58:56 -07:00
Tomaz Canabrava
358611d029 Implement the Buddy Filter interface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31 14:58:55 -07:00
Tomaz Canabrava
19ac1dfa09 Added a 'MultiFilter' widget.
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>
2014-10-31 13:52:51 -07:00
Tomaz Canabrava
063e6d9fbf Ctrl+F now opens the Tag Filter
And old code for the old searchbar removed.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31 13:52:51 -07:00
Tomaz Canabrava
1876bec08b Make possible to hide the tag filter.
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>
2014-10-31 13:52:51 -07:00
Tomaz Canabrava
d50e2d3356 Do not allow to collapse the pannels of the mainwindow
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>
2014-10-31 13:52:51 -07:00
John Van Ostrand
1899d99d1c Fixed RegExp bug
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>
2014-10-28 14:18:29 -07:00
John Van Ostrand
884f653176 Added Cochran CAN files to the Open Logbook dialog
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>
2014-10-28 14:16:02 -07:00