13 #include <qglframebufferobject.h> 30 QGLFramebufferObject*
fbo;
37 QGLFormat( QGLFormat::defaultFormat() )
39 setSampleBuffers(
true );
55 setAttribute( Qt::WA_OpaquePaintEvent,
true );
60 QGLWidget( format, plot ),
65 setAttribute( Qt::WA_OpaquePaintEvent,
true );
83 QGLWidget::paintEvent( event );
93 const bool ok = QGLWidget::event( event );
95 if ( event->type() == QEvent::PolishRequest ||
96 event->type() == QEvent::StyleChange )
101 setAttribute( Qt::WA_StyledBackground,
102 testAttribute( Qt::WA_StyleSheet ) );
135 const bool hasFocusIndicator =
140 #if QT_VERSION < 0x040600 141 painter.begin(
this );
146 if ( hasFocusIndicator )
147 painter.begin(
this );
149 const QRect rect(0, 0, width(), height());
159 QGLFramebufferObjectFormat
format;
160 format.setSamples( 4 );
161 format.setAttachment(QGLFramebufferObject::CombinedDepthStencil);
176 QGLFramebufferObject::blitFramebuffer( NULL, rect,
d_data->
fbo, rect );
180 painter.begin(
this );
185 if ( hasFocusIndicator )
Paint double buffered reusing the content of the pixmap buffer when possible.
virtual ~QwtPlotGLCanvas()
Destructor.
bool testPaintAttribute(PaintAttribute) const
virtual void clearBackingStore()
virtual Q_INVOKABLE void invalidateBackingStore()
FocusIndicator focusIndicator() const
virtual void initializeGL()
virtual void paintEvent(QPaintEvent *)
virtual void resizeGL(int width, int height)
Q_INVOKABLE QPainterPath borderPath(const QRect &) const
std::string format(const std::string &, const time_point< seconds > &, const femtoseconds &, const time_zone &)
QPainterPath borderPath2(const QRect &rect) const
virtual bool event(QEvent *)
QGLFramebufferObject * fbo
QwtPlot * plot()
Return parent plot widget.
QwtPlotGLCanvas(QwtPlot *=NULL)
Constructor.
virtual void drawFocusIndicator(QPainter *)