qwt_compass.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_COMPASS_H
11 #define QWT_COMPASS_H 1
12 
13 #include "qwt_global.h"
14 #include "qwt_dial.h"
15 #include "qwt_round_scale_draw.h"
16 #include <qstring.h>
17 #include <qmap.h>
18 
19 class QwtCompassRose;
20 
32 {
33 public:
34  explicit QwtCompassScaleDraw();
35  explicit QwtCompassScaleDraw( const QMap<double, QString> &map );
36 
37  void setLabelMap( const QMap<double, QString> &map );
38  QMap<double, QString> labelMap() const;
39 
40  virtual QwtText label( double value ) const;
41 
42 private:
43  QMap<double, QString> d_labelMap;
44 };
45 
58 {
59  Q_OBJECT
60 
61 public:
62  explicit QwtCompass( QWidget* parent = NULL );
63  virtual ~QwtCompass();
64 
65  void setRose( QwtCompassRose *rose );
66  const QwtCompassRose *rose() const;
67  QwtCompassRose *rose();
68 
69 protected:
70  virtual void drawRose( QPainter *, const QPointF &center,
71  double radius, double north, QPalette::ColorGroup ) const;
72 
73  virtual void drawScaleContents( QPainter *,
74  const QPointF &center, double radius ) const;
75 
76  virtual void keyPressEvent( QKeyEvent * );
77 
78 private:
79  class PrivateData;
81 };
82 
83 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtDial class provides a rounded range control.
Definition: qwt_dial.h:49
virtual void keyPressEvent(QKeyEvent *)
A Compass Widget.
Definition: qwt_compass.h:57
T value
A class representing a text.
Definition: qwt_text.h:51
Abstract base class for a compass rose.
virtual void drawScaleContents(QPainter *painter, const QPointF &center, double radius) const
Definition: qwt_dial.cpp:508
virtual QwtText label(double) const
Convert a value into its representing label.
A special scale draw made for QwtCompass.
Definition: qwt_compass.h:31
A class for drawing round scales.
QMap< double, QString > d_labelMap
Definition: qwt_compass.h:43
PrivateData * d_data
Definition: qwt_compass.h:79


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17