##// END OF EJS Templates
- added hasOwner method to manage ownership more nicely...
- added hasOwner method to manage ownership more nicely - added force flag to make delete() work - added check for hasOwner git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@51 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r13:d46b01f7163a
r15:ae998290bf19
Show More
PythonQtWrapper_QPainter.h
214 lines | 17.0 KiB | text/x-c | CLexer
#ifndef PYTHONQTWRAPPER_QPAINTER_H
#define PYTHONQTWRAPPER_QPAINTER_H
#include <qpainter.h>
#include <QObject>
#include <QPainterPath>
#include <QPixmap>
#include <QVariant>
#include <QWidget>
#include <qbrush.h>
#include <qcolor.h>
#include <qfont.h>
#include <qimage.h>
#include <qline.h>
#include <qmatrix.h>
#include <qpaintdevice.h>
#include <qpaintengine.h>
#include <qpainter.h>
#include <qpainterpath.h>
#include <qpen.h>
#include <qpicture.h>
#include <qpixmap.h>
#include <qpoint.h>
#include <qpolygon.h>
#include <qrect.h>
#include <qregion.h>
#include <qtransform.h>
#include <qvector.h>
#include <qwidget.h>
class PythonQtWrapper_QPainter : public QObject
{ Q_OBJECT
public:
Q_ENUMS(CompositionMode RenderHint )
enum CompositionMode{
CompositionMode_SourceOver = QPainter::CompositionMode_SourceOver, CompositionMode_DestinationOver = QPainter::CompositionMode_DestinationOver, CompositionMode_Clear = QPainter::CompositionMode_Clear, CompositionMode_Source = QPainter::CompositionMode_Source, CompositionMode_Destination = QPainter::CompositionMode_Destination, CompositionMode_SourceIn = QPainter::CompositionMode_SourceIn, CompositionMode_DestinationIn = QPainter::CompositionMode_DestinationIn, CompositionMode_SourceOut = QPainter::CompositionMode_SourceOut, CompositionMode_DestinationOut = QPainter::CompositionMode_DestinationOut, CompositionMode_SourceAtop = QPainter::CompositionMode_SourceAtop, CompositionMode_DestinationAtop = QPainter::CompositionMode_DestinationAtop, CompositionMode_Xor = QPainter::CompositionMode_Xor, CompositionMode_Plus = QPainter::CompositionMode_Plus, CompositionMode_Multiply = QPainter::CompositionMode_Multiply, CompositionMode_Screen = QPainter::CompositionMode_Screen, CompositionMode_Overlay = QPainter::CompositionMode_Overlay, CompositionMode_Darken = QPainter::CompositionMode_Darken, CompositionMode_Lighten = QPainter::CompositionMode_Lighten, CompositionMode_ColorDodge = QPainter::CompositionMode_ColorDodge, CompositionMode_ColorBurn = QPainter::CompositionMode_ColorBurn, CompositionMode_HardLight = QPainter::CompositionMode_HardLight, CompositionMode_SoftLight = QPainter::CompositionMode_SoftLight, CompositionMode_Difference = QPainter::CompositionMode_Difference, CompositionMode_Exclusion = QPainter::CompositionMode_Exclusion};
enum RenderHint{
Antialiasing = QPainter::Antialiasing, TextAntialiasing = QPainter::TextAntialiasing, SmoothPixmapTransform = QPainter::SmoothPixmapTransform, HighQualityAntialiasing = QPainter::HighQualityAntialiasing, NonCosmeticDefaultPen = QPainter::NonCosmeticDefaultPen};
public slots:
QPainter* new_QPainter();
void delete_QPainter(QPainter* obj) { delete obj; }
const QBrush& background(QPainter* theWrappedObject) const;
Qt::BGMode backgroundMode(QPainter* theWrappedObject) const;
bool begin(QPainter* theWrappedObject, QPaintDevice* arg__1);
QRect boundingRect(QPainter* theWrappedObject, const QRect& rect, int flags, const QString& text);
QRectF boundingRect(QPainter* theWrappedObject, const QRectF& rect, const QString& text, const QTextOption& o = QTextOption());
QRectF boundingRect(QPainter* theWrappedObject, const QRectF& rect, int flags, const QString& text);
QRect boundingRect(QPainter* theWrappedObject, int x, int y, int w, int h, int flags, const QString& text);
const QBrush& brush(QPainter* theWrappedObject) const;
QPoint brushOrigin(QPainter* theWrappedObject) const;
QPainterPath clipPath(QPainter* theWrappedObject) const;
QRegion clipRegion(QPainter* theWrappedObject) const;
QMatrix combinedMatrix(QPainter* theWrappedObject) const;
QTransform combinedTransform(QPainter* theWrappedObject) const;
QPainter::CompositionMode compositionMode(QPainter* theWrappedObject) const;
QPaintDevice* device(QPainter* theWrappedObject) const;
const QMatrix& deviceMatrix(QPainter* theWrappedObject) const;
const QTransform& deviceTransform(QPainter* theWrappedObject) const;
void drawArc(QPainter* theWrappedObject, const QRect& arg__1, int a, int alen);
void drawArc(QPainter* theWrappedObject, const QRectF& rect, int a, int alen);
void drawArc(QPainter* theWrappedObject, int x, int y, int w, int h, int a, int alen);
void drawChord(QPainter* theWrappedObject, const QRect& arg__1, int a, int alen);
void drawChord(QPainter* theWrappedObject, const QRectF& rect, int a, int alen);
void drawChord(QPainter* theWrappedObject, int x, int y, int w, int h, int a, int alen);
void drawConvexPolygon(QPainter* theWrappedObject, const QPolygon& polygon);
void drawConvexPolygon(QPainter* theWrappedObject, const QPolygonF& polygon);
void drawEllipse(QPainter* theWrappedObject, const QPoint& center, int rx, int ry);
void drawEllipse(QPainter* theWrappedObject, const QPointF& center, qreal rx, qreal ry);
void drawEllipse(QPainter* theWrappedObject, const QRect& r);
void drawEllipse(QPainter* theWrappedObject, const QRectF& r);
void drawEllipse(QPainter* theWrappedObject, int x, int y, int w, int h);
void drawImage(QPainter* theWrappedObject, const QPoint& p, const QImage& image);
void drawImage(QPainter* theWrappedObject, const QPoint& p, const QImage& image, const QRect& sr, Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawImage(QPainter* theWrappedObject, const QPointF& p, const QImage& image);
void drawImage(QPainter* theWrappedObject, const QPointF& p, const QImage& image, const QRectF& sr, Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawImage(QPainter* theWrappedObject, const QRect& r, const QImage& image);
void drawImage(QPainter* theWrappedObject, const QRect& targetRect, const QImage& image, const QRect& sourceRect, Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawImage(QPainter* theWrappedObject, const QRectF& r, const QImage& image);
void drawImage(QPainter* theWrappedObject, const QRectF& targetRect, const QImage& image, const QRectF& sourceRect, Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawImage(QPainter* theWrappedObject, int x, int y, const QImage& image, int sx = 0, int sy = 0, int sw = -1, int sh = -1, Qt::ImageConversionFlags flags = Qt::AutoColor);
void drawLine(QPainter* theWrappedObject, const QLine& line);
void drawLine(QPainter* theWrappedObject, const QLineF& line);
void drawLine(QPainter* theWrappedObject, const QPoint& p1, const QPoint& p2);
void drawLine(QPainter* theWrappedObject, const QPointF& p1, const QPointF& p2);
void drawLine(QPainter* theWrappedObject, int x1, int y1, int x2, int y2);
void drawLines(QPainter* theWrappedObject, const QVector<QLine >& lines);
void drawLines(QPainter* theWrappedObject, const QVector<QLineF >& lines);
void drawLines(QPainter* theWrappedObject, const QVector<QPoint >& pointPairs);
void drawLines(QPainter* theWrappedObject, const QVector<QPointF >& pointPairs);
void drawPath(QPainter* theWrappedObject, const QPainterPath& path);
void drawPicture(QPainter* theWrappedObject, const QPoint& p, const QPicture& picture);
void drawPicture(QPainter* theWrappedObject, const QPointF& p, const QPicture& picture);
void drawPicture(QPainter* theWrappedObject, int x, int y, const QPicture& picture);
void drawPie(QPainter* theWrappedObject, const QRect& arg__1, int a, int alen);
void drawPie(QPainter* theWrappedObject, const QRectF& rect, int a, int alen);
void drawPie(QPainter* theWrappedObject, int x, int y, int w, int h, int a, int alen);
void drawPixmap(QPainter* theWrappedObject, const QPoint& p, const QPixmap& pm);
void drawPixmap(QPainter* theWrappedObject, const QPoint& p, const QPixmap& pm, const QRect& sr);
void drawPixmap(QPainter* theWrappedObject, const QPointF& p, const QPixmap& pm);
void drawPixmap(QPainter* theWrappedObject, const QPointF& p, const QPixmap& pm, const QRectF& sr);
void drawPixmap(QPainter* theWrappedObject, const QRect& r, const QPixmap& pm);
void drawPixmap(QPainter* theWrappedObject, const QRect& targetRect, const QPixmap& pixmap, const QRect& sourceRect);
void drawPixmap(QPainter* theWrappedObject, const QRectF& targetRect, const QPixmap& pixmap, const QRectF& sourceRect);
void drawPixmap(QPainter* theWrappedObject, int x, int y, const QPixmap& pm);
void drawPixmap(QPainter* theWrappedObject, int x, int y, const QPixmap& pm, int sx, int sy, int sw, int sh);
void drawPixmap(QPainter* theWrappedObject, int x, int y, int w, int h, const QPixmap& pm);
void drawPixmap(QPainter* theWrappedObject, int x, int y, int w, int h, const QPixmap& pm, int sx, int sy, int sw, int sh);
void drawPoint(QPainter* theWrappedObject, const QPoint& p);
void drawPoint(QPainter* theWrappedObject, const QPointF& pt);
void drawPoint(QPainter* theWrappedObject, int x, int y);
void drawPoints(QPainter* theWrappedObject, const QPolygon& points);
void drawPoints(QPainter* theWrappedObject, const QPolygonF& points);
void drawPolygon(QPainter* theWrappedObject, const QPolygon& polygon, Qt::FillRule fillRule = Qt::OddEvenFill);
void drawPolygon(QPainter* theWrappedObject, const QPolygonF& polygon, Qt::FillRule fillRule = Qt::OddEvenFill);
void drawPolyline(QPainter* theWrappedObject, const QPolygon& polygon);
void drawPolyline(QPainter* theWrappedObject, const QPolygonF& polyline);
void drawRect(QPainter* theWrappedObject, const QRect& rect);
void drawRect(QPainter* theWrappedObject, const QRectF& rect);
void drawRect(QPainter* theWrappedObject, int x1, int y1, int w, int h);
void drawRects(QPainter* theWrappedObject, const QVector<QRect >& rectangles);
void drawRects(QPainter* theWrappedObject, const QVector<QRectF >& rectangles);
void drawRoundRect(QPainter* theWrappedObject, const QRect& r, int xround = 25, int yround = 25);
void drawRoundRect(QPainter* theWrappedObject, const QRectF& r, int xround = 25, int yround = 25);
void drawRoundRect(QPainter* theWrappedObject, int x, int y, int w, int h, int arg__5 = 25, int arg__6 = 25);
void drawRoundedRect(QPainter* theWrappedObject, const QRect& rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize);
void drawRoundedRect(QPainter* theWrappedObject, const QRectF& rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize);
void drawRoundedRect(QPainter* theWrappedObject, int x, int y, int w, int h, qreal xRadius, qreal yRadius, Qt::SizeMode mode = Qt::AbsoluteSize);
void drawText(QPainter* theWrappedObject, const QPoint& p, const QString& s);
void drawText(QPainter* theWrappedObject, const QPointF& p, const QString& s);
void drawText(QPainter* theWrappedObject, const QRect& r, int flags, const QString& text, QRect* br = 0);
void drawText(QPainter* theWrappedObject, const QRectF& r, const QString& text, const QTextOption& o = QTextOption());
void drawText(QPainter* theWrappedObject, const QRectF& r, int flags, const QString& text, QRectF* br = 0);
void drawText(QPainter* theWrappedObject, int x, int y, const QString& s);
void drawText(QPainter* theWrappedObject, int x, int y, int w, int h, int flags, const QString& text, QRect* br = 0);
void drawTextItem(QPainter* theWrappedObject, const QPoint& p, const QTextItem& ti);
void drawTextItem(QPainter* theWrappedObject, const QPointF& p, const QTextItem& ti);
void drawTextItem(QPainter* theWrappedObject, int x, int y, const QTextItem& ti);
void drawTiledPixmap(QPainter* theWrappedObject, const QRect& arg__1, const QPixmap& arg__2, const QPoint& arg__3 = QPoint());
void drawTiledPixmap(QPainter* theWrappedObject, const QRectF& rect, const QPixmap& pm, const QPointF& offset = QPointF());
void drawTiledPixmap(QPainter* theWrappedObject, int x, int y, int w, int h, const QPixmap& arg__5, int sx = 0, int sy = 0);
bool end(QPainter* theWrappedObject);
void eraseRect(QPainter* theWrappedObject, const QRect& arg__1);
void eraseRect(QPainter* theWrappedObject, const QRectF& arg__1);
void eraseRect(QPainter* theWrappedObject, int x, int y, int w, int h);
void fillPath(QPainter* theWrappedObject, const QPainterPath& path, const QBrush& brush);
void fillRect(QPainter* theWrappedObject, const QRect& arg__1, const QBrush& arg__2);
void fillRect(QPainter* theWrappedObject, const QRectF& arg__1, const QBrush& arg__2);
void fillRect(QPainter* theWrappedObject, int x, int y, int w, int h, const QBrush& arg__5);
const QFont& font(QPainter* theWrappedObject) const;
bool hasClipping(QPainter* theWrappedObject) const;
void initFrom(QPainter* theWrappedObject, const QWidget* widget);
bool isActive(QPainter* theWrappedObject) const;
Qt::LayoutDirection layoutDirection(QPainter* theWrappedObject) const;
qreal opacity(QPainter* theWrappedObject) const;
QPaintEngine* paintEngine(QPainter* theWrappedObject) const;
const QPen& pen(QPainter* theWrappedObject) const;
QPaintDevice* static_QPainter_redirected(const QPaintDevice* device, QPoint* offset = 0);
QPainter::RenderHints renderHints(QPainter* theWrappedObject) const;
void resetMatrix(QPainter* theWrappedObject);
void resetTransform(QPainter* theWrappedObject);
void restore(QPainter* theWrappedObject);
void static_QPainter_restoreRedirected(const QPaintDevice* device);
void rotate(QPainter* theWrappedObject, qreal a);
void save(QPainter* theWrappedObject);
void scale(QPainter* theWrappedObject, qreal sx, qreal sy);
void setBackground(QPainter* theWrappedObject, const QBrush& bg);
void setBackgroundMode(QPainter* theWrappedObject, Qt::BGMode mode);
void setBrush(QPainter* theWrappedObject, Qt::BrushStyle style);
void setBrush(QPainter* theWrappedObject, const QBrush& brush);
void setBrushOrigin(QPainter* theWrappedObject, const QPoint& arg__1);
void setBrushOrigin(QPainter* theWrappedObject, const QPointF& arg__1);
void setBrushOrigin(QPainter* theWrappedObject, int x, int y);
void setClipPath(QPainter* theWrappedObject, const QPainterPath& path, Qt::ClipOperation op = Qt::ReplaceClip);
void setClipRect(QPainter* theWrappedObject, const QRect& arg__1, Qt::ClipOperation op = Qt::ReplaceClip);
void setClipRect(QPainter* theWrappedObject, const QRectF& arg__1, Qt::ClipOperation op = Qt::ReplaceClip);
void setClipRect(QPainter* theWrappedObject, int x, int y, int w, int h, Qt::ClipOperation op = Qt::ReplaceClip);
void setClipRegion(QPainter* theWrappedObject, const QRegion& arg__1, Qt::ClipOperation op = Qt::ReplaceClip);
void setClipping(QPainter* theWrappedObject, bool enable);
void setCompositionMode(QPainter* theWrappedObject, QPainter::CompositionMode mode);
void setFont(QPainter* theWrappedObject, const QFont& f);
void setLayoutDirection(QPainter* theWrappedObject, Qt::LayoutDirection direction);
void setOpacity(QPainter* theWrappedObject, qreal opacity);
void setPen(QPainter* theWrappedObject, Qt::PenStyle style);
void setPen(QPainter* theWrappedObject, const QColor& color);
void setPen(QPainter* theWrappedObject, const QPen& pen);
void static_QPainter_setRedirected(const QPaintDevice* device, QPaintDevice* replacement, const QPoint& offset = QPoint());
void setRenderHint(QPainter* theWrappedObject, QPainter::RenderHint hint, bool on = true);
void setRenderHints(QPainter* theWrappedObject, QPainter::RenderHints hints, bool on = true);
void setTransform(QPainter* theWrappedObject, const QTransform& transform, bool combine = false);
void setViewTransformEnabled(QPainter* theWrappedObject, bool enable);
void setViewport(QPainter* theWrappedObject, const QRect& viewport);
void setViewport(QPainter* theWrappedObject, int x, int y, int w, int h);
void setWindow(QPainter* theWrappedObject, const QRect& window);
void setWindow(QPainter* theWrappedObject, int x, int y, int w, int h);
void setWorldMatrix(QPainter* theWrappedObject, const QMatrix& matrix, bool combine = false);
void setWorldMatrixEnabled(QPainter* theWrappedObject, bool enabled);
void setWorldTransform(QPainter* theWrappedObject, const QTransform& matrix, bool combine = false);
void shear(QPainter* theWrappedObject, qreal sh, qreal sv);
void strokePath(QPainter* theWrappedObject, const QPainterPath& path, const QPen& pen);
bool testRenderHint(QPainter* theWrappedObject, QPainter::RenderHint hint) const;
const QTransform& transform(QPainter* theWrappedObject) const;
void translate(QPainter* theWrappedObject, const QPoint& offset);
void translate(QPainter* theWrappedObject, const QPointF& offset);
void translate(QPainter* theWrappedObject, qreal dx, qreal dy);
bool viewTransformEnabled(QPainter* theWrappedObject) const;
QRect viewport(QPainter* theWrappedObject) const;
QRect window(QPainter* theWrappedObject) const;
const QMatrix& worldMatrix(QPainter* theWrappedObject) const;
bool worldMatrixEnabled(QPainter* theWrappedObject) const;
const QTransform& worldTransform(QPainter* theWrappedObject) const;
};
#endif // PYTHONQTWRAPPER_QPAINTER_H