QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
QgsPreviewEffect Class Reference

A graphics effect which can be applied to a widget to simulate various printing and color blindness modes. More...

#include <qgsprevieweffect.h>

Inheritance diagram for QgsPreviewEffect:
Inheritance graph
[legend]

Public Types

enum  PreviewMode {
  PreviewGrayscale , PreviewMono , PreviewProtanope , PreviewDeuteranope ,
  PreviewTritanope
}
 

Public Member Functions

 QgsPreviewEffect (QObject *parent)
 
PreviewMode mode () const
 Returns the mode used for the preview effect.
 
void setMode (PreviewMode mode)
 Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance.
 

Protected Member Functions

void draw (QPainter *painter) override
 

Detailed Description

A graphics effect which can be applied to a widget to simulate various printing and color blindness modes.

Definition at line 31 of file qgsprevieweffect.h.

Member Enumeration Documentation

◆ PreviewMode

Enumerator
PreviewGrayscale 
PreviewMono 
PreviewProtanope 
PreviewDeuteranope 
PreviewTritanope 

Definition at line 36 of file qgsprevieweffect.h.

Constructor & Destructor Documentation

◆ QgsPreviewEffect()

QgsPreviewEffect::QgsPreviewEffect ( QObject *  parent)

Definition at line 23 of file qgsprevieweffect.cpp.

Member Function Documentation

◆ draw()

void QgsPreviewEffect::draw ( QPainter *  painter)
overrideprotected

Definition at line 37 of file qgsprevieweffect.cpp.

◆ mode()

PreviewMode QgsPreviewEffect::mode ( ) const
inline

Returns the mode used for the preview effect.

Returns
PreviewMode currently used by the effect
See also
setMode

Definition at line 59 of file qgsprevieweffect.h.

◆ setMode()

void QgsPreviewEffect::setMode ( QgsPreviewEffect::PreviewMode  mode)

Sets the mode for the preview effect, which controls how the effect modifies a widgets appearance.

Parameters
modePreviewMode to use to draw the widget
See also
mode

Definition at line 31 of file qgsprevieweffect.cpp.


The documentation for this class was generated from the following files: