mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: pass position and gridColor on construction of axes
This is less hassle, than passing these around as parameters. Note: The values are stored but not yet used ("position" has not use yet and gridColor is still passed as parameter). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
766546fc19
commit
277b9234ab
3 changed files with 21 additions and 14 deletions
|
@ -50,8 +50,10 @@ void DiveCartesianAxis::setTextColor(const QColor &color)
|
|||
textColor = color;
|
||||
}
|
||||
|
||||
DiveCartesianAxis::DiveCartesianAxis(double dpr, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis::DiveCartesianAxis(Position position, color_index_t gridColor, double dpr, bool printMode, ProfileScene &scene) :
|
||||
printMode(printMode),
|
||||
position(position),
|
||||
gridColor(gridColor),
|
||||
scene(scene),
|
||||
orientation(LeftToRight),
|
||||
min(0),
|
||||
|
@ -359,7 +361,8 @@ QColor DepthAxis::colorForValue(double) const
|
|||
return QColor(Qt::red);
|
||||
}
|
||||
|
||||
DepthAxis::DepthAxis(double dpr, bool printMode, ProfileScene &scene) : DiveCartesianAxis(dpr, printMode, scene)
|
||||
DepthAxis::DepthAxis(Position position, color_index_t gridColor, double dpr, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis(position, gridColor, dpr, printMode, scene)
|
||||
{
|
||||
changed = true;
|
||||
}
|
||||
|
@ -392,8 +395,9 @@ QString TemperatureAxis::textForValue(double value) const
|
|||
return QString::number(mkelvin_to_C((int)value));
|
||||
}
|
||||
|
||||
PartialGasPressureAxis::PartialGasPressureAxis(const DivePlotDataModel &model, double dpr, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis(dpr, printMode, scene),
|
||||
PartialGasPressureAxis::PartialGasPressureAxis(const DivePlotDataModel &model, Position position, color_index_t gridColor,
|
||||
double dpr, bool printMode, ProfileScene &scene) :
|
||||
DiveCartesianAxis(position, gridColor, dpr, printMode, scene),
|
||||
model(model)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue