Qwt User's Guide svn
qwt_double_range.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_DOUBLE_RANGE_H
00011 #define QWT_DOUBLE_RANGE_H
00012 
00013 #include "qwt_global.h"
00014 
00031 class QWT_EXPORT QwtDoubleRange
00032 {
00033 public:
00034     QwtDoubleRange();
00035     virtual ~QwtDoubleRange();
00036 
00037     void setRange( double vmin, double vmax, 
00038         double vstep = 0.0, int pagesize = 1 );
00039 
00040     void setValid( bool );
00041     bool isValid() const;
00042 
00043     virtual void setValue( double );
00044     double value() const;
00045 
00046     void setPeriodic( bool tf );
00047     bool periodic() const;
00048 
00049     void setStep( double );
00050     double step() const;
00051 
00052     double maxValue() const;
00053     double minValue() const;
00054 
00055     int pageSize() const;
00056 
00057     virtual void incValue( int );
00058     virtual void incPages( int );
00059     virtual void fitValue( double );
00060 
00061 protected:
00062 
00063     double exactValue() const;
00064     double exactPrevValue() const;
00065     double prevValue() const;
00066 
00067     virtual void valueChange();
00068     virtual void stepChange();
00069     virtual void rangeChange();
00070 
00071 private:
00072     void setNewValue( double value, bool align = false );
00073 
00074     class PrivateData;
00075     PrivateData *d_data;
00076 };
00077 
00078 #endif
qmi style