Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QCPPolarGrid Class Reference

The grid in both angular and radial dimensions for polar plots. More...

Inheritance diagram for QCPPolarGrid:
Inheritance graph
[legend]
Collaboration diagram for QCPPolarGrid:
Collaboration graph
[legend]

Public Types

enum  GridType { gtAngular = 0x01 , gtRadial = 0x02 , gtAll = 0xFF , gtNone = 0x00 }
 

Public Member Functions

 QCPPolarGrid (QCPPolarAxisAngular *parentAxis)
 
QCPPolarAxisRadialradialAxis () const
 
GridTypes type () const
 
GridTypes subGridType () const
 
bool antialiasedSubGrid () const
 
bool antialiasedZeroLine () const
 
QPen angularPen () const
 
QPen angularSubGridPen () const
 
QPen radialPen () const
 
QPen radialSubGridPen () const
 
QPen radialZeroLinePen () const
 
void setRadialAxis (QCPPolarAxisRadial *axis)
 
void setType (GridTypes type)
 
void setSubGridType (GridTypes type)
 
void setAntialiasedSubGrid (bool enabled)
 
void setAntialiasedZeroLine (bool enabled)
 
void setAngularPen (const QPen &pen)
 
void setAngularSubGridPen (const QPen &pen)
 
void setRadialPen (const QPen &pen)
 
void setRadialSubGridPen (const QPen &pen)
 
void setRadialZeroLinePen (const QPen &pen)
 
- Public Member Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () const
 
bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const
 
bool realVisibility () const
 

Protected Member Functions

virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const Q_DECL_OVERRIDE
 
virtual void draw (QCPPainter *painter) Q_DECL_OVERRIDE
 
void drawRadialGrid (QCPPainter *painter, const QPointF &center, const QVector< double > &coords, const QPen &pen, const QPen &zeroPen=Qt::NoPen)
 
void drawAngularGrid (QCPPainter *painter, const QPointF &center, double radius, const QVector< QPointF > &ticksCosSin, const QPen &pen)
 
- Protected Member Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
virtual QCP::Interaction selectionCategory () const
 
virtual QRect clipRect () const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
virtual void mousePressEvent (QMouseEvent *event, const QVariant &details)
 
virtual void mouseMoveEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseReleaseEvent (QMouseEvent *event, const QPointF &startPos)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event, const QVariant &details)
 
virtual void wheelEvent (QWheelEvent *event)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 

Protected Attributes

GridTypes mType
 
GridTypes mSubGridType
 
bool mAntialiasedSubGrid
 
bool mAntialiasedZeroLine
 
QPen mAngularPen
 
QPen mAngularSubGridPen
 
QPen mRadialPen
 
QPen mRadialSubGridPen
 
QPen mRadialZeroLinePen
 
QCPPolarAxisAngularmParentAxis
 
QPointer< QCPPolarAxisRadialmRadialAxis
 
- Protected Attributes inherited from QCPLayerable
bool mVisible
 
QCustomPlotmParentPlot
 
QPointer< QCPLayerablemParentLayerable
 
QCPLayermLayer
 
bool mAntialiased
 

Additional Inherited Members

- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 

Detailed Description

The grid in both angular and radial dimensions for polar plots.

Warning
In this QCustomPlot version, polar plots are a tech preview. Expect documentation and functionality to be incomplete, as well as changing public interfaces in the future.

Member Enumeration Documentation

◆ GridType

TODO

Constructor & Destructor Documentation

◆ QCPPolarGrid()

QCPPolarGrid::QCPPolarGrid ( QCPPolarAxisAngular parentAxis)
explicit

Creates a QCPPolarGrid instance and sets default values.

You shouldn't instantiate grids on their own, since every axis brings its own grid.

Member Function Documentation

◆ applyDefaultAntialiasingHint()

void QCPPolarGrid::applyDefaultAntialiasingHint ( QCPPainter painter) const
protectedvirtual

This function applies the default antialiasing setting to the specified painter, using the function applyAntialiasingHint. It is the antialiasing state the painter is put in, when draw is called on the layerable. If the layerable has multiple entities whose antialiasing setting may be specified individually, this function should set the antialiasing state of the most prominent entity. In this case however, the draw function usually calls the specialized versions of this function before drawing each entity, effectively overriding the setting of the default antialiasing hint.

First example: QCPGraph has multiple entities that have an antialiasing setting: The graph line, fills and scatters. Those can be configured via QCPGraph::setAntialiased, QCPGraph::setAntialiasedFill and QCPGraph::setAntialiasedScatters. Consequently, there isn't only the QCPGraph::applyDefaultAntialiasingHint function (which corresponds to the graph line's antialiasing), but specialized ones like QCPGraph::applyFillAntialiasingHint and QCPGraph::applyScattersAntialiasingHint. So before drawing one of those entities, QCPGraph::draw calls the respective specialized applyAntialiasingHint function.

Second example: QCPItemLine consists only of a line so there is only one antialiasing setting which can be controlled with QCPItemLine::setAntialiased. (This function is inherited by all layerables. The specialized functions, as seen on QCPGraph, must be added explicitly to the respective layerable subclass.) Consequently it only has the normal QCPItemLine::applyDefaultAntialiasingHint. The QCPItemLine::draw function doesn't need to care about setting any antialiasing states, because the default antialiasing hint is already set on the painter when the draw function is called, and that's the state it wants to draw the line with.

Implements QCPLayerable.

◆ draw()

void QCPPolarGrid::draw ( QCPPainter painter)
protectedvirtual

Implements QCPLayerable.

◆ setAngularPen()

void QCPPolarGrid::setAngularPen ( const QPen &  pen)

Sets the pen with which (major) grid lines are drawn.

◆ setAngularSubGridPen()

void QCPPolarGrid::setAngularSubGridPen ( const QPen &  pen)

Sets the pen with which sub grid lines are drawn.

◆ setAntialiasedSubGrid()

void QCPPolarGrid::setAntialiasedSubGrid ( bool  enabled)

Sets whether sub grid lines are drawn antialiased.

◆ setAntialiasedZeroLine()

void QCPPolarGrid::setAntialiasedZeroLine ( bool  enabled)

Sets whether zero lines are drawn antialiased.


The documentation for this class was generated from the following files: