Change the rules so they work with percentages.

Changed the ruler so that they work with percentages,
also added a new method to the rules to set the size of the
ticks.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-07-02 11:12:15 -03:00
parent c98894fd52
commit 6115dc1f12
2 changed files with 39 additions and 10 deletions

View file

@ -37,6 +37,7 @@ public:
void setMaximum(double maximum);
void setTickInterval(double interval);
void setOrientation(Qt::Orientation orientation);
void setTickSize(qreal size);
void updateTicks();
double minimum() const;
double maximum() const;
@ -51,6 +52,7 @@ private:
double interval;
double posBegin;
double posEnd;
double tickSize;
};
class DivePlannerGraphics : public QGraphicsView {