Make the tissues be preferences-aware.

This patch adds a new class DiveCalculatedTissue that's preferences aware.
It knows when to show or hide itself.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-01-22 19:22:07 -02:00 committed by Dirk Hohndel
parent f8a4f8de81
commit cde9bc0de9
4 changed files with 22 additions and 2 deletions

View file

@ -388,6 +388,18 @@ void DiveCalculatedCeiling::paint(QPainter* painter, const QStyleOptionGraphicsI
QGraphicsPolygonItem::paint(painter, option, widget);
}
DiveCalculatedTissue::DiveCalculatedTissue()
{
preferencesChanged();
}
void DiveCalculatedTissue::preferencesChanged()
{
QSettings s;
s.beginGroup("TecDetails");
setVisible(s.value("calcalltissues").toBool());
}
void DiveReportedCeiling::modelDataChanged()
{
if (!hAxis || !vAxis || !dataModel || hDataColumn == -1 || vDataColumn == -1)