QGIS/python/core/composer/qgscomposeritemcommand.sip

180 lines
4.6 KiB
Plaintext
Raw Normal View History

2017-06-20 11:14:25 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/composer/qgscomposeritemcommand.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsComposerItemCommand: QUndoCommand
{
2017-06-20 11:14:25 +02:00
%Docstring
Undo command to undo/redo all composer item related changes
%End
%TypeHeaderCode
2017-06-20 11:14:25 +02:00
#include "qgscomposeritemcommand.h"
%End
public:
QgsComposerItemCommand( QgsComposerItem *item, const QString &text, QUndoCommand *parent /TransferThis/ = 0 );
2017-06-20 11:14:25 +02:00
virtual void undo();
%Docstring
Reverses the command
%End
virtual void redo();
%Docstring
Replays the command
%End
void savePreviousState();
2017-06-20 11:14:25 +02:00
%Docstring
Saves current item state as previous state
%End
void saveAfterState();
2017-06-20 11:14:25 +02:00
%Docstring
Saves current item state as after state
%End
QDomDocument previousState() const;
2017-06-20 11:14:25 +02:00
%Docstring
:rtype: QDomDocument
%End
QDomDocument afterState() const;
2017-06-20 11:14:25 +02:00
%Docstring
:rtype: QDomDocument
%End
bool containsChange() const;
2017-06-20 11:14:25 +02:00
%Docstring
Returns true if previous state and after state are valid and different
:rtype: bool
%End
2015-02-03 02:21:52 +01:00
QgsComposerItem *item() const;
2017-06-20 11:14:25 +02:00
%Docstring
Returns the target item the command applies to.
:return: target composer item
:rtype: QgsComposerItem
%End
protected:
2017-06-20 11:14:25 +02:00
void saveState( QDomDocument &stateDoc ) const;
2017-06-20 11:14:25 +02:00
%Docstring
Flag to prevent the first redo() if the command is pushed to the undo stack
%End
void restoreState( QDomDocument &stateDoc ) const;
};
2017-06-20 11:14:25 +02:00
class QgsComposerMergeCommand: QgsComposerItemCommand
{
2017-06-20 11:14:25 +02:00
%Docstring
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
%End
%TypeHeaderCode
2017-06-20 11:14:25 +02:00
#include "qgscomposeritemcommand.h"
%End
public:
enum Context
{
2014-06-02 21:00:51 +02:00
Unknown,
2017-06-20 11:14:25 +02:00
//composer
ComposerLabelSetText,
ComposerLabelSetId,
ComposerLabelFontColor,
2017-06-20 11:14:25 +02:00
//composer
ComposerMapRotation,
ComposerMapAnnotationDistance,
ComposerMapGridFramePenColor,
ComposerMapGridFrameFill1Color,
ComposerMapGridFrameFill2Color,
ComposerMapGridAnnotationFontColor,
2017-06-20 11:14:25 +02:00
//composer
ComposerLegendText,
2013-06-23 16:00:16 +02:00
LegendColumnCount,
LegendSplitLayer,
LegendEqualColumnWidth,
LegendSymbolWidth,
LegendSymbolHeight,
LegendWmsLegendWidth,
LegendWmsLegendHeight,
2013-06-23 16:00:16 +02:00
LegendTitleSpaceBottom,
LegendGroupSpace,
LegendLayerSpace,
LegendSymbolSpace,
LegendIconSymbolSpace,
LegendBoxSpace,
2013-06-23 16:00:16 +02:00
LegendColumnSpace,
2017-06-20 11:14:25 +02:00
LegendLineSpacing,
LegendRasterStrokeWidth,
LegendFontColor,
LegendRasterStrokeColor,
2017-06-20 11:14:25 +02:00
//composer
ComposerPictureRotation,
ComposerPictureFillColor,
ComposerPictureStrokeColor,
2017-06-20 11:14:25 +02:00
ComposerPictureNorthOffset,
// composer
ScaleBarLineWidth,
ScaleBarHeight,
ScaleBarSegmentSize,
ScaleBarSegmentsLeft,
ScaleBarNSegments,
ScaleBarUnitText,
ScaleBarMapUnitsSegment,
ScaleBarLabelBarSize,
ScaleBarBoxContentSpace,
ScaleBarFontColor,
ScaleBarFillColor,
ScaleBarFill2Color,
ScaleBarStrokeColor,
2017-06-20 11:14:25 +02:00
// composer
TableMaximumFeatures,
TableMargin,
TableGridStrokeWidth,
2017-06-20 11:14:25 +02:00
//composer
ShapeCornerRadius,
ShapeStrokeWidth,
2017-06-20 11:14:25 +02:00
//composer
ArrowStrokeWidth,
ArrowHeadFillColor,
ArrowHeadStrokeColor,
ArrowHeadWidth,
//item
ItemStrokeWidth,
ItemStrokeColor,
ItemBackgroundColor,
ItemMove,
ItemRotation,
ItemOpacity,
2015-02-03 02:21:52 +01:00
ItemZoomContent
};
QgsComposerMergeCommand( Context c, QgsComposerItem *item, const QString &text );
2017-06-20 11:14:25 +02:00
virtual bool mergeWith( const QUndoCommand *command );
virtual int id() const;
};
2017-06-20 11:14:25 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/composer/qgscomposeritemcommand.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/