diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 12 | ||||
-rw-r--r-- | qt-ui/profile/diveprofileitem.h | 1 |
2 files changed, 8 insertions, 5 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index f60437ee3..214fd1e12 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -100,6 +100,11 @@ void AbstractProfilePolygonItem::modelDataChanged(const QModelIndex& topLeft, co texts.clear(); } +DiveProfileItem::DiveProfileItem() : show_reported_ceiling(0), reported_ceiling_in_red(0) +{ + +} + void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { Q_UNUSED(widget); @@ -383,9 +388,8 @@ void DiveGasPressureItem::paint(QPainter* painter, const QStyleOptionGraphicsIte } } -DiveCalculatedCeiling::DiveCalculatedCeiling() +DiveCalculatedCeiling::DiveCalculatedCeiling() : is3mIncrement(false), gradientFactor(new DiveTextItem(this)) { - gradientFactor = new DiveTextItem(this); gradientFactor->setY(0); gradientFactor->setBrush(getColor(PRESSURE_TEXT)); gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom); @@ -489,12 +493,10 @@ void DiveReportedCeiling::paint(QPainter* painter, const QStyleOptionGraphicsIte QGraphicsPolygonItem::paint(painter, option, widget); } -MeanDepthLine::MeanDepthLine() +MeanDepthLine::MeanDepthLine() : meanDepth(0), leftText(new DiveTextItem(this)), rightText(new DiveTextItem(this)) { - leftText = new DiveTextItem(this); leftText->setAlignment(Qt::AlignRight | Qt::AlignBottom); leftText->setBrush(getColor(MEAN_DEPTH)); - rightText = new DiveTextItem(this); rightText->setAlignment(Qt::AlignLeft | Qt::AlignBottom); rightText->setBrush(getColor(MEAN_DEPTH)); leftText->setPos(0, 0); diff --git a/qt-ui/profile/diveprofileitem.h b/qt-ui/profile/diveprofileitem.h index 1f9fa26e3..80c840736 100644 --- a/qt-ui/profile/diveprofileitem.h +++ b/qt-ui/profile/diveprofileitem.h @@ -66,6 +66,7 @@ class DiveProfileItem : public AbstractProfilePolygonItem{ Q_OBJECT public: + DiveProfileItem(); virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); virtual void modelDataChanged(const QModelIndex& topLeft = QModelIndex(), const QModelIndex& bottomRight = QModelIndex()); virtual void preferencesChanged(); |