MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / AeqPreviewPlot

Method AeqPreviewPlot

src/subprojects/AutoEqIntegration/AeqPreviewPlot.cpp:12–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10#include <QMenu>
11
12AeqPreviewPlot::AeqPreviewPlot(QWidget* parent) : QCustomPlot(parent)
13{
14 setInteractions(QCP::iRangeDrag | QCP::iRangeZoom);
15
16 xAxis->setRange(QCPRange(20,24000));
17 xAxis->setLabel(tr("Frequency (Hz)"));
18
19 yAxis->setRange(QCPRange(-10,10));
20 yAxis->setLabel(tr("Amplitude (dBr)"));
21
22 QSharedPointer<QCPAxisTickerLog> logTicker(new QCPAxisTickerLog);
23 xAxis->setTicker(logTicker);
24 xAxis->setScaleType(QCPAxis::stLogarithmic);
25 rescaleAxes();
26
27 QFont legendFont = font();
28 legendFont.setPointSize(10);
29 legend->setFont(legendFont);
30 legend->setSelectedFont(legendFont);
31 legend->setVisible(true);
32
33 axisRect()->insetLayout()->setInsetAlignment(0, (Qt::Alignment)(Qt::AlignBottom|Qt::AlignRight));
34
35 plotLayout()->insertRow(0);
36 titleElement = new QCPTextElement(this, "", QFont("sans", 10));
37 plotLayout()->addElement(0, 0, titleElement);
38
39 setContextMenuPolicy(Qt::CustomContextMenu);
40 connect(this, &QCustomPlot::customContextMenuRequested, this, &AeqPreviewPlot::onContextMenuRequest);
41 connect(this, &QCustomPlot::mouseMove, this, &AeqPreviewPlot::onHover);
42 connect(this, &QCustomPlot::legendClick, this, &AeqPreviewPlot::onLegendClick);
43 connect(this, &QCustomPlot::legendDoubleClick, this, &AeqPreviewPlot::onLegendDoubleClick);
44
45}
46
47#define ADD(name,label,color_light,width) \
48 auto name = addGraph(); \

Callers

nothing calls this directly

Calls 14

fontFunction · 0.85
axisRectFunction · 0.85
plotLayoutFunction · 0.85
connectFunction · 0.85
setRangeMethod · 0.80
setLabelMethod · 0.80
setTickerMethod · 0.80
setScaleTypeMethod · 0.80
setFontMethod · 0.80
setSelectedFontMethod · 0.80
setInsetAlignmentMethod · 0.80
setVisibleMethod · 0.45

Tested by

no test coverage detected