mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
This commit adds a new framework for implementing paint effects, which modify the results of QPainter operations to apply visual effects such as drop shadows and blurs. The initial implementation allows for effects to be applied to entire layers and individual symbol layers. Included are a drop shadow, inner shadow, blur, inner glow, outer glow, colorise and transform effect. A "stack" effect is also implemented which allows other paint effects to be combined in various ways. Sponsored by hundreds of generous kickstarter contributors!
110 lines
2.1 KiB
Plaintext
110 lines
2.1 KiB
Plaintext
/** \ingroup gui
|
|
* \class QgsPaintEffectWidget
|
|
* \brief Base class for effect properties widgets.
|
|
*
|
|
* \note Added in version 2.9
|
|
*/
|
|
|
|
class QgsPaintEffectWidget : QWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsPaintEffectWidget( QWidget* parent /TransferThis/ = 0 );
|
|
virtual ~QgsPaintEffectWidget();
|
|
|
|
/**
|
|
* Sets the paint effect to modify with the widget
|
|
* @param effect paint effect
|
|
*/
|
|
virtual void setPaintEffect( QgsPaintEffect* effect ) = 0;
|
|
|
|
signals:
|
|
|
|
/**
|
|
* Emitted when properties of the effect are changed through the widget
|
|
*/
|
|
void changed();
|
|
|
|
};
|
|
|
|
|
|
class QgsDrawSourceWidget : QgsPaintEffectWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsDrawSourceWidget( QWidget* parent /TransferThis/ = NULL );
|
|
|
|
static QgsPaintEffectWidget* create() /Factory/;
|
|
|
|
virtual void setPaintEffect( QgsPaintEffect* effect );
|
|
|
|
};
|
|
|
|
class QgsBlurWidget : QgsPaintEffectWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsBlurWidget( QWidget* parent /TransferThis/ = NULL );
|
|
|
|
static QgsPaintEffectWidget* create() /Factory/;
|
|
|
|
virtual void setPaintEffect( QgsPaintEffect* effect );
|
|
|
|
};
|
|
|
|
class QgsShadowEffectWidget : QgsPaintEffectWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsShadowEffectWidget( QWidget* parent /TransferThis/ = NULL );
|
|
|
|
static QgsPaintEffectWidget* create() /Factory/;
|
|
|
|
virtual void setPaintEffect( QgsPaintEffect* effect );
|
|
|
|
};
|
|
|
|
class QgsGlowWidget : QgsPaintEffectWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsGlowWidget( QWidget* parent /TransferThis/ = NULL );
|
|
|
|
static QgsPaintEffectWidget* create() /Factory/;
|
|
|
|
virtual void setPaintEffect( QgsPaintEffect* effect );
|
|
};
|
|
|
|
|
|
class QgsTransformWidget : QgsPaintEffectWidget
|
|
{
|
|
%TypeHeaderCode
|
|
#include <qgspainteffectwidget.h>
|
|
%End
|
|
|
|
public:
|
|
QgsTransformWidget( QWidget* parent /TransferThis/ = NULL );
|
|
|
|
static QgsPaintEffectWidget* create() /Factory/;
|
|
|
|
virtual void setPaintEffect( QgsPaintEffect* effect );
|
|
|
|
};
|
|
|
|
|