8#ifndef RECTANGULARPLOTWIDGET_H
9#define RECTANGULARPLOTWIDGET_H
11#include "./QCustomPlot/qcustomplot.h"
126 void setTracePen(
const QString& traceName,
const QPen& pen);
133 double getYmax() {
return yAxisMax->value(); }
136 double getYmin() {
return yAxisMin->value(); }
139 double getYdiv() {
return yAxisDiv->value(); }
143 void setYdiv(
double val) { yAxisDiv->setValue(val); }
147 void setYmax(
double val) { yAxisMax->setValue(val); }
151 void setYmin(
double val) { yAxisMin->setValue(val); }
163 double getXmax() {
return xAxisMax->value(); }
169 double getXdiv() {
return xAxisDiv->value(); }
177 QString
getXunits() {
return xAxisUnits->currentText(); }
193 return axisSettingsLocked;
203 return plotWidget->
yAxis2->visible();
216 yAxisUnits->setText(units);
229 y2AxisUnits->setText(units);
247 bool addMarker(
const QString& markerId,
double frequency,
248 const QPen& pen = QPen(Qt::red, 2));
275 bool addLimit(
const QString& LimitId,
const Limit& limit);
297 bool updateLimit(
const QString& limitId,
const Limit& limit);
322 void changeFreqUnits();
327 void toggleShowValues(
bool show);
331 void toggleLockAxisSettings(
bool locked);
335 void toggleLockPan(
bool locked);
339 void onXAxisRangeChanged(
const QCPRange& range);
342 void onYAxisRangeChanged(
const QCPRange& range);
345 void onY2AxisRangeChanged(
const QCPRange& range);
353 QComboBox* xAxisUnits;
366 QCheckBox* showValuesCheckbox;
367 bool showTraceValues;
369 QCheckBox* lockAxisCheckbox;
370 bool axisSettingsLocked;
372 QCheckBox* lockPanCheckbox;
374 QStringList frequencyUnits;
380 QMap<QString, Trace> traces;
381 QMap<QString, Marker> markers;
382 QMap<QString, Limit> limits;
384 QMap<QString, QCPGraph*> traceGraphs;
385 QMap<QString, QCPItemStraightLine*> markerLines;
386 QMap<QString, QCPItemText*> markerLabels;
387 QMap<QString, QCPItemTracer*> intersectionPoints;
388 QMap<QString, QCPItemText*> intersectionLabels;
389 QMap<QString, QCPGraph*> limitGraphs;
393 QGridLayout* setupAxisSettings();
396 void clearGraphicsItems();
404 void addMarkerIntersections(
const QString& markerId,
const Marker& marker);
408 int getYAxisTraceCount()
const;
412 int getY2AxisTraceCount()
const;
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
void setLabel(const QString &str)
Definition qcustomplot.cpp:9488
Represents the range an axis is encompassing.
Definition qcustomplot.h:986
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition qcustomplot.h:4305
QCPAxis * xAxis
Definition qcustomplot.h:4514
Q_SLOT void replot(QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpRefreshHint)
Definition qcustomplot.cpp:16135
QCPAxis * yAxis2
Definition qcustomplot.h:4514
QCPAxis * yAxis
Definition qcustomplot.h:4514