qwt_widget_overlay.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* 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>
#include <qregion.h>
class QPainter;
class QWT_EXPORT QwtWidgetOverlay: public QWidget
{
public:
enum MaskMode
{
NoMask,
MaskHint,
AlphaMask
};
enum RenderMode
{
AutoRenderMode,
CopyAlphaMask,
DrawOverlay
};
QwtWidgetOverlay( QWidget* );
virtual ~QwtWidgetOverlay();
void setMaskMode( MaskMode );
MaskMode maskMode() const;
void setRenderMode( RenderMode );
RenderMode renderMode() const;
void updateOverlay();
virtual bool eventFilter( QObject *, QEvent *);
protected:
virtual void paintEvent( QPaintEvent* event );
virtual void resizeEvent( QResizeEvent* event );
virtual QRegion maskHint() const;
virtual void drawOverlay( QPainter *painter ) const = 0;
private:
void updateMask();
void draw( QPainter * ) const;
private:
class PrivateData;
PrivateData *d_data;
};
#endif
QwtWidgetOverlay::NoMask
Don&#39;t use a mask.
Definition: qwt_widget_overlay.h:63
QwtWidgetOverlay::MaskHint
Use maskHint() as mask.
Definition: qwt_widget_overlay.h:72
QwtWidgetOverlay
An overlay for a widget.
Definition: qwt_widget_overlay.h:40
QwtWidgetOverlay::RenderMode
RenderMode
Render mode.
Definition: qwt_widget_overlay.h:102
QwtWidgetOverlay::CopyAlphaMask
Always copy the buffer.
Definition: qwt_widget_overlay.h:108
QwtWidgetOverlay::MaskMode
MaskMode
Mask mode.
Definition: qwt_widget_overlay.h:60
QwtWidgetOverlay::AutoRenderMode
Copy the buffer, when using the raster paint engine.
Definition: qwt_widget_overlay.h:105