#include <casaqt/QwtPlotter/QPCanvas.qo.h>
#include <casaqt/QtUtilities/QtLayeredLayout.h>
#include <casaqt/QwtPlotter/QPAnnotation.h>
#include <casaqt/QwtPlotter/QPFactory.h>
#include <casaqt/QwtPlotter/QPExporter.h>
#include <casaqt/QwtPlotter/QPPlotter.qo.h>
#include <casaqt/QwtPlotter/QPRasterPlot.h>
#include <casaqt/QwtPlotter/QPShape.h>
#include <casaqt/QwtPlotter/AxisListener.h>
#include <qwt_scale_widget.h>
#include <qwt_scale_engine.h>
#include <qwt_picker_machine.h>
using namespace casacore;
vector<prange_t> preAxes(4); \
preAxes[0] = axisRange(X_BOTTOM); preAxes[1] = axisRange(X_TOP); \
preAxes[2] = axisRange(Y_LEFT); preAxes[3] = axisRange(Y_RIGHT);
vector<prange_t> postAxes(4); \
postAxes[0] = axisRange(X_BOTTOM); postAxes[1] = axisRange(X_TOP); \
postAxes[2] = axisRange(Y_LEFT); postAxes[3] = axisRange(Y_RIGHT); \
if(preAxes[0] != postAxes[0] || preAxes[1] != postAxes[1] || \
preAxes[2] != postAxes[2] || preAxes[3] != postAxes[3]) \
double QPCanvas::zOrder = 1;
const String QPCanvas::CLASS_NAME = "QPCanvas";
const String QPCanvas::DRAW_NAME = "drawItems";
bool QPCanvas::print( QPainter* painter, PlotAreaFillPtr paf, double widgetWidth,
double widgetHeight, int externalAxisWidth, int externalAxisHeight,
int rowIndex, int colIndex, QRect ){
PlotAreaFillPtr originalBackground = background();
PlotColorPtr plotColor = paf->color();
m_legend->setAreaFill( *paf, false );
int widthMultiplier = colIndex;
if ( colIndex >= 1 && commonY && externalAxisWidth > 0 ){