qwt_abstract_scale.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_ABSTRACT_SCALE_H
00011 #define QWT_ABSTRACT_SCALE_H
00012 
00013 #include "qwt_global.h"
00014 #include <qwidget.h>
00015 
00016 class QwtScaleEngine;
00017 class QwtAbstractScaleDraw;
00018 class QwtScaleDiv;
00019 class QwtScaleMap;
00020 class QwtInterval;
00021 
00036 class QWT_EXPORT QwtAbstractScale: public QWidget
00037 {
00038     Q_OBJECT
00039 
00040     Q_PROPERTY( double lowerBound READ lowerBound WRITE setLowerBound )
00041     Q_PROPERTY( double upperBound READ upperBound WRITE setUpperBound )
00042 
00043     Q_PROPERTY( int scaleMaxMajor READ scaleMaxMajor WRITE setScaleMaxMajor )
00044     Q_PROPERTY( int scaleMaxMinor READ scaleMaxMinor WRITE setScaleMaxMinor )
00045 
00046     Q_PROPERTY( double scaleStepSize READ scaleStepSize WRITE setScaleStepSize )
00047 
00048 public:
00049     explicit QwtAbstractScale( QWidget *parent = NULL );
00050     virtual ~QwtAbstractScale();
00051 
00052     void setScale( double lowerBound, double upperBound );
00053     void setScale( const QwtInterval & );
00054     void setScale( const QwtScaleDiv & );
00055 
00056     const QwtScaleDiv& scaleDiv() const;
00057 
00058     void setLowerBound( double value );
00059     double lowerBound() const;
00060 
00061     void setUpperBound( double value );
00062     double upperBound() const;
00063 
00064     void setScaleStepSize( double stepSize );
00065     double scaleStepSize() const;
00066 
00067     void setScaleMaxMajor( int ticks );
00068     int scaleMaxMinor() const;
00069 
00070     void setScaleMaxMinor( int ticks );
00071     int scaleMaxMajor() const;
00072 
00073     void setScaleEngine( QwtScaleEngine * );
00074     const QwtScaleEngine *scaleEngine() const;
00075     QwtScaleEngine *scaleEngine();
00076 
00077     int transform( double ) const;
00078     double invTransform( int ) const;
00079 
00080     bool isInverted() const;
00081 
00082     double minimum() const;
00083     double maximum() const;
00084 
00085     const QwtScaleMap &scaleMap() const;
00086 
00087 protected:
00088     virtual void changeEvent( QEvent * );
00089 
00090     void rescale( double lowerBound, 
00091         double upperBound, double stepSize );
00092 
00093     void setAbstractScaleDraw( QwtAbstractScaleDraw * );
00094 
00095     const QwtAbstractScaleDraw *abstractScaleDraw() const;
00096     QwtAbstractScaleDraw *abstractScaleDraw();
00097 
00098     void updateScaleDraw();
00099     virtual void scaleChange();
00100 
00101 private:
00102     class PrivateData;
00103     PrivateData *d_data;
00104 };
00105 
00106 #endif


plotjuggler
Author(s): Davide Faconti
autogenerated on Fri Sep 1 2017 02:41:56