QGIS API Documentation
3.32.0-Lima (311a8cb8a6)
src
core
effects
qgseffectstack.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgseffectstack.h
3
----------------
4
begin : December 2014
5
copyright : (C) 2014 Nyall Dawson
6
email : nyall dot dawson at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
#ifndef QGSEFFECTSTACK_H
18
#define QGSEFFECTSTACK_H
19
20
#include "qgis_core.h"
21
#include "
qgis_sip.h
"
22
#include "
qgspainteffect.h
"
23
44
class
CORE_EXPORT
QgsEffectStack
:
public
QgsPaintEffect
SIP_NODEFAULTCTORS
45
{
46
47
public
:
48
55
static
QgsPaintEffect
*create(
const
QVariantMap &map )
SIP_FACTORY
;
56
60
QgsEffectStack
() =
default
;
61
62
QgsEffectStack
(
const
QgsEffectStack
&other );
63
67
QgsEffectStack
(
QgsEffectStack
&&other )
SIP_SKIP
;
68
74
explicit
QgsEffectStack
(
const
QgsPaintEffect
&effect );
75
76
~QgsEffectStack
()
override
;
77
78
QString
type
()
const override
{
return
QStringLiteral(
"effectStack"
); }
79
QgsEffectStack
*
clone
() const override
SIP_FACTORY
;
80
bool
saveProperties( QDomDocument &doc, QDomElement &element ) const override;
81
bool
readProperties( const QDomElement &element ) override;
82
86
QVariantMap properties() const override;
87
91
void
readProperties( const QVariantMap &props ) override;
92
99
void
appendEffect(
QgsPaintEffect
*effect
SIP_TRANSFER
);
100
108
bool
insertEffect(
int
index,
QgsPaintEffect
*effect
SIP_TRANSFER
);
109
116
bool
changeEffect(
int
index,
QgsPaintEffect
*effect
SIP_TRANSFER
);
117
122
QgsPaintEffect
*takeEffect(
int
index
SIP_TRANSFERBACK
);
123
129
QList<
QgsPaintEffect
* > *effectList();
130
135
int
count()
const
{
return
mEffectList.count(); }
136
142
QgsPaintEffect
*effect(
int
index )
const
;
143
144
QgsEffectStack
&operator=(
const
QgsEffectStack
&rhs );
145
146
QgsEffectStack
&operator=(
QgsEffectStack
&&other )
SIP_SKIP
;
147
148
149
protected
:
150
151
void
draw
(
QgsRenderContext
&context )
override
;
152
153
private
:
154
155
QList< QgsPaintEffect * > mEffectList;
156
157
void
clearStack();
158
};
159
160
#endif
// QGSEFFECTSTACK_H
161
QgsEffectStack
A paint effect which consists of a stack of other chained paint effects.
Definition:
qgseffectstack.h:45
QgsEffectStack::QgsEffectStack
QgsEffectStack()=default
Constructor for empty QgsEffectStack.
QgsEffectStack::type
QString type() const override
Returns the effect type.
Definition:
qgseffectstack.h:78
QgsPaintEffect
Base class for visual effects which can be applied to QPicture drawings.
Definition:
qgspainteffect.h:53
QgsPaintEffect::QgsEffectStack
friend class QgsEffectStack
Definition:
qgspainteffect.h:308
QgsPaintEffect::clone
virtual QgsPaintEffect * clone() const =0
Duplicates an effect by creating a deep copy of the effect.
QgsPaintEffect::draw
virtual void draw(QgsRenderContext &context)=0
Handles drawing of the effect's result on to the specified render context.
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:61
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition:
qgis_sip.h:126
SIP_TRANSFER
#define SIP_TRANSFER
Definition:
qgis_sip.h:36
SIP_TRANSFERBACK
#define SIP_TRANSFERBACK
Definition:
qgis_sip.h:48
SIP_FACTORY
#define SIP_FACTORY
Definition:
qgis_sip.h:76
SIP_NODEFAULTCTORS
#define SIP_NODEFAULTCTORS
Definition:
qgis_sip.h:101
qgspainteffect.h
Generated on Sun Jun 25 2023 11:54:04 for QGIS API Documentation by
1.9.4