qwt_polar_item.h
Go to the documentation of this file.
1 /******************************************************************************
2  * QwtPolar Widget Library
3  * Copyright (C) 2008 Uwe Rathmann
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the Qwt License, Version 1.0
7  *****************************************************************************/
8 
9 #ifndef QWT_POLAR_ITEM_H
10 #define QWT_POLAR_ITEM_H
11 
12 #include "qwt_global.h"
13 #include "qwt_text.h"
14 #include "qwt_legend_data.h"
15 #include "qwt_graphic.h"
16 #include "qwt_interval.h"
17 
18 class QString;
19 class QRect;
20 class QPointF;
21 class QPainter;
22 class QwtPolarPlot;
23 class QwtScaleMap;
24 class QwtScaleDiv;
25 
38 {
39  public:
47  {
49  Rtti_PolarItem = 0,
50 
53 
56 
59 
62 
67  Rtti_PolarUserItem = 1000
68  };
69 
75  {
77  Legend = 0x01,
78 
83  AutoScale = 0x02
84  };
85 
86  Q_DECLARE_FLAGS( ItemAttributes, ItemAttribute )
87 
88 
93  {
95  RenderAntialiased = 0x01
96  };
97 
98  Q_DECLARE_FLAGS( RenderHints, RenderHint )
99 
100  explicit QwtPolarItem( const QwtText& title = QwtText() );
101  virtual ~QwtPolarItem();
102 
103  void attach( QwtPolarPlot* plot );
104  void detach();
105 
106  QwtPolarPlot* plot() const;
107 
108  void setTitle( const QString& title );
109  void setTitle( const QwtText& title );
110  const QwtText& title() const;
111 
112  virtual int rtti() const;
113 
114  void setItemAttribute( ItemAttribute, bool on = true );
115  bool testItemAttribute( ItemAttribute ) const;
116 
117  void setRenderHint( RenderHint, bool on = true );
118  bool testRenderHint( RenderHint ) const;
119 
120  void setRenderThreadCount( uint numThreads );
121  uint renderThreadCount() const;
122 
123  double z() const;
124  void setZ( double z );
125 
126  void show();
127  void hide();
128  virtual void setVisible( bool );
129  bool isVisible () const;
130 
131  virtual void itemChanged();
132  virtual void legendChanged();
133 
144  virtual void draw( QPainter* painter,
145  const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
146  const QPointF& pole, double radius,
147  const QRectF& canvasRect ) const = 0;
148 
149  virtual QwtInterval boundingInterval( int scaleId ) const;
150 
151  virtual void updateScaleDiv( const QwtScaleDiv&,
152  const QwtScaleDiv&, const QwtInterval& );
153 
154  virtual int marginHint() const;
155 
156  void setLegendIconSize( const QSize& );
157  QSize legendIconSize() const;
158 
159  virtual QList< QwtLegendData > legendData() const;
160  virtual QwtGraphic legendIcon( int index, const QSizeF& ) const;
161 
162  private:
163  Q_DISABLE_COPY( QwtPolarItem )
164 
165  class PrivateData;
166  PrivateData* m_data;
167 };
168 
169 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::ItemAttributes )
170 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::RenderHints )
171 
172 Q_DECLARE_METATYPE( QwtPolarItem* )
173 
174 #endif
QwtPolarItem::PrivateData
Definition: qwt_polar_item.cpp:16
qwt_graphic.h
QwtPolarPlot
A plotting widget, displaying a polar coordinate system.
Definition: qwt_polar_plot.h:46
QwtGraphic
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
QwtPolarItem::Rtti_PolarSpectrogram
@ Rtti_PolarSpectrogram
For QwtPolarSpectrogram.
Definition: qwt_polar_item.h:61
qwt_global.h
QwtPolarItem::Rtti_PolarCurve
@ Rtti_PolarCurve
For QwtPolarCurve.
Definition: qwt_polar_item.h:58
qwt_interval.h
QList
Definition: qwt_abstract_legend.h:17
qwt_legend_data.h
mqtt_test_proto.z
z
Definition: mqtt_test_proto.py:36
QwtPolarItem::RenderHint
RenderHint
Render hints.
Definition: qwt_polar_item.h:92
QwtPolarItem::ItemAttribute
ItemAttribute
Plot Item Attributes.
Definition: qwt_polar_item.h:74
QwtInterval
A class representing an interval.
Definition: qwt_interval.h:22
QwtText
A class representing a text.
Definition: qwt_text.h:51
QwtPolarItem::Rtti_PolarGrid
@ Rtti_PolarGrid
For QwtPolarGrid.
Definition: qwt_polar_item.h:52
QwtPolarItem
Base class for items on a polar plot.
Definition: qwt_polar_item.h:37
QwtPolarItem::Rtti_PolarMarker
@ Rtti_PolarMarker
For QwtPolarMarker.
Definition: qwt_polar_item.h:55
QwtScaleMap
A scale map.
Definition: qwt_scale_map.h:26
QwtPolarItem::RttiValues
RttiValues
Runtime type information.
Definition: qwt_polar_item.h:46
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtScaleDiv
A class representing a scale division.
Definition: qwt_scale_div.h:33
qwt_text.h


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46