QGIS API Documentation
2.8.2-Wien
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
composer
qgscomposeritemcommand.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscomposeritemcommand.h
3
------------------------
4
begin : 2010-11-18
5
copyright : (C) 2010 by Marco Hugentobler
6
email : marco dot hugentobler at sourcepole dot ch
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
18
#ifndef QGSCOMPOSERITEMCOMMAND_H
19
#define QGSCOMPOSERITEMCOMMAND_H
20
21
#include <QUndoCommand>
22
#include <QDomDocument>
23
24
class
QgsComposerItem
;
25
class
QgsComposerMultiFrame
;
26
28
class
CORE_EXPORT
QgsComposerItemCommand
:
public
QUndoCommand
29
{
30
public
:
31
QgsComposerItemCommand
(
QgsComposerItem
* item,
const
QString& text, QUndoCommand* parent = 0 );
32
virtual
~
QgsComposerItemCommand
();
33
35
void
undo()
override
;
37
void
redo()
override
;
38
40
void
savePreviousState();
42
void
saveAfterState();
43
44
QDomDocument
previousState
()
const
{
return
mPreviousState.cloneNode().toDocument(); }
45
QDomDocument
afterState
()
const
{
return
mAfterState.cloneNode().toDocument(); }
46
48
bool
containsChange()
const
;
49
53
QgsComposerItem
*item()
const
;
54
55
protected
:
57
QgsComposerItem
*
mItem
;
59
QDomDocument
mPreviousState
;
61
QDomDocument
mAfterState
;
62
65
QgsComposerMultiFrame
*
mMultiFrame
;
66
int
mFrameNumber
;
67
69
bool
mFirstRun
;
70
71
void
saveState( QDomDocument& stateDoc )
const
;
72
void
restoreState( QDomDocument& stateDoc )
const
;
73
};
74
77
class
CORE_EXPORT
QgsComposerMergeCommand
:
public
QgsComposerItemCommand
78
{
79
public
:
80
enum
Context
81
{
82
Unknown
= 0,
83
//composer label
84
ComposerLabelSetText
,
85
ComposerLabelSetId
,
86
//composer map
87
ComposerMapRotation
,
88
ComposerMapAnnotationDistance
,
89
//composer legend
90
ComposerLegendText
,
91
LegendColumnCount
,
92
LegendSplitLayer
,
93
LegendEqualColumnWidth
,
94
LegendSymbolWidth
,
95
LegendSymbolHeight
,
96
LegendWmsLegendWidth
,
97
LegendWmsLegendHeight
,
98
LegendTitleSpaceBottom
,
99
LegendGroupSpace
,
100
LegendLayerSpace
,
101
LegendSymbolSpace
,
102
LegendIconSymbolSpace
,
103
LegendBoxSpace
,
104
LegendColumnSpace
,
105
//composer picture
106
ComposerPictureRotation
,
107
// composer scalebar
108
ScaleBarLineWidth
,
109
ScaleBarHeight
,
110
ScaleBarSegmentSize
,
111
ScaleBarSegmentsLeft
,
112
ScaleBarNSegments
,
113
ScaleBarUnitText
,
114
ScaleBarMapUnitsSegment
,
115
ScaleBarLabelBarSize
,
116
ScaleBarBoxContentSpace
,
117
// composer table
118
TableMaximumFeatures
,
119
TableMargin
,
120
TableGridStrokeWidth
,
121
//composer shape
122
ShapeCornerRadius
,
123
ShapeOutlineWidth
,
124
//composer arrow
125
ArrowOutlineWidth
,
126
ArrowHeadWidth
,
127
//item
128
ItemOutlineWidth
,
129
ItemMove
,
130
ItemRotation
,
131
ItemTransparency
,
132
ItemZoomContent
133
};
134
135
QgsComposerMergeCommand
( Context c,
QgsComposerItem
* item,
const
QString& text );
136
~
QgsComposerMergeCommand
();
137
138
bool
mergeWith(
const
QUndoCommand * command )
override
;
139
int
id
()
const override
{
return
(
int
)mContext; }
140
141
private
:
142
Context mContext;
143
};
144
145
#endif // QGSCOMPOSERITEMCOMMAND_H
Generated on Sun May 10 2015 16:33:23 for QGIS API Documentation by
1.8.1.2