mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Feature to show or hide heart rate graph
Adds new push button "HR" to the button bar on the dive profile to toggle display of heart rate. TODO: New icon for the heart rate button is needed. Fixes #485 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
20bde81023
commit
6a8d929876
10 changed files with 70 additions and 9 deletions
|
|
@ -221,6 +221,7 @@ DiveHeartrateItem::DiveHeartrateItem()
|
|||
pen.setCosmetic(true);
|
||||
pen.setWidth(1);
|
||||
setPen(pen);
|
||||
visible = true;
|
||||
}
|
||||
|
||||
void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
|
||||
|
|
@ -297,6 +298,27 @@ void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||
painter->drawPolyline(polygon());
|
||||
}
|
||||
|
||||
void DiveHeartrateItem::preferencesChanged()
|
||||
{
|
||||
QSettings s;
|
||||
s.beginGroup("TecDetails");
|
||||
setVisible(s.value(visibilityKey).toBool());
|
||||
if (s.value(visibilityKey).toBool())
|
||||
visible = true;
|
||||
else
|
||||
visible = false;
|
||||
}
|
||||
|
||||
void DiveHeartrateItem::setVisibilitySettingsKey(const QString &key)
|
||||
{
|
||||
visibilityKey = key;
|
||||
}
|
||||
|
||||
bool DiveHeartrateItem::isVisible()
|
||||
{
|
||||
return visible == true;
|
||||
}
|
||||
|
||||
DiveTemperatureItem::DiveTemperatureItem()
|
||||
{
|
||||
QPen pen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue