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

Method QCustomPlot

3rdparty/qcustomplot/qcustomplot.cpp:13597–13693  ·  view source on GitHub ↗

! Constructs a QCustomPlot and sets reasonable default values. */

Source from the content-addressed store, hash-verified

13595 Constructs a QCustomPlot and sets reasonable default values.
13596*/
13597QCustomPlot::QCustomPlot(QWidget *parent) :
13598 QWidget(parent),
13599 xAxis(nullptr),
13600 yAxis(nullptr),
13601 xAxis2(nullptr),
13602 yAxis2(nullptr),
13603 legend(nullptr),
13604 mBufferDevicePixelRatio(1.0), // will be adapted to true value below
13605 mPlotLayout(nullptr),
13606 mAutoAddPlottableToLegend(true),
13607 mAntialiasedElements(QCP::aeNone),
13608 mNotAntialiasedElements(QCP::aeNone),
13609 mInteractions(QCP::iNone),
13610 mSelectionTolerance(8),
13611 mNoAntialiasingOnDrag(false),
13612 mBackgroundBrush(Qt::white, Qt::SolidPattern),
13613 mBackgroundScaled(true),
13614 mBackgroundScaledMode(Qt::KeepAspectRatioByExpanding),
13615 mCurrentLayer(nullptr),
13616 mPlottingHints(QCP::phCacheLabels|QCP::phImmediateRefresh),
13617 mMultiSelectModifier(Qt::ControlModifier),
13618 mSelectionRectMode(QCP::srmNone),
13619 mSelectionRect(nullptr),
13620 mOpenGl(false),
13621 mMouseHasMoved(false),
13622 mMouseEventLayerable(nullptr),
13623 mMouseSignalLayerable(nullptr),
13624 mReplotting(false),
13625 mReplotQueued(false),
13626 mReplotTime(0),
13627 mReplotTimeAverage(0),
13628 mOpenGlMultisamples(16),
13629 mOpenGlAntialiasedElementsBackup(QCP::aeNone),
13630 mOpenGlCacheLabelsBackup(true)
13631{
13632 setAttribute(Qt::WA_NoMousePropagation);
13633 setFocusPolicy(Qt::ClickFocus);
13634 setMouseTracking(true);
13635 QLocale currentLocale = locale();
13636 currentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
13637 setLocale(currentLocale);
13638#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
13639# ifdef QCP_DEVICEPIXELRATIO_FLOAT
13640 setBufferDevicePixelRatio(QWidget::devicePixelRatioF());
13641# else
13642 setBufferDevicePixelRatio(QWidget::devicePixelRatio());
13643# endif
13644#endif
13645
13646 mOpenGlAntialiasedElementsBackup = mAntialiasedElements;
13647 mOpenGlCacheLabelsBackup = mPlottingHints.testFlag(QCP::phCacheLabels);
13648 // create initial layers:
13649 mLayers.append(new QCPLayer(this, QLatin1String("background")));
13650 mLayers.append(new QCPLayer(this, QLatin1String("grid")));
13651 mLayers.append(new QCPLayer(this, QLatin1String("main")));
13652 mLayers.append(new QCPLayer(this, QLatin1String("axes")));
13653 mLayers.append(new QCPLayer(this, QLatin1String("legend")));
13654 mLayers.append(new QCPLayer(this, QLatin1String("overlay")));

Callers

nothing calls this directly

Calls 10

devicePixelRatioFunction · 0.85
rectFunction · 0.85
appendMethod · 0.80
initializeParentPlotMethod · 0.80
setLayerMethod · 0.80
axisMethod · 0.80
setMarginsMethod · 0.80
setModeMethod · 0.45
addElementMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected