ICS

QicsTable Documentation Set

QicsTableCommon Class Reference

Superclass defining table-wide attributes and settings. More...

#include <QicsTableCommon.h>

Inherits QicsGridCommon.

Inherited by QicsTablePrint.

List of all members.

Common Table Properties

QicsTableDisplayOption topHeaderVisible
QicsTableDisplayOption bottomHeaderVisible
QicsTableDisplayOption leftHeaderVisible
QicsTableDisplayOption rightHeaderVisible
int tableMargin
int tableSpacing
int gridSpacing
bool columnHeaderUsesModel
bool rowHeaderUsesModel
bool ignoreModelSizeChanges

Public Slots

void setTopHeaderVisible (QicsTableDisplayOption)
void setBottomHeaderVisible (QicsTableDisplayOption)
void setLeftHeaderVisible (QicsTableDisplayOption)
void setRightHeaderVisible (QicsTableDisplayOption)
void setTableMargin (int margin)
void setTableSpacing (int spacing)
void setGridSpacing (int spacing)
void setRowHeaderUsesModel (bool b)
void setColumnHeaderUsesModel (bool b)
void setIgnoreModelSizeChanges (bool b)
void deleteColumn (int column)
void addColumns (int howMany)
void insertColumn (int column)
void deleteRow (int row)
void addRows (int rows)
void insertRow (int row)
void setDefaultRowHeightInPixels (int height)
void setDefaultRowHeightInChars (int height)
void setDefaultColumnWidthInPixels (int width)
void setDefaultColumnWidthInChars (int width)

Public Member Functions

 QicsTableCommon (QObject *parent=0, bool forward_signals=false)
QicsDataModeldataModel (void) const
virtual void setDataModel (QicsDataModel *dm)
QicsRowrowRef (int rownum)
const QicsRowrowRef (int rownum) const
QicsRowrow (int rownum, bool follow_model=true)
const QicsRowrow (int rownum, bool follow_model=true) const
QicsColumncolumnRef (int colnum)
const QicsColumncolumnRef (int colnum) const
QicsColumncolumn (int colnum, bool follow_model=true)
const QicsColumncolumn (int colnum, bool follow_model=true) const
QicsRepeatingRowrepeatingRowRef (int start_row, unsigned int interval)
const QicsRepeatingRowrepeatingRowRef (int start_row, unsigned int interval) const
QicsRepeatingRowrepeatingRow (int start_row, unsigned int interval)
const QicsRepeatingRowrepeatingRow (int start_row, unsigned int interval) const
QicsRepeatingColumnrepeatingColumnRef (int start_col, unsigned int interval)
const QicsRepeatingColumnrepeatingColumnRef (int start_col, unsigned int interval) const
QicsRepeatingColumnrepeatingColumn (int start_col, unsigned int interval)
const QicsRepeatingColumnrepeatingColumn (int start_col, unsigned int interval) const
QicsCellcellRef (int rownum, int colnum)
const QicsCellcellRef (int rownum, int colnum) const
QicsCellcell (int rownum, int colnum, bool follow_model=true)
const QicsCellcell (int rownum, int colnum, bool follow_model=true) const
QicsMainGridmainGridRef (void)
const QicsMainGridmainGridRef (void) const
QicsMainGridmainGrid (void)
const QicsMainGridmainGrid (void) const
QicsRowHeaderrowHeaderRef (void)
const QicsRowHeaderrowHeaderRef (void) const
QicsRowHeaderrowHeader (void)
const QicsRowHeaderrowHeader (void) const
QicsColumnHeadercolumnHeaderRef (void)
const QicsColumnHeadercolumnHeaderRef (void) const
QicsColumnHeadercolumnHeader (void)
const QicsColumnHeadercolumnHeader (void) const
QicsTableDisplayOption topHeaderVisible (void) const
QicsTableDisplayOption bottomHeaderVisible (void) const
QicsTableDisplayOption leftHeaderVisible (void) const
QicsTableDisplayOption rightHeaderVisible (void) const
int tableMargin (void) const
int tableSpacing (void) const
int gridSpacing (void) const
bool columnHeaderUsesModel (void) const
bool rowHeaderUsesModel (void) const
bool ignoreModelSizeChanges (void) const
void sortRows (QVector< int > columns, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void sortColumns (QVector< int > rows, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void moveRows (int target_row, const QVector< int > &rows)
void moveColumns (int target_col, const QVector< int > &cols)
bool setMouseButton (Qt::MouseButton, Qt::Modifier, Qt::MouseButton)

Protected Member Functions

void registerMetaTypes ()
virtual void setAttr (QicsCellStyle::QicsCellStyleProperty attr, const void *val)
virtual void setGridAttr (QicsGridStyle::QicsGridStyleProperty attr, const void *val)
virtual void clearGridAttr (QicsGridStyle::QicsGridStyleProperty attr)
const QicsGridInfogridInfo (void) const
const QicsGridInforhGridInfo (void) const
const QicsGridInfochGridInfo (void) const
QicsGridInfogridInfo (void)
QicsGridInforhGridInfo (void)
QicsGridInfochGridInfo (void)

Protected Attributes

QicsGridInfo myMainGridInfo
QicsGridInfo myRowHeaderGridInfo
QicsGridInfo myColumnHeaderGridInfo
QicsDataModelmyRHDataModel
QicsDataModelmyCHDataModel
QicsCellmyCell
QicsRowmyRow
QicsColumnmyColumn
QicsRepeatingRowmyRepeatingRow
QicsRepeatingColumnmyRepeatingColumn
QicsMainGridmyMainGrid
QicsRowHeadermyRowHeader
QicsColumnHeadermyColumnHeader
QicsTableDisplayOption myTopHeaderVisible
QicsTableDisplayOption myBottomHeaderVisible
QicsTableDisplayOption myLeftHeaderVisible
QicsTableDisplayOption myRightHeaderVisible
int myTableMargin
int myTableSpacing
int myGridSpacing
bool myRowHeaderUsesModel
bool myColumnHeaderUsesModel

Friends

class QicsTable
class QicsTablePrint


Detailed Description

Superclass defining table-wide attributes and settings.

QicsTableCommon is a class defining table-wide attributes and settings. It is not meant to be instantiated directly. Rather, it serves as a superclass for QicsTablePrint, and is used by QicsTable.


Member Function Documentation

void QicsTableCommon::addColumns ( int  howMany  )  [slot]

Append a column or more to the table.

void QicsTableCommon::addRows ( int  rows  )  [slot]

Append a row or more to the table.

QicsTableDisplayOption QicsTableCommon::bottomHeaderVisible ( void   )  const [inline]

Returns the current value of the bottom header visibility property. See the "bottomHeaderVisible" property for details.

See also:
setBottomHeaderVisible()

const QicsCell* QicsTableCommon::cell ( int  rownum,
int  colnum,
bool  follow_model = true 
) const

Returns a newly allocated const QicsCell object for cell (rownum, colnum). If follow_model is true, the cell object will always refer to the cell in the data model that is currently being displayed in cell (rownum, colnum), even if rows and columns of the table are reordered. If follow_model is false, the cell will always refer to the visual cell (rownum, colnum), but the underlying cell in the data model may change.

See also:
cellRef()

QicsCell* QicsTableCommon::cell ( int  rownum,
int  colnum,
bool  follow_model = true 
)

Returns a newly allocated QicsCell object for cell (rownum, colnum). If follow_model is true, the cell object will always refer to the cell in the data model that is currently being displayed in cell (rownum, colnum), even if rows and columns of the table are reordered. If follow_model is false, the cell will always refer to the visual cell (rownum, colnum), but the underlying cell in the data model may change.

See also:
cellRef()

const QicsCell& QicsTableCommon::cellRef ( int  rownum,
int  colnum 
) const

Returns a const reference to an internal flyweight QicsCell object that refers to cell (rownum, colnum).

See also:
cell()

QicsCell& QicsTableCommon::cellRef ( int  rownum,
int  colnum 
)

Returns a reference to an internal flyweight QicsCell object that refers to cell (rownum, colnum).

See also:
cell()

const QicsColumn* QicsTableCommon::column ( int  colnum,
bool  follow_model = true 
) const

Returns a newly allocated const QicsColumn object for column colnum. If follow_model is true, the column object will always refer to the column in the data model that is currently being displayed in column colnum, even if columns of the table are reordered. If follow_model is false, the column will always refer to the visual column colnum, but the underlying column in the data model may change.

See also:
columnRef()

QicsColumn* QicsTableCommon::column ( int  colnum,
bool  follow_model = true 
)

Returns a newly allocated QicsColumn object for column colnum. If follow_model is true, the column object will always refer to the column in the data model that is currently being displayed in column colnum, even if columns of the table are reordered. If follow_model is false, the column will always refer to the visual column colnum, but the underlying column in the data model may change.

See also:
columnRef()

const QicsColumnHeader* QicsTableCommon::columnHeader ( void   )  const

Returns a newly allocated const column header object.

See also:
columnHeaderRef()

QicsColumnHeader* QicsTableCommon::columnHeader ( void   ) 

Returns a newly allocated column header object.

See also:
columnHeaderRef()

const QicsColumnHeader& QicsTableCommon::columnHeaderRef ( void   )  const

Returns a const reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

QicsColumnHeader& QicsTableCommon::columnHeaderRef ( void   ) 

Returns a reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

bool QicsTableCommon::columnHeaderUsesModel ( void   )  const [inline]

Returns whether the first row of data in the table's data model is used as column header data. See the "columnHeaderUsesModel" property for details.

See also:
setColumnHeaderUsesModel()

const QicsColumn& QicsTableCommon::columnRef ( int  colnum  )  const

Returns a const reference to an internal flyweight QicsColumn object that refers to column colnum.

See also:
column()

QicsColumn& QicsTableCommon::columnRef ( int  colnum  ) 

Returns a reference to an internal flyweight QicsColumn object that refers to column colnum.

See also:
column()

QicsDataModel* QicsTableCommon::dataModel ( void   )  const

Returns the data model object associated with this table.

See also:
setDataModel()

void QicsTableCommon::deleteColumn ( int  column  )  [slot]

Delete a column from the table.

void QicsTableCommon::deleteRow ( int  row  )  [slot]

Delete a row from the table.

int QicsTableCommon::gridSpacing ( void   )  const [inline]

Returns the spacing of the grids in the table widget. See the "gridSpacing" property for details.

bool QicsTableCommon::ignoreModelSizeChanges ( void   )  const

Returns whether the table should ignore size change signals from the data model. See the "ignoreModelSizeChanges" property for details.

See also:
setIgnoreModelSizeChanges()

void QicsTableCommon::insertColumn ( int  column  )  [slot]

Insert a column into the table before column.

void QicsTableCommon::insertRow ( int  row  )  [slot]

Insert a row into the table before row.

QicsTableDisplayOption QicsTableCommon::leftHeaderVisible ( void   )  const [inline]

Returns the current value of the left header visibility property. See the "leftHeaderVisible" property for details.

See also:
setLeftHeaderVisible()

const QicsMainGrid* QicsTableCommon::mainGrid ( void   )  const

Returns a newly allocated const main grid object.

See also:
mainGridRef()

QicsMainGrid* QicsTableCommon::mainGrid ( void   ) 

Returns a newly allocated main grid object.

See also:
mainGridRef()

const QicsMainGrid& QicsTableCommon::mainGridRef ( void   )  const

Returns a const reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

QicsMainGrid& QicsTableCommon::mainGridRef ( void   ) 

Returns a reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

void QicsTableCommon::moveColumns ( int  target_col,
const QVector< int > &  cols 
)

Moves a set of (possibly discontiguous) columns to a new location.

Parameters:
target_col the column before which the moved columns will be placed
cols a list of column indices to be moved
See also:
moveRows()

void QicsTableCommon::moveRows ( int  target_row,
const QVector< int > &  rows 
)

Moves a set of (possibly discontiguous) rows to a new location.

Parameters:
target_row the row before which the moved rows will be placed
rows a list of row indices to be moved
See also:
moveColumns()

const QicsRepeatingColumn* QicsTableCommon::repeatingColumn ( int  start_col,
unsigned int  interval 
) const

Returns a newly allocated const QicsRepeatingColumn object for a repeating sequence starting at start_col and repeating each interval columns.

See also:
repeatingColumnRef()

QicsRepeatingColumn* QicsTableCommon::repeatingColumn ( int  start_col,
unsigned int  interval 
)

Returns a newly allocated QicsRepeatingColumn object for a repeating sequence starting at start_col and repeating each interval columns.

See also:
repeatingColumnRef()

const QicsRepeatingColumn& QicsTableCommon::repeatingColumnRef ( int  start_col,
unsigned int  interval 
) const

Returns a const reference to an internal flyweight QicsRepeatingColumn object that refers to a repeating sequence starting at start_col and repeating each interval columns.

See also:
repeatingColumn()

QicsRepeatingColumn& QicsTableCommon::repeatingColumnRef ( int  start_col,
unsigned int  interval 
)

Returns a reference to an internal flyweight QicsRepeatingColumn object that refers to a repeating sequence starting at start_col and repeating each interval columns.

See also:
repeatingColumn()

const QicsRepeatingRow* QicsTableCommon::repeatingRow ( int  start_row,
unsigned int  interval 
) const

Returns a newly allocated const QicsRepeatingRow object for a repeating sequence starting at start_row and repeating each interval rows.

See also:
repeatingRowRef()

QicsRepeatingRow* QicsTableCommon::repeatingRow ( int  start_row,
unsigned int  interval 
)

Returns a newly allocated QicsRepeatingRow object for a repeating sequence starting at start_row and repeating each interval rows.

See also:
repeatingRowRef()

const QicsRepeatingRow& QicsTableCommon::repeatingRowRef ( int  start_row,
unsigned int  interval 
) const

Returns a const reference to an internal flyweight QicsRepeatingRow object that refers to a repeating sequence starting at start_row and repeating each interval rows.

See also:
repeatingRow()

QicsRepeatingRow& QicsTableCommon::repeatingRowRef ( int  start_row,
unsigned int  interval 
)

Returns a reference to an internal flyweight QicsRepeatingRow object that refers to a repeating sequence starting at start_row and repeating each interval rows.

See also:
repeatingRow()

QicsTableDisplayOption QicsTableCommon::rightHeaderVisible ( void   )  const [inline]

Returns the current value of the right header visibility property. See the "rightHeaderVisible" property for details.

See also:
setRightHeaderVisible()

const QicsRow* QicsTableCommon::row ( int  rownum,
bool  follow_model = true 
) const

Returns a newly allocated const QicsRow object for row rownum. If follow_model is true, the row object will always refer to the row in the data model that is currently being displayed in row rownum, even if rows of the table are reordered. If follow_model is false, the row will always refer to the visual row rownum, but the underlying row in the data model may change.

See also:
rowRef()

QicsRow* QicsTableCommon::row ( int  rownum,
bool  follow_model = true 
)

Returns a newly allocated QicsRow object for row rownum. If follow_model is true, the row object will always refer to the row in the data model that is currently being displayed in row rownum, even if rows of the table are reordered. If follow_model is false, the row will always refer to the visual row rownum, but the underlying row in the data model may change.

See also:
rowRef()

const QicsRowHeader* QicsTableCommon::rowHeader ( void   )  const

Returns a newly allocated const row header object.

See also:
rowHeaderRef()

QicsRowHeader* QicsTableCommon::rowHeader ( void   ) 

Returns a newly allocated row header object.

See also:
rowHeaderRef()

const QicsRowHeader& QicsTableCommon::rowHeaderRef ( void   )  const

Returns a const reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

QicsRowHeader& QicsTableCommon::rowHeaderRef ( void   ) 

Returns a reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

bool QicsTableCommon::rowHeaderUsesModel ( void   )  const [inline]

Returns whether the first column of data in the table's data model is used as row header data. See the "rowHeaderUsesModel" property for details.

See also:
setRowHeaderUsesModel()

const QicsRow& QicsTableCommon::rowRef ( int  rownum  )  const

Returns a const reference to an internal flyweight QicsRow object that refers to row rownum.

See also:
row()

QicsRow& QicsTableCommon::rowRef ( int  rownum  ) 

Returns a reference to an internal flyweight QicsRow object that refers to row rownum.

See also:
row()

void QicsTableCommon::setBottomHeaderVisible ( QicsTableDisplayOption   )  [slot]

Sets the value of the bottomHeaderVisible property. At the present time, only DisplayNever and DisplayAlways are supported. See the "bottomHeaderVisible" property for details.

See also:
bottomHeaderVisible()

void QicsTableCommon::setColumnHeaderUsesModel ( bool  b  )  [slot]

Controls whether the first row of data in the table's data model is used as column header data. See the "columnHeaderUsesModel" property for details.

See also:
columnHeaderUsesModel()

virtual void QicsTableCommon::setDataModel ( QicsDataModel dm  )  [virtual]

Sets the data model object associated with this table.

See also:
dataModel()

void QicsTableCommon::setDefaultColumnWidthInChars ( int  width  )  [slot]

Sets the default column width to width character units for the the entire table.

void QicsTableCommon::setDefaultColumnWidthInPixels ( int  width  )  [slot]

Sets the default column width to width pixels for the the entire table.

void QicsTableCommon::setDefaultRowHeightInChars ( int  height  )  [slot]

Sets the default row height to height character units (i.e. lines) for the the entire table.

void QicsTableCommon::setDefaultRowHeightInPixels ( int  height  )  [slot]

Sets the default row height to height pixels for the the entire table.

void QicsTableCommon::setGridSpacing ( int  spacing  )  [slot]

Sets the spacing of the grids in the table widget. See the "gridSpacing" property for details.

void QicsTableCommon::setIgnoreModelSizeChanges ( bool  b  )  [slot]

Controls whether the table should ignore size change signals from the data model. See the "ignoreModelSizeChanges" property for details.

See also:
ignoreModelSizeChanges()

void QicsTableCommon::setLeftHeaderVisible ( QicsTableDisplayOption   )  [slot]

Sets the value of the leftHeaderVisible property. See the "leftHeaderVisible" property for details.

See also:
leftHeaderVisible()

bool QicsTableCommon::setMouseButton ( Qt::MouseButton  ,
Qt::Modifier  ,
Qt::MouseButton   
)

This method set mouse button mapping inside

See also:
QicsTable. Usefull for Apple mouse, 2-button mouse or for individual remapping. First paramater action button, second keyboard modifier, third result button (which emulate).

void QicsTableCommon::setRightHeaderVisible ( QicsTableDisplayOption   )  [slot]

Sets the value of the rightHeaderVisible property. At the present time, only DisplayNever and DisplayAlways are supported. See the "rightHeaderVisible" property for details.

See also:
rightHeaderVisible()

void QicsTableCommon::setRowHeaderUsesModel ( bool  b  )  [slot]

Controls whether the first column of data in the table's data model is used as row header data. See the "rowHeaderUsesModel" property for details.

See also:
rowHeaderUsesModel()

void QicsTableCommon::setTableMargin ( int  margin  )  [slot]

Sets the margin of the table widget. See the "tableMargin" property for details.

void QicsTableCommon::setTableSpacing ( int  spacing  )  [slot]

Sets the spacing of the table widget. See the "tableSpacing" property for details.

void QicsTableCommon::setTopHeaderVisible ( QicsTableDisplayOption   )  [slot]

Sets the value of the topHeaderVisible property. See the "topHeaderVisible" property for details.

See also:
topHeaderVisible()

void QicsTableCommon::sortColumns ( QVector< int >  rows,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

sort the columns

Parameters:
rows the data model rows to sort on
order sort order (default: Ascending)
from only sort the columns between from and to
to only sort the columns between from and to. The default of -1 will cause all columns through the end to be sorted
func optional a comparator function. Specifying 0 will use a default comparator which should work for almost every case. Applications which add new subclasses of QicsDataItem to their tables, should provide type specific comparators with their data elements.
See also:
sortRows()

void QicsTableCommon::sortRows ( QVector< int >  columns,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

sort the rows

Parameters:
columns the data model columns to sort on
order sort order (default: Ascending)
from only sort the rows between from and to
to only sort the rows between from and to. The default of -1 will cause all rows through the end to be sorted
func optional a comparator function. Specifying 0 will use a default comparator which should work for almost every case. Applications which add new subclasses of QicsDataItem to their tables, should provide type specific comparators with their data elements.
See also:
sortColumns()

int QicsTableCommon::tableMargin ( void   )  const [inline]

Returns the margin of the table widget. See the "tableMargin" property for details.

int QicsTableCommon::tableSpacing ( void   )  const [inline]

Returns the spacing of the table widget. See the "tableSpacing" property for details.

QicsTableDisplayOption QicsTableCommon::topHeaderVisible ( void   )  const [inline]

Returns the current value of the top header visibility property. See the "topHeaderVisible" property for details.

See also:
setTopHeaderVisible()


Member Data Documentation

QicsTableDisplayOption QicsTableCommon::bottomHeaderVisible

Specifies whether the bottom header is visible. The default value of this property is DisplayNever.

bool QicsTableCommon::columnHeaderUsesModel

Specifies whether the values in the first row of the table's associated QicsDataModel should be interpreted as column header data. If this value is true, the value of cell(0, colnum) will be shown as the column header for column colnum, and row 0 will never be shown as data in the table.

The default value of this property is false.

int QicsTableCommon::gridSpacing

Specifies the number of pixels between each of the grids in the table widget. This property does not control the spacing between other element in the table. Use "tableSpacing" in that case. The default value of this property is 0.

bool QicsTableCommon::ignoreModelSizeChanges

Specifies whether the table should ignore changes to the size of the model. This can be very useful when you are clearing all rows and columns from the table, but you wish to retain model attribute settings on the table display. If this value is true, these settings will be retained. If this value is false, row and column addition and deletion will result in the appropriate changes to the attribute settings and row and column widths of the table.

QicsTableDisplayOption QicsTableCommon::leftHeaderVisible

Specifies whether the left header is visible. The default value of this property is DisplayAlways.

QicsTableDisplayOption QicsTableCommon::rightHeaderVisible

Specifies whether the right header is visible. The default value of this property is DisplayNever.

bool QicsTableCommon::rowHeaderUsesModel

Specifies whether the values in the first column of the table's associated QicsDataModel should be interpreted as row header data. If this value is true, the value of cell(rownum, 0) will be shown as the row header for row rownum, and column 0 will never be shown as data in the table.

The default value of this property is false.

int QicsTableCommon::tableMargin

Specifies the number of pixels between the edge of the table widget and its subwidgets (title widgets, headers, etc). The default value of this property is 10.

int QicsTableCommon::tableSpacing

Specifies the number of pixels between each of the table widget's elements (title widgets, corner widgets, etc). This property does not control the spacing between grids in the table. Use "gridSpacing" in that case. The default value of this property is 10.

QicsTableDisplayOption QicsTableCommon::topHeaderVisible

Specifies whether the top header is visible. The default value of this property is DisplayAlways.


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-2006 Integrated Computer Solutions, Inc.