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 #include <qregion.h>
16 
17 class QPainter;
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 
124  virtual bool eventFilter( QObject *, QEvent *);
125 
126 public Q_SLOTS:
127  void updateOverlay();
128 
129 protected:
130  virtual void paintEvent( QPaintEvent* event );
131  virtual void resizeEvent( QResizeEvent* event );
132 
133  virtual QRegion maskHint() const;
134 
139  virtual void drawOverlay( QPainter *painter ) const = 0;
140 
141 private:
142  void updateMask();
143  void draw( QPainter * ) const;
144 
145 private:
146  class PrivateData;
148 };
149 
150 #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.
PrivateData * d_data
An overlay for a widget.


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18