aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-11-05Untangle Profile from MainWindow: shortcutsGravatar Dirk Hohndel
This, too, should be done with signals. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: turn off tts/ndl calculationGravatar Dirk Hohndel
I'm not sure we can ever run into this issue anymore since we stop calculating TTS / NDL past 2 hours, but I guess on a fairly slow CPU this still could take too long. But instead of calling into MainWindow let's just change the setting right here and add a signal to show the notification - that way we can use the appropriate way to make such notifications on the mobile app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Remove dead codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Untangle Profile from MainWindow: files on command lineGravatar Dirk Hohndel
There's no reason why this should be on the MainWindow widget. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Profile: begin untangling from MainWindowGravatar Dirk Hohndel
Use a signal to turn the toolbar on or off. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Use target_link_libraries for GrantleeGravatar Rex Dieter
This allows for finding headers when not in /usr/include (like parallel-installable distribution-packaged grantlee5) Signed-off-by: Rex Dieter <rdieter@fedoraproject.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05QML-UI: find the include filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Android build: we no longer have a MainWindow instanceGravatar Dirk Hohndel
So we don't need to hide it, either Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05Cmake: correctly identify an Android buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-04Re-add the signal connectionsGravatar Tomaz Canabrava
The signal connections from the old preferences got lost when we moved to the new ones because Designer is broken and can't handle signals / connactions from copy/pasted content. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Cmake: fix BT definitionGravatar Dirk Hohndel
This was set twice, the first time before we checked that we have a new enough Qt version installed. Also fixed a typo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03NSIS: add a couple of uninstaller checkboxesGravatar Lubomir I. Ivanov
Add a new dialog/page which is shown right before the final "uninstall" click. The dialog may contains two checkboxes - for registry entries and for the user path. These checkboxes will not be created if the user has not run the application yet, as no registry keys will be available. Selecting the user directory checkbox shows a warning message box, that the user should make sure no important files are present there. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03PreferencesDialog.cpp: store 'default_directory' in QSettingsGravatar Lubomir I. Ivanov
This is needed only on Windows, so that the uninstaller knows which directory to delete. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: add loading from file / webGravatar Guido Lerch
Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: enable multi selectionGravatar Guido Lerch
Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: small fixGravatar Guido Lerch
Required change within DivePictureItem, adding update parameter defaulted to true in this case. Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: support deletionGravatar Guido Lerch
Adding modified code to support deletion of selected images as well as deleting of all images (with warning messagebox) Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: remove obsolete codeGravatar Guido Lerch
Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for images: change DivePicture modelGravatar Guido Lerch
Altering DivePicture model to allow deleting images from the QListView without immediate updating of the list. Updating is determined by an additioanl parameter Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Context menu for imagesGravatar Guido Lerch
Just add a context menu for now - the following commits will make this useful. Signed-off-by: Guido Lerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Fix UDDF import indentationGravatar Miika Turkia
Only indentation is changed on this commit. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Only include samples with data on UDDF importGravatar Miika Turkia
According to the specification each proper sample should have depth, so we can just ignore the empty waypoints. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03subsurfacestartup.c: don't double free 'default_filename'Gravatar Lubomir I. Ivanov
'default_filename' is obtained from system_default_filename() but system_default_filename() returns a static pointer the HEAP memory of which is handled in main(). Remove the free() for 'default_filename' free_prefs() to prevent a double free(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-03Fix M_PI with -std=c++11 on MingwGravatar Lubomir I. Ivanov
The introduction of -std=c++11 breaks usage of M_PI in Mingw, but technically M_PI is not standard C or C++. Defining M_PI in units.h solves the issue. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Grab all gas mixes only when no tank data is givenGravatar Miika Turkia
Grabbing all gas mixes was added for Xdeep default cylinders, and it is not required for other data sources that have tankdata info in the UDDF file. See #958 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Merge branch 'cmakeAndPreferences'Gravatar Dirk Hohndel
2015-11-02Don't overflow cylinder array in xml parsingGravatar Linus Torvalds
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: make apply workGravatar Dirk Hohndel
We didn't respond at all to that button. Also, the language settings didn't propagate without this explicit call. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: Call LoadPreferences from whitin the new dialogGravatar Tomaz Canabrava
When I removed the old preferences dialog, I forgot to load them again. The code is in the wrong place: it should be on every and each preferences dialog (or on the main preferences) Beware if you used this wip code before, I may have destroyed your preferences. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Forgot to set the static variable staticGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Do not depend on the subsurface_core qrc for testsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: Use apply instead of reset to defaultsGravatar Tomaz Canabrava
Change the Reset to Defaults button to Apply in the preferences dialog. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: Remove the old dialog and use the new oneGravatar Tomaz Canabrava
The new preferences dialog still needs a bit of fine tuning but should already work. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: hook up the UI page with the preferences structureGravatar Dirk Hohndel
With this the new date and time formats mostly work Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Create date and time formats preferencesGravatar Dirk Hohndel
Now we can actually change them in preferences instead of just deriving them from the language set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-02Preferences: add date and time format to language pageGravatar Dirk Hohndel
Not hooked up, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-01Merge branch 'for_dirk' of https://github.com/atdotde/subsurfaceGravatar Dirk Hohndel
2015-11-01Profile: Display VPM-B rather than GF when in VPM-B modeGravatar Rick Walsh
If we are planning a dive using VPM-B with +x conservatism, we want to print "VPM-B +x" at the top of the profile, instead of "GF xx/yy". Accordingly, the variable gradientFactor in profilewidget2.cpp is renamed decoModelParameters to reflect what it represents. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-11-01Calculate VPM-B ceiling outside of plannerGravatar Rick Walsh
Doing VPM-B calculations for dives outside of the planner has not been possible because real dive data does not record either: - reference pressure for the Boyle's law compensation (i.e. first_stop_pressure), or - deco_time for the vpmb_next_gradient function used to do the CVA calculations However, we can infer these values to be: - first_stop_pressure is the deepest ceiling in the dive - deco_time is dive time from the deepest ceiling until the ceiling clears (or would have cleared if the diver finished their deco obligations) With these assumptions, the CVA converges rapidly. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-11-01Update spanish translation of user manual to english eed9a4bGravatar Salvador Cuñat
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-31Give proper error message when no dives on a zipGravatar Miika Turkia
We import a few logs that are archived in a zip file. E.g. divelogs.de import is a zip file named with .dld extension. In case the zip file is empty, we should return an error message that states that fact, not parse error. This will also end the input file parsing cleaning up the error message on the console. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Preferences: switch language preference to be a dropdownGravatar Dirk Hohndel
The list widget takes too much space and isn't really any better. The dropdown plus fliter is actually rather neat. Also added back the connections so the dropdown and filter get disabled when system default is selected (just as it was in the old preferences dialog). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Make the skeleton Facebook plugin and make sure it is loadedGravatar Tomaz Canabrava
Currently we need to copy manually the plugin dynamic library to the /plugins folder. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Facebook plugin skeletonGravatar Tomaz Canabrava
Just to see if a plugin will compile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Populate the MainMenu with social network actionsGravatar Tomaz Canabrava
The magic happens here: We are iterating over the plugins and populating the main menu with all actions provided by them. Currently we can't test this as we don't have a single plugin. Next patch series of commits will be adding the Facebook plugin. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Constify, ReferencifyGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Start the Plugin ManagerGravatar Tomaz Canabrava
This bit of code will try to load all plugins avaliable. Now I need to port a Facebook plugin for this new system, then I'll delete the old preferences widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Add a PluginManager classGravatar Tomaz Canabrava
This class is currently very small but the reason of existence is to allow subsurface to be easily extendable via plugins. The current type of plugin that I'm making is Social Network, but another possibilities: - Dive Simulation Algorithm - Import/Export Filters - Profile Overlays Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Fix the ISocialNetworkIntegration interfaceGravatar Tomaz Canabrava
I missed a few virtuals there. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Make code compile in gnu11 and c++11Gravatar Tomaz Canabrava
This is to make it possible to use some nice to have features of c11 and c++11 like range based loops, delete default functions, auto variable assignment. Talked to Dirk about this and he is ok with the change, but he also states that he will not accept lambdas Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>