Dhanya Thattil 38cd10d4e6
Qt5 built in qwt (#570)
- qt4->qt5
- in built qt5 6.1.5 because rhel7 is not upto date with qt5, removed findqwt.cmake
- made a fix in qwt lib (qwt_plot_layout.h) to work with 5.15 and lower versions for qrect constr.
- qt5 forms fixed, qt4 many hard coding forms switched to forms including qtabwidget, scrolls etc, fonts moved to forms
 - docking option enabled by default, removed option to disable docking feature from "Mode"
- added qVersionResolve utility functions to handle compatibility before and after qt5.12
- qtplots (ian's code) takes in gain mode enable to set some settings within the class, with proper gain plot ticks
- ensure gain plots have no zooming of z axis in 2d and y axis in 1d
- removed placeholder text in qpalette in main window form as its not supportd until 5.12 (so using qt5.9 designer insted of qt5.15 to cope)
- tab order
Servers:
- fixed some error messages that were empty for fail in funcs (mostly minor as if this error, major issues)
2022-11-11 15:15:10 +01:00

306 lines
6.9 KiB
Groff

.TH "QwtWidgetOverlay" 3 "Mon Jun 1 2020" "Version 6.1.5" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtWidgetOverlay \- An overlay for a widget\&.
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_widget_overlay\&.h>\fP
.PP
Inherits QWidget\&.
.PP
Inherited by QwtPickerRubberband, and QwtPickerTracker\&.
.SS "Public Types"
.in +1c
.ti -1c
.RI "enum \fBMaskMode\fP { \fBNoMask\fP, \fBMaskHint\fP, \fBAlphaMask\fP }"
.br
.RI "Mask mode\&. "
.ti -1c
.RI "enum \fBRenderMode\fP { \fBAutoRenderMode\fP, \fBCopyAlphaMask\fP, \fBDrawOverlay\fP }"
.br
.RI "Render mode\&. "
.in -1c
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBQwtWidgetOverlay\fP (QWidget *)"
.br
.RI "Constructor\&. "
.ti -1c
.RI "virtual \fB~QwtWidgetOverlay\fP ()"
.br
.RI "Destructor\&. "
.ti -1c
.RI "void \fBsetMaskMode\fP (\fBMaskMode\fP)"
.br
.RI "Specify how to find the mask for the overlay\&. "
.ti -1c
.RI "\fBMaskMode\fP \fBmaskMode\fP () const"
.br
.ti -1c
.RI "void \fBsetRenderMode\fP (\fBRenderMode\fP)"
.br
.ti -1c
.RI "\fBRenderMode\fP \fBrenderMode\fP () const"
.br
.ti -1c
.RI "void \fBupdateOverlay\fP ()"
.br
.ti -1c
.RI "virtual bool \fBeventFilter\fP (QObject *, QEvent *)"
.br
.RI "Event filter\&. "
.in -1c
.SS "Protected Member Functions"
.in +1c
.ti -1c
.RI "virtual void \fBpaintEvent\fP (QPaintEvent *event)"
.br
.ti -1c
.RI "virtual void \fBresizeEvent\fP (QResizeEvent *event)"
.br
.ti -1c
.RI "virtual QRegion \fBmaskHint\fP () const"
.br
.RI "Calculate an approximation for the mask\&. "
.ti -1c
.RI "virtual void \fBdrawOverlay\fP (QPainter *painter) const =0"
.br
.in -1c
.SH "Detailed Description"
.PP
An overlay for a widget\&.
The main use case of an widget overlay is to avoid heavy repaint operation of the widget below\&.
.PP
F\&.e\&. in combination with the plot canvas an overlay avoid replots as the content of the canvas can be restored from its backing store\&.
.PP
\fBQwtWidgetOverlay\fP is an abstract base class\&. Deriving classes are supposed to reimplement the following methods:
.PP
.IP "\(bu" 2
\fBdrawOverlay()\fP
.IP "\(bu" 2
\fBmaskHint()\fP
.PP
.PP
Internally \fBQwtPlotPicker\fP uses overlays for displaying the rubber band and the tracker text\&.
.PP
\fBSee also\fP
.RS 4
\fBQwtPlotCanvas::BackingStore\fP
.RE
.PP
.SH "Member Enumeration Documentation"
.PP
.SS "enum \fBQwtWidgetOverlay::MaskMode\fP"
.PP
Mask mode\&. When using masks the widget below gets paint events for the masked regions of the overlay only\&. Otherwise Qt triggers full repaints\&. On less powerful hardware ( f\&.e embedded systems ) - or when using the raster paint engine on a remote desktop - bit blitting is a noticeable operation, that needs to be avoided\&.
.PP
If and how to mask depends on how expensive the calculation of the mask is and how many pixels can be excluded by the mask\&.
.PP
The default setting is MaskHint\&.
.PP
\fBSee also\fP
.RS 4
\fBsetMaskMode()\fP, \fBmaskMode()\fP
.RE
.PP
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fINoMask \fP\fP
Don't use a mask\&.
.TP
\fB\fIMaskHint \fP\fP
Use \fBmaskHint()\fP as mask\&. For many situations a fast approximation is good enough and it is not necessary to build a more detailed mask ( f\&.e the bounding rectangle of a text )\&.
.TP
\fB\fIAlphaMask \fP\fP
Calculate a mask by checking the alpha values\&. Sometimes it is not possible to give a fast approximation and the mask needs to be calculated by drawing the overlay and testing the result\&.
.PP
When a valid \fBmaskHint()\fP is available only pixels inside this approximation are checked\&.
.SS "enum \fBQwtWidgetOverlay::RenderMode\fP"
.PP
Render mode\&. For calculating the alpha mask the overlay has already been painted to a temporary QImage\&. Instead of rendering the overlay twice this buffer can be copied for drawing the overlay\&.
.PP
On graphic systems using the raster paint engine ( QWS, Windows ) it means usually copying some memory only\&. On X11 it results in an expensive operation building a pixmap and for simple overlays it might not be recommended\&.
.PP
\fBNote\fP
.RS 4
The render mode has no effect, when \fBmaskMode()\fP != AlphaMask\&.
.RE
.PP
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fIAutoRenderMode \fP\fP
Copy the buffer, when using the raster paint engine\&.
.TP
\fB\fICopyAlphaMask \fP\fP
Always copy the buffer\&.
.TP
\fB\fIDrawOverlay \fP\fP
Never copy the buffer\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "QwtWidgetOverlay::QwtWidgetOverlay (QWidget * widget)"
.PP
Constructor\&.
.PP
\fBParameters\fP
.RS 4
\fIwidget\fP Parent widget, where the overlay is aligned to
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "virtual void QwtWidgetOverlay::drawOverlay (QPainter * painter) const\fC [protected]\fP, \fC [pure virtual]\fP"
Draw the widget overlay
.PP
\fBParameters\fP
.RS 4
\fIpainter\fP Painter
.RE
.PP
.SS "bool QwtWidgetOverlay::eventFilter (QObject * object, QEvent * event)\fC [virtual]\fP"
.PP
Event filter\&. Resize the overlay according to the size of the parent widget\&.
.PP
\fBParameters\fP
.RS 4
\fIobject\fP Object to be filtered
.br
\fIevent\fP Event
.RE
.PP
\fBReturns\fP
.RS 4
See QObject::eventFilter()
.RE
.PP
.SS "QRegion QwtWidgetOverlay::maskHint () const\fC [protected]\fP, \fC [virtual]\fP"
.PP
Calculate an approximation for the mask\&.
.IP "\(bu" 2
MaskHint The hint is used as mask\&.
.IP "\(bu" 2
AlphaMask The hint is used to speed up the algorithm for calculating a mask from non transparent pixels
.IP "\(bu" 2
NoMask The hint is unused\&.
.PP
.PP
The default implementation returns an invalid region indicating no hint\&.
.PP
\fBReturns\fP
.RS 4
Hint for the mask
.RE
.PP
.SS "\fBQwtWidgetOverlay::MaskMode\fP QwtWidgetOverlay::maskMode () const"
.PP
\fBReturns\fP
.RS 4
Mode how to find the mask for the overlay
.RE
.PP
\fBSee also\fP
.RS 4
\fBsetMaskMode()\fP
.RE
.PP
.SS "void QwtWidgetOverlay::paintEvent (QPaintEvent * event)\fC [protected]\fP, \fC [virtual]\fP"
Paint event
.PP
\fBParameters\fP
.RS 4
\fIevent\fP Paint event
.RE
.PP
\fBSee also\fP
.RS 4
\fBdrawOverlay()\fP
.RE
.PP
.SS "\fBQwtWidgetOverlay::RenderMode\fP QwtWidgetOverlay::renderMode () const"
.PP
\fBReturns\fP
.RS 4
Render mode
.RE
.PP
\fBSee also\fP
.RS 4
\fBRenderMode\fP, \fBsetRenderMode()\fP
.RE
.PP
.SS "void QwtWidgetOverlay::resizeEvent (QResizeEvent * event)\fC [protected]\fP, \fC [virtual]\fP"
Resize event
.PP
\fBParameters\fP
.RS 4
\fIevent\fP Resize event
.RE
.PP
.SS "void QwtWidgetOverlay::setMaskMode (\fBMaskMode\fP mode)"
.PP
Specify how to find the mask for the overlay\&.
.PP
\fBParameters\fP
.RS 4
\fImode\fP New mode
.RE
.PP
\fBSee also\fP
.RS 4
\fBmaskMode()\fP
.RE
.PP
.SS "void QwtWidgetOverlay::setRenderMode (\fBRenderMode\fP mode)"
Set the render mode
.PP
\fBParameters\fP
.RS 4
\fImode\fP Render mode
.RE
.PP
\fBSee also\fP
.RS 4
\fBRenderMode\fP, \fBrenderMode()\fP
.RE
.PP
.SS "void QwtWidgetOverlay::updateOverlay ()"
Recalculate the mask and repaint the overlay
.SH "Author"
.PP
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.