Commit graph

4566 commits

Author SHA1 Message Date
Anton Lundin
909cfe7135 Set the prefs-value alongside the button status
Previous code just set the button-"status" based on what we stored on
the settings. This sets the corresponding value in our prefs-struct.

This fixes the same issue as in 63f7f3, without the side effect of
magically hiding the mean depth line.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 13:42:07 -08:00
Miika Turkia
b7940dec5c XSLT to export dive log in CSV
This implements divelog export into CSV format. This currently supports
only metric units and lacks user interface.

See #434

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 12:04:15 -08:00
Anton Lundin
3df506b081 Spelling fix, Its called Ndl
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 11:16:38 -08:00
Dirk Hohndel
92da9c7f7c Strip incorrect iCCP profiles from new icons
simply run
convert <name>.png -strip <name>.png

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 11:08:58 -08:00
Andrey Zhdanov
3be1358b46 Icons for new profile
Existing dummy icons are replaced with new ones for:
- o2 graph
- n2 graph
- He graph
- MOD
- EAD, EED, END
- DC reported ceiling
- calculated ceiling
- calculated ceiling in 3m increments
- SAC
- ruler

Fixes #446

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 10:53:30 -08:00
Dirk Hohndel
d29d0e7a5d Revert "Switch profile button events, clicked to toggled"
This reverts commit 63f7f37e46.

For odd reasons this appears to make the mean depth line disappear. This
will require some further analysis, but for now I'll just revert it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 10:37:07 -08:00
Gopichand Paturi
9b07acbee8 Add Units to mean depth value
Fixes #445

Signed-off-by: Gopichand Paturi <gopichandpaturi@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-02 08:16:29 -08:00
Nicu Badescu
b3c0f8938d Fix negative value for depths in Information Box
The get_depth_units function was expecting an unsigned int as a first parameter.
When it received a negative integer, the function made a cast to an unsigned int,
resulting in a very big number.

Signed-off-by: Nicu Badescu <badescunicu@yahoo.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-28 16:32:01 -08:00
Joshua Wambua
a8bce0bb9f Fix minor spelling error in CodingStyle
Fixes a minor spelling error in the CodingStyle file.

Signed-off-by: Joshua Wambua <joshua@megvel.me.ke>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-28 07:57:09 -08:00
Joshua Wambua
9cd3d61c11 Remove failed parses from recent files menu
This patch will remove all files that fail to parse from the recent
files menu.

Signed-off-by: Joshua Wambua <joshua@megvel.me.ke>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-28 07:51:41 -08:00
Dirk Hohndel
76e6420f6b Massive automated whitespace cleanup
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 20:09:57 -08:00
Tomaz Canabrava
006265d7a0 Try to fix the font issue on the ruler.
This changes the ruler a bit, I hope nobody gets offended by it. :)

The main issue is that the scene is now 100x100 pixels wide, so the font
was *really* huge. and setting itemIgnoresTransformations on the ruler
broke a lot of stuff.

I removed the code that painted the text and created a QGraphics TextItem
for that - that will hold the text for the ruler.

Then I played with the view to get the correct angle of the line, that was
in scene coordinates and thus, could not be used directly on the item that
had ignore transformation changes.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 18:57:48 -08:00
Anton Lundin
63f7f37e46 Switch profile button events, clicked to toggled
This is needed so the underlaying struct preferences prefs, will be
updated when we set the buttons to there previous state after we
loaded the settings.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 18:55:54 -08:00
Anton Lundin
619d4acb6f Remove old leftover header
This got merged into a common divelogimportdialog.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 18:55:38 -08:00
Anton Lundin
5bbe931b6c Add some notes about vim settings for our style
Basic vim settings to mostly follow our coding style.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 18:55:17 -08:00
Anton Lundin
a6024f50d8 Remove old icon files
This was leftovers from the Gtk days, no longer in use.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 18:52:44 -08:00
Dirk Hohndel
7695a50b4d Remove the old Gtk translation infrastructure
Long overdue

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 12:06:50 -08:00
Tomaz Canabrava
a4d0f7bdb3 New profile: Make the ruler work. (caution, fonts are BIIIG )
This patch makes the ruler work again, the problem is that the fonts are
*terribly* big, I'll fix that on the next commit.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 12:03:59 -08:00
Tomaz Canabrava
0a24e13469 Remove the pInfo pointer, make it a real structure instead.
This fixes the invalid pointer stage crash.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 12:03:34 -08:00
Alberto Corona
0d62efaa39 Tune CVS import dialog
Increased vertical spacing between spinboxes and checkboxes for the manual
CVS import dialog

Fixes #448

Signed-off-by: Alberto Corona <albcoron@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 11:44:59 -08:00
Tomaz Canabrava
c356fac3b6 New profile: Toggle on / off the ruler via settings.
This patch toggles on / off the ruler via QSettings.
When the user clicks on the toolbar, this sets the settings to true /
false, in a way that if the user turns Subsurface on/ off, we still get
the last choosed option.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
35e102b176 New profile: add the RulerItem
This patch adds the RulerItem inside of the new profile, and already takes
settings into consideration.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
250653a67f New profile: DiveRuler compiles / not working yet.
This patch removes the GC macros and change the calling to use the
DiveCartesianAxis.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
52fe9101c8 New profile: add placeholder code for the RulerItem
This patch just creates two files for the rulerItem, a .h and a .cpp.
nothing was done to make it visible on the new profile yet - will do that
on the next commits

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
1695894130 New profile: connect the scale action
Just quick'n dirty glue code so that when the user clicks on the 'scale'
toolbar item, the new profile graphic is scaled.

Lovely thing: Animations for free. <3

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:47 -08:00
Tomaz Canabrava
8c56b2f45e Store zoomed plot in preferences
This patch makes the 'Zoomed Plot' a preference that can be stored and
retrieved, this way if the user sets the plot to be 'zoomed', this
information will persist even if they closed or opened subsurface again.

Also, added the 'Scale' button on the new profile, but didn't did the glue
code yet.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 10:48:35 -08:00
Dirk Hohndel
0307f3d543 Add explanations and Emacs / QtCreator settings to CodingStyle
These may not be perfect, but they are a start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27 07:57:22 -08:00
Thiago Macieira
68d80e7a9d Update the Mac Info.plist structure
The bundle signature is not a necessary property in any of the OS X
versions we support. And the current bundle version identifier is 6.0,
not 1.0.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 17:17:50 -08:00
Andrey Zhdanov
fdc11abe68 Typesetting in profile infobox
There should be a space between the colon and the value in the information
box in the profile.  The vertical speed should have only one digit after
the decimal point.

Fixes #443

Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 15:38:46 -08:00
Danilo Cesar Lemes de Paula
5846ff972d Fixing default font on preference window
Default font was hardcoded as 14.
What happen if you change any other preference value is that the
application would start to use fontSize=14.

This commit loads the right value in the QDoubleSpinBox

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 11:51:33 -08:00
Dirk Hohndel
30b25d1212 New profile: create fake DC if we have no samples
This call got lost when creating the new plot_info structures.
dives/test15.xml is a good test case.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 11:43:56 -08:00
Danilo Cesar Lemes de Paula
6801c68c2d reseting progress_bar_text for new downloads
if the user tries to redownload something from its dive computer
the interface will be stuck since progress_bar_text won't be empty in
the second run.

Even if I don't really like this idea of that value being changed by
downloadfromdivecomputer.cpp and libdivecomputer.c, that value needs to
be reset by someone.

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 09:00:19 -08:00
Danilo Cesar Lemes de Paula
0e6d893dae set the download progress bar to zero after a download
Before that, the behaviour was that in case of an error or a
re-download, the progress bar would appear for a few milliseconds with
the old value.

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 09:00:19 -08:00
Danilo Cesar Lemes de Paula
ed12902746 disable buttons while downloading
Simple patch to enable/disable extra buttons while downloading.
The UI should be blocked during the download.

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 09:00:19 -08:00
Giuseppe 'ferdy' Miceli
69bf64793c Adding a polite "Please" in front of the warning message.
Signed-off-by: Giuseppe 'ferdy' Miceli <ferdy@ferdy.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-26 08:02:38 -08:00
Thiago Macieira
28d0cb8e2c Set the NSPrincipalClass in Info.plist
This is required to enable HiDPI support for the Retina displays. The
Info.plist that comes with Qt had this, but the one we supply with
Subsurface didn't.

Done-with: Jake Petroules <jake.petroules@petroules.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 17:35:20 -08:00
Thiago Macieira
3318aefa46 Make sure the user-manual.html output always ends up in $(OUT)
If you're doing a non-local build, it would get saved in the source
dir. Then qmake would complain that it couldn't find it in the target
dir.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 15:30:38 -08:00
Dirk Hohndel
67a1e3f3e0 New profile: try to pick better HR samples for which to print number
This simply tries to pick at least local minima / maxima.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 14:24:09 -08:00
Dirk Hohndel
21ed18816a New profile: fix tooltip display for events
We need to use the transform() of the view, not the tooltip.

Suggested-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 13:58:57 -08:00
Dirk Hohndel
eb5cbf64eb New profile: small cleanup of heartrate code
Remove unused variable and correct comment.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 13:30:00 -08:00
Miika Turkia
2b4bce8ef9 Removing MacRoman encoding from sample dive
MacRoman encoding is poorly supported, and there is nothing that needs
any special encodings in the sample file. Thus removing the whole
encoding directive.

Fixes #441

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 12:28:49 -08:00
Dirk Hohndel
c0e489c1ea New profile: add event info to tooltip
This appears to correctly add the tooltip to the event item, but for some
reason the tooltip isn't displayed for most events.

Still needs more work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25 12:27:12 -08:00
Dirk Hohndel
b5a02e50aa New profile: create new class for DiveHeartrateItem
This allows us to give it a different color (red) and make it a smaller
size.

While implementing this I also fixed the size of the temperature text in
the new profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 15:28:31 -08:00
Dirk Hohndel
76393a2f53 New profile: better positioning for the heartrate labels
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 14:36:47 -08:00
Dirk Hohndel
41abab7253 Calculate minimum and maximum heartrate
And setup the axis accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 14:32:25 -08:00
Dirk Hohndel
9712999e66 User correct branch name for Marble
Oops, that was the tag, not the branch.

Reported-by: Darren Hart <darren@dvhart.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 08:41:47 -08:00
Dirk Hohndel
4c68d4c616 Make sure that there are plot_info entries for events
We use the plot_info as basis for our dataModel in the new profile. In
order to be able to place events at the right spot we need to have a
plot_info entry when the event happens. So let's add interpolated entries
not only based on time but also whenever there's an event between them.

This should address Robert's comment in commit 0474fe70fc ("New profile:
add image pixmaps for image events").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 08:36:20 -08:00
Dirk Hohndel
f5862201a8 Don't try to setup event if it is NULL
This also fixes the whitespace in a function that I instrumented to figure
out what's going on. I restored it to its original state, but I couldn't
leave the whitespace unfixed...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 08:35:06 -08:00
Dirk Hohndel
48db63736b Don't try to set visibility of events before they have been added
Admittedly this code doesn't do anything useful right now, but at least
have it not to anything useful in the right spot.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 08:33:58 -08:00
Dirk Hohndel
cfed6efecc Add resource for flag icon
This has been broken in the old profile for a while (as we use the flag
icon there by name).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-23 08:18:30 -08:00