Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

# qwt_sclif.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_SCALE_IF_H
    00011 #define QWT_SCALE_IF_H
    00012
    00013 #include "qwt_global.h"
    00014 #include "qwt_scldraw.h"
    00015
    00040 class QWT_EXPORT QwtScaleIf
    00041 {
    00042 public:
    00043     QwtScaleIf();
    00044     virtual ~QwtScaleIf();
    00045
    00046     void setScale (double vmin, double vmax, int logarithmic = 0);
    00047     void setScale (double vmin, double vmax, double step, int logarithmic = 0);
    00048     void setScale(const QwtScaleDiv &s);
    00049     void setScaleMaxMajor( int ticks);
    00050     void setScaleMaxMinor( int ticks);
    00051     void autoScale();
    00053     int scaleMaxMinor() const {return d_maxMinor;}
    00055     int scaleMaxMajor() const {return d_maxMajor;}
    00056
    00057     void setScaleDraw(QwtScaleDraw *);
    00058     const QwtScaleDraw *scaleDraw() const;
    00059
    00060 protected:
    00062     bool hasUserScale() {return d_userScale;}
    00063
    00065     virtual void scaleChange() = 0;
    00066     QwtScaleDraw *scaleDraw();
    00067
    00068 private:
    00069     QwtScaleDraw *d_scaleDraw;
    00070     int d_maxMajor;
    00071     int d_maxMinor;
    00072
    00073     bool d_userScale;
    00074 };
    00075 #endif