aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/profile/profilewidget2.cpp10
-rw-r--r--qt-ui/profile/profilewidget2.h3
2 files changed, 12 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;
+}
diff --git a/qt-ui/profile/profilewidget2.h b/qt-ui/profile/profilewidget2.h
index f02ca4058..eb7486e8d 100644
--- a/qt-ui/profile/profilewidget2.h
+++ b/qt-ui/profile/profilewidget2.h
@@ -67,6 +67,7 @@ public:
void replot();
virtual bool eventFilter(QObject *, QEvent *);
void setupItem(AbstractProfilePolygonItem *item, DiveCartesianAxis *hAxis, DiveCartesianAxis *vAxis, DivePlotDataModel *model, int vData, int hData, int zValue);
+ void setPrintMode(bool mode, bool grayscale = false);
public
slots: // Necessary to call from QAction's signals.
@@ -126,6 +127,8 @@ private:
DiveCartesianAxis *heartBeatAxis;
DiveHeartrateItem *heartBeatItem;
RulerItem2 *rulerItem;
+ bool isGrayscale;
+ bool printMode;
};
#endif // PROFILEWIDGET2_H