Public Slots | Signals | Public Member Functions | List of all members
pqUndoStack Class Reference

pqUndoStack represents a vtkSMUndoStack along with a a vtkSMUndoStackBuilder. More...

#include <pqUndoStack.h>

Inherits QObject.

Public Slots

void beginUndoSet (QString label)
 
void endUndoSet ()
 
void undo ()
 triggers Undo. More...
 
void redo ()
 triggers Redo. More...
 
void clear ()
 Clears undo stack. More...
 
void beginNonUndoableChanges ()
 when the GUI is performing some changes that should not go on the UndoStack at all, it should call beginNonUndoableChanges(). More...
 
void endNonUndoableChanges ()
 
void addToActiveUndoSet (vtkUndoElement *element)
 One can add arbitrary elements to the undo set currently being built. More...
 

Signals

void stackChanged (bool canUndo, QString undoLabel, bool canRedo, QString redoLabel)
 Fired to notify interested parites that the stack has changed. More...
 
void canUndoChanged (bool)
 
void canRedoChanged (bool)
 
void undoLabelChanged (const QString &)
 
void redoLabelChanged (const QString &)
 
void undone ()
 
void redone ()
 

Public Member Functions

 pqUndoStack (vtkSMUndoStackBuilder *builder=nullptr, QObject *parent=nullptr)
 If no builder is provided a default vtkSMUndoStackBuilder object will be created. More...
 
 ~pqUndoStack () override
 
bool canUndo ()
 returns if it's possible to undo. More...
 
bool canRedo ()
 returns if it's possible to redo. More...
 
QString undoLabel ()
 returns the undo label. More...
 
QString redoLabel ()
 returns the redo label. More...
 
bool ignoreAllChanges () const
 Get the status of the IgnoreAllChanges flag on the stack builder. More...
 
void registerElementForLoader (vtkSMUndoElement *)
 Register Application specific undo elements. More...
 
bool getInUndo () const
 Get if the stack is currently being undone/redone. More...
 
bool getInRedo () const
 
void Push (const char *label, vtkUndoSet *set)
 vistrails - push an undo set directly onto the undo stack (don't apply the changes - we want to be able to undo them) More...
 
vtkUndoSetgetLastUndoSet ()
 
vtkUndoSetgetUndoSetFromXML (vtkPVXMLElement *root)
 
vtkSMUndoStackBuilderGetUndoStackBuilder ()
 Get the UndoStackBuilder that is used with that UndoStack. More...
 
void updateAllModifiedProxies ()
 Make sure all proxy of all SessionProxyManager get updated. More...
 

Detailed Description

pqUndoStack represents a vtkSMUndoStack along with a a vtkSMUndoStackBuilder.

It provides Qt slots to call methods on undo stack or builder. Also it converts vtk events from the stack/builder to Qt signals. The only purpose of this class is to provide Qt friendly API to the ServerManager classes. All logic must be in the server manager classes (or their subclasses).

Definition at line 28 of file pqUndoStack.h.

Constructor & Destructor Documentation

◆ pqUndoStack()

pqUndoStack::pqUndoStack ( vtkSMUndoStackBuilder builder = nullptr,
QObject *  parent = nullptr 
)

If no builder is provided a default vtkSMUndoStackBuilder object will be created.

◆ ~pqUndoStack()

pqUndoStack::~pqUndoStack ( )
override

Member Function Documentation

◆ canUndo()

bool pqUndoStack::canUndo ( )

returns if it's possible to undo.

◆ canRedo()

bool pqUndoStack::canRedo ( )

returns if it's possible to redo.

◆ undoLabel()

QString pqUndoStack::undoLabel ( )

returns the undo label.

◆ redoLabel()

QString pqUndoStack::redoLabel ( )

returns the redo label.

◆ ignoreAllChanges()

bool pqUndoStack::ignoreAllChanges ( ) const

Get the status of the IgnoreAllChanges flag on the stack builder.

◆ registerElementForLoader()

void pqUndoStack::registerElementForLoader ( vtkSMUndoElement )

Register Application specific undo elements.

◆ getInUndo()

bool pqUndoStack::getInUndo ( ) const

Get if the stack is currently being undone/redone.

◆ getInRedo()

bool pqUndoStack::getInRedo ( ) const

◆ Push()

void pqUndoStack::Push ( const char *  label,
vtkUndoSet set 
)

vistrails - push an undo set directly onto the undo stack (don't apply the changes - we want to be able to undo them)

◆ getLastUndoSet()

vtkUndoSet* pqUndoStack::getLastUndoSet ( )

◆ getUndoSetFromXML()

vtkUndoSet* pqUndoStack::getUndoSetFromXML ( vtkPVXMLElement root)

◆ GetUndoStackBuilder()

vtkSMUndoStackBuilder* pqUndoStack::GetUndoStackBuilder ( )

Get the UndoStackBuilder that is used with that UndoStack.

◆ updateAllModifiedProxies()

void pqUndoStack::updateAllModifiedProxies ( )

Make sure all proxy of all SessionProxyManager get updated.

◆ beginUndoSet

void pqUndoStack::beginUndoSet ( QString  label)
slot

◆ endUndoSet

void pqUndoStack::endUndoSet ( )
slot

◆ undo

void pqUndoStack::undo ( )
slot

triggers Undo.

◆ redo

void pqUndoStack::redo ( )
slot

triggers Redo.

◆ clear

void pqUndoStack::clear ( )
slot

Clears undo stack.

◆ beginNonUndoableChanges

void pqUndoStack::beginNonUndoableChanges ( )
slot

when the GUI is performing some changes that should not go on the UndoStack at all, it should call beginNonUndoableChanges().

Once it's finished doing these changes, it must call endNonUndoableChanges() to restore the IgnoreAllChanges flag state to the one before the push.

◆ endNonUndoableChanges

void pqUndoStack::endNonUndoableChanges ( )
slot

◆ addToActiveUndoSet

void pqUndoStack::addToActiveUndoSet ( vtkUndoElement element)
slot

One can add arbitrary elements to the undo set currently being built.

◆ stackChanged

void pqUndoStack::stackChanged ( bool  canUndo,
QString  undoLabel,
bool  canRedo,
QString  redoLabel 
)
signal

Fired to notify interested parites that the stack has changed.

Has information to know the status of the top of the stack.

◆ canUndoChanged

void pqUndoStack::canUndoChanged ( bool  )
signal

◆ canRedoChanged

void pqUndoStack::canRedoChanged ( bool  )
signal

◆ undoLabelChanged

void pqUndoStack::undoLabelChanged ( const QString &  )
signal

◆ redoLabelChanged

void pqUndoStack::redoLabelChanged ( const QString &  )
signal

◆ undone

void pqUndoStack::undone ( )
signal

◆ redone

void pqUndoStack::redone ( )
signal

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