summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r--profile-widget/diveprofileitem.cpp55
1 files changed, 12 insertions, 43 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 90f78f9e1..9f648c2f0 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -52,11 +52,8 @@ void AbstractProfilePolygonItem::setModel(DivePlotDataModel *model)
modelDataChanged();
}
-void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex &parent, int from, int to)
+void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex&, int, int)
{
- Q_UNUSED(from);
- Q_UNUSED(parent);
- Q_UNUSED(to);
setPolygon(QPolygonF());
qDeleteAll(texts);
texts.clear();
@@ -93,10 +90,8 @@ bool AbstractProfilePolygonItem::shouldCalculateStuff(const QModelIndex &topLeft
return true;
}
-void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex&, const QModelIndex&)
{
- Q_UNUSED(topLeft);
- Q_UNUSED(bottomRight);
// Calculate the polygon. This is the polygon that will be painted on screen
// on the ::paint method. Here we calculate the correct position of the points
// regarting our cartesian plane ( made by the hAxis and vAxis ), the QPolygonF
@@ -121,15 +116,13 @@ DiveProfileItem::DiveProfileItem() : show_reported_ceiling(0), reported_ceiling_
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::redceilingChanged, this, &DiveProfileItem::settingsToggled);
}
-void DiveProfileItem::settingsToggled(bool toggled)
+void DiveProfileItem::settingsToggled(bool)
{
- Q_UNUSED(toggled);
settingsChanged();
}
void DiveProfileItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
- Q_UNUSED(widget);
if (polygon().isEmpty())
return;
@@ -342,10 +335,8 @@ void DiveHeartrateItem::createTextItem(int sec, int hr)
texts.append(text);
}
-void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
if (polygon().isEmpty())
return;
painter->save();
@@ -406,11 +397,8 @@ QColor DivePercentageItem::ColorScale(double value, int inert)
}
-void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -468,11 +456,8 @@ void DiveAmbPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
}
-void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -516,11 +501,8 @@ void DiveGFLineItem::modelDataChanged(const QModelIndex &topLeft, const QModelIn
texts.last()->setAlignment(Qt::AlignLeft | Qt::AlignBottom);
}
-void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -599,11 +581,8 @@ void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
texts.append(text);
}
-void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -647,11 +626,8 @@ void DiveMeanDepthItem::modelDataChanged(const QModelIndex &topLeft, const QMode
}
-void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
painter->save();
@@ -813,11 +789,8 @@ void DiveGasPressureItem::plotGasValue(int mbar, int sec, struct gasmix gasmix,
texts.push_back(text);
}
-void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
if (polygon().isEmpty())
return;
QPen pen;
@@ -892,9 +865,8 @@ DiveCalculatedTissue::DiveCalculatedTissue(ProfileWidget2 *widget) : DiveCalcula
connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::calcceilingChanged, this, &DiveCalculatedTissue::setVisible);
}
-void DiveCalculatedTissue::setVisible(bool visible)
+void DiveCalculatedTissue::setVisible(bool)
{
- Q_UNUSED(visible);
settingsChanged();
}
@@ -1012,11 +984,8 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
*/
}
-void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem*, QWidget*)
{
- Q_UNUSED(option);
- Q_UNUSED(widget);
-
const qreal pWidth = 0.0;
painter->save();
painter->setPen(QPen(normalColor, pWidth));