summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/diveprofileitem.h')
-rw-r--r--profile-widget/diveprofileitem.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h
index d85ec64fe..fc123c133 100644
--- a/profile-widget/diveprofileitem.h
+++ b/profile-widget/diveprofileitem.h
@@ -38,10 +38,9 @@ public:
AbstractProfilePolygonItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) = 0;
void clear();
+ virtual void replot();
public
slots:
- virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex());
- void replot();
void setVisible(bool visible);
protected:
@@ -68,7 +67,7 @@ class DiveProfileItem : public AbstractProfilePolygonItem {
public:
DiveProfileItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void settingsToggled(bool toggled);
void plot_depth_sample(struct plot_data *entry, QFlags<Qt::AlignmentFlag> flags, const QColor &color);
int maxCeiling(int row);
@@ -83,7 +82,7 @@ class DiveMeanDepthItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveMeanDepthItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
@@ -96,7 +95,7 @@ class DiveTemperatureItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveTemperatureItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
@@ -107,7 +106,7 @@ class DiveHeartrateItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveHeartrateItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
@@ -119,7 +118,7 @@ class DivePercentageItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DivePercentageItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn, int i);
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
@@ -133,7 +132,7 @@ class DiveAmbPressureItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveAmbPressureItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
@@ -144,7 +143,7 @@ class DiveGFLineItem : public AbstractProfilePolygonItem {
Q_OBJECT
public:
DiveGFLineItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
private:
@@ -156,7 +155,7 @@ class DiveGasPressureItem : public AbstractProfilePolygonItem {
public:
using AbstractProfilePolygonItem::AbstractProfilePolygonItem;
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
@@ -171,7 +170,7 @@ class DiveCalculatedCeiling : public AbstractProfilePolygonItem {
public:
DiveCalculatedCeiling(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn,
const DiveCartesianAxis &vAxis, int vColumn, ProfileWidget2 *profileWidget);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
private:
@@ -183,7 +182,7 @@ class DiveReportedCeiling : public AbstractProfilePolygonItem {
public:
DiveReportedCeiling(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
};
@@ -200,7 +199,7 @@ class PartialPressureGasItem : public AbstractProfilePolygonItem {
public:
PartialPressureGasItem(const DivePlotDataModel &model, const DiveCartesianAxis &hAxis, int hColumn, const DiveCartesianAxis &vAxis, int vColumn);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0) override;
- void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()) override;
+ void replot() override;
void setThresholdSettingsKey(const double *prefPointerMin, const double *prefPointerMax);
void setVisibilitySettingsKey(const QString &setVisibilitySettingsKey);
void setColors(const QColor &normalColor, const QColor &alertColor);