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>
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>
Also, disable Facebook temporarely since I'm removing the preferences
widget in a few commits. Facebook will have to change to use a new
way of connection that I'm still creating.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simple port of the default preferences to the new preferences structure.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Load all settings as soon as we start the preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And this actually made me find one memory leak on the old version:
We are constantly creating / leaking a new QSortFilterProxyModel
everytime a sync() is done on the settings. That's not a lot, maybe
once per time a user changes its settings... but it's still a leak.
And the code is more sanely separated this time. yey.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All functions that should control the preferences are
created.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since I'm using a dialog created by hand, I also need to
hook things by hand. the code is very simple - debug output
kept in just to make sure things are indeed working.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This Preferences dialog should be visually similar to the
old one - the main difference is how it acts on the preferences.
It's also not based on .ui files since it's a very simple widget
I prefered to mount it by hand - no more than 6 lines of c++ code.
Right now we have only one preference page on this, and nothing
is hoocked up.
I've also changed mainwindow a bit to only show this dialog for
testing purposes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is not hooked into anything - It's the bare minimum that I
need to continue creating the new preferences dialog. But take a
look at it... very simple. :)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Our preferences dialog right now is a rather huge dialog
with more than 9 subpages, and all of those pages are programmed
inside of the same class, same methods and all that - which means
that if I change something on the dialog I can break any
other thing quite easily.
The idea of this patch series is to make it harder to break
user settings and the settings dialog.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A bit of dust was setting here, when I moved tons of things around
I forgot to remove some bits.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Besides making it more simple to add a new test now since
you don't need to play hide and seek with the main cmake
this has another good thing: on IDE's that scan the cmake
to create targets on the project tree, the main project
was being popullated with test-targets on the main tree
and not inside the tests directory.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The reason for that is, even if profile widget is made with qpainter
and for that reason it should be a desktop widget, it's being used
on the mobile version because of a lack of QML plotting library that
is fast and reliable.
We discovered that it was faster just to encapsulate our Profile in
a QML class and call it directly.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This one was pretty easy because of the work I did a few months
ago to separate the models from the UI.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is needed to compile both in a single call to make. Also it will
help removing some of the mistakes in the current android version:
it always created the mainwindow, even without using it for anything,
so tons of memory will be freed now for the android version, making it
snappier and smoother.
This is a necessary move so we don't need to #ifdef all over the place
for the two different versions, and imo the changes needed to keep both
versions will not be that huge if we keep things in subsurface-core
sane.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
There was no reason at all to keep those icons on the root
folder.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Did a git rebase and some stuff changed in the meantime;
This is a compatibility commit: Add a few include directories
on the cmake to quiet some ui_headers.h not being found (the
ones that are created automatically by uic) and a few noiseances
like models requiring interface functionality.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
CMake can be a good system but if we keep everything into one big
cmake file things can go nuts really quick. Since I already took
quite a start on an subsurface layer separation some time ago, I'm
improving it by making each module on Subsurface depend on it's own
CMake module.
This first patch moves the qt-ui part to qt-ui/CMakeLists.txt file,
it cleans tons of the main cmake file ( moving all parts to the in
ternal folder ), and makes things more easily manageable by the
programmer that will change the ui bits, he doesn't need to play
hide and seek with the CMakeLists.txt file anymore, trying to figure
out where should he put his newly generated file.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Manually fixed the two strings with plurals. The Qt tools create only one
<numerusform></numerusform> line, but for some reason transifex appears to
require two of them back to back.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows separate translation of singular and plural forms
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds subsurface.debug script and install it for Linux.
Instead of running subsurface, you can run subsurface.debug which will launch
subsurface as usual, but will monitor subsurface exit and run gdb automatically
if subsurface crashes and it creates a crashlog in $HOME/.
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise we would be printing html source with too many tags
for humans to spot the content.
[Dirk Hohndel: changed the string comparison to use our helper]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1) Put table of contents as a column on the left-hand side of the page
instead of as part of the user manual text.
2) Correct a some typoss.
3) Add three sentences to the Bluetooth download section to deal with
Bluetooth Pass Codes.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's a list, not a string. Treating it as a string creates all kinds of
exciting weird errors that make no sense.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we ship it all in one piece there is no reason to use a static
libdivecomputer (like there is on Linux). This allows us to give the user
a different libdivecomputer.dll for testing when tracking down a bug.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This seems to fix our issues with being able to create zip files on the
fly (needed for the divelogs.de access).
Fixes#955
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>