mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Instead of a host of virtual functions, let the base class (DiveCartesianAxis) do the formatting of the axis labels. To do so, it needs to know how to convert the internal representation (e.g. mm) into the displayed value (e.g. feet). Moreover, this transformation has to be adapted when changing the locale-setting, therefore do it for every plot() call. The transformation itself cannot be a simple linear translation, because we have non-absolute display units, namely °C and °F. Thankfully affine transformations are enough though. Only one custom formatter remains: the time axis. It might be a good idea to remove the virtual function and do this via a flag. This is all done not so much for code simplification, but because for a general layout of the axis labels, the axis has to understand the values of the labels and not only handle them as opaque texts. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> |
||
---|---|---|
.. | ||
animationfunctions.cpp | ||
animationfunctions.h | ||
CMakeLists.txt | ||
divecartesianaxis.cpp | ||
divecartesianaxis.h | ||
diveeventitem.cpp | ||
diveeventitem.h | ||
divehandler.cpp | ||
divehandler.h | ||
divelineitem.cpp | ||
divelineitem.h | ||
divepercentageitem.cpp | ||
divepercentageitem.h | ||
divepixmapcache.cpp | ||
divepixmapcache.h | ||
divepixmapitem.cpp | ||
divepixmapitem.h | ||
diveprofileitem.cpp | ||
diveprofileitem.h | ||
diverectitem.cpp | ||
diverectitem.h | ||
divetextitem.cpp | ||
divetextitem.h | ||
divetooltipitem.cpp | ||
divetooltipitem.h | ||
profilescene.cpp | ||
profilescene.h | ||
profilewidget2.cpp | ||
profilewidget2.h | ||
qmlprofile.cpp | ||
qmlprofile.h | ||
ruleritem.cpp | ||
ruleritem.h | ||
tankitem.cpp | ||
tankitem.h |