1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the Qwt License, Version 1.0
8
*****************************************************************************/
10
#ifndef QWT_SCALE_DIV_H
11
#define QWT_SCALE_DIV_H
13
#include "qwt_global.h"
14
#include "qwt_valuelist.h"
16
class QwtDoubleInterval;
19
\brief A class representing a scale division
21
A scale division consists of its limits and 3 list
22
of tick values qualified as major, medium and minor ticks.
24
In most cases scale divisions are calculated by a QwtScaleEngine.
26
\sa QwtScaleEngine::subDivideInto, QwtScaleEngine::subDivide
29
class QWT_EXPORT QwtScaleDiv
43
explicit QwtScaleDiv();
44
explicit QwtScaleDiv(const QwtDoubleInterval &,
45
QwtValueList[NTickTypes]);
46
explicit QwtScaleDiv(double lBound, double rBound,
47
QwtValueList[NTickTypes]);
49
int operator==(const QwtScaleDiv &s) const;
50
int operator!=(const QwtScaleDiv &s) const;
52
inline double lBound() const;
53
inline double hBound() const;
54
inline double range() const;
56
bool contains(double v) const;
58
const QwtValueList &ticks(int type) const;
68
QwtValueList d_ticks[NTickTypes];
75
\sa QwtScaleDiv::hBound
77
inline double QwtScaleDiv::lBound() const
84
\sa QwtScaleDiv::lBound
86
inline double QwtScaleDiv::hBound() const
92
\return hBound() - lBound()
94
inline double QwtScaleDiv::range() const
96
return d_hBound - d_lBound;