ICS

QicsTable Documentation Set

QicsCommonAttributeController Class Reference

QicsCommonAttributeController is an implementation of basic attribute controller's functionality and is intended for subclassing. More...

#include <QicsCommonAttributeController.h>

Inherits QicsAbstractAttributeController.

Inherited by QicsQtModelAttributeController, and QicsRegionalAttributeController.

List of all members.

Public Types

enum  QicsWideKeyAction {
  Del_DeleteSelected, CtrlA_SelectAll, CtrlC_Copy, CtrlV_Paste,
  CtrlX_Cut
}
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  QicsSelectCurrentCellPolicy { Follow = 0, Static }
enum  QicsFillHandleEventType { FillHandlePressed = 0, FillHandleReleased, FillHandleDoubleClicked, FillHandleDragged }
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 }
enum  QicsCellWidthMode { NoChange = 0, ChangeOnlyHeight, ChangeHeightWidth }
enum  QicsCellDecorationStyle { Flat = 0, Styled = 1 }
enum  QicsHeaderDragStyle { SimpleDrag = 0, StyledDrag = 1 }
enum  QicsAutoFitMode { Native = 0, Excel }

Public Member Functions

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 isPropertySupported (int name)
virtual bool isDefaultPropertySupported (int name)
virtual QicsCellStyle * defaultStyle ()
virtual void setDefaultStyle (QicsCellStyle *style)
virtual void setGridInfo (QicsGridInfo *gi)
virtual void reinit (int rows, int columns)
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
QicsAbstractAttributeController
createController ()=0
virtual void * cellProperty (int row, int col, int name)=0
virtual bool setCellProperty (int row, int col, int name, const void *val)=0
virtual bool clearCellProperty (int row, int col, int name)=0
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)

Static Public Attributes

static const int QicsLAST_ROW = INT_MAX-1
static const int QicsLAST_COLUMN = INT_MAX-1

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

QList< QicsAttrRowCol * > m_arows
QList< QicsAttrRowCol * > m_acols
int m_rows
int m_cols
QicsCellStyle * myDefaultStyle
QicsGridInfomyInfo
QicsCellStyle * myCellStyle


Detailed Description

QicsCommonAttributeController is an implementation of basic attribute controller's functionality and is intended for subclassing.

This controller provides handling of row/column and default cell attributes.


Member Enumeration Documentation

enum Qics::QicsWideKeyAction [inherited]

Denotes global key actions available for the table grid.

  • Del_DeleteSelected Pressing Delete removes data from the selected cells.
  • CtrlA_SelectAll Pressing Control+A selects all the cells in the grid.

enum Qics::QicsBoxBorders [inherited]

Denotes the box borders of cell region.

  • TopBorder Top border of the region.
  • BottomBorder Bottom border of the region.
  • LeftBorder Left border of the region.
  • RightBorder Right border of the region.

enum Qics::QicsCopyPolicy [inherited]

Denotes the copying policy during copy/paste and drag/drop operations.

  • CopyData Copy data from cells.
  • CopyAttributes Copy cell attributes.
  • CopyDimensions Copy cell dimensions (width/height).
  • CopySpans Copy spanned cells.

enum Qics::QicsClearPolicy [inherited]

Denotes the clearing policy during cut and delete operations.

  • ClearData Clear data from cells.
  • ClearAttributes Clear cell attributes.
  • ClearSpans Clear spanned cells.

enum Qics::QicsSortMode [inherited]

Denotes the sort algorithm which is used.

  • QicsStableSort Used non-destructive, stable sort algorithm.
  • QicsQuickSort Default quick sort algorithm.

Denotes the behavior of grids when handling cells whose contents cannot be displayed in the boundaries of the cell.

  • Clip Cell contents are clipped at the edges of the cell.
  • Overflow The grid will attempt to overflow into adjacent cells.
  • ToolTip The full contents of the cell will be displayed in a tooltip when the mouse pointer is hovered over the cell.

enum Qics::QicsCurrentCellStyle [inherited]

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.

enum Qics::QicsSelectionStyle [inherited]

  • Normal The selection will be drawn by the normal way.
  • Exclusive The selection will be drawn with border like in MS Excel.

  • Follow The current cell will follow the selection (QicsTable style).
  • Static The current cell will stay on selection anchor (MS Excel style).
    Since:
    2.3

enum Qics::QicsGridCellClipping [inherited]

Denotes the policy for displaying text that is too long to fit in its cell.

  • AllowPartial Shows as much of the text as possible.
  • NoDisplayOnPartial Do not display text if it cannot fit in the cell.
  • UseClippedSymbol Display a clipped symbol at the end of the partial text.

enum Qics::QicsGridType [inherited]

Specifies a type of grid object.

  • TableGrid A grid used to display normal table data.
  • RowHeaderGrid A grid used to display row header data.
  • ColumnHeaderGrid A grid used to display column header data.

enum Qics::QicsHeaderType [inherited]

Specifies the type of table header.

  • HeaderRow A row header.
  • HeaderColumn A column header.

enum Qics::QicsIndexType [inherited]

Specifies the type of table index.

  • RowIndex A row index.
  • ColumnIndex A column index.

enum Qics::QicsLineStyle [inherited]

Denotes the style of lines and borders in the table widget.

  • None No line or border.
  • Plain A simple, plain line or border.
  • Raised A raised line (using shadows).
  • Sunken A sunken line (using shadows).

enum Qics::QicsRepaintBehavior [inherited]

Specifies the recalculation and repainting behavior of tables and grids.

  • RepaintOff Do not perform any drawing or dimension calculations.
  • RepaintOn Draw as needed, keep all dimensions up to date.
  • RepaintCalcOnly Do not draw, but keep all dimensions up to date.

enum Qics::QicsScrollBarMode [inherited]

Specifies the various modes of QicsTable's scroll bars.

  • Auto QicsTable shows a scroll bar when the content is too large to fit and not otherwise.
  • AlwaysOff QicsTable never shows a scroll bar.
  • AlwaysOn QicsTable always shows a scroll bar.

enum Qics::QicsScrollDirection [inherited]

Denotes a direction for scrolling operations, or that an absolute scroll should occur.

  • ScrollNone no scroll allowed.
  • ScrollUp scrolling up on a certain number of rows.
  • ScrollDown scrolling down on a certain number of rows.
  • ScrollLeft scrolling left on a certain number of columns.
  • ScrollRight scrolling right on a certain number of columns.
  • ScrollToRow scrolling up or down to a certain row.
  • ScrollToColumn scrolling left or right to a certain column.

enum Qics::QicsSelectionPolicy [inherited]

Denotes the selection policy for the table.

  • SelectNone no selection allowed.
  • SelectSingle single cell selection.
  • SelectMultiple multiple cell selection (including non-contiguous regions).
  • SelectSingleRow selecting a cell selects the entire row, only one row can be selected.
  • SelectMultipleRow selecting a cell selects the entire row, multiple rows can be selected.

enum Qics::QicsSortOrder [inherited]

Specifies whenever ordering should be ascending or descending.

  • Ascending Ascending order.
  • Descending Descending order.

enum Qics::QicsTableDisplayOption [inherited]

Specifies a printing display policy for elements of the table.

  • DisplayNever Do not display the element when printing.
  • DisplayAlways Always display the element when printing.
  • DisplayFirstPage Display the element only when printing the first page of the table.

Specifies the behavior of the traversal keys. (left, right, up, down, etc) while editing a cell.

  • TraverseWithinCell Traversal keys move the text cursor within the edited cell.
  • TraverseBetweenCells Traversal keys move the current cell highlight between cells in the table.

Specifies the behavior of drag&drop operations when it has began from current cell.

  • DragCurrent - only current cell is dragging.
  • DragSelection - whole selection is dragging.

enum Qics::QicsCellWidthMode [inherited]

Specifies the behavior of set cell font.

  • NoChange - does not change size of cells.
  • ChangeOnlyHeight - changing only height of the cell when new font is applies (cell width is not changed).
  • ChangeHeightWidth - changing height and width.

Specifies the cell decoration style for headers.

  • Flat Header cells are drawn flat, just like as ordinal cells.
  • Styled Header cells are drawn with different look.

enum Qics::QicsHeaderDragStyle [inherited]

Specifies row/column drag style for headers.

  • SimpleDrag Only drag cursor is used to indicate drag process.
  • StyledDrag Extended image is used to indicate drag process.

enum Qics::QicsAutoFitMode [inherited]

Specifies autofit modes.

  • Native It toggles between the user defined and minimal width (default).
  • Excel It is just setting the minimal width.


Member Function Documentation

virtual void* QicsCommonAttributeController::rowProperty ( int  row,
int  name 
) [virtual]

Returns pointer to a row row property name, 0 if not found.

Implements QicsAbstractAttributeController.

virtual void* QicsCommonAttributeController::columnProperty ( int  col,
int  name 
) [virtual]

Returns pointer to a column col property name, 0 if not found.

Implements QicsAbstractAttributeController.

virtual void* QicsCommonAttributeController::defaultProperty ( int  name  )  [virtual]

Returns pointer to default property name, 0 if not found.

Implements QicsAbstractAttributeController.

virtual bool QicsCommonAttributeController::setRowProperty ( int  row,
int  name,
const void *  val 
) [virtual]

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]

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]

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]

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]

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::isPropertySupported ( int   )  [virtual]

Returns true if property name is supported. Else returns false.

Reimplemented from QicsAbstractAttributeController.

Reimplemented in QicsQtModelAttributeController.

virtual bool QicsCommonAttributeController::isDefaultPropertySupported ( int   )  [virtual]

Returns true if default property name is supported. Else returns false.

Reimplemented from QicsAbstractAttributeController.

virtual QicsCellStyle* QicsCommonAttributeController::defaultStyle (  )  [inline, virtual]

Returns default style.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::setDefaultStyle ( QicsCellStyle *  style  )  [virtual]

Sets default style.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::setGridInfo ( QicsGridInfo  )  [inline, virtual]

Sets grid info of a parent.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::reinit ( int  rows,
int  columns 
) [virtual]

Performs total reinitialization based on new amount of columns and rows.

Implements QicsAbstractAttributeController.

Reimplemented in QicsQtModelAttributeController.

virtual void QicsCommonAttributeController::insertRows ( int  num,
int  start_position 
) [virtual]

Inserts num rows, starting at start_position.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::insertColumns ( int  num,
int  start_position 
) [virtual]

Inserts num columns, starting at start_position.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::deleteRows ( int  num,
int  start_position 
) [virtual]

Deletes num rows, starting at start_position.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::deleteColumns ( int  num,
int  start_position 
) [virtual]

Deletes num columns, starting at start_position.

Implements QicsAbstractAttributeController.

virtual void QicsCommonAttributeController::handleReinit ( int  ,
int   
) [inline, protected, virtual]

Called internally from reinit(). Should be reimplemented in subclasses in order to handle reinitialization of cell attributes (i.e. clear).

Since:
2.2.1

Reimplemented in QicsRegionalAttributeController.

virtual void QicsCommonAttributeController::handleInsertRows ( int  ,
int   
) [inline, protected, virtual]

Called internally from insertRows(). Should be reimplemented in subclasses in order to handle change of cell attributes when rows are being inserted.

Since:
2.2.1

Reimplemented in QicsRegionalAttributeController.

virtual void QicsCommonAttributeController::handleInsertColumns ( int  ,
int   
) [inline, protected, virtual]

Called internally from insertColumns(). Should be reimplemented in subclasses in order to handle change of cell attributes when columns are being inserted.

Since:
2.2.1

Reimplemented in QicsRegionalAttributeController.

virtual void QicsCommonAttributeController::handleDeleteRows ( int  ,
int   
) [inline, protected, virtual]

Called internally from deleteRows(). Should be reimplemented in subclasses in order to handle change of cell attributes when rows are being deleted.

Since:
2.2.1

Reimplemented in QicsRegionalAttributeController.

virtual void QicsCommonAttributeController::handleDeleteColumns ( int  ,
int   
) [inline, protected, virtual]

Called internally from deleteColumns(). Should be reimplemented in subclasses in order to handle change of cell attributes when columns are being deleted.

Since:
2.2.1

Reimplemented in QicsRegionalAttributeController.

virtual QicsAbstractAttributeController* QicsAbstractAttributeController::createController (  )  [pure virtual, inherited]

Creates new attribute controller.

Implemented in QicsQtModelAttributeController, and QicsRegionalAttributeController.

virtual void* QicsAbstractAttributeController::cellProperty ( int  row,
int  col,
int  name 
) [pure virtual, inherited]

Returns pointer to a property name at cell with row row and column col, 0 if not found.

Implemented in QicsQtModelAttributeController, and QicsRegionalAttributeController.

virtual bool QicsAbstractAttributeController::setCellProperty ( int  row,
int  col,
int  name,
const void *  val 
) [pure virtual, inherited]

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).

Implemented in QicsQtModelAttributeController, and QicsRegionalAttributeController.

virtual bool QicsAbstractAttributeController::clearCellProperty ( int  row,
int  col,
int  name 
) [pure virtual, inherited]

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).

Implemented in QicsQtModelAttributeController, and 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.


The documentation for this class was generated from the following file:

All trademarks and copyrights on this page are properties of their respective owners.
The rest is copyright 1999-2007 Integrated Computer Solutions, Inc.