Quantum GIS API Documentation
1.7.5-Wroclaw
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
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
protected
:
51
QgsComposerItem
*
mItem
;
53
QDomDocument
mPreviousState
;
55
QDomDocument
mAfterState
;
56
58
bool
mFirstRun
;
59
60
void
saveState( QDomDocument& stateDoc )
const
;
61
void
restoreState( QDomDocument& stateDoc )
const
;
62
};
63
66
class
CORE_EXPORT
QgsComposerMergeCommand
:
public
QgsComposerItemCommand
67
{
68
public
:
69
enum
Context
70
{
71
Unknown = 0,
72
//composer label
73
ComposerLabelSetText
,
74
ComposerLabelSetId
,
75
//composer map
76
ComposerMapRotation
,
77
ComposerMapAnnotationDistance
,
78
//composer legend
79
ComposerLegendText
,
80
LegendSymbolWidth
,
81
LegendSymbolHeight
,
82
LegendLayerSpace
,
83
LegendSymbolSpace
,
84
LegendIconSymbolSpace
,
85
LegendBoxSpace
,
86
//composer picture
87
ComposerPictureRotation
,
88
// composer scalebar
89
ScaleBarLineWidth
,
90
ScaleBarHeight
,
91
ScaleBarSegmentSize
,
92
ScaleBarSegmentsLeft
,
93
ScaleBarNSegments
,
94
ScaleBarUnitText
,
95
ScaleBarMapUnitsSegment
,
96
ScaleBarLabelBarSize
,
97
ScaleBarBoxContentSpace
,
98
// composer table
99
TableMaximumFeatures
,
100
TableMargin
,
101
TableGridStrokeWidth
,
102
//composer shape
103
ShapeRotation
,
104
ShapeOutlineWidth
,
105
//composer arrow
106
ArrowOutlineWidth
,
107
ArrowHeadWidth
,
108
//item
109
ItemOutlineWidth
110
};
111
112
QgsComposerMergeCommand
( Context c,
QgsComposerItem
* item,
const
QString& text );
113
~
QgsComposerMergeCommand
();
114
115
bool
mergeWith(
const
QUndoCommand * command );
116
int
id
()
const
{
return
(
int
)mContext; }
117
118
private
:
119
Context
mContext
;
120
};
121
122
#endif // QGSCOMPOSERITEMCOMMAND_H
Generated on Thu Sep 19 2013 17:30:54 for Quantum GIS API Documentation by
1.8.4