aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-08-27HTML: Save divecomputer data to the HTML exportsGravatar Gehad elrobey
Save divecomputers data to the JSON files. and show them in the HTML dive detailed view. Fixes #711 Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27Add uncompressed Poseidon CCR XML dive log to the directory subsurface/dives.Gravatar willem ferguson
This file is not in the original unformatted style of Posedon but in an intermediate XML for developing the Qt interface. At the end of development this file will be replaced by the original unformatted dive log. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-27CCR Patch: Adapt pressure interpolation for CCRGravatar willem ferguson
This patch adapts pressure interpolation (function pr_interpolate_data) in order to process CCR diluent gas as well. A flag diluent_flag is added to the variables for calling this function indicating whether the gas being worked with is diluent gas or not. This is necessitated by the fact that the diluent gas storage is separate from that of the other gases. The data used for interpolation are selected from the appropriate array, depending on nthe value of diluent_flag. In function fill_missing_tank_pressures, diluent_flag is set to 0 in order for the code to work with the current CCR adaptations. The above constitutes no. 1 of a four-part set of patches that allows pressure calculations for CCR gases. There will be CCR functionality only after the whole set of patches is complete. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26TableWidgets: change default column width and don't save unchanged widthsGravatar Dirk Hohndel
Similar change to the dive list. The idea is to not save things that are the default. This way Subsurface will do the right thing when defaults change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26DiveList: don't save default column widthGravatar Dirk Hohndel
This is an elegant way around our problem with people who have the horrible old "100px" column width in their settings. The first time they run Subsurface after this fix things won't get better, but the offending keys will be deleted at exit. And the second time they run, they'll get the much more sensible new default widths. Thanks to Thiago for this idea. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26CCR patch: Create memory space to store cylinder pressuresGravatar Willem Ferguson
This patch creates memory space to store both the cylinder pressure of the diluent cylinder as well as the oxygen partial pressures of up to four oxygen sensors. This is accomplished within profile.h 1) To the plot_data structure, add: a) an array diluentpressure[2] to store diluent pressures b) create o2setpoint and o2sensor[4] to store oxygen partial pressures 2) Define a constant and prototypes to access the cylinder pressures and their corresponding interpolated values. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Fix planner gas consumptionGravatar Dirk Hohndel
We need to start out with valid SAC rates in the diveplan. Thanks to Gaetan for finding this and suggesting a different fix - this seems cleaner to me. Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-26Fix missing translations for webservice responsesGravatar Dirk Hohndel
The webservice backend sends responses in English. Let's do a better job presenting those in the users preferred language. Fixes #714 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Implement the modelDataChanged to repopulate the widget on StatisticsGravatar Tomaz Canabrava
The modelDataChanged method will remove all items and recreate everything *right* now we will never use it, because we are not triggering any changes on the model, but simply deleting and recreating it everytime we open the dialog. to be changed in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Use scene()->clear() instead of manually clearing the scene.Gravatar Tomaz Canabrava
When there's a rowsAboutToBeRemoevd, remove all items from the scene() by calling scene()->clear(), instead of creating a method just for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Use aboutToBeRemoved instead of removedGravatar Tomaz Canabrava
If we used removed things from the interface we could hit a dangling pointer, so first delete the items, then let the system delete the rows. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Implement the resizeEvent to make the statistics always visible.Gravatar Tomaz Canabrava
Always fit the whole scene in the view. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Create stub methods and connects the model with the new statisticsGravatar Tomaz Canabrava
Connects the YearlyStatistics model with the YearlyStatisticsWidget nothing is shown right now, mostly because I need to do everything but now it's easyer to add the things that are missing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Add the old Statistics to have a reference view while programmingGravatar Tomaz Canabrava
Added the old statistics panel at the botton of the new one to have a reference view of the statistics while programming the new one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Remove a lot of non-necessary boilerplate code.Gravatar Tomaz Canabrava
We used to have a very sad way of controlling the statistics, now we will create the model when there's a need for it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Add initial skeleton for the Statistics RedesignGravatar Tomaz Canabrava
The statistics widget is a beast, one of the parts that I dislike most on the current subsurface implementation. This is the initial work to change that to something amazing. This first commit adds the first bunch of files that I think are needed, and the correct setup for the qmake and cmake buildsystems. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Code cleanup: gaspressures.cGravatar Willem Ferguson
This patch does some cleaning up of code after the previous CCR patch that extracted the contents of gaspressures.c form profile.c 1) Inapplicable #defines were removed 2) static function types were reinstated where practically possible. 3) comments at the start of the file were expanded a bit. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Fix NO_USERMANUAL building for androidGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25Fix android font configGravatar Anton Lundin
In e893f6bd9db696a1d647b796138233152ca290fa ("Use the Windows default font on Windows 7 and 8/8.1") font config was changed, but the android font config wasn't changed. This updates the android font config to match the new way. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-25CCR code: Split profile.c into two files, with gas caluclations separate.Gravatar Willem Ferguson
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-23Re-enable the edition of the Date after editing a trip.Gravatar Tomaz Canabrava
Since we can't edit the trip date, we need to remember to re-enable it after we disable it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23A much better Toolbar for the profile.Gravatar Tomaz Canabrava
Using QToolBar I was able to remove much of the dead code from the mainwindow.ui xml file by transforming the QToolButtons into actions and loading them dynamically in the .cpp code. I couldn't use the designer for this ( as I wanted ) because Qt has no notion of ToolBars outside of the areas where the MainWindow should have one, and we use it in a very different area. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23Complement the CMakesList.txt with the latest file inclusions.Gravatar Tomaz Canabrava
Just added the missing files to the CMakesList.txt Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-23TankBar: don't risk dereferencing stale pointersGravatar Dirk Hohndel
Basically we could end up in a situation where the plotInfo is no longer valid, yet the model changes and triggers a redraw before the new data is passed into the TankBar. Instead of chasing that race condition it seemed much easier to just copy the plot_data entries and the gas information in the dive. Fixes #716 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Add new strings and pull latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Use the Windows default font on Windows 7 and 8/8.1Gravatar Dirk Hohndel
It contains the characters we need and will make the application look more "native". See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Divelist: Use more sensible default column widthsGravatar Dirk Hohndel
Having 100px wide columns was simplistic and stupid. It was never intended to stay that way. See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22Divelist: switch to better column headersGravatar Dirk Hohndel
And move the units there. This is a long going back and forth. What we want is narrow columns. But what we need is something that's easy to understand for our users. I'm open to other suggestions, but I think this moves us in the right direction. See #712 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-22We should never show decimals on depth in feetGravatar Dirk Hohndel
That's 3cm resolution - just unrealistic Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Fix selection logic when manually adding a diveGravatar Dirk Hohndel
This was an interesting bug. When adding a dive that would end up in the middle of the dive list, the newest dive in the dive list would end up marked in the dive structure as selected - even though it wasn't visualized as selected by Qt. Bad things happen if the user then made changes to that dive without selecting something else first, for example by either editing the dive or doing things to it like removing it from or adding it to a trip. The same operation would also be applied to the newest dive in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Planner: Control-Click removes divedatapoint and all following onesGravatar Robert C. Helling
In order to offer a simple way to remove a calculated deco, if Control is pressed while clicking on the trash can in the dive plan, that point and all following are removed. This way the user can Ctrl-click on the first calculated waypoint. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Crash clicking on the globe without a diveGravatar Karina Mochetti
When the user right clicks the globe, we should only present the menu action if there's a current dive, if not, we disable it. Signed-off-by: Karina Mochetti <karina.mochetti@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Dive list: seriously simplify the "add to trip" codeGravatar Dirk Hohndel
The existing code seemed way complicated, made way too many assumptions and apparently was broken in certain cases. This code seems very simple, looks correct and should fail gracefully (i.e. simply do nothing) if things get confused. Fixes #706 (I hope) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Show correct path after saving dive computer settingsGravatar Joseph W. Joshua
When backing up dive computer settings to XML, the confirmation dialog shows the default file path. This patch fixes that by displaying the correct file if the user changes the backup location. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Make sure tank bar button triggers tank barGravatar Dirk Hohndel
This worked flawlessly on Mac and Linux, but on Windows I needed to add the explicit setVisible here - not quite sure why. Fixes #710 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21One more attempt to get Mac back to work with Qt4Gravatar Dirk Hohndel
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-21make clean should also remove ssrf-version.hGravatar Dirk Hohndel
Regardless if we are building from git or from a tar file. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-21Add keywords in .desktop fileGravatar Salvo 'LtWorf' Tomaselli
This adds a keywords entry and some keywords in the .desktop file. They are (should?) be used to improve application search in DEs. http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi@tiscali.it> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20make clean should remove the compiled binaryGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20Import decostop information from UDDF filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-20Import NDL form UDDF filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Planner: don't show CC Set Point when planning divesGravatar Dirk Hohndel
So far we only plan OC dives, so let's not confuse things by showing the set point for the tank. Fixes #261 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Planner: make sure start time is reflected in diveplan and displayed_diveGravatar Dirk Hohndel
Fixes #709 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Fix crash when calling the planner twice in a rowGravatar Dirk Hohndel
Turns out that the fix in commit f7119bdccfb2 ("Planner: make sure no old handles are around when entering Add/Plan") was incorrect. We ONLY want to remove the existing handlers when we re-plan a dive, NOT when we call add or plan. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Fix build on Mac with Qt4Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Don't trigger creation of dive from invalid plan in planCreated()Gravatar Dirk Hohndel
This is subtle. The modifications to the selection cause a redraw of the profile. So we need to make sure that we leave the plan state and return to profile state BEFORE we do this, otherwise we'll call into createTemporaryPlan() with invalid data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Mark manually entered waypoints as suchGravatar Dirk Hohndel
With this information, when we re-plan a dive we can bring the user right back to the point where they ended - they have the waypoints in the dive pointes table and handles are shown on the right points in the profile - and the rest of the dive is once again calculated by the planning algorithm. For now this state is lost when saving the dive file as we don't add this flag in the sample to our saved files. So if we don't find any samples marked as manually added we add ALL of the samples as way points on the diveplan and the user has to manually remove the ones that were calculated. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Planner: make sure no old handles are around when entering Add/PlanGravatar Dirk Hohndel
In some cases we don't appear to remove all of the old handles from the scene and end up showing a handle from a previous instance of the planner in the upper right corner of the profile. This patch makes sure that we remove any stray handles that might still be around before entereing plan or add mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-19Planner: after canceling a plan, redraw the profileGravatar Dirk Hohndel
While planning we might have made changes to the displayed_dive. So we need to make sure that the profile is redrawn after we cancel a plan (or a re-plan). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>