commands.*¶
Pyspread undoable commands
Provides
SetColumnWidth
SetRowHeight
- class commands.DeleteColumns(grid, model, index, column, count, description)[source]¶
Bases:
QUndoCommand
Deletes grid columns
- Parameters:
grid (
QTableView
) – The main grid objectmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Parent from which the new columns are deletedcolumn (
int
) – Column number of the first column to be deletedcount (
int
) – Number of columns to be deleteddescription (
str
) – Command description
- class commands.DeleteRows(grid, model, index, row, count, description)[source]¶
Bases:
QUndoCommand
Deletes grid rows
- Parameters:
- class commands.DeleteSelectedCellData(grid, model, selection, description)[source]¶
Bases:
QUndoCommand
Delete selected cells
- Parameters:
- class commands.DeleteTable(grid, model, table, description)[source]¶
Bases:
QUndoCommand
Deletes table
- Parameters:
- class commands.FreezeCell(model, cells, description)[source]¶
Bases:
QUndoCommand
Freezes cell in grid
- Parameters:
- class commands.InsertColumns(grid, model, index, column, count, description)[source]¶
Bases:
QUndoCommand
Inserts grid columns
- Parameters:
grid (
QTableView
) – The main grid objectmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Parent into which the new columns are insertedcolumn (
int
) – Column number of the first column after insertioncount (
int
) – Number of columns to be inserteddescription (
str
) – Command description
- class commands.InsertRows(grid, model, index, row, count, description)[source]¶
Bases:
QUndoCommand
Inserts grid rows
- Parameters:
grid (
QTableView
) – The main grid objectmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Parent into which the new rows are insertedrow (
int
) – Row number that first row will have after insertioncount (
int
) – Number of rows to be inserteddescription (
str
) – Command description
- class commands.InsertTable(grid, model, table, description)[source]¶
Bases:
QUndoCommand
Inserts table
- Parameters:
- class commands.MakeButtonCell(grid, text, index, description)[source]¶
Bases:
QUndoCommand
Makes a button cell
- Parameters:
- class commands.PasteSelectedCellData(grid, model, selection, data, description)[source]¶
Bases:
QUndoCommand
Paste selected cells
- Parameters:
- class commands.RemoveButtonCell(grid, index, description)[source]¶
Bases:
QUndoCommand
Removes a button cell
- Parameters:
grid (
QTableView
) – Main grid objectindex (
QModelIndex
) – Index of the cell where a button cell is removeddescription (
str
) – Command description
- class commands.SetCellCode(code, model, index, description)[source]¶
Bases:
QUndoCommand
Sets cell code in grid
- Parameters:
- class commands.SetCellFormat(attr, model, index, selected_idx, description)[source]¶
Bases:
QUndoCommand
Sets cell format in grid
Format is set for one given cell and a selection.
- Parameters:
attr (
CellAttribute
) – Cell format to be setmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Index of the cell for which the format is setselected_idx (
Iterable
[QModelIndex
]) – Indexes of cells for which the format is setdescription (
str
) – Command description
- class commands.SetCellMerge(attr, model, index, selected_idx, description)[source]¶
Bases:
SetCellFormat
Sets cell merges in grid
- Parameters:
attr (
CellAttribute
) – Cell format to be setmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Index of the cell for which the format is setselected_idx (
Iterable
[QModelIndex
]) – Indexes of cells for which the format is setdescription (
str
) – Command description
- class commands.SetCellRenderer(attr, model, entry_line, highlighter_document, index, selected_idx, description)[source]¶
Bases:
QUndoCommand
Sets cell renderer in grid
Adjusts syntax highlighting in entry line.
- Parameters:
attr (
CellAttribute
) – Cell format that cointains target renderer informationmodel (
QAbstractTableModel
) – Model of the grid objectentry_line (
QPlainTextEdit
) – Entry line in main windowhighlighter_document (
QTextDocument
) – Document for entry lineindex (
QModelIndex
) – Index of the cell for which the renderer is setselected_idx (
Iterable
[QModelIndex
]) – Indexes of cells for which the renderer is setdescription (
str
) – Command description
- class commands.SetCellTextAlignment(attr, model, index, selected_idx, description)[source]¶
Bases:
SetCellFormat
Sets cell text alignment in grid
- Parameters:
attr (
CellAttribute
) – Cell format to be setmodel (
QAbstractTableModel
) – Model of the grid objectindex (
QModelIndex
) – Index of the cell for which the format is setselected_idx (
Iterable
[QModelIndex
]) – Indexes of cells for which the format is setdescription (
str
) – Command description
- class commands.SetColumnsWidth(grid, columns, table, old_width, new_width, description)[source]¶
Bases:
QUndoCommand
Sets column width in grid
- Parameters:
- class commands.SetGridSize(grid, old_shape, new_shape, description)[source]¶
Bases:
QUndoCommand
Sets size of grid
- Parameters:
- class commands.SetRowsHeight(grid, rows, table, old_height, new_height, description)[source]¶
Bases:
QUndoCommand
Sets rows height in grid
- Parameters:
- class commands.ThawCell(model, cells, description)[source]¶
Bases:
FreezeCell
Thaw (unfreezes) cell in grid
- Parameters: