We had all in place, all that was missing was to actually load
the position stored on the settings for the tooltips.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This code cleanup fixes the two issues that I raised on
my last e-mail. hurrah.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch fixes the colors on the new profile, the init of the colors map
was not being done. This fixes it.
A few problems were spotted on the new profile dealing with the ruler
graph and a newly added dive, when using the dive add dialog.
I'll be on it later.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is just removal of dead code from the old profile, probably there's
still a bit more to remove, but this is a very good cleanup already.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is simply a code removal, nothing was touched besides the
profilegraphics.h/cpp files.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch partially removes the code for the old profile from
Subsurface. It removes the use of the old profile on the mainwindow,
but keeping the code in the tree for now.
A bit of code-cleanup also entered this commit because I had to change
every instance of the code that used the old profile.
Now to the real code-cleanup
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The ruler is a weird beast - it has two child objects that access the
parent to call another function, that call the child functions.
When I updated the plot_info I didn't take that into consideration, what
happened is that when I set the parent's plot_info, the children's
plot_info are still invalid, but the update method is called anyhow.
This patch updates all plot_info's before calling anything else.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We can't keep the cache around (even though it's tempting) as the next
iteration might change the start time of the planned dive or other
parameters which would make the cached data invalid.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
clang-format doesn't appear to reindent multi line #define statements
correctly - so this hopefully will clean those up.
The included whitespace corrections to the code should stay in place when
using the updated tool.
This includes cleaning up some multi-line comments that were messed up the
last time around as well as a few other minor changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- Move the buttons of the profile window around to have more sane positions.
- All the buttons affecting the ceiling(s) are now grouped together.
- All the buttons affecting the Information Box are now grouped together.
- The previous icon for "Show calculated ceiling" has been reassigned to
"Show all tissues"
- A new stand-in button hav been included for "Show calculated ceiling"
Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I'm not sure about this one. It's possible that there's something
happening behind the scenes that I don't understand. But let's just
initialize this to 0 and be sure.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
tissue_tolerance wasn't used after it was assigned.
type was overwritten after it was assigned.
serial was overwritten after the last /= 100.
event is assigned in the for loop.
clear isn't used after the assignment
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Decrease depth by tapping left part of widget. Icon is showing "up" (i.e. closer to surface).
Increase depth by tapping right part of widget. Icon is showing "down" (i.e. deeper).
Fixes#354
Signed-off-by: Andrey Zhdanov <andrjufka@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Minor change to the perl postprocessing script and resulting changes to
the affected source files.
This deals with two issues:
- "foreach"-like structures were not always treated correctly
- some longer calculations that ended on "+ constant" were reformatted in
a rather unatractive manner
In one source file (divelist.c) I ended up adding braces to the sources...
trying to cascade the indentation further down without having the block
there seemed a lot more trouble than it's worth.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Non-stop Dive Limit (or No Deco Limit) abbreviation is not NTL but NDL
Signed-off-by: Giuseppe 'ferdy' Miceli <ferdy@ferdy.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Partial pressures abbreviations should have capitalized chemical element
symbols e.g. pn2 -> pN2
Signed-off-by: Giuseppe 'ferdy' Miceli <ferdy@ferdy.it>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In commit c84ef319a2 ("Create a toolbox on the left side of the new
profile") Tomaz invented a new TLA: EED.
No one noticed. Oops.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Previous code just set the button-"status" based on what we stored on
the settings. This sets the corresponding value in our prefs-struct.
This fixes the same issue as in 63f7f3, without the side effect of
magically hiding the mean depth line.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 63f7f37e46.
For odd reasons this appears to make the mean depth line disappear. This
will require some further analysis, but for now I'll just revert it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch will remove all files that fail to parse from the recent
files menu.
Signed-off-by: Joshua Wambua <joshua@megvel.me.ke>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This changes the ruler a bit, I hope nobody gets offended by it. :)
The main issue is that the scene is now 100x100 pixels wide, so the font
was *really* huge. and setting itemIgnoresTransformations on the ruler
broke a lot of stuff.
I removed the code that painted the text and created a QGraphics TextItem
for that - that will hold the text for the ruler.
Then I played with the view to get the correct angle of the line, that was
in scene coordinates and thus, could not be used directly on the item that
had ignore transformation changes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is needed so the underlaying struct preferences prefs, will be
updated when we set the buttons to there previous state after we
loaded the settings.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch makes the ruler work again, the problem is that the fonts are
*terribly* big, I'll fix that on the next commit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Increased vertical spacing between spinboxes and checkboxes for the manual
CVS import dialog
Fixes#448
Signed-off-by: Alberto Corona <albcoron@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch toggles on / off the ruler via QSettings.
When the user clicks on the toolbar, this sets the settings to true /
false, in a way that if the user turns Subsurface on/ off, we still get
the last choosed option.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds the RulerItem inside of the new profile, and already takes
settings into consideration.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch removes the GC macros and change the calling to use the
DiveCartesianAxis.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch just creates two files for the rulerItem, a .h and a .cpp.
nothing was done to make it visible on the new profile yet - will do that
on the next commits
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just quick'n dirty glue code so that when the user clicks on the 'scale'
toolbar item, the new profile graphic is scaled.
Lovely thing: Animations for free. <3
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch makes the 'Zoomed Plot' a preference that can be stored and
retrieved, this way if the user sets the plot to be 'zoomed', this
information will persist even if they closed or opened subsurface again.
Also, added the 'Scale' button on the new profile, but didn't did the glue
code yet.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Default font was hardcoded as 14.
What happen if you change any other preference value is that the
application would start to use fontSize=14.
This commit loads the right value in the QDoubleSpinBox
Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
if the user tries to redownload something from its dive computer
the interface will be stuck since progress_bar_text won't be empty in
the second run.
Even if I don't really like this idea of that value being changed by
downloadfromdivecomputer.cpp and libdivecomputer.c, that value needs to
be reset by someone.
Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simple patch to enable/disable extra buttons while downloading.
The UI should be blocked during the download.
Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to use the transform() of the view, not the tooltip.
Suggested-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This appears to correctly add the tooltip to the event item, but for some
reason the tooltip isn't displayed for most events.
Still needs more work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>