Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_widget_overlay.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10#ifndef QWT_WIDGET_OVERLAY_H
11#define QWT_WIDGET_OVERLAY_H
12
13#include "qwt_global.h"
14#include <qwidget.h>
15
16class QPainter;
17class QRegion;
18
40class QWT_EXPORT QwtWidgetOverlay : public QWidget
41{
42 Q_OBJECT
43
44 public:
63 {
66
75
86 AlphaMask
87 };
88
105 {
108
111
113 DrawOverlay
114 };
115
116 explicit QwtWidgetOverlay( QWidget* );
117 virtual ~QwtWidgetOverlay();
118
119 void setMaskMode( MaskMode );
120 MaskMode maskMode() const;
121
122 void setRenderMode( RenderMode );
123 RenderMode renderMode() const;
124
125 virtual bool eventFilter( QObject*, QEvent*) QWT_OVERRIDE;
126
127 public Q_SLOTS:
128 void updateOverlay();
129
130 protected:
131 virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
132 virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
133
134 virtual QRegion maskHint() const;
135
140 virtual void drawOverlay( QPainter* painter ) const = 0;
141
142 private:
143 void updateMask();
144 void draw( QPainter* ) const;
145
146 private:
147 class PrivateData;
148 PrivateData* m_data;
149};
150
151#endif
An overlay for a widget.
@ NoMask
Don't use a mask.
@ MaskHint
Use maskHint() as mask.
@ AutoRenderMode
Copy the buffer, when using the raster paint engine.
@ CopyAlphaMask
Always copy the buffer.
virtual void drawOverlay(QPainter *painter) const =0