QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
QgsComposerMergeCommand Class Reference

A composer command that merges together with other commands having the same context (=id). More...

#include <qgscomposeritemcommand.h>

Inheritance diagram for QgsComposerMergeCommand:
Inheritance graph
[legend]
Collaboration diagram for QgsComposerMergeCommand:
Collaboration graph
[legend]

Public Types

enum  Context {
  Unknown = 0, ComposerLabelSetText, ComposerLabelSetId, ComposerMapRotation,
  ComposerMapAnnotationDistance, ComposerLegendText, LegendColumnCount, LegendSplitLayer,
  LegendEqualColumnWidth, LegendSymbolWidth, LegendSymbolHeight, LegendWmsLegendWidth,
  LegendWmsLegendHeight, LegendTitleSpaceBottom, LegendGroupSpace, LegendLayerSpace,
  LegendSymbolSpace, LegendIconSymbolSpace, LegendBoxSpace, LegendColumnSpace,
  ComposerPictureRotation, ScaleBarLineWidth, ScaleBarHeight, ScaleBarSegmentSize,
  ScaleBarSegmentsLeft, ScaleBarNSegments, ScaleBarUnitText, ScaleBarMapUnitsSegment,
  ScaleBarLabelBarSize, ScaleBarBoxContentSpace, TableMaximumFeatures, TableMargin,
  TableGridStrokeWidth, ShapeCornerRadius, ShapeOutlineWidth, ArrowOutlineWidth,
  ArrowHeadWidth, ItemOutlineWidth, ItemMove, ItemRotation,
  ItemTransparency
}
 

Public Member Functions

 QgsComposerMergeCommand (Context c, QgsComposerItem *item, const QString &text)
 
 ~QgsComposerMergeCommand ()
 
bool mergeWith (const QUndoCommand *command)
 
int id () const
 
- Public Member Functions inherited from QgsComposerItemCommand
 QgsComposerItemCommand (QgsComposerItem *item, const QString &text, QUndoCommand *parent=0)
 
virtual ~QgsComposerItemCommand ()
 
void undo ()
 Reverses the command. More...
 
void redo ()
 Replays the command. More...
 
void savePreviousState ()
 Saves current item state as previous state. More...
 
void saveAfterState ()
 Saves current item state as after state. More...
 
QDomDocument previousState () const
 
QDomDocument afterState () const
 
bool containsChange () const
 Returns true if previous state and after state are valid and different. More...
 
const QgsComposerItemitem () const
 

Private Attributes

Context mContext
 

Additional Inherited Members

- Protected Member Functions inherited from QgsComposerItemCommand
void saveState (QDomDocument &stateDoc) const
 
void restoreState (QDomDocument &stateDoc) const
 
- Protected Attributes inherited from QgsComposerItemCommand
QgsComposerItemmItem
 Target item of the command. More...
 
QDomDocument mPreviousState
 XML that saves the state before executing the command. More...
 
QDomDocument mAfterState
 XML containing the state after executing the command. More...
 
bool mFirstRun
 Flag to prevent the first redo() if the command is pushed to the undo stack. More...
 

Detailed Description

A composer command that merges together with other commands having the same context (=id).

Keeps the oldest previous state and uses the newest after state. The purpose is to avoid too many micro changes in the history

Definition at line 68 of file qgscomposeritemcommand.h.

Member Enumeration Documentation

Enumerator
Unknown 
ComposerLabelSetText 
ComposerLabelSetId 
ComposerMapRotation 
ComposerMapAnnotationDistance 
ComposerLegendText 
LegendColumnCount 
LegendSplitLayer 
LegendEqualColumnWidth 
LegendSymbolWidth 
LegendSymbolHeight 
LegendWmsLegendWidth 
LegendWmsLegendHeight 
LegendTitleSpaceBottom 
LegendGroupSpace 
LegendLayerSpace 
LegendSymbolSpace 
LegendIconSymbolSpace 
LegendBoxSpace 
LegendColumnSpace 
ComposerPictureRotation 
ScaleBarLineWidth 
ScaleBarHeight 
ScaleBarSegmentSize 
ScaleBarSegmentsLeft 
ScaleBarNSegments 
ScaleBarUnitText 
ScaleBarMapUnitsSegment 
ScaleBarLabelBarSize 
ScaleBarBoxContentSpace 
TableMaximumFeatures 
TableMargin 
TableGridStrokeWidth 
ShapeCornerRadius 
ShapeOutlineWidth 
ArrowOutlineWidth 
ArrowHeadWidth 
ItemOutlineWidth 
ItemMove 
ItemRotation 
ItemTransparency 

Definition at line 71 of file qgscomposeritemcommand.h.

Constructor & Destructor Documentation

QgsComposerMergeCommand::QgsComposerMergeCommand ( Context  c,
QgsComposerItem item,
const QString &  text 
)

Definition at line 82 of file qgscomposeritemcommand.cpp.

QgsComposerMergeCommand::~QgsComposerMergeCommand ( )

Definition at line 86 of file qgscomposeritemcommand.cpp.

Member Function Documentation

int QgsComposerMergeCommand::id ( ) const
inline

Definition at line 129 of file qgscomposeritemcommand.h.

bool QgsComposerMergeCommand::mergeWith ( const QUndoCommand *  command)

Member Data Documentation

Context QgsComposerMergeCommand::mContext
private

Definition at line 132 of file qgscomposeritemcommand.h.


The documentation for this class was generated from the following files: