#include <QicsQtModelAttributeController.h>
Inherits QicsCommonAttributeController.
Public Types | |
| enum | QicsWideKeyAction { Del_DeleteSelected, CtrlA_SelectAll } |
| enum | QicsBoxBorders { TopBorder = 1, BottomBorder = 2, LeftBorder = 4, RightBorder = 8, AllBorders = 1+2+4+8 } |
| enum | QicsCopyPolicy { CopyData = 1, CopyAttributes = 2, CopyDimensions = 4, CopySpans = 8, CopyAll = 1+2+4+8 } |
| enum | QicsClearPolicy { ClearData = 1, ClearAttributes = 2, ClearSpans = 4, ClearAll = 1+2+4 } |
| enum | QicsSortMode { QicsStableSort = 0, QicsQuickSort } |
| enum | QicsCellOverflowBehavior { Clip = 0, Overflow, ToolTip } |
| enum | QicsCurrentCellStyle { Spreadsheet = 0, NormalSelected } |
| enum | QicsSelectionStyle { Normal = 0, Exclusive } |
| enum | QicsGridCellClipping { AllowPartial = 0, NoDisplayOnPartial, UseClippedSymbol } |
| enum | QicsGridType { TableGrid = 0, RowHeaderGrid, ColumnHeaderGrid } |
| enum | QicsHeaderType { RowHeader = 0, ColumnHeader } |
| enum | QicsIndexType { NoIndex = 0, RowIndex, ColumnIndex, RowAndColumnIndex } |
| enum | QicsLineStyle { None = 0, Plain, Raised, Sunken } |
| enum | QicsRepaintBehavior { RepaintOff = 0, RepaintOn = 1, RepaintCalcOnly = 2 } |
| enum | QicsScrollBarMode { Auto = 0, AlwaysOff, AlwaysOn } |
| enum | QicsScrollDirection { ScrollNone = 0, ScrollUp = 1, ScrollDown = 2, ScrollLeft = 4, ScrollRight = 8, ScrollToRow = 16, ScrollToColumn = 32 } |
| enum | QicsSelectionPolicy { SelectNone = 0, SelectSingle, SelectMultiple, SelectSingleRow, SelectMultipleRow } |
| enum | QicsSelectionType { SelectionNone = 0, SelectionBegin, SelectionDrag, SelectionEnd, SelectionExtend, SelectionAdd, SelectionReplace } |
| enum | QicsSortOrder { Ascending = 0, Descending } |
| enum | QicsTableDisplayOption { DisplayNever = 0, DisplayAlways, DisplayFirstPage } |
| enum | QicsTraversalKeyEditBehavior { TraverseWithinCell = 0, TraverseBetweenCells } |
| enum | QicsCurrentCellDraggingPolicy { DragCurrent = 0, DragSelection } |
Public Member Functions | |
| virtual QicsAbstractAttributeController * | createController () |
| virtual void * | cellProperty (int row, int col, int name) |
| virtual bool | setCellProperty (int row, int col, int name, const void *val) |
| virtual bool | clearCellProperty (int row, int col, int name) |
| virtual bool | isPropertySupported (int name) |
| virtual void | reinit (int rows, int columns) |
| virtual void * | rowProperty (int row, int name) |
| virtual void * | columnProperty (int col, int name) |
| virtual void * | defaultProperty (int name) |
| virtual bool | setRowProperty (int row, int name, const void *val) |
| virtual bool | setColumnProperty (int col, int name, const void *val) |
| virtual bool | setDefaultProperty (int name, const void *val) |
| virtual bool | clearRowProperty (int row, int name) |
| virtual bool | clearColumnProperty (int col, int name) |
| virtual bool | isDefaultPropertySupported (int name) |
| virtual QicsCellStyle * | defaultStyle () |
| virtual void | setDefaultStyle (QicsCellStyle *style) |
| virtual void | setGridInfo (QicsGridInfo *gi) |
| virtual void | insertRows (int num, int start_position) |
| virtual void | insertColumns (int num, int start_position) |
| virtual void | deleteRows (int num, int start_position) |
| virtual void | deleteColumns (int num, int start_position) |
| virtual QicsCellStyle * | cellStyle (int row, int column) |
| virtual void | setCellStyle (int row, int column, QicsCellStyle *style) |
| virtual QicsCellStyle * | rowStyle (int row) |
| virtual void | setRowStyle (int row, QicsCellStyle *style) |
| virtual QicsCellStyle * | columnStyle (int column) |
| virtual void | setColumnStyle (int column, QicsCellStyle *style) |
Protected Member Functions | |
| virtual void | handleReinit (int, int) |
| virtual void | handleInsertRows (int, int) |
| virtual void | handleInsertColumns (int, int) |
| virtual void | handleDeleteRows (int, int) |
| virtual void | handleDeleteColumns (int, int) |
| void | removeRowAttr (int r) |
| QicsAttrRowCol * | rowAttr (int r) |
| void | setRowAttr (int r, QicsAttrRowCol *attr) |
| void | removeColumnAttr (int c) |
| QicsAttrRowCol * | columnAttr (int c) |
| void | setColumnAttr (int c, QicsAttrRowCol *attr) |
Protected Attributes | |
| QAbstractItemModel * | m_model |
| QicsDataModelQtModelAdapter * | m_adapter |
| QVariant | variant |
| bool | boolean |
| uint | uinteger |
| qicsptr | pointer |
| QColor | clr |
| QPalette | pal |
| QFont | font |
| QString | string |
| QCursor | cursor |
| QPen | pen |
| QRgb | rgb |
| QPixmap | pixmap |
| QList< QicsAttrRowCol * > | m_arows |
| QList< QicsAttrRowCol * > | m_acols |
| int | m_rows |
| int | m_cols |
| QicsCellStyle * | myDefaultStyle |
| QicsGridInfo * | myInfo |
| QicsCellStyle * | myCellStyle |
The controller should be used in parallel with QicsDataModelQtModelAdapter which is the interface between Qt and QicsTable data models. It operates directly with the QicsDataModelQtModelAdapter set as the model for QicsTable. Here's the example how to work with simple QAbstractTableModel.
// create Qt table data model QAbstractItemModel *qtmodel = new QAbstractTableModel(); // create an adapter to QicsDataModel QicsDataModelQtModelAdapter *model = new QicsDataModelQtModelAdapter(); // set qtmodel for the adapter model->setModel(qtmodel); // create the table QicsTable *table = new QicsTable(); // set adapted model for the table table->setDataModel(model); // install the controller QicsQtModelAttributeController controller; table->setExternalAttributeController(controller);
enum Qics::QicsWideKeyAction [inherited] |
Denotes global key actions available for the table grid.
enum Qics::QicsBoxBorders [inherited] |
Denotes the box borders of cell region.
enum Qics::QicsCopyPolicy [inherited] |
Denotes the copying policy during copy/paste and drag/drop operations.
enum Qics::QicsClearPolicy [inherited] |
Denotes the clearing policy during cut and delete operations.
enum Qics::QicsSortMode [inherited] |
Denotes the sort algorithm which is used.
enum Qics::QicsCellOverflowBehavior [inherited] |
Denotes the behavior of grids when handling cells whose contents cannot be displayed in the boundaries of the cell.
enum Qics::QicsCurrentCellStyle [inherited] |
Denotes the visual style that the current cell of the table will be drawn with.
enum Qics::QicsSelectionStyle [inherited] |
enum Qics::QicsGridCellClipping [inherited] |
Denotes the policy for displaying text that is too long to fit in its cell.
enum Qics::QicsGridType [inherited] |
Specifies a type of grid object.
enum Qics::QicsHeaderType [inherited] |
Specifies the type of table header.
enum Qics::QicsIndexType [inherited] |
Specifies the type of table index.
enum Qics::QicsLineStyle [inherited] |
Denotes the style of lines and borders in the table widget.
enum Qics::QicsRepaintBehavior [inherited] |
Specifies the recalculation and repainting behavior of tables and grids.
enum Qics::QicsScrollBarMode [inherited] |
enum Qics::QicsScrollDirection [inherited] |
Denotes a direction for scrolling operations, or that an absolute scroll should occur.
enum Qics::QicsSelectionPolicy [inherited] |
Denotes the selection policy for the table.
enum Qics::QicsSortOrder [inherited] |
Specifies whenever ordering should be ascending or descending.
enum Qics::QicsTableDisplayOption [inherited] |
Specifies a printing display policy for elements of the table.
enum Qics::QicsTraversalKeyEditBehavior [inherited] |
Specifies the behavior of the traversal keys. (left, right, up, down, etc) while editing a cell.
enum Qics::QicsCurrentCellDraggingPolicy [inherited] |
Specifies the behavior of drag&drop operations when it has began from current cell.
| virtual QicsAbstractAttributeController* QicsQtModelAttributeController::createController | ( | ) | [inline, virtual] |
Creates new attribute controller.
Implements QicsAbstractAttributeController.
| virtual void* QicsQtModelAttributeController::cellProperty | ( | int | row, | |
| int | col, | |||
| int | name | |||
| ) | [virtual] |
Returns pointer to a property name at cell with row row and column col, 0 if not found.
Implements QicsAbstractAttributeController.
| virtual bool QicsQtModelAttributeController::setCellProperty | ( | int | row, | |
| int | col, | |||
| int | name, | |||
| const void * | val | |||
| ) | [virtual] |
Sets a property name at cell with row row and column col to a value of val. Returns true if ok, false if such property cannot be set (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsQtModelAttributeController::clearCellProperty | ( | int | row, | |
| int | col, | |||
| int | name | |||
| ) | [virtual] |
Clears property name at cell with row row and column col. Returns true if ok, false if such property cannot be cleared (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsQtModelAttributeController::isPropertySupported | ( | int | name | ) | [virtual] |
Returns true if property name is supported. Else returns false.
Reimplemented from QicsCommonAttributeController.
| virtual void QicsQtModelAttributeController::reinit | ( | int | rows, | |
| int | columns | |||
| ) | [virtual] |
Performs total reinitialization based on new amount of columns and rows.
Reimplemented from QicsCommonAttributeController.
| virtual void* QicsCommonAttributeController::rowProperty | ( | int | row, | |
| int | name | |||
| ) | [virtual, inherited] |
Returns pointer to a row row property name, 0 if not found.
Implements QicsAbstractAttributeController.
| virtual void* QicsCommonAttributeController::columnProperty | ( | int | col, | |
| int | name | |||
| ) | [virtual, inherited] |
Returns pointer to a column col property name, 0 if not found.
Implements QicsAbstractAttributeController.
| virtual void* QicsCommonAttributeController::defaultProperty | ( | int | name | ) | [virtual, inherited] |
Returns pointer to default property name, 0 if not found.
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::setRowProperty | ( | int | row, | |
| int | name, | |||
| const void * | val | |||
| ) | [virtual, inherited] |
Sets a row row property name to a value of val. Returns true if ok, false if such property cannot be set (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::setColumnProperty | ( | int | col, | |
| int | name, | |||
| const void * | val | |||
| ) | [virtual, inherited] |
Sets a column col property name to a value of val. Returns true if ok, false if such property cannot be set (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::setDefaultProperty | ( | int | name, | |
| const void * | val | |||
| ) | [virtual, inherited] |
Sets default property name to a value of val. Returns true if ok, false if such property cannot be set (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::clearRowProperty | ( | int | row, | |
| int | name | |||
| ) | [virtual, inherited] |
Clears row row property name. Returns true if ok, false if such property cannot be cleared (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::clearColumnProperty | ( | int | col, | |
| int | name | |||
| ) | [virtual, inherited] |
Clears column col property name. Returns true if ok, false if such property cannot be cleared (i.e. not supported).
Implements QicsAbstractAttributeController.
| virtual bool QicsCommonAttributeController::isDefaultPropertySupported | ( | int | name | ) | [virtual, inherited] |
Returns true if default property name is supported. Else returns false.
Reimplemented from QicsAbstractAttributeController.
| virtual QicsCellStyle* QicsCommonAttributeController::defaultStyle | ( | ) | [inline, virtual, inherited] |
Returns default style.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::setDefaultStyle | ( | QicsCellStyle * | style | ) | [virtual, inherited] |
Sets default style.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::setGridInfo | ( | QicsGridInfo * | gi | ) | [inline, virtual, inherited] |
Sets grid info of a parent.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::insertRows | ( | int | num, | |
| int | start_position | |||
| ) | [virtual, inherited] |
Inserts num rows, starting at start_position.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::insertColumns | ( | int | num, | |
| int | start_position | |||
| ) | [virtual, inherited] |
Inserts num columns, starting at start_position.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::deleteRows | ( | int | num, | |
| int | start_position | |||
| ) | [virtual, inherited] |
Deletes num rows, starting at start_position.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::deleteColumns | ( | int | num, | |
| int | start_position | |||
| ) | [virtual, inherited] |
Deletes num columns, starting at start_position.
Implements QicsAbstractAttributeController.
| virtual void QicsCommonAttributeController::handleReinit | ( | int | , | |
| int | ||||
| ) | [inline, protected, virtual, inherited] |
Called internally from reinit(). Should be reimplemented in subclasses in order to handle reinitialization of cell attributes (i.e. clear).
Reimplemented in QicsRegionalAttributeController.
| virtual void QicsCommonAttributeController::handleInsertRows | ( | int | , | |
| int | ||||
| ) | [inline, protected, virtual, inherited] |
Called internally from insertRows(). Should be reimplemented in subclasses in order to handle change of cell attributes when rows are being inserted.
Reimplemented in QicsRegionalAttributeController.
| virtual void QicsCommonAttributeController::handleInsertColumns | ( | int | , | |
| int | ||||
| ) | [inline, protected, virtual, inherited] |
Called internally from insertColumns(). Should be reimplemented in subclasses in order to handle change of cell attributes when columns are being inserted.
Reimplemented in QicsRegionalAttributeController.
| virtual void QicsCommonAttributeController::handleDeleteRows | ( | int | , | |
| int | ||||
| ) | [inline, protected, virtual, inherited] |
Called internally from deleteRows(). Should be reimplemented in subclasses in order to handle change of cell attributes when rows are being deleted.
Reimplemented in QicsRegionalAttributeController.
| virtual void QicsCommonAttributeController::handleDeleteColumns | ( | int | , | |
| int | ||||
| ) | [inline, protected, virtual, inherited] |
Called internally from deleteColumns(). Should be reimplemented in subclasses in order to handle change of cell attributes when columns are being deleted.
Reimplemented in QicsRegionalAttributeController.
| virtual QicsCellStyle* QicsAbstractAttributeController::cellStyle | ( | int | row, | |
| int | column | |||
| ) | [virtual, inherited] |
Returns cell style from row and column.
| virtual void QicsAbstractAttributeController::setCellStyle | ( | int | row, | |
| int | column, | |||
| QicsCellStyle * | style | |||
| ) | [virtual, inherited] |
Sets cell style for row and column.
| virtual QicsCellStyle* QicsAbstractAttributeController::rowStyle | ( | int | row | ) | [virtual, inherited] |
Returns cell style from row.
| virtual void QicsAbstractAttributeController::setRowStyle | ( | int | row, | |
| QicsCellStyle * | style | |||
| ) | [virtual, inherited] |
Sets cell style for row.
| virtual QicsCellStyle* QicsAbstractAttributeController::columnStyle | ( | int | column | ) | [virtual, inherited] |
Returns cell style from column.
| virtual void QicsAbstractAttributeController::setColumnStyle | ( | int | column, | |
| QicsCellStyle * | style | |||
| ) | [virtual, inherited] |
Sets cell style for column.