Qwt User's Guide
qwt_round_scale_draw.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_ROUND_SCALE_DRAW_H
00011 #define QWT_ROUND_SCALE_DRAW_H
00012 
00013 #include "qwt_global.h"
00014 #include "qwt_abstract_scale_draw.h"
00015 #include <qpoint.h>
00016 
00030 class QWT_EXPORT QwtRoundScaleDraw: public QwtAbstractScaleDraw
00031 {
00032 public:
00033     QwtRoundScaleDraw();
00034     virtual ~QwtRoundScaleDraw();
00035 
00036     void setRadius( double radius );
00037     double radius() const;
00038 
00039     void moveCenter( double x, double y );
00040     void moveCenter( const QPointF & );
00041     QPointF center() const;
00042 
00043     void setAngleRange( double angle1, double angle2 );
00044 
00045     virtual double extent( const QFont & ) const;
00046 
00047 protected:
00048     virtual void drawTick( QPainter *, double val, double len ) const;
00049     virtual void drawBackbone( QPainter * ) const;
00050     virtual void drawLabel( QPainter *, double val ) const;
00051 
00052 private:
00053     QwtRoundScaleDraw( const QwtRoundScaleDraw & );
00054     QwtRoundScaleDraw &operator=( const QwtRoundScaleDraw &other );
00055 
00056     class PrivateData;
00057     PrivateData *d_data;
00058 };
00059 
00061 inline void QwtRoundScaleDraw::moveCenter( double x, double y )
00062 {
00063     moveCenter( QPointF( x, y ) );
00064 }
00065 
00066 #endif
 All Classes Functions Variables Typedefs Enumerations Enumerator