MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / QCustomPlot

Method QCustomPlot

qcustomplot.cpp:12859–12954  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

12857 Constructs a QCustomPlot and sets reasonable default values.
12858*/
12859QCustomPlot::QCustomPlot(QWidget *parent) :
12860 QWidget(parent),
12861 xAxis(0),
12862 yAxis(0),
12863 xAxis2(0),
12864 yAxis2(0),
12865 legend(0),
12866 mBufferDevicePixelRatio(1.0), // will be adapted to primary screen below
12867 mPlotLayout(0),
12868 mAutoAddPlottableToLegend(true),
12869 mAntialiasedElements(QCP::aeNone),
12870 mNotAntialiasedElements(QCP::aeNone),
12871 mInteractions(0),
12872 mSelectionTolerance(8),
12873 mNoAntialiasingOnDrag(false),
12874 mBackgroundBrush(Qt::white, Qt::SolidPattern),
12875 mBackgroundScaled(true),
12876 mBackgroundScaledMode(Qt::KeepAspectRatioByExpanding),
12877 mCurrentLayer(0),
12878 mPlottingHints(QCP::phCacheLabels|QCP::phImmediateRefresh),
12879 mMultiSelectModifier(Qt::ControlModifier),
12880 mSelectionRectMode(QCP::srmNone),
12881 mSelectionRect(0),
12882 mOpenGl(false),
12883 mMouseHasMoved(false),
12884 mMouseEventLayerable(0),
12885 mMouseSignalLayerable(0),
12886 mReplotting(false),
12887 mReplotQueued(false),
12888 mOpenGlMultisamples(16),
12889 mOpenGlAntialiasedElementsBackup(QCP::aeNone),
12890 mOpenGlCacheLabelsBackup(true)
12891{
12892 setAttribute(Qt::WA_NoMousePropagation);
12893 setAttribute(Qt::WA_OpaquePaintEvent);
12894 setFocusPolicy(Qt::ClickFocus);
12895 setMouseTracking(true);
12896 QLocale currentLocale = locale();
12897 currentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
12898 setLocale(currentLocale);
12899#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
12900# ifdef QCP_DEVICEPIXELRATIO_FLOAT
12901 setBufferDevicePixelRatio(QWidget::devicePixelRatioF());
12902# else
12903 setBufferDevicePixelRatio(QWidget::devicePixelRatio());
12904# endif
12905#endif
12906
12907 mOpenGlAntialiasedElementsBackup = mAntialiasedElements;
12908 mOpenGlCacheLabelsBackup = mPlottingHints.testFlag(QCP::phCacheLabels);
12909 // create initial layers:
12910 mLayers.append(new QCPLayer(this, QLatin1String("background")));
12911 mLayers.append(new QCPLayer(this, QLatin1String("grid")));
12912 mLayers.append(new QCPLayer(this, QLatin1String("main")));
12913 mLayers.append(new QCPLayer(this, QLatin1String("axes")));
12914 mLayers.append(new QCPLayer(this, QLatin1String("legend")));
12915 mLayers.append(new QCPLayer(this, QLatin1String("overlay")));
12916 updateLayerIndices();

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected