aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-10 14:04:43 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-20 10:01:50 -0800
commitde220c2da04f7ea4d4f603a81c8e9c2447d83170 (patch)
tree6c423728cd6e0420aa038bbe433e901f3b8a71f7 /profile-widget
parentf4d806c77abf112a9fc6f87549e9e2346396e3f1 (diff)
downloadsubsurface-de220c2da04f7ea4d4f603a81c8e9c2447d83170.tar.gz
profile: make three member functions const
These accessors do not change the ProfileWidget2 state, so make them const. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp6
-rw-r--r--profile-widget/profilewidget2.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 043c39258..049df247b 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1321,7 +1321,7 @@ void ProfileWidget2::setPlanState()
}
#endif
-bool ProfileWidget2::isPlanner()
+bool ProfileWidget2::isPlanner() const
{
return currentState == PLAN;
}
@@ -1608,7 +1608,7 @@ void ProfileWidget2::changeGas(int tank, int seconds)
}
#endif
-bool ProfileWidget2::getPrintMode()
+bool ProfileWidget2::getPrintMode() const
{
return printMode;
}
@@ -1641,7 +1641,7 @@ void ProfileWidget2::setFontPrintScale(double scale)
emit fontPrintScaleChanged(scale);
}
-double ProfileWidget2::getFontPrintScale()
+double ProfileWidget2::getFontPrintScale() const
{
if (printMode)
return fontPrintScale;
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index 1758b86c3..be40694a7 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -79,10 +79,10 @@ public:
void scale(qreal sx, qreal sy);
void plotDive(const struct dive *d, bool force = false, bool clearPictures = false, bool instant = false);
void setPrintMode(bool mode, bool grayscale = false);
- bool getPrintMode();
+ bool getPrintMode() const;
bool isPointOutOfBoundaries(const QPointF &point) const;
- bool isPlanner();
- double getFontPrintScale();
+ bool isPlanner() const;
+ double getFontPrintScale() const;
void setFontPrintScale(double scale);
#ifndef SUBSURFACE_MOBILE
bool eventFilter(QObject *, QEvent *) override;