QGIS API Documentation
2.2.0-Valmiera
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
27
class
CORE_EXPORT
QgsComposerItemCommand
:
public
QUndoCommand
28
{
29
public
:
30
QgsComposerItemCommand
(
QgsComposerItem
* item,
const
QString& text, QUndoCommand* parent = 0 );
31
virtual
~
QgsComposerItemCommand
();
32
34
void
undo();
36
void
redo();
37
39
void
savePreviousState();
41
void
saveAfterState();
42
43
QDomDocument
previousState
()
const
{
return
mPreviousState.cloneNode().toDocument(); }
44
QDomDocument
afterState
()
const
{
return
mAfterState.cloneNode().toDocument(); }
45
47
bool
containsChange()
const
;
48
49
const
QgsComposerItem
*
item
()
const
{
return
mItem; }
50
51
protected
:
53
QgsComposerItem
*
mItem
;
55
QDomDocument
mPreviousState
;
57
QDomDocument
mAfterState
;
58
60
bool
mFirstRun
;
61
62
void
saveState( QDomDocument& stateDoc )
const
;
63
void
restoreState( QDomDocument& stateDoc )
const
;
64
};
65
68
class
CORE_EXPORT
QgsComposerMergeCommand
:
public
QgsComposerItemCommand
69
{
70
public
:
71
enum
Context
72
{
73
Unknown
= 0,
74
//composer label
75
ComposerLabelSetText
,
76
ComposerLabelSetId
,
77
//composer map
78
ComposerMapRotation
,
79
ComposerMapAnnotationDistance
,
80
//composer legend
81
ComposerLegendText
,
82
LegendColumnCount
,
83
LegendSplitLayer
,
84
LegendEqualColumnWidth
,
85
LegendSymbolWidth
,
86
LegendSymbolHeight
,
87
LegendWmsLegendWidth
,
88
LegendWmsLegendHeight
,
89
LegendTitleSpaceBottom
,
90
LegendGroupSpace
,
91
LegendLayerSpace
,
92
LegendSymbolSpace
,
93
LegendIconSymbolSpace
,
94
LegendBoxSpace
,
95
LegendColumnSpace
,
96
//composer picture
97
ComposerPictureRotation
,
98
// composer scalebar
99
ScaleBarLineWidth
,
100
ScaleBarHeight
,
101
ScaleBarSegmentSize
,
102
ScaleBarSegmentsLeft
,
103
ScaleBarNSegments
,
104
ScaleBarUnitText
,
105
ScaleBarMapUnitsSegment
,
106
ScaleBarLabelBarSize
,
107
ScaleBarBoxContentSpace
,
108
// composer table
109
TableMaximumFeatures
,
110
TableMargin
,
111
TableGridStrokeWidth
,
112
//composer shape
113
ShapeCornerRadius
,
114
ShapeOutlineWidth
,
115
//composer arrow
116
ArrowOutlineWidth
,
117
ArrowHeadWidth
,
118
//item
119
ItemOutlineWidth
,
120
ItemMove
,
121
ItemRotation
122
};
123
124
QgsComposerMergeCommand
( Context c,
QgsComposerItem
* item,
const
QString& text );
125
~
QgsComposerMergeCommand
();
126
127
bool
mergeWith(
const
QUndoCommand * command );
128
int
id
()
const
{
return
(
int
)mContext; }
129
130
private
:
131
Context
mContext
;
132
};
133
134
#endif // QGSCOMPOSERITEMCOMMAND_H
Generated on Sun Feb 23 2014 14:27:18 for QGIS API Documentation by
1.8.1.2