1
//=========================================================
4
// $Id: scldraw.h,v 1.1.1.1 2003/10/29 10:06:34 wschweer Exp $
6
// Copyright (C) 1997 Josef Wilgen
7
// This program is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License, version 2,
9
// as published by the Free Software Foundation.
11
// (C) Copyright 2000 Werner Schweer (ws@seh.de)
12
//=========================================================
28
class ScaleDraw : public DiMap {
30
enum OrientationX { Bottom, Top, Left, Right, Round };
34
static const int minLen;
35
OrientationX d_orient;
58
void drawTick(QPainter *p, double val, int len) const;
59
void drawBackbone(QPainter *p) const;
60
void drawLabel(QPainter *p, double val) const;
66
void setScale(const ScaleDiv &s);
67
void setScale(double vmin, double vmax, int maxMajIntv, int maxMinIntv,
68
double step = 0.0, int logarithmic = 0);
69
void setGeometry(int xorigin, int yorigin, int length, OrientationX o);
70
void setAngleRange(double angle1, double angle2);
71
void setLabelFormat(char f, int prec);
73
const ScaleDiv& scaleDiv() const { return d_scldiv; }
74
OrientationX orientation() const { return d_orient; }
75
QRect maxBoundingRect(QPainter *p) const;
76
int maxWidth(QPainter *p, bool worst = TRUE) const;
77
int maxHeight(QPainter *p) const;
78
int maxLabelWidth(QPainter *p, int worst = TRUE) const;
79
void draw(QPainter *p) const;