aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core
AgeCommit message (Collapse)Author
2015-11-09Remove empty implementationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Removed unused filesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Remove the PluginSystemGravatar Tomaz Canabrava
But keep the Interface so it's still userfull to create a new SocialNetwork when needed, but it will be part of the code, and not a plugin. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: more debug outputGravatar Dirk Hohndel
Once again compile time enabled. I guess it would be nice to turn this into a logfile (just like we have with the libdivecomputer backends). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: recover if dive info is completely missingGravatar Dirk Hohndel
I user had a Uemis that had a dive log entry for a certain internal id but no dive info for it. This appeared to be one of those dreaded dives when the Uemis decides to start a dive at the end of a flight and then stays in dive mode until it runs out of battery. Anyway, if we see a number above and a number below, just give up and move on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Uemis downloader: deal with a whole block of deleted divesGravatar Dirk Hohndel
If every dive in a download block from the Uemis was deleted we kept downloading that same block of dives. With this we remember how far we got even if the dives ended up being deleted. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09Store Thumbnails with image hashesGravatar Robert C. Helling
This drastically improves the time it takes to select a dive with several pictures at the expense of longer startup and bigger hash files. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Removed C++11 from the code.Gravatar Tomaz Canabrava
Make Dirk ungrumpy Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Uemis downloader: print some information on stderr in verbose modeGravatar Dirk Hohndel
On the Mac the info on the download dialog isn't shown. So print it on stderr as well when in verbose mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Change from uploadCurrentDive to requestUpload callGravatar Tomaz Canabrava
Since we can't forbit the plugins to upload more than just the current dive, it's better to change the name of the call. also add a stub to make sure it's calling the right method inside the plugin. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Make it possible to connect to facebook againGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07dive.c: remove unused variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07profile.c: remove unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07profile.c: mark get_local_sac() as unusedGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07Android: go back to using Qt's DataLocationGravatar Dirk Hohndel
It appears that the default path we tried to use on Android since commit 80056278f7a2 ("android.cpp: update path retriaval scheme") didn't work - so let's just go back to what we used to do as that was perfectly fine. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Don't crash if we have no WindowTitleUpdater registeredGravatar Dirk Hohndel
Subsurface-mobile doesn't have a window title with the name of our file name at this point, so simply don't try to trigger the update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Recognize Android as CMAKE_SYSTEM_NAMEGravatar Sebastian Kügler
This fixes the build for me against Qt 5.5. It seems Android is not Linux anymore, but uses its own CMAKE_SYSTEM_NAME now, so in this case we also want to compile android.cpp. This change should be rather safe, since it catches a condition that was not previously handled. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Use default font size on AndroidGravatar Sebastian Kügler
This solves the root problem of most of the dpi-depdent sizing in the mobile Android version. When setting a custom font size, we circumvent Android's defaults, which means that we end up setting the font size further down the road to get readable fonts. I suppose this was set in order to make the QWidget-based user interface "work" on Android. Hard-coding a font size at this central point brings more headache than needed, one could instead consider adding an #ifdef Q_OS_ANDROID in main window. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Move ImageDownloader out of the desktop widgetsGravatar Dirk Hohndel
This required a bit more untangling, but with this it seems we can build subsurface-mobile again (at least on the desktop). Interesting is the removal from inside the ImageDownloader of the call to DivePictureModel::instance()->updateDivePictures() - which actually could cause some interesting recursion issues. If it turns out we did indeed need this, it needs to be re-architected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06profile.h: fix incomplete typeGravatar Lubomir I. Ivanov
ruleritem.cpp throws an error about incomplete type 'struct gas_pressures'. 'struct gas_pressures' is defined in dive.h, so every header that has usage of the type needs to include dive.h. Such a header is profile.h which has 'struct gas_pressures pressures' in 'struct plot_data', by including dive.h on top of profile.h every source file (e.g. ruleritem.cpp) that includes profile.h will now receive knowledge of a complete 'struct gas_pressures' type. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> 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-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-02Merge branch 'cmakeAndPreferences'Gravatar Dirk Hohndel
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-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-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-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-30Add an interface for Social Network InterfacesGravatar Tomaz Canabrava
The Social Network plugins need an interface file to describe the expected behavior of it, this little header file will serve for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move all core-functionality to subsurface-coreGravatar Tomaz Canabrava
And adapt a new CMakeLists.txt file for it. On the way I've also found out that we where double-compilling a few files. I've also set the subsurface-core as a include_path but that was just to reduce the noise on this commit, since I plan to remove it from the include path to make it obligatory to specify something like include "subsurface-core/dive.h" for the header files. Since the app is growing quite a bit we ended up having a few different files with almost same name that did similar things, I want to kill that (for instance Dive.h, dive.h, PrintDive.h and such). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>