VTK
QVTKPaintEngine.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright 2004 Sandia Corporation.
4  Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
5  license for use of this work by or on behalf of the
6  U.S. Government. Redistribution and use in source and binary forms, with
7  or without modification, are permitted provided that this Notice and any
8  statement of authorship are reproduced on all copies.
9 
10 =========================================================================*/
11 
12 #ifndef QVTK_PAINT_ENGINE_HPP
13 #define QVTK_PAINT_ENGINE_HPP
14 
15 #include "QVTKWin32Header.h"
16 #include <QPaintEngine>
17 #include <vtkSetGet.h>
18 class QVTKWidget;
19 class QVTKPaintEngineInternal;
20 
29 class QVTKPaintEngine : public QPaintEngine
30 {
31 public:
32  VTK_LEGACY(QVTKPaintEngine());
33  ~QVTKPaintEngine() override;
34 
35  // Description:
36  // begin painting on device (QVTKWidget)
37  bool begin(QPaintDevice* dev) override;
38 
39  // Description:
40  // end painting on device
41  bool end() override;
42 
43  // Description:
44  // returns type User
45  QPaintEngine::Type type() const override;
46 
47  // Description:
48  // updateState
49  void updateState(const QPaintEngineState&) override;
50 
51  // Description:
52  // draw a pixmap
53  void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) override;
54 
55  // Description:
56  // draw a path
57  void drawPath(const QPainterPath& path) override;
58 
59  // Description:
60  // draw a polygon
61  void drawPolygon(const QPointF* points, int pointCount, PolygonDrawMode mode) override;
62  void drawPolygon(const QPoint* points, int pointCount, PolygonDrawMode mode) override;
63 
64 protected:
65 
67  QVTKPaintEngineInternal* Internal;
68 };
69 
70 #endif
71 
QPaintEngine::Type type() const override
bool end() override
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
void updateState(const QPaintEngineState &) override
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
QVTKWidget * Widget
void drawPath(const QPainterPath &path) override
QVTKPaintEngineInternal * Internal
bool begin(QPaintDevice *dev) override
display a vtkRenderWindow in a Qt&#39;s QWidget.
~QVTKPaintEngine() override
directs QPainter calls to a VTK window