Detailed Description

Information for QicsGrids.

QicsGridInfo is a grouping of objects relating to a QicsGrid. QicsGridInfo automates the connections that are necesary between a grid and its associated objects. These objects include a QicsDataModel (used to help determine the size of the grid, as well as to retrieve the data to draw in the grid), a QicsStyleManager (used to retrieve visual and interactive information about the cells in the grid), and a QicsDimensionManager (used to determine the dimensions of the cells in the grid).

QicsGridInfo connects individual grid widgets to each of the above objects, and notifies the grids if any of the objects have changed.

Most QicsTable users should never need to use a QicsGridInfo object. These objects are automatically created by QicsTable and are used internally by the table components. If you are subclassing a grid or a cell display object, you may need to use this class.

Denotes the visual style that the current cell of the table will be drawn with.

Spreadsheet The current cell will be drawn with a solid border and will always use the cell's background color.

NormalSelected The current cell will be drawn the same as all other selected cells. The border will be as specified in the cell's border properties, and the background will be the cell's selected color.

Member Function Documentation

Returns the value of cell (row, col ) [visual coordinates] in the data model object contained in this object, after mapping to model coordinates. If the grid info object is RowHeader and there is no value returned from the data model, returns a QicsDataInt object containing row. If the grid info object is ColumnHeader and there is no value returned from the data model, returns a QicsDataInt object containing col.

void QicsGridInfo::cellValueChanged

(

int

row,

int

col

)

[signal]

This signal is emitted when a the value of a cell in a grid associated with this object changes. The cell (row, col ) is expressed in visual coordinates .

void QicsGridInfo::columnsMoved

(

int

target,

const QVector< int > &

columns

)

[signal]

This signal is emitted when columns moved. See moveColumns() method for more information.

Returns a drag object/mime source that represents data that is to be cut or copied from the table. The current selection list is used as the data to be cut or copied. If ref_cell is non-zero, it is used to find a contiguous selection from the selection list that contains ref_cell. If no such selection exists, the contents of ref_cell will be used as the data. If ref_cell is zero, the entire selection list is cut or copied.

If non-zero, drag_widget will be set as the drag object's source widget. If specified, ref_cell will be used to determine which part

Returns the current data model object that has been assigned to this object.

virtual void QicsGridInfo::finishCut

(

bool

removeData

)

[virtual]

Finishes a cut operation. Option deletes data from the data model and then cleans up any cruft from the cudCopyData operation.

Parameters:

removeData

Remove the data from the model. This would be done only after a successful dragMove operation.

int QicsGridInfo::firstNonHiddenColumn

(

int

startColumn,

int

endColumn

)

const

Returns the visual index of the first non hidden column in the region from startColumn to endColumn.

int QicsGridInfo::firstNonHiddenRow

(

int

startRow,

int

endRow

)

const

Returns the visual index of the first non hidden row in the region from startRow to endRow.

void QicsGridInfo::globalRevertRepaintBehaviorRequest

(

void

)

[signal]

Signaled as a request to the table widget to revert the repaint behavior all grids in the table to the value they had previous to the last repaint behavior change request. This is commonly used by QicsRow, QicsColumn and QicsCell objects when they are performing complex changes that would otherwise result in many grid recalculations and redraws.

Signaled as a request to the table widget to change the repaint behavior for all grids in the table. This is commonly used by QicsRow, QicsColumn and QicsCell objects when they are performing complex changes that would otherwise result in many grid recalculations and redraws.

Overlays data model dm onto the data model contained in this object. The overlay will start at cell start_cell in the main data model. If expand_model is true, the main data model will be expanded if necessary. If clear_if_empty is true, empty cells in dm will be "copied" to the main data model. If clear_if_empty is false, those cells will not be "copied" and the existing values in the main data model will be retained.