OpenShot Video Editor
2.0.0
|
This class is used to track and distribute changes to listeners. More...
Public Member Functions | |
def | __init__ |
def | add_listener |
Add a new listener (which will invoke the changed(action) method each time an UpdateAction is available). More... | |
def | add_watcher |
Add a new watcher (which will invoke the updateStatusChanged() method each time a 'redo' or 'undo' action is available). More... | |
def | apply_last_action_to_history |
Apply the last action to the history. More... | |
def | delete |
Delete an item from the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) More... | |
def | dispatch_action |
Distribute changes to all listeners (by calling their changed() method) More... | |
def | get_reverse_action |
Convert an UpdateAction into the opposite type (i.e. More... | |
def | insert |
Insert a new UpdateAction into the UpdateManager (this action will then be distributed to all listeners) More... | |
def | load |
Load all project data via an UpdateAction into the UpdateManager (this action will then be distributed to all listeners) More... | |
def | load_history |
Load history from project. More... | |
def | redo |
Redo the last UpdateAction (and notify all listeners and watchers) More... | |
def | reset |
Reset the UpdateManager, and clear all UpdateActions and History. More... | |
def | save_history |
Save history to project. More... | |
def | undo |
Undo the last UpdateAction (and notify all listeners and watchers) More... | |
def | update |
Update the UpdateManager with an UpdateAction (this action will then be distributed to all listeners) More... | |
def | update_watchers |
Notify all watchers if any 'undo' or 'redo' actions are available. More... | |
Public Attributes | |
actionHistory | |
currentStatus | |
ignore_history | |
last_action | |
redoHistory | |
statusWatchers | |
updateListeners | |
This class is used to track and distribute changes to listeners.
Typically, only 1 instance of this class is needed, and many different listeners are connected with the add_listener() method.
Definition at line 139 of file updates.py.
def updates.UpdateManager.__init__ | ( | self | ) |
Definition at line 141 of file updates.py.
def updates.UpdateManager.add_listener | ( | self, | |
listener, | |||
index = -1 |
|||
) |
Add a new listener (which will invoke the changed(action) method each time an UpdateAction is available).
Definition at line 214 of file updates.py.
def updates.UpdateManager.add_watcher | ( | self, | |
watcher | |||
) |
Add a new watcher (which will invoke the updateStatusChanged() method each time a 'redo' or 'undo' action is available).
Definition at line 228 of file updates.py.
def updates.UpdateManager.apply_last_action_to_history | ( | self, | |
previous_value | |||
) |
Apply the last action to the history.
Definition at line 364 of file updates.py.
def updates.UpdateManager.delete | ( | self, | |
key | |||
) |
Delete an item from the UpdateManager with an UpdateAction (this action will then be distributed to all listeners)
Definition at line 354 of file updates.py.
def updates.UpdateManager.dispatch_action | ( | self, | |
action | |||
) |
Distribute changes to all listeners (by calling their changed() method)
Definition at line 307 of file updates.py.
def updates.UpdateManager.get_reverse_action | ( | self, | |
action | |||
) |
Convert an UpdateAction into the opposite type (i.e.
'insert' becomes an 'delete')
Definition at line 251 of file updates.py.
def updates.UpdateManager.insert | ( | self, | |
key, | |||
values | |||
) |
Insert a new UpdateAction into the UpdateManager (this action will then be distributed to all listeners)
Definition at line 332 of file updates.py.
def updates.UpdateManager.load | ( | self, | |
values | |||
) |
Load all project data via an UpdateAction into the UpdateManager (this action will then be distributed to all listeners)
Definition at line 322 of file updates.py.
def updates.UpdateManager.load_history | ( | self, | |
project | |||
) |
Load history from project.
Definition at line 152 of file updates.py.
def updates.UpdateManager.redo | ( | self | ) |
Redo the last UpdateAction (and notify all listeners and watchers)
Definition at line 290 of file updates.py.
def updates.UpdateManager.reset | ( | self | ) |
Reset the UpdateManager, and clear all UpdateActions and History.
This does not clear listeners and watchers.
Definition at line 208 of file updates.py.
def updates.UpdateManager.save_history | ( | self, | |
project, | |||
history_length | |||
) |
Save history to project.
Definition at line 181 of file updates.py.
def updates.UpdateManager.undo | ( | self | ) |
Undo the last UpdateAction (and notify all listeners and watchers)
Definition at line 277 of file updates.py.
def updates.UpdateManager.update | ( | self, | |
key, | |||
values, | |||
partial_update = False |
|||
) |
Update the UpdateManager with an UpdateAction (this action will then be distributed to all listeners)
Definition at line 342 of file updates.py.
def updates.UpdateManager.update_watchers | ( | self | ) |
Notify all watchers if any 'undo' or 'redo' actions are available.
Definition at line 237 of file updates.py.
updates.UpdateManager.actionHistory |
Definition at line 144 of file updates.py.
updates.UpdateManager.currentStatus |
Definition at line 146 of file updates.py.
updates.UpdateManager.ignore_history |
Definition at line 147 of file updates.py.
updates.UpdateManager.last_action |
Definition at line 148 of file updates.py.
updates.UpdateManager.redoHistory |
Definition at line 145 of file updates.py.
updates.UpdateManager.statusWatchers |
Definition at line 142 of file updates.py.
updates.UpdateManager.updateListeners |
Definition at line 143 of file updates.py.