QGIS API Documentation  2.99.0-Master (6a61179)
Public Types | Public Member Functions | 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]

Public Types

enum  Context {
  Unknown = 0, ComposerLabelSetText, ComposerLabelSetId, ComposerLabelFontColor,
  ComposerMapRotation, ComposerMapAnnotationDistance, ComposerMapGridFramePenColor, ComposerMapGridFrameFill1Color,
  ComposerMapGridFrameFill2Color, ComposerMapGridAnnotationFontColor, ComposerLegendText, LegendColumnCount,
  LegendSplitLayer, LegendEqualColumnWidth, LegendSymbolWidth, LegendSymbolHeight,
  LegendWmsLegendWidth, LegendWmsLegendHeight, LegendTitleSpaceBottom, LegendGroupSpace,
  LegendLayerSpace, LegendSymbolSpace, LegendIconSymbolSpace, LegendBoxSpace,
  LegendColumnSpace, LegendRasterBorderWidth, LegendFontColor, LegendRasterBorderColor,
  ComposerPictureRotation, ComposerPictureFillColor, ComposerPictureOutlineColor, ComposerPictureNorthOffset,
  ScaleBarLineWidth, ScaleBarHeight, ScaleBarSegmentSize, ScaleBarSegmentsLeft,
  ScaleBarNSegments, ScaleBarUnitText, ScaleBarMapUnitsSegment, ScaleBarLabelBarSize,
  ScaleBarBoxContentSpace, ScaleBarFontColor, ScaleBarFillColor, ScaleBarFill2Color,
  ScaleBarStrokeColor, TableMaximumFeatures, TableMargin, TableGridStrokeWidth,
  ShapeCornerRadius, ShapeOutlineWidth, ArrowOutlineWidth, ArrowHeadFillColor,
  ArrowHeadOutlineColor, ArrowHeadWidth, ItemOutlineWidth, ItemOutlineColor,
  ItemBackgroundColor, ItemMove, ItemRotation, ItemTransparency,
  ItemZoomContent
}
 

Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from QgsComposerItemCommand
void restoreState (QDomDocument &stateDoc) const
 
void saveState (QDomDocument &stateDoc) const
 
- Protected Attributes inherited from QgsComposerItemCommand
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...
 
int mFrameNumber
 
QgsComposerItemmItem
 Target item of the command. More...
 
QgsComposerMultiFramemMultiFrame
 Parameters for frame items Parent multiframe. More...
 
QDomDocument mPreviousState
 XML that saves the state before executing the command. 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 81 of file qgscomposeritemcommand.h.

Member Enumeration Documentation

§ Context

Enumerator
Unknown 
ComposerLabelSetText 
ComposerLabelSetId 
ComposerLabelFontColor 
ComposerMapRotation 
ComposerMapAnnotationDistance 
ComposerMapGridFramePenColor 
ComposerMapGridFrameFill1Color 
ComposerMapGridFrameFill2Color 
ComposerMapGridAnnotationFontColor 
ComposerLegendText 
LegendColumnCount 
LegendSplitLayer 
LegendEqualColumnWidth 
LegendSymbolWidth 
LegendSymbolHeight 
LegendWmsLegendWidth 
LegendWmsLegendHeight 
LegendTitleSpaceBottom 
LegendGroupSpace 
LegendLayerSpace 
LegendSymbolSpace 
LegendIconSymbolSpace 
LegendBoxSpace 
LegendColumnSpace 
LegendRasterBorderWidth 
LegendFontColor 
LegendRasterBorderColor 
ComposerPictureRotation 
ComposerPictureFillColor 
ComposerPictureOutlineColor 
ComposerPictureNorthOffset 
ScaleBarLineWidth 
ScaleBarHeight 
ScaleBarSegmentSize 
ScaleBarSegmentsLeft 
ScaleBarNSegments 
ScaleBarUnitText 
ScaleBarMapUnitsSegment 
ScaleBarLabelBarSize 
ScaleBarBoxContentSpace 
ScaleBarFontColor 
ScaleBarFillColor 
ScaleBarFill2Color 
ScaleBarStrokeColor 
TableMaximumFeatures 
TableMargin 
TableGridStrokeWidth 
ShapeCornerRadius 
ShapeOutlineWidth 
ArrowOutlineWidth 
ArrowHeadFillColor 
ArrowHeadOutlineColor 
ArrowHeadWidth 
ItemOutlineWidth 
ItemOutlineColor 
ItemBackgroundColor 
ItemMove 
ItemRotation 
ItemTransparency 
ItemZoomContent 

Definition at line 84 of file qgscomposeritemcommand.h.

Constructor & Destructor Documentation

§ QgsComposerMergeCommand()

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

Definition at line 128 of file qgscomposeritemcommand.cpp.

§ ~QgsComposerMergeCommand()

QgsComposerMergeCommand::~QgsComposerMergeCommand ( )

Definition at line 134 of file qgscomposeritemcommand.cpp.

Member Function Documentation

§ id()

int QgsComposerMergeCommand::id ( ) const
inlineoverride

Definition at line 162 of file qgscomposeritemcommand.h.

§ mergeWith()

bool QgsComposerMergeCommand::mergeWith ( const QUndoCommand *  command)
override

Definition at line 138 of file qgscomposeritemcommand.cpp.


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