QGIS API Documentation
2.0.1-Dufour
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
ComposerLabelRotation
,
78
//composer map
79
ComposerMapRotation
,
80
ComposerMapAnnotationDistance
,
81
//composer legend
82
ComposerLegendText
,
83
LegendColumnCount
,
84
LegendSplitLayer
,
85
LegendEqualColumnWidth
,
86
LegendSymbolWidth
,
87
LegendSymbolHeight
,
88
LegendTitleSpaceBottom
,
89
LegendGroupSpace
,
90
LegendLayerSpace
,
91
LegendSymbolSpace
,
92
LegendIconSymbolSpace
,
93
LegendBoxSpace
,
94
LegendColumnSpace
,
95
//composer picture
96
ComposerPictureRotation
,
97
// composer scalebar
98
ScaleBarLineWidth
,
99
ScaleBarHeight
,
100
ScaleBarSegmentSize
,
101
ScaleBarSegmentsLeft
,
102
ScaleBarNSegments
,
103
ScaleBarUnitText
,
104
ScaleBarMapUnitsSegment
,
105
ScaleBarLabelBarSize
,
106
ScaleBarBoxContentSpace
,
107
// composer table
108
TableMaximumFeatures
,
109
TableMargin
,
110
TableGridStrokeWidth
,
111
//composer shape
112
ShapeRotation
,
113
ShapeOutlineWidth
,
114
//composer arrow
115
ArrowOutlineWidth
,
116
ArrowHeadWidth
,
117
//item
118
ItemOutlineWidth
,
119
ItemMove
120
};
121
122
QgsComposerMergeCommand
( Context c,
QgsComposerItem
* item,
const
QString& text );
123
~
QgsComposerMergeCommand
();
124
125
bool
mergeWith(
const
QUndoCommand * command );
126
int
id
()
const
{
return
(
int
)mContext; }
127
128
private
:
129
Context
mContext
;
130
};
131
132
#endif // QGSCOMPOSERITEMCOMMAND_H
Generated on Tue Sep 24 2013 14:41:46 for QGIS API Documentation by
1.8.1.2