qwt_compass.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_COMPASS_H
#define QWT_COMPASS_H 1
#include "qwt_global.h"
#include "qwt_dial.h"
#include "qwt_round_scale_draw.h"
#include <qstring.h>
#include <qmap.h>
class QwtCompassRose;
class QWT_EXPORT QwtCompassScaleDraw: public QwtRoundScaleDraw
{
public:
explicit QwtCompassScaleDraw();
explicit QwtCompassScaleDraw( const QMap<double, QString> &map );
void setLabelMap( const QMap<double, QString> &map );
QMap<double, QString> labelMap() const;
virtual QwtText label( double value ) const;
private:
QMap<double, QString> d_labelMap;
};
class QWT_EXPORT QwtCompass: public QwtDial
{
Q_OBJECT
public:
explicit QwtCompass( QWidget* parent = NULL );
virtual ~QwtCompass();
void setRose( QwtCompassRose *rose );
const QwtCompassRose *rose() const;
QwtCompassRose *rose();
protected:
virtual void drawRose( QPainter *, const QPointF &center,
double radius, double north, QPalette::ColorGroup ) const;
virtual void drawScaleContents( QPainter *,
const QPointF &center, double radius ) const;
virtual void keyPressEvent( QKeyEvent * );
private:
class PrivateData;
PrivateData *d_data;
};
#endif
QwtCompass
A Compass Widget.
Definition: qwt_compass.h:58
QwtCompassScaleDraw
A special scale draw made for QwtCompass.
Definition: qwt_compass.h:32
QwtText
A class representing a text.
Definition: qwt_text.h:52
QwtDial::drawScaleContents
virtual void drawScaleContents(QPainter *painter, const QPointF &center, double radius) const
Definition: qwt_dial.cpp:508
QwtAbstractScaleDraw::label
virtual QwtText label(double) const
Convert a value into its representing label.
Definition: qwt_abstract_scale_draw.cpp:374
QwtDial
QwtDial class provides a rounded range control.
Definition: qwt_dial.h:50
QwtCompassRose
Abstract base class for a compass rose.
Definition: qwt_compass_rose.h:22
QwtAbstractSlider::keyPressEvent
virtual void keyPressEvent(QKeyEvent *)
Definition: qwt_abstract_slider.cpp:365
QwtRoundScaleDraw
A class for drawing round scales.
Definition: qwt_round_scale_draw.h:31