qwt_widget_overlay.h
Go to the documentation of this file.
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 
16 class QPainter;
17 class QRegion;
18 
40 class QWT_EXPORT QwtWidgetOverlay: public QWidget
41 {
42 public:
60  enum MaskMode
61  {
64 
73 
84  AlphaMask
85  };
86 
103  {
106 
109 
111  DrawOverlay
112  };
113 
114  explicit 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  virtual bool eventFilter( QObject *, QEvent *) QWT_OVERRIDE;
124 
125 public Q_SLOTS:
126  void updateOverlay();
127 
128 protected:
129  virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE;
130  virtual void resizeEvent( QResizeEvent* ) QWT_OVERRIDE;
131 
132  virtual QRegion maskHint() const;
133 
138  virtual void drawOverlay( QPainter *painter ) const = 0;
139 
140 private:
141  void updateMask();
142  void draw( QPainter * ) const;
143 
144 private:
145  class PrivateData;
146  PrivateData *d_data;
147 };
148 
149 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
Don&#39;t use a mask.
RenderMode
Render mode.
Copy the buffer, when using the raster paint engine.
Use maskHint() as mask.
An overlay for a widget.
#define QWT_OVERRIDE
Definition: qwt_global.h:53


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10