diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-02-07 14:59:58 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-08 07:16:16 -0800 |
commit | 9cf6b2be6bc8f49e4e26e0d10a7d9d48afcdc05a (patch) | |
tree | c462f0bf85e20da492a62903f8abc7f3a00a75b4 /qt-ui/profile/divecartesianaxis.cpp | |
parent | 6de9b329d16275573d2e8f2ea6e712c626553dad (diff) | |
download | subsurface-9cf6b2be6bc8f49e4e26e0d10a7d9d48afcdc05a.tar.gz |
Break everything to make it correct next time.
This commit breaks the whole new profile. <3
The problem with the old code is that I was using the QStateMachine
and I just got tired of it. I will implement a much-simpler state
machine to do what I want instead of hitting my head on the wall
to understand how that was supposed to work.
This commit also adds a few helper methods to simplify the understanding
of the constructor and tries to make the logic a bit better. No graphics
are being show right now. :)
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r-- | qt-ui/profile/divecartesianaxis.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp index 1cfd9d13b..85245c6e6 100644 --- a/qt-ui/profile/divecartesianaxis.cpp +++ b/qt-ui/profile/divecartesianaxis.cpp @@ -19,6 +19,17 @@ static QPen gridPen(){ pen.setCosmetic(true); return pen; } + +void DiveCartesianAxis::setup(double minimum, double maximum, double interval, DiveCartesianAxis::Orientation o, qreal tickSize, const QPointF& pos) +{ + setMinimum(minimum); + setMaximum(maximum); + setTickInterval(interval); + setOrientation(o); + setTickSize(tickSize); + setPos(pos); +} + void DiveCartesianAxis::setMaximum(double maximum) { if (max == maximum) |