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>
This commit is contained in:
Tomaz Canabrava 2014-02-07 14:59:58 -02:00 committed by Dirk Hohndel
parent 6de9b329d1
commit 9cf6b2be6b
4 changed files with 103 additions and 178 deletions

View file

@ -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)