qwt_polar_item.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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 
87  typedef QFlags<ItemAttribute> ItemAttributes;
88 
94  {
96  RenderAntialiased = 0x01
97  };
98 
100  typedef QFlags<RenderHint> RenderHints;
101 
102  explicit QwtPolarItem( const QwtText &title = QwtText() );
103  virtual ~QwtPolarItem();
104 
105  void attach( QwtPolarPlot *plot );
106  void detach();
107 
108  QwtPolarPlot *plot() const;
109 
110  void setTitle( const QString &title );
111  void setTitle( const QwtText &title );
112  const QwtText &title() const;
113 
114  virtual int rtti() const;
115 
116  void setItemAttribute( ItemAttribute, bool on = true );
117  bool testItemAttribute( ItemAttribute ) const;
118 
119  void setRenderHint( RenderHint, bool on = true );
120  bool testRenderHint( RenderHint ) const;
121 
122  void setRenderThreadCount( uint numThreads );
123  uint renderThreadCount() const;
124 
125  double z() const;
126  void setZ( double z );
127 
128  void show();
129  void hide();
130  virtual void setVisible( bool );
131  bool isVisible () const;
132 
133  virtual void itemChanged();
134  virtual void legendChanged();
135 
146  virtual void draw( QPainter *painter,
147  const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap,
148  const QPointF &pole, double radius,
149  const QRectF &canvasRect ) const = 0;
150 
151  virtual QwtInterval boundingInterval( int scaleId ) const;
152 
153  virtual void updateScaleDiv( const QwtScaleDiv &,
154  const QwtScaleDiv &, const QwtInterval & );
155 
156  virtual int marginHint() const;
157 
158  void setLegendIconSize( const QSize & );
159  QSize legendIconSize() const;
160 
161  virtual QList<QwtLegendData> legendData() const;
162  virtual QwtGraphic legendIcon( int index, const QSizeF & ) const;
163 
164 private:
165  // Disabled copy constructor and operator=
166  QwtPolarItem( const QwtPolarItem & );
167  QwtPolarItem &operator=( const QwtPolarItem & );
168 
169  class PrivateData;
171 };
172 
173 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::ItemAttributes )
174 Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::RenderHints )
175 
176 Q_DECLARE_METATYPE( QwtPolarItem * )
177 
178 #endif
A plotting widget, displaying a polar coordinate system.
A class representing an interval.
Definition: qwt_interval.h:22
#define QWT_EXPORT
Definition: qwt_global.h:38
RttiValues
Runtime type information.
A class representing a scale division.
Definition: qwt_scale_div.h:33
QFlags< RenderHint > RenderHints
Item attributes.
PrivateData * d_data
Base class for items on a polar plot.
QFlags< ItemAttribute > ItemAttributes
Item attributes.
A class representing a text.
Definition: qwt_text.h:51
ItemAttribute
Plot Item Attributes.
A paint device for scalable graphics.
Definition: qwt_graphic.h:75
A scale map.
Definition: qwt_scale_map.h:26
For QwtPolarSpectrogram.
RenderHint
Render hints.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10