1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
/*
* python-qwt. Python wrapper for the Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
* Copyright (C) 2015 Gudjon I. Gudjonsson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
class QwtGraphic: QwtNullPaintDevice
{
%TypeHeaderCode
#include <qwt_graphic.h>
%End
public:
enum RenderHint
{
RenderPensUnscaled = 0x1
};
typedef QFlags<QwtGraphic::RenderHint> RenderHints;
QwtGraphic();
QwtGraphic( const QwtGraphic & );
virtual ~QwtGraphic();
void reset();
bool isNull() const;
bool isEmpty() const;
void render( QPainter * ) const;
void render( QPainter *, const QSizeF &,
Qt::AspectRatioMode = Qt::IgnoreAspectRatio ) const;
void render( QPainter *, const QRectF &,
Qt::AspectRatioMode = Qt::IgnoreAspectRatio ) const;
void render( QPainter *, const QPointF &,
Qt::Alignment = Qt::AlignTop | Qt::AlignLeft ) const;
QPixmap toPixmap() const;
QPixmap toPixmap( const QSize &,
Qt::AspectRatioMode = Qt::IgnoreAspectRatio ) const;
QImage toImage() const;
QImage toImage( const QSize &,
Qt::AspectRatioMode = Qt::IgnoreAspectRatio ) const;
QRectF scaledBoundingRect( double sx, double sy ) const;
QRectF boundingRect() const;
QRectF controlPointRect() const;
//const QVector< QwtPainterCommand > &commands() const; FIXME
//void setCommands( QVector< QwtPainterCommand > & ); FIXME
void setDefaultSize( const QSizeF & );
QSizeF defaultSize() const;
void setRenderHint( QwtGraphic::RenderHint, bool on = true );
bool testRenderHint( QwtGraphic::RenderHint ) const;
protected:
virtual QSize sizeMetrics() const;
virtual void drawPath( const QPainterPath & );
virtual void drawPixmap( const QRectF &,
const QPixmap &, const QRectF & );
virtual void drawImage( const QRectF &,
const QImage &, const QRectF &, Qt::ImageConversionFlags );
virtual void updateState( const QPaintEngineState &state );
private:
QwtGraphic& operator=( const QwtGraphic & );
/* void updateBoundingRect( const QRectF & );
void updateControlPointRect( const QRectF & );
class PathInfo;
class PrivateData;
PrivateData *d_data;*/
};
//Q_DECLARE_OPERATORS_FOR_FLAGS( QwtGraphic::RenderHints )
//Q_DECLARE_METATYPE( QwtGraphic )
|