ParaView
Public Slots | Signals | Public Member Functions
pqUndoStack Class Reference

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

#include <pqUndoStack.h>

List of all members.

Public Slots

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

Signals

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

Public Member Functions

 pqUndoStack (vtkSMUndoStackBuilder *builder=0, QObject *parent=NULL)
 If no builder is provided a default vtkSMUndoStackBuilder object will be created.
virtual ~pqUndoStack ()
bool canUndo ()
 returns if it's possible to undo.
bool canRedo ()
 returns if it's possible to redo.
const QString undoLabel ()
 returns the undo label.
const QString redoLabel ()
 returns the redo label.
bool ignoreAllChanges () const
 Get the status of the IgnoreAllChanges flag on the stack builder.
void registerElementForLoader (vtkSMUndoElement *)
 Register Application specific undo elements.
bool getInUndo () const
 Get if the stack is currently being undone/redone.
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)
vtkUndoSetgetLastUndoSet ()
vtkUndoSetgetUndoSetFromXML (vtkPVXMLElement *root)
vtkSMUndoStackBuilderGetUndoStackBuilder ()
 Get the UndoStackBuilder that is used with that UndoStack.
void updateAllModifiedProxies ()
 Make sure all proxy of all SessionProxyManager get updated.

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 54 of file pqUndoStack.h.


Constructor & Destructor Documentation

pqUndoStack::pqUndoStack ( vtkSMUndoStackBuilder builder = 0,
QObject *  parent = NULL 
)

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

virtual pqUndoStack::~pqUndoStack ( ) [virtual]

Member Function Documentation

bool pqUndoStack::canUndo ( )

returns if it's possible to undo.

bool pqUndoStack::canRedo ( )

returns if it's possible to redo.

const QString pqUndoStack::undoLabel ( )

returns the undo label.

const QString pqUndoStack::redoLabel ( )

returns the redo label.

bool pqUndoStack::ignoreAllChanges ( ) const

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

void pqUndoStack::registerElementForLoader ( vtkSMUndoElement )

Register Application specific undo elements.

bool pqUndoStack::getInUndo ( ) const

Get if the stack is currently being undone/redone.

bool pqUndoStack::getInRedo ( ) const
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)

vtkUndoSet* pqUndoStack::getLastUndoSet ( )
vtkUndoSet* pqUndoStack::getUndoSetFromXML ( vtkPVXMLElement root)
vtkSMUndoStackBuilder* pqUndoStack::GetUndoStackBuilder ( )

Get the UndoStackBuilder that is used with that UndoStack.

void pqUndoStack::updateAllModifiedProxies ( )

Make sure all proxy of all SessionProxyManager get updated.

void pqUndoStack::beginUndoSet ( QString  label) [slot]
void pqUndoStack::endUndoSet ( ) [slot]
void pqUndoStack::undo ( ) [slot]

triggers Undo.

void pqUndoStack::redo ( ) [slot]

triggers Redo.

void pqUndoStack::clear ( ) [slot]

Clears undo stack.

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.

void pqUndoStack::endNonUndoableChanges ( ) [slot]
void pqUndoStack::addToActiveUndoSet ( vtkUndoElement element) [slot]

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

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.

void pqUndoStack::canUndoChanged ( bool  ) [signal]
void pqUndoStack::canRedoChanged ( bool  ) [signal]
void pqUndoStack::undoLabelChanged ( const QString &  ) [signal]
void pqUndoStack::redoLabelChanged ( const QString &  ) [signal]
void pqUndoStack::undone ( ) [signal]
void pqUndoStack::redone ( ) [signal]

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