Trees | Index | Help |
|
---|
Package subjectdata :: Module SetCells :: Class SetCells |
|
Command
--+
|
SetCells
Method Summary | |
---|---|
SetCells's constructor. | |
bool |
Returns true if it is possible to redo |
bool |
Returns true if it is possible to undo |
tuple (bool, string) |
Update __cells with the data in nextState. |
Redo the next action. | |
Undo the last action. | |
bool |
Before applying an action on __cells, verify that there is at least one cell that is modified. |
Remember an action to be able to undo/redo it. | |
tuple (list of SSheetCell , string)
|
Transform a SSheetState into an equivalent list of SSheetCell. |
SSheetCell
|
Return the cell mapped by cellCoord. |
CellValue
|
Return the ast of the cell located at cellCoord. |
string |
Return the formula of the cell located at cellCoord. |
CellValue
|
Return the value of the cell located at cellCoord. |
Returns true if __cells has a key cellCoord | |
Put cell into __cells. | |
list of SSheetCell
|
Get the cells of the next action (to redo) |
list of SSheetCell
|
Get the cells of the previous action (to undo) |
Set the next state (in history) as being current. | |
Set the previous state (in history) as being current. |
Method Details |
---|
__init__(self,
cells)
SetCells's constructor. Takes a reference to the dictionnary holding
the cells of a SSheetData object.
|
canRedo(self)Returns true if it is possible to redo
|
canUndo(self)Returns true if it is possible to undo
|
execute(self, nextState)Update __cells with the data in nextState. Return a tuple to propagate parse errors. The first element of the tuple is true if the execute was a success, false otherwise. The second element is the error message.
|
reexecute(self)Redo the next action.
|
unexecute(self)Undo the last action.
|
__areCurCellsAffected(self, nextCells)Before applying an action on __cells, verify that there is at least one cell that is modified. To prevent from undoing/redoing an action that changed nothing!
|
__backupAffectedCells(self, nextCells)Remember an action to be able to undo/redo it.
|
__createCells(self, state)Transform a SSheetState into an equivalent list of SSheetCell. If the list Of SSheetCells is None, creating the cells failed due to a parse error. errMsg describe the parse error.
|
__getCell(self, cellCoord)Return the cell mapped by cellCoord. Returns an empty cell if cellCoord is not present in __cells.
|
__getCellAST(self, cellCoord)Return the ast of the cell located at cellCoord. Returns None if cellCoord is not present in __cells. |
__getCellFormula(self, cellCoord)Return the formula of the cell located at cellCoord. Returns an empty string if cellCoord is not present in __cells.
|
__getCellValue(self, cellCoord)Return the value of the cell located at cellCoord. Returns an empty value if cellCoord is not present in __cells. |
__hasCell(self, cellCoord)Returns true if __cells has a key cellCoord
|
__putCell(self, cell)Put cell into __cells. If cell is empty, delete the corresponding cell located in __cells.
|
__retrieveNextCells(self)Get the cells of the next action (to redo)
|
__retrievePreviousCells(self)Get the cells of the previous action (to undo)
|
__setNextCellsAsCurrent(self)Set the next state (in history) as being current. (used just after redo) |
__setPreviousCellsAsCurrent(self)Set the previous state (in history) as being current. (used just after undo) |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Aug 26 22:55:24 2004 | http://epydoc.sf.net |