Commit graph

112 commits

Author SHA1 Message Date
Willem Ferguson
7575eb44df CCR code: Split profile.c into two files, with gas caluclations separate.
This patch implements a separation of the code for gas pressure
calculations from the rest of the code in profile.c. The latter
file is now split into: profile.c and gaspressures.c. The
details of the transferred functions is given at the top of
gaspressures.c. The following chnages were made:
1) dive.h: The function types of calculate_depth_to_mbar
   and depth_to_mbar were made non-static in order to make them
   available within gaspressures.c.
2) profile.c: Prototypes for the functions in gaspressures.c
   were inserted at the top of profile. Ten functions were
   transferred from profile.c to gaspressures.c
3) gaspressures.c as well as a short header, gaspressures.h
   were created.

For the gas pressure calculations for CCR dives, gaspressures.c
forms the immediate basis for further code development.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25 13:53:51 -07:00
Dirk Hohndel
5f5834698c One more attempt to get Mac back to work with Qt4
This was stupid on my part - I didn't look closely enough at the offending
commit the first time I tried to fix it. And didn't have access to a
working Mac with working Qt4 to test (still don't).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21 06:10:13 -05:00
Dirk Hohndel
5033a0488c make clean should remove the compiled binary
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20 20:07:35 -05:00
Dirk Hohndel
fc96daf93f Fix build on Mac with Qt4
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19 21:26:14 -05:00
Dirk Hohndel
150676ce3d Merge branch 'joshua-gsoc' of git://github.com/thiagomacieira/subsurface into josh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

Conflicts:
	subsurface.pro
2014-08-18 20:25:06 -05:00
Thiago Macieira
b1cd536e1c Fix build with Qt 5
<QPrinter> is in QtPrintSupport, so we need to declare we want to use
it.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-17 23:25:02 -05:00
Dirk Hohndel
34fceb4a1b Cut'n'paste for dive data: implement copy side
Admittedly not very useful without working paste, but it's progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-16 10:07:06 -06:00
Dirk Hohndel
fa3c18d83b Add initial support for a visual tracker of gas used
This shows a color-coded bar at the bottom of the graph that corresponds
with the active gas.

Todo:
- text that explicitly states gas on the left edge of the bar
- better vertical positioning of the bar
- ability to turn this on and off

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-14 18:22:27 -06:00
Joseph W. Joshua
4f37602836 Move non gui code from qt-ui
Moves non gui classes (configuredivecomputer, configuredivecomputerthreads
and devicedetails) from qt-ui to the top level folder.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
4fc16b1674 Move divecomputer configuration code to different files
This splits the code in configuredivecomputer.cpp into multiple files.
The read and write threads are moved to configuredivecomputerthreads.h/cpp,
and the device details class is moved to devicedetails.h/.cpp

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:06:42 -03:00
Joseph W. Joshua
a7c9b25b05 Read basic details from dive computer
Added classes for reading data from dive computer. This is
at the basic level and I will expand it as I go along.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 12:01:54 -03:00
Joseph W. Joshua
ec02737eda Create Dive Computer configuration dialog
Create a dialog for reading and writing settings to and
from dive computers, with a menu entry in MainWindow to
open the dialog.

I will build up on this dialog and change it as needed.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09 11:50:14 -03:00
Dirk Hohndel
af1d77056e Change version to 4.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:39:19 -07:00
Dirk Hohndel
a22544f49a Include SupportedDivecomputers.txt with the bundled docs
After all, it's referenced in the ReleaseNotes.txt and the README

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:55:22 -07:00
Dirk Hohndel
092a973f7c Install README and Relnotes so they get included in installers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-04 13:21:11 -07:00
Dirk Hohndel
70235cb45c Getting ready for Beta 5
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-04 13:02:11 -07:00
Dirk Hohndel
41953c8c46 Get the Russian manual installed as well
This way it will end up in the installers, too.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-04 06:50:39 -07:00
Dirk Hohndel
d4954d831d Some adjustments to the Qt translations
It appears that in newer versions of Qt some (but not all) of the lanuage
translations have been broken out into different files.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-02 16:08:16 -07:00
Dirk Hohndel
6bd6a22a1f Getting ready for Beta 4
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-25 12:36:46 -07:00
Dirk Hohndel
3f9049290e Getting ready for Beta 3
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-24 13:53:21 -07:00
Dirk Hohndel
359613210b Getting read for Beta 2
Tiny updates to Relnotes and README, include the latest formatted manual,
change the version in the project file

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-18 18:00:28 -07:00
Dirk Hohndel
c983dc0c75 Preparing for Beta 1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-12 21:09:32 -07:00
Dirk Hohndel
dae02d5fd2 Translations: force UTF-8 encoding
This seems to fix transifex issues with strings containing ₂ (subscript 2)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-09 10:06:00 -07:00
Dirk Hohndel
da911993f1 Small cleanups
Add commented out options to subsurface.pro that enable debuging the planner.
Remove obsolete comment.
Clean up the selection tracking.
Force the re-sort of the divelist inside the reload instead of explicitly
calling it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-03 21:05:08 -07:00
Tomaz Canabrava
927bc5d601 Fixed SearchBar layout and icons
This is almost a rewrite of the Search function on the WebView
the old code had a few uneeded things, mostly being a subclass
of QMainWindow instead of the QWebView - this makes the code
use a tiny bit less ram.

The SearchBox was also moved to an own class ( we can use it
later to filter the contents of the DiveList for instance )

and a forced use of the pixmaps for the Mac and Windows platform
was added.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30 16:04:24 -07:00
Dirk Hohndel
7f3efbdc98 Make gas mod be reasonable for users of imperial units as well
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25 21:41:58 +08:00
Venkatesh Shukla
6e10615666 Template for subsurface android package
For modifications to the final source code of built android package
such as permission additions and inclusion of xml and java files, it
is necessary to maintain a template. The template is copied without
any modifications on top of qt android-template before building
subsurface libraries. Refer:
http://qt-project.org/doc/qt-5/deployment-android.html#qmake-variables

Files that are required to be directly copied to android package
would be included in directory android.
Icons for subsurface on android and string.xml are included.

Signed-off-by: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-25 13:50:21 +08:00
Joseph W. Joshua
1ec5e6ffc4 OS Detection
Implements automatic OS and architecture detection. This code has
been taken from the Qt repositories for Qt 5.4 (LGPL) and slightly
modified into the SubsurfaceSysInfo class.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-14 12:50:35 -07:00
Dirk Hohndel
cdd3b3d9cd Start a user survey dialog
The idea is that a week after the user starts using Subsurface we ask them
if they would like to submit a survey response.

If you are running a development build, don't wait seven days.

This patch doesn't do anything with the user's selections, doesn't submit
anything to our server, etc. It's just a placeholder to tune what we
should ask, etc.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-13 14:03:51 -07:00
Robert C. Helling
708f19830e Planner: New plannerSettingsWidget
In planner mode, this replaces the globe with the dive plan and introduces
a new plannerSettingsWidget in the diveListPane. All new fields are still
disfunctional. This is WIP.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-12 09:30:46 -07:00
Dirk Hohndel
397e39eb4f Qmake: make clean failed on Windows cross builds
For some reason the docclean rule wasn't included in the Makefile when
cross building for Windows on Linux. Doing some searching into the issue I
found a much easier way to handle the make clean stage and sidestepped the
actual problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11 11:09:24 -07:00
Dirk Hohndel
de6ee1f8a9 ENABLE_PLANNER is obsolete
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11 09:38:03 -07:00
Thiago Macieira
49dac1d129 Attempt at telling Makefile how to build the user manual
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08 11:02:46 -07:00
Thiago Macieira
d051399229 Make make clean also clean in the doc subdir
Also add reminder comments for creating debug builds on Windows

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-08 11:00:37 -07:00
Joakim Bygdell
4d8d0e339e Typo in subsurface.pro prevents a clean build on Mac.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-07 07:38:31 -07:00
Dirk Hohndel
a38e476bee User manual: install English and localized copies
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-06 12:22:42 -07:00
Dirk Hohndel
cc22a98766 Install HTML export theme files on Windows and Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-05 16:26:35 -07:00
Gehad elrobey
99d886f57f Update install script: copy HTML theme directory to usr/share
Updating the qmake file to check and copy the theme directory under
usr/share. THIS needs to work on windows and mac.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-03 21:08:48 -07:00
Tomaz Canabrava
d95d1735b5 Break picture handling code from C++ to C.
This commit breaks the loading of images that were done in the divelist
into smaller bits. A bit of code refactor was done in order to correct the
placement of a few methods.

ShiftTimesDialog::EpochFromExiv got moved to Exif::epoch dive_add_picture
is now used instead of add_event picture_load_exif_data got implemented
using the old listview code.  dive_set_geodata_from_picture got
implemented using the old listview code.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-02 23:59:29 -07:00
Tomaz Canabrava
13e8aba7da Fix compilation of the Qt Concurrent code.
Forgot to add qt concurrent on the .pro file, sorry.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-02 23:59:07 -07:00
Tomaz Canabrava
1c34c831a4 Add stub for a widget to show the dive pictures.
This has a few classes: the model is the list of pictures for the current
dive, the delegate is how this pictures will be displayed on screen, the
widget is the collection of delegates, and the DivePictureThumbnailThread
is a worker-thread to generate the thumbnails so the UI will not freeze.

[Dirk Hohndel: added the new files to subsurface.pro]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:07 -07:00
Gehad elrobey
a3dbb5865c HTML list exporter
Exporting the raw dive list into JSON format for later viewing with html
and js files.  Also some worldmap code organizations.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-29 07:24:17 -07:00
Tomaz Canabrava
feff22c222 Planner: Re-enable using the new profile.
This correctly enables the planner on the new profile,
but it doesn't triggers the correct paint on the canvas.

[Dirk Hohndel: remove other remnants of the disabled planner as well]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-26 13:17:32 -07:00
Miika Turkia
7dc642860d Implementing export dialog
As our menus are getting many export entries, it is better to create a
single export dialog where user is able to select the export type and
whether to export selected dives or all of them. This should also be
more intuitive than the current way when export from file menu export
all dives and right click menu on divelist exports only selected dives.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-21 03:31:43 +09:00
Tomaz Canabrava
6ab05563b3 Move DiveList related methods/classes to own file.
The DiveList classes were a partial mess (and some of it is still in a
messy state). The classes that deal with it where done in 'qtHelpers.h',
the extern global variable in dive.h, a few methods here and there. This
concentrates most - but not all - functions in their own file. The reason
for that is to make the new developer faster when looking for things: if
it's a divecomputer related method, it should be in a single file, not
scattered around.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-13 09:20:28 +09:00
Dirk Hohndel
5bd6361f91 Getting ready for 4.1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-07 21:35:40 -07:00
Dirk Hohndel
20595ac0d7 Last minute Beta 4
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-06 11:32:48 -07:00
Dirk Hohndel
3e17690525 Bump to Beta 3 / 4.0.98
Beta 2 didn't last long...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-01 21:30:29 -07:00
Dirk Hohndel
2dda348bab Getting ready for 4.1 Beta 2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-30 21:36:38 -07:00
Dirk Hohndel
d98f715942 Translations: New strings sources and update translations
I'm not the author (except for the new German translations), just running
the tools.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-26 17:49:03 -07:00