Transform the DiveProfileItem to an Abstract Generalization

The DiveProfileItem contained much of the complexity and
algorithms for almost all line-based items on the canvas,
so I transformed that to a general abstraction and implemented
a new DiveProfileItem that uses it. this should reduce a
bit of code since the implementation of the PP Graphs, Temperature
Cylinder Pressure and maybe a few others will only need to
reimplement the paint() and the modelDataChanged() methods.
The rest is ready.

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-16 16:21:23 -02:00 committed by Dirk Hohndel
parent 1f80788286
commit 254beef5d4
4 changed files with 37 additions and 27 deletions

View file

@ -16,10 +16,10 @@ public:
void setVerticalAxis(DiveCartesianAxis *axis);
void setHorizontalAxis(DiveCartesianAxis *axis);
void setModel(DivePlotDataModel *model);
void recalculate();
private:
void setupToolTipString();
void setupPixmap();
void recalculatePos();
void setupPixmap();
DiveCartesianAxis *vAxis;
DiveCartesianAxis *hAxis;
DivePlotDataModel *dataModel;