minimal pO2 threshold: color the p02 graph also for minumum

Color the p02 graph also in red for going under the minumum p02 value as
set in the Preferences.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This commit is contained in:
Jan Mulder 2017-03-25 11:15:13 +01:00 committed by Dirk Hohndel
parent bb31c77597
commit 5a235aea12
3 changed files with 33 additions and 18 deletions

View file

@ -215,13 +215,14 @@ public:
PartialPressureGasItem();
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
void setThreshouldSettingsKey(double *prefPointer);
void setThreshouldSettingsKey(double *prefPointerMin, double *prefPointerMax);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);
private:
QVector<QPolygonF> alertPolygons;
double *thresholdPtr;
double *thresholdPtrMin;
double *thresholdPtrMax;
QString visibilityKey;
QColor normalColor;
QColor alertColor;