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 /*========================================================================
13  For general information about using VTK and Qt, see:
14  http://www.trolltech.com/products/3rdparty/vtksupport.html
15 =========================================================================*/
16 
17 /*========================================================================
18  !!! WARNING for those who want to contribute code to this file.
19  !!! If you use a commercial edition of Qt, you can modify this code.
20  !!! If you use an open source version of Qt, you are free to modify
21  !!! and use this code within the guidelines of the GPL license.
22  !!! Unfortunately, you cannot contribute the changes back into this
23  !!! file. Doing so creates a conflict between the GPL and BSD-like VTK
24  !!! license.
25 =========================================================================*/
26 
27 // .NAME QVTKPaintEngine - directs QPainter calls to a VTK window
28 
29 #ifndef QVTK_PAINT_ENGINE_HPP
30 #define QVTK_PAINT_ENGINE_HPP
31 
32 #include "QVTKWin32Header.h"
33 #include <QPaintEngine>
34 class QVTKWidget;
35 class QVTKPaintEngineInternal;
36 
38 class QVTKPaintEngine : public QPaintEngine
39 {
40 public:
43 
44  // Description:
45  // begin painting on device (QVTKWidget)
46  bool begin(QPaintDevice* dev);
47 
48  // Description:
49  // end painting on device
50  bool end();
51 
52  // Description:
53  // returns type User
54  QPaintEngine::Type type() const;
55 
56  // Description:
57  // updateState
58  void updateState(const QPaintEngineState&);
59 
60  // Description:
61  // draw a pixmap
62  void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr);
63 
64  // Description:
65  // draw a path
66  void drawPath(const QPainterPath& path);
67 
68  // Description:
69  // draw a polygon
70  void drawPolygon(const QPointF* points, int pointCount, PolygonDrawMode mode);
71  void drawPolygon(const QPoint* points, int pointCount, PolygonDrawMode mode);
72 
73 protected:
74 
76  QVTKPaintEngineInternal* Internal;
77 };
78 
79 #endif
80 
QVTKPaintEngine::drawPath
void drawPath(const QPainterPath &path)
QVTKPaintEngine::drawPolygon
void drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)
QVTKWidget
QVTKWidget displays a VTK window in a Qt window.
Definition: Q4VTKWidgetPlugin.h:80
QVTKPaintEngine::~QVTKPaintEngine
~QVTKPaintEngine()
QVTKPaintEngine::Internal
QVTKPaintEngineInternal * Internal
Definition: QVTKPaintEngine.h:76
QVTKPaintEngine::end
bool end()
vtkX3D::points
@ points
Definition: vtkX3D.h:446
QVTKPaintEngine::begin
bool begin(QPaintDevice *dev)
QVTKPaintEngine
A paint engine class to direct QPainter calls into a VTK window.
Definition: QVTKPaintEngine.h:39
QVTKPaintEngine::Widget
QVTKWidget * Widget
Definition: QVTKPaintEngine.h:75
QVTKWin32Header.h
QVTKPaintEngine::type
QPaintEngine::Type type() const
QVTKPaintEngine::drawPixmap
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
vtkX3D::mode
@ mode
Definition: vtkX3D.h:247
QVTKPaintEngine::updateState
void updateState(const QPaintEngineState &)
QVTKPaintEngine::drawPolygon
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
QVTKPaintEngine::QVTKPaintEngine
QVTKPaintEngine()