Qwt User's Guide 6.1.2

- Main Page
- Related Pages
- Classes

All Classes Functions Variables Typedefs Enumerations Enumerator Pages
qwt_widget_overlay.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
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 #include <qregion.h>
16
17 class QPainter;
18
40 class QWT_EXPORT QwtWidgetOverlay: public QWidget
41 {
42 public:
60 enum MaskMode
61 {
63 NoMask,
64
72 MaskHint,
73
84 AlphaMask
85 };
86
102 enum RenderMode
103 {
105 AutoRenderMode,
106
108 CopyAlphaMask,
109
111 DrawOverlay
112 };
113
114 QwtWidgetOverlay( QWidget* );
115 virtual ~QwtWidgetOverlay();
116
117 void setMaskMode( MaskMode );
118 MaskMode maskMode() const;
119
120 void setRenderMode( RenderMode );
121 RenderMode renderMode() const;
122
123 void updateOverlay();
124
125 virtual bool eventFilter( QObject *, QEvent *);
126
127 protected:
128 virtual void paintEvent( QPaintEvent* event );
129 virtual void resizeEvent( QResizeEvent* event );
130
131 virtual QRegion maskHint() const;
132
137 virtual void drawOverlay( QPainter *painter ) const = 0;
138
139 private:
140 void updateMask();
141 void draw( QPainter * ) const;
142
143 private:
144 class PrivateData;
145 PrivateData *d_data;
146 };
147
148 #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