Merged a few changes from QCustomPlot's GIT repo that haven't made it
to a release yet. Turned off OpenGL as it has troubles on some machines.
This commit is contained in:
+9
-2
@@ -9262,11 +9262,14 @@ void QCPAxisPainterPrivate::placeTickLabel(QCPPainter *painter, double position,
|
|||||||
{
|
{
|
||||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size()*mParentPlot->bufferDevicePixelRatio());
|
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size()*mParentPlot->bufferDevicePixelRatio());
|
||||||
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||||
|
# ifdef QCP_DEVICEPIXELRATIO_FLOAT
|
||||||
|
cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatioF());
|
||||||
|
# else
|
||||||
cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatio());
|
cachedLabel->pixmap.setDevicePixelRatio(mParentPlot->devicePixelRatio());
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
} else
|
} else
|
||||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size());
|
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size());
|
||||||
cachedLabel->pixmap = QPixmap(labelData.rotatedTotalBounds.size());
|
|
||||||
cachedLabel->pixmap.fill(Qt::transparent);
|
cachedLabel->pixmap.fill(Qt::transparent);
|
||||||
QCPPainter cachePainter(&cachedLabel->pixmap);
|
QCPPainter cachePainter(&cachedLabel->pixmap);
|
||||||
cachePainter.setPen(painter->pen());
|
cachePainter.setPen(painter->pen());
|
||||||
@@ -12629,7 +12632,11 @@ QCustomPlot::QCustomPlot(QWidget *parent) :
|
|||||||
currentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
|
currentLocale.setNumberOptions(QLocale::OmitGroupSeparator);
|
||||||
setLocale(currentLocale);
|
setLocale(currentLocale);
|
||||||
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
#ifdef QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||||
|
# ifdef QCP_DEVICEPIXELRATIO_FLOAT
|
||||||
|
setBufferDevicePixelRatio(QWidget::devicePixelRatioF());
|
||||||
|
# else
|
||||||
setBufferDevicePixelRatio(QWidget::devicePixelRatio());
|
setBufferDevicePixelRatio(QWidget::devicePixelRatio());
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mOpenGlAntialiasedElementsBackup = mAntialiasedElements;
|
mOpenGlAntialiasedElementsBackup = mAntialiasedElements;
|
||||||
@@ -17579,7 +17586,7 @@ void QCPAxisRect::mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
|
|||||||
{
|
{
|
||||||
if (mParentPlot->noAntialiasingOnDrag())
|
if (mParentPlot->noAntialiasingOnDrag())
|
||||||
mParentPlot->setNotAntialiasedElements(QCP::aeAll);
|
mParentPlot->setNotAntialiasedElements(QCP::aeAll);
|
||||||
mParentPlot->replot();
|
mParentPlot->replot(QCustomPlot::rpQueuedReplot);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-1
@@ -41,7 +41,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
#define QCP_DEVICEPIXELRATIO_SUPPORTED
|
# define QCP_DEVICEPIXELRATIO_SUPPORTED
|
||||||
|
# if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||||
|
# define QCP_DEVICEPIXELRATIO_FLOAT
|
||||||
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ GraphingWindow::GraphingWindow(const QVector<CANFrame> *frames, QWidget *parent)
|
|||||||
|
|
||||||
ui->graphingView->setAttribute(Qt::WA_AcceptTouchEvents);
|
ui->graphingView->setAttribute(Qt::WA_AcceptTouchEvents);
|
||||||
|
|
||||||
ui->graphingView->setOpenGl(true); //purdy and fast drawing courtesy of your video card - pretty everyone has 3D accel these days
|
//ui->graphingView->setOpenGl(true); //purdy and fast drawing courtesy of your video card - pretty everyone has 3D accel these days
|
||||||
|
ui->graphingView->setAntialiasedElements(QCP::aeNone);
|
||||||
|
|
||||||
needScaleSetup = true;
|
needScaleSetup = true;
|
||||||
followGraphEnd = false;
|
followGraphEnd = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user