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

qwt_compass.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_COMPASS_H
00011 #define QWT_COMPASS_H 1
00012 
00013 #include <qstring.h>
00014 #include <qmap.h>
00015 #include "qwt_dial.h"
00016 
00017 #if defined(QWT_TEMPLATEDLL)
00018 // MOC_SKIP_BEGIN
00019 template class QWT_EXPORT QMap<double, QString>;
00020 // MOC_SKIP_END
00021 #endif
00022 
00023 class QwtCompassRose;
00024 
00037 class QWT_EXPORT QwtCompass: public QwtDial 
00038 {
00039   Q_OBJECT
00040 
00041 public:
00042   QwtCompass( QWidget* parent=0, const char* name = 0);
00043   virtual ~QwtCompass();
00044 
00045   void setRose(QwtCompassRose *rose);
00046   const QwtCompassRose *rose() const;
00047   QwtCompassRose *rose();
00048 
00049   const QMap<double, QString> &labelMap() const;
00050   QMap<double, QString> &labelMap();
00051   void setLabelMap(const QMap<double, QString> &map);
00052 
00053 protected:
00054   virtual QString scaleLabel(double value) const;
00055 
00056   virtual void drawRose(QPainter *, const QPoint &center,
00057       int radius, double north, QPalette::ColorGroup) const;
00058 
00059     virtual void drawScaleContents(QPainter *, 
00060     const QPoint &center, int radius) const; 
00061 
00062     virtual void keyPressEvent(QKeyEvent *);
00063 
00064 private:
00065   QwtCompassRose *d_rose;
00066   QMap<double, QString> d_labelMap;
00067 };
00068 
00069 #endif

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