QGIS/python/core/auto_generated/layout/qgslayoutundostack.sip.in

144 lines
4.3 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutundostack.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutUndoStack : QObject
{
%Docstring
2017-12-15 10:36:55 -04:00
An undo stack for QgsLayouts.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutundostack.h"
%End
public:
QgsLayoutUndoStack( QgsLayout *layout );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutUndoStack, for the specified parent ``layout``.
%End
void beginMacro( const QString &commandText );
%Docstring
2017-12-15 10:36:55 -04:00
Starts a macro command, with the given descriptive ``commandText``.
2017-12-15 10:36:55 -04:00
Any commands added to the stack (either via direct manipulation of
stack() or via beginCommand()/endCommand() calls) between a
beginMacro() and endMacro() block are collapsed into a single
undo command, which will be applied or rolled back in a single step.
.. seealso:: :py:func:`endMacro`
%End
void endMacro();
%Docstring
2017-12-15 10:36:55 -04:00
Ends a macro command. This must be called after beginMacro(), when
all child undo commands which form part of the macro have been completed.
2017-12-15 10:36:55 -04:00
Any commands added to the stack (either via direct manipulation of
stack() or via beginCommand()/endCommand() calls) between a
beginMacro() and endMacro() block are collapsed into a single
undo command, which will be applied or rolled back in a single step.
.. seealso:: :py:func:`beginMacro`
%End
void beginCommand( QgsLayoutUndoObjectInterface *object, const QString &commandText, int id = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Begins a new undo command for the specified ``object``.
2017-12-15 10:36:55 -04:00
This must be followed by a call to endCommand() or cancelCommand() after the desired changes
have been made to ``object``.
2017-12-15 10:36:55 -04:00
The ``id`` argument can be used to specify an id number for the source event - this is used to determine whether QUndoCommand
command compression can apply to the command.
.. seealso:: :py:func:`endCommand`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`cancelCommand`
%End
void endCommand();
%Docstring
2017-12-15 10:36:55 -04:00
Saves final state of an object and pushes the active command to the undo history.
.. seealso:: :py:func:`beginCommand`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`cancelCommand`
%End
void cancelCommand();
%Docstring
2017-12-15 10:36:55 -04:00
Cancels the active command, discarding it without pushing to the undo history.
.. seealso:: :py:func:`endCommand`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`cancelCommand`
%End
QUndoStack *stack();
%Docstring
2017-12-15 10:36:55 -04:00
Returns a pointer to the internal QUndoStack.
%End
void notifyUndoRedoOccurred( QgsLayoutItem *item );
%Docstring
2017-12-15 10:36:55 -04:00
Notifies the stack that an undo or redo action occurred for a specified ``item``.
%End
void blockCommands( bool blocked );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether undo commands for the layout should be temporarily blocked.
2017-12-15 10:36:55 -04:00
If ``blocked`` is true, subsequent undo commands will be blocked until a follow-up
call to blockCommands( false ) is made.
2017-12-15 10:36:55 -04:00
Note that calls to blockCommands are stacked, so two calls blocking the commands
will take two calls unblocking commands in order to release the block.
.. seealso:: :py:func:`isBlocked`
%End
bool isBlocked() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if undo commands are currently blocked.
.. seealso:: :py:func:`blockCommands`
%End
void push( QUndoCommand *command /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Manually pushes a ``command`` to the stack, and takes ownership of the command.
%End
signals:
void undoRedoOccurredForItems( const QSet< QString > itemUuids );
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when an undo or redo action has occurred, which affected a
set of layout ``itemUuids``.
%End
private:
QgsLayoutUndoStack( const QgsLayoutUndoStack &other );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutundostack.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/