diff options
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 93c954fd4..022616ef1 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -56,6 +56,9 @@ void AbstractProfilePolygonItem::setModel(DivePlotDataModel *model) void AbstractProfilePolygonItem::modelDataRemoved(const QModelIndex &parent, int from, int to) { + Q_UNUSED(from); + Q_UNUSED(parent); + Q_UNUSED(to); setPolygon(QPolygonF()); qDeleteAll(texts); texts.clear(); @@ -94,8 +97,8 @@ bool AbstractProfilePolygonItem::shouldCalculateStuff(const QModelIndex &topLeft void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { - // We don't have enougth data to calculate things, quit. - + 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 @@ -340,6 +343,8 @@ void DiveHeartrateItem::createTextItem(int sec, int hr) void DiveHeartrateItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); if (polygon().isEmpty()) return; painter->save(); @@ -386,6 +391,9 @@ void DivePercentageItem::modelDataChanged(const QModelIndex &topLeft, const QMod void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; painter->save(); @@ -431,6 +439,9 @@ void DiveAmbPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo void DiveAmbPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; painter->save(); @@ -476,6 +487,9 @@ void DiveGFLineItem::modelDataChanged(const QModelIndex &topLeft, const QModelIn void DiveGFLineItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; painter->save(); @@ -557,6 +571,9 @@ void DiveTemperatureItem::createTextItem(int sec, int mkelvin) void DiveTemperatureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; painter->save(); @@ -601,6 +618,9 @@ void DiveMeanDepthItem::modelDataChanged(const QModelIndex &topLeft, const QMode void DiveMeanDepthItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; painter->save(); @@ -646,7 +666,7 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo if (displayed_dive.dc.divemode == CCR) o2mbar = GET_O2CYLINDER_PRESSURE(entry); - if (entry->cylinderindex != last_index) { + if ((int)entry->cylinderindex != last_index) { polygons.append(QPolygonF()); // this is the polygon that will be actually drawn on screen. last_index = entry->cylinderindex; } @@ -722,7 +742,7 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo if (!mbar) continue; - if (cyl != entry->cylinderindex) { // Pressure value near the left hand edge of the profile - other cylinders: + if (cyl != (int)entry->cylinderindex) { // Pressure value near the left hand edge of the profile - other cylinders: cyl = entry->cylinderindex; // For each other cylinder, write the gas lable and pressure if (!seen_cyl[cyl]) { plotPressureValue(mbar, entry->sec, alignVar, print_y_offset[cyl][1]); @@ -767,6 +787,9 @@ void DiveGasPressureItem::plotGasValue(int mbar, int sec, struct gasmix gasmix, void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + if (polygon().isEmpty()) return; QPen pen; @@ -940,6 +963,9 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(option); + Q_UNUSED(widget); + const qreal pWidth = 0.0; painter->save(); painter->setPen(QPen(normalColor, pWidth)); |