Loading...
Searching...
No Matches
qwt_polar_item.h
/******************************************************************************
* QwtPolar Widget Library
* Copyright (C) 2008 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_POLAR_ITEM_H
#define QWT_POLAR_ITEM_H
#include "qwt_global.h"
#include "qwt_text.h"
#include "qwt_legend_data.h"
#include "qwt_graphic.h"
#include "qwt_interval.h"
class QString;
class QRect;
class QPointF;
class QPainter;
class QwtPolarPlot;
class QwtScaleMap;
class QwtScaleDiv;
class QWT_EXPORT QwtPolarItem
{
public:
enum RttiValues
{
Rtti_PolarItem = 0,
Rtti_PolarGrid,
Rtti_PolarMarker,
Rtti_PolarCurve,
Rtti_PolarSpectrogram,
Rtti_PolarUserItem = 1000
};
enum ItemAttribute
{
Legend = 0x01,
AutoScale = 0x02
};
Q_DECLARE_FLAGS( ItemAttributes, ItemAttribute )
enum RenderHint
{
RenderAntialiased = 0x01
};
Q_DECLARE_FLAGS( RenderHints, RenderHint )
explicit QwtPolarItem( const QwtText& title = QwtText() );
virtual ~QwtPolarItem();
void attach( QwtPolarPlot* plot );
void detach();
QwtPolarPlot* plot() const;
void setTitle( const QString& title );
void setTitle( const QwtText& title );
const QwtText& title() const;
virtual int rtti() const;
void setItemAttribute( ItemAttribute, bool on = true );
bool testItemAttribute( ItemAttribute ) const;
void setRenderHint( RenderHint, bool on = true );
bool testRenderHint( RenderHint ) const;
void setRenderThreadCount( uint numThreads );
uint renderThreadCount() const;
double z() const;
void setZ( double z );
void show();
void hide();
virtual void setVisible( bool );
bool isVisible () const;
virtual void itemChanged();
virtual void legendChanged();
virtual void draw( QPainter* painter,
const QwtScaleMap& azimuthMap, const QwtScaleMap& radialMap,
const QPointF& pole, double radius,
const QRectF& canvasRect ) const = 0;
virtual QwtInterval boundingInterval( int scaleId ) const;
virtual void updateScaleDiv( const QwtScaleDiv&,
const QwtScaleDiv&, const QwtInterval& );
virtual int marginHint() const;
void setLegendIconSize( const QSize& );
QSize legendIconSize() const;
virtual QList< QwtLegendData > legendData() const;
virtual QwtGraphic legendIcon( int index, const QSizeF& ) const;
private:
Q_DISABLE_COPY( QwtPolarItem )
class PrivateData;
PrivateData* m_data;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::ItemAttributes )
Q_DECLARE_OPERATORS_FOR_FLAGS( QwtPolarItem::RenderHints )
Q_DECLARE_METATYPE( QwtPolarItem* )
#endif
QList
Definition qwt_abstract_legend.h:17
QwtGraphic
A paint device for scalable graphics.
Definition qwt_graphic.h:76
QwtInterval
A class representing an interval.
Definition qwt_interval.h:23
QwtPolarItem
Base class for items on a polar plot.
Definition qwt_polar_item.h:38
QwtPolarItem::draw
virtual void draw(QPainter *painter, const QwtScaleMap &azimuthMap, const QwtScaleMap &radialMap, const QPointF &pole, double radius, const QRectF &canvasRect) const =0
Draw the item.
QwtPolarItem::ItemAttribute
ItemAttribute
Plot Item Attributes.
Definition qwt_polar_item.h:75
QwtPolarItem::ItemAttributes
QFlags< ItemAttribute > ItemAttributes
Definition qwt_polar_item.h:86
QwtPolarItem::RttiValues
RttiValues
Runtime type information.
Definition qwt_polar_item.h:47
QwtPolarItem::Rtti_PolarMarker
@ Rtti_PolarMarker
For QwtPolarMarker.
Definition qwt_polar_item.h:55
QwtPolarItem::Rtti_PolarGrid
@ Rtti_PolarGrid
For QwtPolarGrid.
Definition qwt_polar_item.h:52
QwtPolarItem::Rtti_PolarCurve
@ Rtti_PolarCurve
For QwtPolarCurve.
Definition qwt_polar_item.h:58
QwtPolarItem::Rtti_PolarSpectrogram
@ Rtti_PolarSpectrogram
For QwtPolarSpectrogram.
Definition qwt_polar_item.h:61
QwtPolarItem::RenderHints
QFlags< RenderHint > RenderHints
Definition qwt_polar_item.h:98
QwtPolarItem::RenderHint
RenderHint
Render hints.
Definition qwt_polar_item.h:93
QwtPolarPlot
A plotting widget, displaying a polar coordinate system.
Definition qwt_polar_plot.h:47
QwtScaleDiv
A class representing a scale division.
Definition qwt_scale_div.h:34
QwtScaleMap
A scale map.
Definition qwt_scale_map.h:27
QwtText
A class representing a text.
Definition qwt_text.h:52