aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2014-03-25 23:34:09 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-27 10:58:22 -0700
commit06a1cb09754e74957891ad9f2bacf24290895210 (patch)
tree88ff8d6de1942fb81bcb7aa6dbad02985227ff9b /qt-ui/profile/profilewidget2.cpp
parentac23d7397f9303c2cff6479458342fe47498ac1b (diff)
downloadsubsurface-06a1cb09754e74957891ad9f2bacf24290895210.tar.gz
Profile2: add some print related flags
Some flags like printMode and isGrayscale are missing yet needed. The flag printMode is required so that we know *when* to hide certain elements such as the ruler and tool tip (e.g. not needed while printing). isGrayscale should be passed to all getColor() calls, so that the greyscale color table is respected. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 604f307c0..c29d32f28 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -83,7 +83,9 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
po2GasItem(new PartialPressureGasItem()),
heartBeatAxis(new DiveCartesianAxis()),
heartBeatItem(new DiveHeartrateItem()),
- rulerItem(new RulerItem2())
+ rulerItem(new RulerItem2()),
+ isGrayscale(false),
+ printMode(false)
{
memset(&plotInfo, 0, sizeof(plotInfo));
@@ -789,3 +791,9 @@ void ProfileWidget2::changeGas()
mark_divelist_changed(true);
replot();
}
+
+void ProfileWidget2::setPrintMode(bool mode, bool grayscale)
+{
+ printMode = mode;
+ isGrayscale = mode ? grayscale : false;
+}