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

qwt_drange.h

Go to the documentation of this file.
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_DBLRANGE_H
00011 #define QWT_DBLRANGE_H
00012 
00013 #include "qwt_global.h"
00014 
00031 class QWT_EXPORT QwtDblRange
00032 {
00033 public:
00034   QwtDblRange();
00035   virtual ~QwtDblRange();
00036 
00037   void setRange(double vmin, double vmax, double vstep = 0.0,
00038     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 x,int align = 0);
00073 
00074   double d_minValue;
00075   double d_maxValue;
00076   double d_step;
00077   int d_pageSize;
00078 
00079   bool d_isValid;
00080   double d_value;
00081   double d_exactValue;
00082   double d_exactPrevValue;
00083   double d_prevValue;
00084 
00085   bool d_periodic;
00086 };
00087 
00088 #endif

Generated on Fri Nov 7 14:11:45 2003 for Qwt Developer's Guide by doxygen 1.3.2