QT5 -- QWT 6.1 canvas fixup

This commit is contained in:
Mark Liversedge
2013-12-09 12:24:58 +00:00
parent 5abf8776f1
commit 5a89eee24c
6 changed files with 13 additions and 10 deletions

View File

@@ -2,7 +2,7 @@
#include "plot.h"
#ifndef QWT_NO_OPENGL
#define USE_OPENGL 1
#define USE_OPENGL 0
#endif
#if USE_OPENGL

View File

@@ -3,7 +3,7 @@
#ifndef QWT_NO_OPENGL
#if QT_VERSION >= 0x040600 && QT_VERSION < 0x050000
#define USE_OPENGL 1
#define USE_OPENGL 0
#endif
#endif

View File

@@ -1,3 +1,5 @@
#define QWT_NO_OPENGL
#include <qglobal.h>
#include <qwt_painter.h>
#include <qwt_plot_canvas.h>

View File

@@ -70,7 +70,7 @@ QWT_INSTALL_FEATURES = $${QWT_INSTALL_PREFIX}/features
# it will be a static library.
######################################################################
QWT_CONFIG += QwtDll
#QWT_CONFIG += QwtDll
######################################################################
# QwtPlot enables all classes, that are needed to use the QwtPlot

View File

@@ -110,7 +110,7 @@ class QwtPlot::PrivateData
public:
QPointer<QwtTextLabel> titleLabel;
QPointer<QwtTextLabel> footerLabel;
QPointer<QWidget> canvas;
QPointer<QwtPlotCanvas> canvas;
QPointer<QwtAbstractLegend> legend;
QwtPlotLayout *layout;
@@ -241,7 +241,7 @@ void QwtPlot::initPlot( const QwtText &title )
\param canvas Canvas Widget
\sa canvas()
*/
void QwtPlot::setCanvas( QWidget *canvas )
void QwtPlot::setCanvas( QwtPlotCanvas *canvas )
{
if ( canvas == d_data->canvas )
return;
@@ -491,7 +491,7 @@ const QwtAbstractLegend *QwtPlot::legend() const
/*!
\return the plot's canvas
*/
QWidget *QwtPlot::canvas()
QwtPlotCanvas *QwtPlot::canvas()
{
return d_data->canvas;
}
@@ -499,7 +499,7 @@ QWidget *QwtPlot::canvas()
/*!
\return the plot's canvas
*/
const QWidget *QwtPlot::canvas() const
const QwtPlotCanvas *QwtPlot::canvas() const
{
return d_data->canvas;
}

View File

@@ -14,6 +14,7 @@
#include "qwt_axis_id.h"
#include "qwt_text.h"
#include "qwt_plot_dict.h"
#include "qwt_plot_canvas.h"
#include "qwt_scale_map.h"
#include "qwt_interval.h"
#include <qframe.h>
@@ -152,10 +153,10 @@ public:
// Canvas
void setCanvas( QWidget * );
void setCanvas( QwtPlotCanvas * );
QWidget *canvas();
const QWidget *canvas() const;
QwtPlotCanvas *canvas();
const QwtPlotCanvas *canvas() const;
void setCanvasBackground( const QBrush & );
QBrush canvasBackground() const;