Go to the documentation of this file.
15 #include <qpainterpath.h>
52 setFrameShadow( QFrame::Sunken );
53 setFrameShape( QFrame::Panel );
91 #if QT_VERSION >= 0x050000
95 QPixmap::grabWidget(
this, rect() );
109 setAttribute( Qt::WA_OpaquePaintEvent,
true );
153 if (
event->type() == QEvent::PolishRequest )
161 setAttribute( Qt::WA_OpaquePaintEvent,
true );
165 if (
event->type() == QEvent::PolishRequest ||
166 event->type() == QEvent::StyleChange )
171 return QFrame::event(
event );
180 QPainter painter(
this );
181 painter.setClipRegion(
event->region() );
191 if ( testAttribute(Qt::WA_StyledBackground) )
211 if ( frameWidth() > 0 )
220 if ( testAttribute(Qt::WA_StyledBackground ) )
222 if ( testAttribute( Qt::WA_OpaquePaintEvent ) )
233 if ( testAttribute( Qt::WA_OpaquePaintEvent ) )
235 if ( autoFillBackground() )
245 QPainterPath clipPath;
246 clipPath.addRect( rect() );
247 clipPath = clipPath.subtracted(
borderPath( rect() ) );
251 painter.setClipPath( clipPath, Qt::IntersectClip );
261 if ( frameWidth() > 0 )
280 drawFrame( painter );
293 QFrame::resizeEvent(
event );
306 repaint( contentsRect() );
326 #include "moc_qwt_plot_canvas.cpp"
@ HackStyledBackground
Try to improve painting of styled backgrounds.
void updateStyleSheetInfo()
Update the cached information about the current style sheet.
virtual bool event(QEvent *) QWT_OVERRIDE
Q_INVOKABLE void invalidateBackingStore()
Invalidate the internal backing store.
QwtPlotCanvas(QwtPlot *=NULL)
Constructor.
virtual void drawBorder(QPainter *)
virtual void drawBorder(QPainter *) QWT_OVERRIDE
@ BackingStore
Paint double buffered reusing the content of the pixmap buffer when possible.
QPainterPath canvasBorderPath(const QRect &rect) const
virtual void drawFocusIndicator(QPainter *)
void setPaintAttribute(PaintAttribute, bool on=true)
Changing the paint attributes.
static void fillPixmap(const QWidget *, QPixmap &, const QPoint &offset=QPoint())
span_constexpr std::size_t size(span< T, Extent > const &spn)
virtual ~QwtPlotCanvas()
Destructor.
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
void fillBackground(QPainter *)
Helper function for the derived plot canvas.
void drawUnstyled(QPainter *)
Helper function for the derived plot canvas.
static QPixmap backingStore(QWidget *, const QSize &)
void drawCanvas(QPainter *)
Draw the plot to the canvas.
Q_INVOKABLE QPainterPath borderPath(const QRect &) const
FocusIndicator focusIndicator() const
virtual void resizeEvent(QResizeEvent *) QWT_OVERRIDE
void drawStyled(QPainter *, bool)
Helper function for the derived plot canvas.
PaintAttribute
Paint attributes.
const QPixmap * backingStore() const
virtual void drawBackground(QPainter *)
Helper function for the derived plot canvas.
QwtPlotCanvas::PaintAttributes paintAttributes
static qreal devicePixelRatio(const QPaintDevice *)
virtual void paintEvent(QPaintEvent *) QWT_OVERRIDE
@ Opaque
Try to fill the complete contents rectangle of the plot canvas.
Base class for all type of plot canvases.
bool testPaintAttribute(PaintAttribute) const
plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45