Loading...
Searching...
No Matches
qwt_widget_overlay.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_WIDGET_OVERLAY_H
#define QWT_WIDGET_OVERLAY_H
#include "qwt_global.h"
#include <qwidget.h>
class QPainter;
class QRegion;
class QWT_EXPORT QwtWidgetOverlay : public QWidget
{
Q_OBJECT
public:
enum MaskMode
{
NoMask,
MaskHint,
AlphaMask
};
enum RenderMode
{
AutoRenderMode,
CopyAlphaMask,
DrawOverlay
};
explicit QwtWidgetOverlay( QWidget* );
virtual ~QwtWidgetOverlay();
void setMaskMode( MaskMode );
MaskMode maskMode() const;
void setRenderMode( RenderMode );
RenderMode renderMode() const;
virtual bool eventFilter( QObject*, QEvent*) QWT_OVERRIDE;
public Q_SLOTS:
void updateOverlay();
protected:
virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
virtual QRegion maskHint() const;
virtual void drawOverlay( QPainter* painter ) const = 0;
private:
void updateMask();
void draw( QPainter* ) const;
private:
class PrivateData;
PrivateData* m_data;
};
#endif
QwtWidgetOverlay
An overlay for a widget.
Definition qwt_widget_overlay.h:41
QwtWidgetOverlay::MaskMode
MaskMode
Mask mode.
Definition qwt_widget_overlay.h:63
QwtWidgetOverlay::NoMask
@ NoMask
Don't use a mask.
Definition qwt_widget_overlay.h:65
QwtWidgetOverlay::MaskHint
@ MaskHint
Use maskHint() as mask.
Definition qwt_widget_overlay.h:74
QwtWidgetOverlay::RenderMode
RenderMode
Render mode.
Definition qwt_widget_overlay.h:105
QwtWidgetOverlay::AutoRenderMode
@ AutoRenderMode
Copy the buffer, when using the raster paint engine.
Definition qwt_widget_overlay.h:107
QwtWidgetOverlay::CopyAlphaMask
@ CopyAlphaMask
Always copy the buffer.
Definition qwt_widget_overlay.h:110
QwtWidgetOverlay::drawOverlay
virtual void drawOverlay(QPainter *painter) const =0