Commit graph

5502 commits

Author SHA1 Message Date
Dirk Hohndel
abb9a6c12d Globe: don't show the location edit message after aborting plan
For some reason the isVisible() check failed, even though the message is,
indeed, visible. But it doesn't seem to hurt to unconditionally hide the
message, so I'm doing that instead.

Fixes #576

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 17:45:11 -07:00
Linus Torvalds
e92576600b Parse git-format picture data
This adds the loading of picture data from git repositories too.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 17:18:09 -07:00
Linus Torvalds
5b311abfb5 git-format: save dive picture data
This doesn't actually parse the data at load time yet, but I need a save
file to do that..

The diff looks larger than it is because this moves the "mktree()"
function up earlier to be used by the picture saving code.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 17:17:57 -07:00
Anton Lundin
537beb319b Only calculate deco stops, TTS and NDL every 30s
This introduces a limiter that we only calculate deco stop, TTS and NDL
with a minimum of 30s intervall and just reused the values from the
previous sample in other cases.

I run my OSTC3 at 2s sample intervall so this is a 15x speedup in that
case.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 17:16:43 -07:00
Anton Lundin
b2288e1e3d Calculate approx gas bill on dives
This uses a bit of naive gas computations to figure out how much of
different base gases you used up on the dives the statistics is done for.

It's quite useful to get a minimum line about how big your gas bill is
going to be after a dive trip.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 17:15:09 -07:00
Willem Ferguson
c020cda41b Update of user manual
Several updates are implemented here.

1) Updates to the dive planner section, following excellent
suggestions from Rob.

2) Updates reflecting the date picker, including hitting ESC
to close the calendar.

3) The edit of device names.

4) Several small or typographic edits

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 09:44:28 -07:00
Dirk Hohndel
abd4fb0991 MainTab: make the tag widgets play nicer with large fonts
Doing this I noticed that the dive list doesn't like huge fonts, either.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 09:07:31 -07:00
Dirk Hohndel
4de78729d7 Maintab: make design more fluid
I'm not sure I love the result just yet - the different fields don't quite
stretch in a natural way (i.e., they don't stretch proportionally), but at
least eventually they all stretch.

Fixes #569

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 09:00:41 -07:00
Willem Ferguson
de8dbf2dad Updates to user manual: Preferences and Main menu
This patch updates the section on Preferences to accommodate
the newer additions to this Panel.
(Three images removed, five images inserted)

The section dealing with the desciption of all the main menu items
is updated.

One small change to the FAQ section.

A few small typo edits elsewhere in manual.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 08:36:07 -07:00
Robert C. Helling
a9b030ed44 Fixed SAC in planner
When I moved the settings for SAC's from the planner to the plannerSettings widget
I forgot to move the corresponding methods from one class to the other.

This fixes the display of the gas consumption in the planner

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 08:35:37 -07:00
Henrik Brautaset Aronsen
0f535620e4 Don't translate HTML tags
We were sending HTML tags to translate() in worldmap-save.c

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 08:34:24 -07:00
Anton Lundin
5617f36ed8 Surface pressure is in mbar, not bar
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 08:33:02 -07:00
Dirk Hohndel
816a78f5ba Profile: show dive computer nickname instead of model
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-29 08:31:37 -07:00
Dirk Hohndel
b1e50fb157 Profile: change event icon for gaschange
This is not ideal, but it gets us closer to what we need.

Fixes #556

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 21:07:39 -07:00
Dirk Hohndel
7f783e2147 Profile: remove old picture event handling code
We now handle pictures differently.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 20:54:01 -07:00
Willem Ferguson
f1f16b224b User manual: add more about dive log export.
This patch updates the information about dive log export.
Export to Worldmap, as well as to HTML are covered.

Small typo corrections elsewhere in the manual.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 16:01:59 -07:00
Willem Ferguson
dd9d68a359 User manual: Load photographs
This patch adds text and figures to the user manual, explaining how to
add photographs to the dive profile.

A 2-sentence paragraph was added to the dive planner text, detailing
planning for repetitive dives.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 16:01:48 -07:00
Willem Ferguson
2292abd552 User manual: add text for the dive planner
Text for the dive planner has been added to the user manual.
This includes two new images.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 16:01:38 -07:00
Dirk Hohndel
3ef490fe11 Fix crash when cancelling a trip edit
We were comparing the wrong data and freeing things that shouldn't be
freed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 13:42:38 -07:00
Dirk Hohndel
413c276258 Calendar Widget: make it modal
Also fix the setWindowFlags calls - those are not incremental, so you need
to call the method once and combine the flags.

I would also like ESC to close the calendar widget, but haven't figured
out how to do that...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:57:47 -07:00
Dirk Hohndel
3179e0f722 Calendar Widget: get rid of week number
It puzzles me that this is the default.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:41:10 -07:00
Dirk Hohndel
0ea86d83c1 Calendar Widget: set the locale appropriate first day of the week
Also adjust the minimum size, given I changed this in commit
26855234ac ("Make date widget easier to read").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:38:16 -07:00
Joakim Bygdell
48a3d1b79c Make calendar stay on top
This patch makes tha calendar stay on top at all times.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:21:07 -07:00
Dirk Hohndel
a1c933da9f Planner: small fixes for the UI
This way the calendar looks more "natural".
And a typo fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:18:29 -07:00
Dirk Hohndel
d25e31525c Merge branch 'fixPlannerStartTime' 2014-06-28 08:07:59 -07:00
Dirk Hohndel
06a8002a2d Planner: implement sane way to set the start time of the planned dive
This uses the same widgets we use on the maintab.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:07:28 -07:00
Dirk Hohndel
4b18da1f22 Use date / time entry for start time of planned dive
This is not hooked up, yet, just the UI change.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 08:06:58 -07:00
Sergey Starosek
20e0aba0b4 Rename slot to get rid of auto-connect warning
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 06:35:19 -07:00
Sergey Starosek
2a8f32b87e Fix date and time l10n
QDateTime::toString(const QString & format) uses system locale
for month and day names.

In order to get localized month and day names for user-choosen locale
use QLocale::toString(const QDateTime & datetime, const QString & format)
instead.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 06:34:13 -07:00
Sergey Starosek
22d56889bb Fallback to loading theme icons from resources
Since not all platforms support theme icons, we need to pack
them into resources and fallback to that resource theme.

There seems to be a bug in Qt
(https://bugreports.qt-project.org/browse/QTBUG-16697), thus
default theme name (hicolor) does not work. So we test for
'window-close' theme icon on startup and if not found, set theme
name to 'subsurface'

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-28 06:29:20 -07:00
Tomaz Canabrava
c84b40664d Fix dive picture position
I was messing with the origin point, making the dive picture
be a tiny bit to the right. This removes the rotation, but
that was also not very good.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 20:37:11 -07:00
Tomaz Canabrava
e40367fc39 This is unecessary when calling methods.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 20:37:11 -07:00
Tomaz Canabrava
3f98f024e4 Open picture manager when clicking on the picture at the profile
This patch makes the click on pic == open picture browser works
also on the profile instead of only on the list view..

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 20:37:11 -07:00
Dirk Hohndel
259b73335f Remove unused variable
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 12:13:27 -07:00
Dirk Hohndel
a8a9deb262 Better date localization
Instead on relying on the translators to correctly format date and time we
should be able to get all we need from QLocale. Sadly this takes a bit of
hacky post-processing, but in my limited testing the results look good.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 12:07:47 -07:00
Sergey Starosek
e88f37d327 Start external viewer on photo double-click
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 06:56:21 -07:00
Sergey Starosek
d1511aa968 Emit signal on photo double-click
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 06:56:16 -07:00
Anton Lundin
b6fac74f6e Care about drop_stone_mode in createSimpleDive
The checkbox is remembered as long as the program is still running, so
if you planned one dive with drop_stone_mode and saved/aborted and then
tried to plan another one we had a first "down" waypoint from
createSimpleDive and drop_stone_mode was also enabled.

This makes sure we don't add the first waypoint in createSimpleDive when
drop_stone_mode is enabled and lets that add a implicit first waypoint.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 06:54:59 -07:00
Anton Lundin
707b9f0666 Close snprintf warning
Gcc yells:
warning: format not a string literal and no format arguments

This closes that warning.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-27 06:54:44 -07:00
Dirk Hohndel
26855234ac Make date widget easier to read
At least on my screen this is much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 16:14:44 -07:00
Dirk Hohndel
a925e677f1 Correctly use our "localtime"
We use time stamps without timezone, so we need to correct for the current
time zone offset before showing dates and times in time zone aware
widgets.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 16:05:48 -07:00
Tomaz Canabrava
3de498b466 Re-enable possibility to edit manually added dive.
This one-liner re-adds the possibility to edit manually added dives.
Tested because I didn't belived that it was going to be so easy, but it
seems that it was.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:51:28 -07:00
Tomaz Canabrava
3f1efecdde Break really long line
Hard to read on the editor.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:51:12 -07:00
Tomaz Canabrava
f6d133d742 Fix crash when trying to add a dive or plan when a filter is active.
The planner used the selected dive on the dive list, and
when there's a filtering in action it can be in a state where
there's no dive selected.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:49:19 -07:00
Tomaz Canabrava
81fd56b16f Fixed changing dates with the new date widget.
The maintab was connecting with an invalid slot on the
new date widget, QDateTime instead of QDate

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:48:49 -07:00
Tomaz Canabrava
1e2349e794 Added code for TimeEdit
This makes the TimeEdit work again.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:48:33 -07:00
Tomaz Canabrava
7c037c8d05 Added a TimeEdit
The thing that I was trying to do didn't worked, getting back
to the original Qt timeEdit.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:48:19 -07:00
Tomaz Canabrava
f01fdc48bc Better visualization of the maintab in the designer
The layout of the maintab differed a bit between the application and the
designer because the designer didn't take into account that the
divemaster, buddy and tags were one line widgets.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:47:37 -07:00
Tomaz Canabrava
89816f64c2 Headers cleanup.
Too much noise on the headers, this commit remove uneeded
headers when they are uneeded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:47:02 -07:00
Sergey Starosek
b05d15c5a9 Make system proxy as default
On first start (no settings saved yet) system-wide proxy should be
default.

Proposed-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-26 15:44:51 -07:00