aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-01-19Show a flag when editing a location on the globeGravatar Dirk Hohndel
Since we don't modify the dive list, the new flag wouldn't show up until we accepted the change - that's not user friendly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Don't just change the location when double clicking on the globeGravatar Dirk Hohndel
Instead be consistent with other parts of the code and put us in editing mode so the user can accept / reject the change. See #800 Fixes #801 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Always updated the coordinates from the displayed_diveGravatar Dirk Hohndel
That's why it's called the displayed dive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Fix extreme sluggish profile over timeGravatar Tomaz Canabrava
Whoa, this deserves a good explanation. Everytime that the mouse moved in add / plan mode, or anytime a new dive was displayed on the profile, this method would be called and connect the dataModel to the modelChanged method. This added the slot in a call-vector that the fired signal would call, adding one call to the Slot per add / plan mouse move (about 20x/s) or each time a new dive was displayed. Quickly filling the vector with more than 200 - 300 calls to this same Slot. The fix is to only connect one time. this made the add / plan mode *so* much smoother... :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-19Only update the "add dive profile / plan dive" 20x/sGravatar Tomaz Canabrava
We were updating the dive quite a lot of times, we really didn't need to. This will help, but not fix, the issues with plan / add dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Fix build: add missing #includesGravatar Thiago Macieira
qt-ui/profile/profilewidget2.cpp:1351:10: error: invalid use of incomplete type ‘class QDebug’ qt-ui/printlayout.cpp:141:27: error: variable ‘QPointer<ProfileWidget2> profile’ has initializer but incomplete type In commit f9ceff009b35 ("Clean up the header files") things got broken for an as of now unreliesed future version of Qt. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Move the heart rate graphGravatar Joakim Bygdell
Move the heart rate graph down to the same space as the tissue saturation graph so that it does not overlap with temperature or partial pressures. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Use correct divemode (PSCR in particular) in deco calculationGravatar Robert C. Helling
I had forgotten this dead code. Sorry. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-18Clean up the header filesGravatar Dirk Hohndel
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Use correct divemode (PSCR in particular) in deco calculationGravatar Robert C. Helling
I had forgotten this dead code. Sorry. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Clean up the header filesGravatar Dirk Hohndel
Lots and lots and lots of header files were being included without being needed. This attempts to clean some of that crud up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Cache the complex items to give us a boost of speedGravatar Tomaz Canabrava
This cache give us a huge gain in performance, going from 17% moving the mouse frenetically to 9%, wich is quite acceptable. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Fix memleak of QGraphicsRectItemGravatar Tomaz Canabrava
We used to create a new QGraphicsRectItem everytime a Pixmap changed. Since I'm pretty sure I deleted every bit of the PictureItem before setting a new one, no leak was due, but this version is safer. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Only update text if something changedGravatar Tomaz Canabrava
We were calling this even if we didn't really change anything and paths are expensive to paint. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Fix the colors - brush wasn't being set anymore.Gravatar Tomaz Canabrava
Also a bit of code cleanup. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Reduce the amount of new/delete when setting a new text on DiveTextItemGravatar Tomaz Canabrava
We were recreating the PathItems (one for the outline, other for the real text) for every call to setText. This was a very un-smart move. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Make Facebook support a config optionGravatar Dirk Hohndel
By default it is turned off, turn on by calling qmake with CONFIG+=FBSUPPORT. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Planner rebreather modeGravatar Robert C. Helling
Do the switching based on the index rather than the string (which is translatable!). Update set-points when turning on/off CCR mode (remeber: the rebreather mode is stored in two places: the divemode and implicitly in the setpoitns. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Save predefined SACGravatar Robert C. Helling
When planning a dive, the gas consumption is based on a user configured SAC. Thus we should use that SAC and not try to recompute it from samples. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Minor PSCR fixesGravatar Robert C. Helling
Update O2 metabolsim rate and adopt default gas switch depths to pSCR oxygen drop. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Reduce the refresh rate of the toolTipItem to 25fps.Gravatar Tomaz Canabrava
This reduces a lot of CPU time and makes the overall use of the tooltip a breeze. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Honor prefs.anim_speed on the ToolTip animationsGravatar Tomaz Canabrava
The tooltip animation had a fixed animation speed, this patch honors the anim_speed on the preferences, and also disables the animation completely if the speed == 0. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Reduce the number of calls to boundingRectGravatar Tomaz Canabrava
There are a few calculations that go on boundingRect that can be avoided if we simply store the result. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Fix the colors of the rectangleGravatar Tomaz Canabrava
Correct pen and brush set. the ToolTip now is correctly rounded, translucent and happy. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Implement the paint method to draw the rounded rectangle.Gravatar Tomaz Canabrava
The rectangle is now correct, but the collors are still wrong. I'm tracking that down - most probably I've set the wrong pen or brush ( or both ) somewhere. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Remove the background and the separatorGravatar Tomaz Canabrava
Those items were used to fake the background of the path item but since the rectangle can be painted with a border and a fill, this is uneeded. The rect is still ugly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-17Inherit from QGraphicsRectItem instead of QGraphicsShapeItemGravatar Tomaz Canabrava
a rectangle is *much* faster to paint than a simple ShapeItem, so this is a safer choice. We still need to create the paint method so we can use the correct roundness for the rectangle. Currently it's white with a 1px solid line - terrible. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Need to use qmake-qt4 for building Ubuntu 12.04 packagesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Update Readme.ubuntuGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Update README for 4.4 Beta 1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Add patch to the Ubuntu build process for 12.04Gravatar Dirk Hohndel
We need to build with Qt4 on 12.04. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Some updates to the ReleaseNotesGravatar Dirk Hohndel
Doing this incrementally as we add features would be much smarter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Finally deal with incrementing the serial number of the buildGravatar Dirk Hohndel
I know, I know. This should never have been hard coded. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Attempt to build for Ubuntu 12.04 as wellGravatar Dirk Hohndel
And fix a silly typo in the Debian/Ubuntu control file Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-16Documentation: Fix user-manual.txt indentation to comply to asciidoc format ↵Gravatar Guillaume GARDET
(also fix po4a translation tool usage) This patch fix indentation for list item to comply to asciidoc format. This also fix po4a translation tool usage. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Reduce the amount of calls to create the background on the ToolTipGravatar Tomaz Canabrava
We were deleting / recreating the graphics background item for *every* mouse movement. Now we are just creating the painter path; no more allocations / desalocations, adding, removing from the scene. This should make things a tiny bit faster. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Reuse the entry tooltip item and do fewer calls for each mouse moveGravatar Tomaz Canabrava
While analizing the code for the mouse movement I've discovered that we did a lot of uneeded things: Set the color, the pen, the size of a fixed-colored line, twice. We also deleted-newed the same Pixmap / Text for every mouse movement so now we reuse the 'entryToolTip' that consists of a huge line and a pixmap, and after that we add the other tooltips that are not static Also, reduced a lot the number of calls to expand() (that did a lot of math). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Do not set the rectangle if it's the sameGravatar Tomaz Canabrava
Strangelly, this method was being called even if the rectangle was the same, so we deleted everything and recreated everything again. tsc tsc. Some more improvement is needed but we are getting there. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Only update the rectangle if it changedGravatar Tomaz Canabrava
Very often the rectangle of the ToolTip doesn't need to change but we were calling and firing an animation for it for *every* mouse movement, even when we didn't really needed it. Now it will only fire something if the rectangles are indeed different. From my tests we reduced the number of calls to the animatior by about 20% using a real divelog as test. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Do not free the membuffer, reuse itGravatar Tomaz Canabrava
This is an attempt to make fewer calls to alloc functions when the mouse is moving. We were creating a membuffer, filling it (malloc / realloc), then freeing it just after use. but we could simply hold that allocated area and reuse it again. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Documentation: Add initial support for French translationGravatar Guillaume GARDET
Add initial support to French (fr) translation of user-manual. Note that it is not perfect, since the po4a tool loose some list item indexes during PO to ASCIIDOC conversion (see asciidoc warning messages during user manual generation). Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Add POT/PO infrastructure to translate user manual.Gravatar Guillaume GARDET
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Speed Improvemens: fewer calls to mapFromScene / mapToSceneGravatar Tomaz Canabrava
We did three cals to mapToScene / mapFromScene on the mouse moveEvent at the ProfileWidget2 where we only needed to call one in the common case and two in the worst case. This doesn't really help in terms of speed (unless you have a really old cpu) but since it's code that gets called *very* often, it seemed a reasonable thing to do. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Fix memory leakGravatar Tomaz Canabrava
The QPainter and the QPixmap were being created but never freed. A QPixmap and a QPainter don't need to be created by new, they can be safely created on the stack. So, create them on the stack, pass them via const-reference and use them correctly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-15Major speedup when moving the mouse in the profileGravatar Tomaz Canabrava
After looking with great care at the result of the mouse movement on the profile, and also playing a bit with callgrind I've found out that one thing that we were doing wrong was the way we looked at the items in the scene, by calling scene()->items with Qt::ItemIntersectsShape, our shapes are very complex curves with thousends of points and we have lots of them. and it usually doesn't matter because *most* of the time we are getting the tooltip information from 'get_plot_details_new', so no accessing to items was necessary. By changing the access from Qt::ItemIntersectsShape to Qt::IntersectsItemBoundingRect we had a speedup of almost 500x in a section of code that's very important, and the good thing, nothing bad happened because one of the only things that we are using this code is to get information from the events, not the curves. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Remove instantMeanDepthLineGravatar Cristine Guadelupe
Take instantMeanDepthLine out of the code. We have the moving average line plus the exact data in the information overlay. Signed-off-by: Cristine Guadelupe <cristineguadelupe@me.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Turns out the manifest doesn't allow a dash in the nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Change the name of the Android appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-14Ignore QWebView in AndroidGravatar Joseph W. Joshua
Ignore QWebView instances in the preferences dialog when compiling under Android, as QWebView is not yet supported under Android. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-01-13Dive download UI: sort the dive computer dropdownGravatar Dirk Hohndel
I could have sworn we did this at some point. The vendors are already sorted, but the products for each vendor should be sorted, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>