qwt_abstract_scale.h

00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_ABSTRACT_SCALE_H
00011 #define QWT_ABSTRACT_SCALE_H
00012 
00013 #include "qwt_global.h"
00014 
00015 class QwtScaleEngine;
00016 class QwtAbstractScaleDraw;
00017 class QwtScaleDiv;
00018 class QwtScaleMap;
00019 class QwtDoubleInterval;
00020 
00029 class QWT_EXPORT QwtAbstractScale
00030 {
00031 public:
00032     QwtAbstractScale();
00033     virtual ~QwtAbstractScale();
00034     
00035     void setScale(double vmin, double vmax, double step = 0.0);
00036     void setScale(const QwtDoubleInterval &, double step = 0.0);
00037     void setScale(const QwtScaleDiv &s);
00038 
00039     void setAutoScale();
00040     bool autoScale() const;
00041 
00042     void setScaleMaxMajor( int ticks);
00043     int scaleMaxMinor() const;
00044 
00045     void setScaleMaxMinor( int ticks);
00046     int scaleMaxMajor() const; 
00047 
00048     void setScaleEngine(QwtScaleEngine *);
00049     const QwtScaleEngine *scaleEngine() const;
00050     QwtScaleEngine *scaleEngine();
00051 
00052     const QwtScaleMap &scaleMap() const;
00053     
00054 protected:
00055     void rescale(double vmin, double vmax, double step = 0.0);
00056 
00057     void setAbstractScaleDraw(QwtAbstractScaleDraw *);
00058     const QwtAbstractScaleDraw *abstractScaleDraw() const;
00059     QwtAbstractScaleDraw *abstractScaleDraw();
00060 
00061     virtual void scaleChange();
00062 
00063 private:
00064     void updateScaleDraw();
00065 
00066     class PrivateData;
00067     PrivateData *d_data;
00068 };
00069 
00070 #endif

Generated on Mon Feb 26 21:22:35 2007 for Qwt User's Guide by  doxygen 1.4.6