aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-02-05Created a method to check if calculations should take place.Gravatar Tomaz Canabrava
Created a method to check if calculations should take place taking into consideration what changed on the model. if the model changes *everything*, them, all calculations should be done, but if just some of the columns of the model are changed, only those columns should trigger an visual update on the items. In theory this patch looks right, but something is wrong ( calculations are not being made. ), so I'll commit this any how, and fix on the next commit. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-02Search pkg-config before {xml2,xslt}-configGravatar Thiago Macieira
Cross-compilation tools provide the right .pc files and a pkg-config to match, but often don't provide the scripts to match. Even if they did, you'd have to change PATH to find them. So give pkg-config precedence. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-02Fix the LIBDCDEVEL=1 build when libdivecomputer was shadow-builtGravatar Thiago Macieira
When that happens, the include/version.h file is in the shadow build dir, not in the sources. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-31User manual: Small text updates and new screenshotsGravatar Willem Ferguson
This adds Gnome-based screenshots to the manual for most of the images not involving the profile. More of the images remain to be done. I rewrote small sections of the text to reflect some of the recent changes. Several images still need to be replaced. The profile images will be done once the profile panel has been finalised. Some text also still needs working. Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-29Fix positioning of many text items.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-29Show gradient factor.Gravatar Tomaz Canabrava
The gradient factor is shown with this patch, but the correct position should still be adjusted. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-29Always calculate deco data, independent of preferencesGravatar Tomaz Canabrava
This is a better way since we can enable / disable the deco by changing the preferences later, and that will not need to recalculate everything just because a polygon was set to invisible. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-29Make the calculated ceiling be preferences awareGravatar Tomaz Canabrava
This patch only adds preference-awareness for the ceiling. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28Remove the hack to create most Makefile variables on UnixGravatar Thiago Macieira
I've just discovered, quite by accident, a new undocumented feature of qmake: it can write Makefile variables. So let's use this feature where we can instead of our hack. The only thing is that it prepends an "EXPORT_" prefix, so we can't use it for a variable like $(prefix) that Linux distributions are expected to try to modify during make install. I've verified that the feature remains in Qt 5.x. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28Fix an issue added in the last commitGravatar Tomaz Canabrava
The last commit made the time and all other axis behave like the time axis. Not cool. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28Use the same behavior as the old time markersGravatar Tomaz Canabrava
This commit adds the same behavior for the old time markers on the new ones. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-28Do not create label if string is empty.Gravatar Tomaz Canabrava
Do not create a text label if the returned string is empty. Also, fixed a potential crash after not creating a label and adding it to the list of created labels. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27Move the 'getSacColor' out of old profile and use it.Gravatar Tomaz Canabrava
This patch makes the color of the cylinder pressure use the sac colors. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27Detect errors while downloading from libdivecomputerGravatar Dirk Hohndel
Show them in the progress bar and offer to retry. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27Fix the semantics of the dive_cbGravatar Dirk Hohndel
Libdivecomputer wants us to return true if it should continue to loop over the dives and false if we want to stop. Don't pass errors back. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-27Add settings awareness for the PP graphGravatar Tomaz Canabrava
This commit is rather big, and I forgot to cut it in pieces. The first part creates a new 'calculate_gas_information' that will not fill the profile_info->maxpp member ( that should be removed from it as soon as the new dialog is finished ). The reason for that is that all of the profile data will be calculated and the graph needs to update dynamically, so whenever the settings changes, I ask for the model which is the biggest graph and replot only the ones we need. The second part adds a new animation function 'animdelete' to fade-out and delete the item when it's done. the old function 'hide' did just that but a hide shouldn't delete anything. The third part is preferenes awareness for the PP graphs. I created two new functions that receive the settings key for visibility and use the QSettings to show / hide them. This also works quite well for the axis; if no graph is visible, the axis will also hide itself. The fourth part is colors. The pp graphs now have the correct colors. And a bit of code cleanup too. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-26Add qt-ui to DEPENDPATH.Gravatar Michael Andreen
Without this qmake doesn't take headers in qt-ui into account when creating makefiles, causing parallel builds to fail. Signed-off-by: Michael Andreen <harv@ruin.nu> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-26Disable the switching depth column for cylindersGravatar Dirk Hohndel
Since the planner is disabled this column isn't needed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-26Don't dereference NULL pointer when adding tanks to a dive planGravatar Dirk Hohndel
The code was obviously bogus before. Fixes #429 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Extends copyright years on About screen to include 2014Gravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Fix potential crash at startupGravatar Dirk Hohndel
Strangely enough, on the system I build this, I don't see the crash. But when I create a DMG and run it on a different Mac, it crashes if updateTicks() is called but scene() still returns 0. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Adding some supported divelogs to importing infoGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Typo fixes on user manualGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Add manual CSV log import to UserManualGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Update screenshot for CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25CSV import instructions improvedGravatar Miika Turkia
Importing CSV files has changed slightly since writing this manual. Updating accordingly. A typo fix as well (comma separated *values*). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Hook up XSLT and include it in resourcesGravatar Miika Turkia
XSLT to import manually kept CSV logs is hooked up and included in resources. Fixes #427 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25Set up the parsing of manual CSV filesGravatar Miika Turkia
This function wraps up the parsing of manually kept CSV log files. Set up parameters received from C++ code for use in XSLT. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25C++ code to call parsing functions for manual CSVGravatar Miika Turkia
This code sets up the C++ part for importing manually kept CSV log. That includes setting up the field separator selection and calling C-code for parsing the log file. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25GUI for importing manually kept CSV logsGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-25XSLT for importing manually kept CSV divesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-24Make the appdata file validateGravatar Richard Hughes
Signed-off-by: Richard Hughes <richard@hughsie.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23This adds appdata for SubsurfaceGravatar Pedro Neves
Fixes #428 Signed-off-by: Pedro Neves <nevesdiver@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Added the Po2 Partial Pressure Graph.Gravatar Tomaz Canabrava
Important to note that no Partial Pressure Graph handles settings yet. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Added the code for the PHE gas pressure.Gravatar Tomaz Canabrava
Using the PartialPressureGasItem the addition of a new partial plot is very easy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Added the first Partial Gas Pressure: PN2Gravatar Tomaz Canabrava
This makes the beginning of the partial gas pressures, there's two more. but this code uses a good part of the Model View system, and it's way clearer than the old one. Luckly the other 2 missing items will be even more clear ( the diffs ) to do, because I just need to create a new PartialPressureGasItem and set the properties. <3 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Added comments explaining why the events are created on the setDiveGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Prevent memory leak by removing the texts on the TemperatureItemGravatar Tomaz Canabrava
This patch prevents memory leak by adding the text on the list of 'delete me when model changes' items. it also makes things a bit more snappy because the scene doesn't have to deal with all of the texts bounding rectangles eveytime. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Move profile item to be used as cache.Gravatar Tomaz Canabrava
the profile item should also use the model to know when to change something, this makes it happen. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Moved the temperature item as a 'Cache'Gravatar Tomaz Canabrava
This patch moves the temperature item as a cache that will be updated as the model updates, instead of deleting / recreating it everytime the dive changes. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Fix the ghost-text-on-profile regressionGravatar Tomaz Canabrava
The last patch correctly moved the GasPressure item to use a cache-based system, but ignored the fact that the Gas pressure text was not being removed from the scene. this fixed it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Move the creation of the Gas Pressure item to the constructorGravatar Tomaz Canabrava
This makes the Gas Pressure Item a 'cached' item, when the dive changes, the item will regenerate the drawing based on it's model. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Don't recreate the tissues, but instead, reshape them.Gravatar Tomaz Canabrava
This patch makes the Tissues be used as a 'cache', it will not be deleted untill the program closes, but whenever a new dive is selected, the old drawings of the tissues will be regenerated, Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-23Fix importing CSV files with empty valuesGravatar Miika Turkia
Empty values included the rest of the line in the value, instead of leaving it empty. This patch leaves empty values empty. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Make the tissues be preferences-aware.Gravatar Tomaz Canabrava
This patch adds a new class DiveCalculatedTissue that's preferences aware. It knows when to show or hide itself. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Do not delete / new object that can be cached.Gravatar Tomaz Canabrava
This way we will always have this object on screen, and as soon as the model changes, it's contents will change. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Simplify the code for the reported ceiling.Gravatar Tomaz Canabrava
The reported ceiling now behaves better by not being deleted / recreated, instead it uses the same object and connects to the model to know when to regenerate its plot. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Prepare for plotting partial pressures in the new profileGravatar Tomaz Canabrava
This patch makes the cartesian axis of the profile depth shrink and (together with it) the Profile Depth and the grid lines. There will probabla bey a lot of things that didn't have their correct position fixed, so I'll fix them in the later commits. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Fix the ZLevel value of some items.Gravatar Tomaz Canabrava
Almost all of the items on the new profile were being painted on the same ZLevel, so the level of awesomeness was a bit random. This puts things on the correct spots, events on top of everything, profile at the bottom, things in the middle. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-22Add a MeanDepthItem that has 2 strings.Gravatar Tomaz Canabrava
Dirk's implementation of the MeanDepth item was correct, but in order to add the 2 strings to it ( one at the begin, one at the end ) I had to put more stuff inside the ProfileWidget that's already packed with graphics items. So I created a new class MeanDepthItem that contains these 2 strings and will get updated whenever the value changes. I also fixed a math inconsistency where I changed RIGHT to LEFT. (wich fixed a few text-placements, and broke others.) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>