qwt_widget_overlay.h
Go to the documentation of this file.
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 
16 class QPainter;
17 class QRegion;
18 
40 class QWT_EXPORT QwtWidgetOverlay : public QWidget
41 {
42  Q_OBJECT
43 
44  public:
62  enum MaskMode
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;
149 };
150 
151 #endif
QwtWidgetOverlay
An overlay for a widget.
Definition: qwt_widget_overlay.h:40
QwtWidgetOverlay::m_data
PrivateData * m_data
Definition: qwt_widget_overlay.h:147
qwt_global.h
QwtWidgetOverlay::AutoRenderMode
@ AutoRenderMode
Copy the buffer, when using the raster paint engine.
Definition: qwt_widget_overlay.h:107
QwtWidgetOverlay::MaskHint
@ MaskHint
Use maskHint() as mask.
Definition: qwt_widget_overlay.h:74
QwtWidgetOverlay::PrivateData
Definition: qwt_widget_overlay.cpp:93
QwtWidgetOverlay::CopyAlphaMask
@ CopyAlphaMask
Always copy the buffer.
Definition: qwt_widget_overlay.h:110
QwtWidgetOverlay::RenderMode
RenderMode
Render mode.
Definition: qwt_widget_overlay.h:104
QwtWidgetOverlay::MaskMode
MaskMode
Mask mode.
Definition: qwt_widget_overlay.h:62
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtWidgetOverlay::NoMask
@ NoMask
Don't use a mask.
Definition: qwt_widget_overlay.h:65


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:46