aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget/diveeventitem.h
AgeCommit message (Collapse)Author
2018-05-13Dive pictures: remove close-button optimizationGravatar Berthold Stoeger
One close-button object was used for all dive pictures. This seems like a brittle premature optimization and the pixmap is shared anyway. Make the button a subobject of the dive picture object. Change the object-hierarchy to be based on QGraphicsItem instead of QObject. The QObject here is only used as a kludge to support signals and properties (the latter are necessary for animations). Remove a comment, which does not seem to be relevant after this change. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-01-21Show ICD in gaschange iconsGravatar Robert C. Helling
Add an exclamation mark in the gas change icons if the change violates our isobaric counter diffusion criterium. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2018-01-21Show ICD events data in infoboxGravatar Robert C. Helling
If a gas switch violates our ICD criteria, show this in the info box. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-29Add SPDX header to profile widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Prevent gaschange tank icons from using garbage coords.Gravatar K. \"pestophagous\" Heller
Tank icons were shown at incorrect spots on the profile when the DiveEventItem object held a pointer to a struct event even after the struct event at that address had been freed. When internalEvent is a pointer to freed memory, internalEvent->time.seconds could have all kinds of crazy values, which get used in member function DiveEventItem::recalculatePos to place the tank at bad x coordinates. The DiveEventItem(s) no longer store a pointer to memory that they do not own. This way, no matter how the path of execution arrives into slot recalculatePos, we never need fear that the DiveEventItem will dereference a garbage pointer to a struct event. Fixes #968 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move Profile widget out of desktop-widgetsGravatar Tomaz Canabrava
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>