Loading...
Searching...
No Matches
qwt_compass.h
/******************************************************************************
* 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
#include "qwt_global.h"
#include "qwt_dial.h"
#include "qwt_round_scale_draw.h"
class QwtCompassRose;
class QString;
template< class Key, class T > class QMap;
class QWT_EXPORT QwtCompassScaleDraw : public QwtRoundScaleDraw
{
public:
explicit QwtCompassScaleDraw();
explicit QwtCompassScaleDraw( const QMap< double, QString >& map );
virtual ~QwtCompassScaleDraw();
void setLabelMap( const QMap< double, QString >& map );
QMap< double, QString > labelMap() const;
virtual QwtText label( double value ) const QWT_OVERRIDE;
private:
class PrivateData;
PrivateData* m_data;
};
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 QWT_OVERRIDE;
virtual void keyPressEvent( QKeyEvent* ) QWT_OVERRIDE;
private:
class PrivateData;
PrivateData* m_data;
};
#endif
QMap
Definition qwt_compass.h:19
QwtAbstractScaleDraw::label
virtual QwtText label(double) const
Convert a value into its representing label.
Definition qwt_abstract_scale_draw.cpp:375
QwtCompass
A Compass Widget.
Definition qwt_compass.h:62
QwtCompassRose
Abstract base class for a compass rose.
Definition qwt_compass_rose.h:22
QwtCompassScaleDraw
A special scale draw made for QwtCompass.
Definition qwt_compass.h:33
QwtDial
QwtDial class provides a rounded range control.
Definition qwt_dial.h:51
QwtRoundScaleDraw
A class for drawing round scales.
Definition qwt_round_scale_draw.h:32
QwtText
A class representing a text.
Definition qwt_text.h:52