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... | |
vtkUndoSet * | getLastUndoSet () |
vtkUndoSet * | getUndoSetFromXML (vtkPVXMLElement *root) |
vtkSMUndoStackBuilder * | GetUndoStackBuilder () |
Get the UndoStackBuilder that is used with that UndoStack. More... | |
void | updateAllModifiedProxies () |
Make sure all proxy of all SessionProxyManager get updated. More... | |
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.
pqUndoStack::pqUndoStack | ( | vtkSMUndoStackBuilder * | builder = nullptr , |
QObject * | parent = nullptr |
||
) |
If no builder
is provided a default vtkSMUndoStackBuilder object will be created.
|
override |
bool pqUndoStack::canUndo | ( | ) |
returns if it's possible to undo.
bool pqUndoStack::canRedo | ( | ) |
returns if it's possible to redo.
QString pqUndoStack::undoLabel | ( | ) |
returns the undo label.
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.
|
slot |
|
slot |
|
slot |
triggers Undo.
|
slot |
triggers Redo.
|
slot |
Clears undo stack.
|
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.
|
slot |
|
slot |
One can add arbitrary elements to the undo set currently being built.
|
signal |
Fired to notify interested parites that the stack has changed.
Has information to know the status of the top of the stack.
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |
|
signal |