mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
profile: pass print-mode add construction of ProfileScene
Setting the profile and grayscale mode of the profile via functions is from a time when the same profile widget was used for printing and the UI. It is simpler to set the mode when constructing the object and not deal with changes. To prepare for this scenario, take the flag at construction time. This still keeps the callers as-is. These will be adapted later. Logically, then the printFlag also has to be set in DiveCartesianAxis at construction time. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1327043d6e
commit
84ebd1d67a
5 changed files with 23 additions and 45 deletions
|
|
@ -29,9 +29,8 @@ public:
|
|||
LeftToRight,
|
||||
RightToLeft
|
||||
};
|
||||
DiveCartesianAxis(double fontPrintScale, ProfileScene &scene);
|
||||
DiveCartesianAxis(double fontPrintScale, bool printMode, ProfileScene &scene);
|
||||
~DiveCartesianAxis();
|
||||
void setPrintMode();
|
||||
void setMinimum(double minimum);
|
||||
void setMaximum(double maximum);
|
||||
void setTickInterval(double interval);
|
||||
|
|
@ -77,7 +76,7 @@ protected:
|
|||
class DepthAxis : public DiveCartesianAxis {
|
||||
Q_OBJECT
|
||||
public:
|
||||
DepthAxis(double fontPrintScale, ProfileScene &scene);
|
||||
DepthAxis(double fontPrintScale, bool printMode, ProfileScene &scene);
|
||||
private:
|
||||
QString textForValue(double value) const override;
|
||||
QColor colorForValue(double value) const override;
|
||||
|
|
@ -104,7 +103,7 @@ private:
|
|||
class PartialGasPressureAxis : public DiveCartesianAxis {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PartialGasPressureAxis(const DivePlotDataModel &model, double fontPrintScale, ProfileScene &scene);
|
||||
PartialGasPressureAxis(const DivePlotDataModel &model, double fontPrintScale, bool printMode, ProfileScene &scene);
|
||||
void update(int animSpeed);
|
||||
private:
|
||||
const DivePlotDataModel &model;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue