QGIS API Documentation
2.10.1-Pisa
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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 "
qgspainteffect.h
"
21
41
class
CORE_EXPORT
QgsEffectStack
:
public
QgsPaintEffect
42
{
43
44
public
:
45
51
static
QgsPaintEffect
* create(
const
QgsStringMap
& map );
52
53
QgsEffectStack
();
54
QgsEffectStack
(
const
QgsEffectStack
& other );
55
61
explicit
QgsEffectStack
(
const
QgsPaintEffect
& effect );
62
63
virtual
~
QgsEffectStack
();
64
65
virtual
QString
type
()
const override
{
return
QString
(
"effectStack"
); }
66
virtual
QgsPaintEffect
*
clone
()
const override
;
67
virtual
bool
saveProperties
(
QDomDocument
& doc,
QDomElement
& element )
const override
;
68
virtual
bool
readProperties
(
const
QDomElement
& element )
override
;
69
72
virtual
QgsStringMap
properties
()
const override
;
73
76
virtual
void
readProperties
(
const
QgsStringMap
& props )
override
;
77
83
void
appendEffect(
QgsPaintEffect
* effect );
84
91
bool
insertEffect(
const
int
index
,
QgsPaintEffect
* effect );
92
98
bool
changeEffect(
const
int
index
,
QgsPaintEffect
*effect );
99
103
QgsPaintEffect
* takeEffect(
const
int
index
);
104
109
QList< QgsPaintEffect* >
* effectList();
110
114
int
count
()
const
{
return
mEffectList.count(); }
115
120
QgsPaintEffect
* effect(
int
index
)
const
;
121
122
QgsEffectStack
& operator=(
const
QgsEffectStack
& rhs );
123
124
protected
:
125
126
virtual
void
draw
(
QgsRenderContext
& context )
override
;
127
128
private
:
129
130
QList< QgsPaintEffect* >
mEffectList;
131
132
void
clearStack();
133
};
134
135
#endif // QGSEFFECTSTACK_H
136
index
static unsigned index
Definition:
mersenne-twister.cpp:36
QgsPaintEffect::properties
virtual QgsStringMap properties() const =0
Returns the properties describing the paint effect encoded in a string format.
QMap
QgsPaintEffect
Base class for visual effects which can be applied to QPicture drawings.
Definition:
qgspainteffect.h:49
QgsEffectStack::type
virtual QString type() const override
Returns the effect type.
Definition:
qgseffectstack.h:65
QgsPaintEffect::clone
virtual QgsPaintEffect * clone() const =0
Duplicates an effect by creating a deep copy of the effect.
QgsEffectStack::count
int count() const
Returns count of effects contained by the stack.
Definition:
qgseffectstack.h:114
qgspainteffect.h
QgsEffectStack
A paint effect which consists of a stack of other chained paint effects.
Definition:
qgseffectstack.h:41
QString
QList< QgsPaintEffect * >
QDomDocument
QgsPaintEffect::readProperties
virtual void readProperties(const QgsStringMap &props)=0
Reads a string map of an effect's properties and restores the effect to the state described by the pr...
QgsPaintEffect::saveProperties
virtual bool saveProperties(QDomDocument &doc, QDomElement &element) const
Saves the current state of the effect to a DOM element.
Definition:
qgspainteffect.cpp:74
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:39
QgsPaintEffect::QgsEffectStack
friend class QgsEffectStack
Definition:
qgspainteffect.h:239
QgsPaintEffect::draw
virtual void draw(QgsRenderContext &context)=0
Handles drawing of the effect's result on to the specified render context.
QDomElement
Generated on Sat Aug 22 2015 02:53:38 for QGIS API Documentation by
1.8.6