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

Widget for displaying complex data in polar plot format with markers and traces. More...

#include <polarplotwidget.h>

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

Classes

struct  AxisSettings
 Settings for plot axes and display options. More...
 
struct  Marker
 Data structure for the frequency marker. More...
 
struct  Trace
 Complex trace data structure with frequencies and display properties. More...
 

Public Member Functions

void setSettings (const AxisSettings &settings)
 Apply saved axis settings.
 
PolarPlotWidget::AxisSettings getSettings () const
 Get current axis settings.
 
 PolarPlotWidget (QWidget *parent=nullptr)
 Construct a new polar plot widget.
 
 ~PolarPlotWidget ()
 Class destructor.
 
void addTrace (const QString &name, const Trace &trace)
 Add trace to the widget.
 
void removeTrace (const QString &name)
 Remove trace by name.
 
void clearTraces ()
 Clear all traces from the plot.
 
QPen getTracePen (const QString &traceName) const
 Get pen style for a specific trace.
 
void setTracePen (const QString &traceName, const QPen &pen)
 Set pen style for a specific trace.
 
QMap< QString, QPen > getTracesInfo () const
 Get all trace names and their pen styles.
 
double getRmax ()
 Get current radial axis maximum value.
 
double getRmin ()
 Get current radial axis minimum value.
 
double getRdiv ()
 Get radial axis division spacing.
 
int getDisplayMode () const
 Get current display mode.
 
bool addMarker (const QString &markerId, double frequency, const QPen &pen=QPen(Qt::red, 2))
 Add marker at specified frequency.
 
bool removeMarker (const QString &markerId)
 Remove marker by ID.
 
bool updateMarkerFrequency (const QString &markerId, double newFrequency)
 Update existing marker to new frequency.
 
void clearMarkers ()
 Clear all markers from the plot.
 
QMap< QString, double > getMarkers () const
 Get all marker IDs and their frequencies.
 
QCustomPlotcustomPlot () const
 Access underlying QCustomPlot instance.
 

Detailed Description

Widget for displaying complex data in polar plot format with markers and traces.

PolarPlotWidget provides a polar plot visualization with support for multiple traces and frequency markers

Constructor & Destructor Documentation

◆ PolarPlotWidget()

PolarPlotWidget::PolarPlotWidget ( QWidget *  parent = nullptr)
explicit

Construct a new polar plot widget.

Parameters
parentParent widget

Member Function Documentation

◆ addMarker()

bool PolarPlotWidget::addMarker ( const QString &  markerId,
double  frequency,
const QPen &  pen = QPen(Qt::red, 2) 
)

Add marker at specified frequency.

Parameters
markerIdUnique marker identifier
frequencyFrequency position in Hz
penVisual style for marker (default: red, width 2)
Returns
true if marker added successfully, false if frequency out of range

◆ addTrace()

void PolarPlotWidget::addTrace ( const QString &  name,
const Trace trace 
)

Add trace to the widget.

Parameters
nameUnique trace identifier
traceTrace data to add

◆ customPlot()

QCustomPlot * PolarPlotWidget::customPlot ( ) const
inline

Access underlying QCustomPlot instance.

Returns
Pointer to internal QCustomPlot widget

◆ getDisplayMode()

int PolarPlotWidget::getDisplayMode ( ) const
inline

Get current display mode.

Returns
0 for Magnitude/Phase, 1 for Real/Imaginary

◆ getMarkers()

QMap< QString, double > PolarPlotWidget::getMarkers ( ) const

Get all marker IDs and their frequencies.

Returns
Map of marker IDs to frequency values

◆ getRdiv()

double PolarPlotWidget::getRdiv ( )
inline

Get radial axis division spacing.

Returns
Division interval for radial grid

◆ getRmax()

double PolarPlotWidget::getRmax ( )
inline

Get current radial axis maximum value.

Returns
Maximum radius value

◆ getRmin()

double PolarPlotWidget::getRmin ( )
inline

Get current radial axis minimum value.

Returns
Minimum radius value

◆ getSettings()

PolarPlotWidget::AxisSettings PolarPlotWidget::getSettings ( ) const

Get current axis settings.

Returns
Current axis configuration

◆ getTracePen()

QPen PolarPlotWidget::getTracePen ( const QString &  traceName) const

Get pen style for a specific trace.

Parameters
traceNameName of the trace
Returns
Pen style, or default QPen if trace not found

◆ getTracesInfo()

QMap< QString, QPen > PolarPlotWidget::getTracesInfo ( ) const

Get all trace names and their pen styles.

Returns
Map of trace names to pen styles

◆ removeMarker()

bool PolarPlotWidget::removeMarker ( const QString &  markerId)

Remove marker by ID.

Parameters
markerIdIdentifier of marker to remove
Returns
true if marker existed and was removed, false otherwise

◆ removeTrace()

void PolarPlotWidget::removeTrace ( const QString &  name)

Remove trace by name.

Parameters
nameTrace identifier to remove

◆ setTracePen()

void PolarPlotWidget::setTracePen ( const QString &  traceName,
const QPen &  pen 
)

Set pen style for a specific trace.

Parameters
traceNameName of the trace
penNew pen style to apply

◆ updateMarkerFrequency()

bool PolarPlotWidget::updateMarkerFrequency ( const QString &  markerId,
double  newFrequency 
)

Update existing marker to new frequency.

Parameters
markerIdIdentifier of marker to update
newFrequencyNew frequency position in Hz
Returns
true if update successful, false if marker not found or frequency invalid

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