profile: set textColor in constructor of DiveCartesianAxis

There were virtual functions to calculate the label colors
based on the value of the label. However, these functions
only returned constant values. Therefore, just set these
in the constructors.

Thuse, a few virtual functions and derived classes can be
removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-10-03 22:10:00 +02:00 committed by Dirk Hohndel
parent ea59e5cf7a
commit 3a79f3e78a
4 changed files with 16 additions and 57 deletions

View file

@ -15,8 +15,6 @@ class DivePlannerPointsModel;
class DivePlotDataModel;
class AbstractProfilePolygonItem;
class DepthAxis;
class DiveCartesianAxis;
class DiveCalculatedCeiling;
class DiveCalculatedTissue;
class DiveCartesianAxis;
@ -30,11 +28,8 @@ class DiveProfileItem;
class DiveReportedCeiling;
class DiveTemperatureItem;
class DiveTextItem;
class PartialGasPressureAxis;
class PartialPressureGasItem;
class TankItem;
class TemperatureAxis;
class TimeAxis;
class ProfileScene : public QGraphicsScene {
public:
@ -71,10 +66,10 @@ private:
DivePlotDataModel *dataModel;
struct plot_info plotInfo;
DepthAxis *profileYAxis;
DiveCartesianAxis *profileYAxis;
DiveCartesianAxis *gasYAxis;
TemperatureAxis *temperatureAxis;
TimeAxis *timeAxis;
DiveCartesianAxis *temperatureAxis;
DiveCartesianAxis *timeAxis;
DiveCartesianAxis *cylinderPressureAxis;
DiveCartesianAxis *heartBeatAxis;
DiveCartesianAxis *percentageAxis;