ICS

QicsTable Documentation Set

QicsHeader Class Reference

A base class for header objects. More...

#include <QicsHeader.h>

Inherits QicsGridCommon.

Inherited by QicsColumnHeader, and QicsRowHeader.

List of all members.

Common Header Properties

bool allowUserResize
bool allowHeaderResize
bool allowUserMove
QString autoHeaderNamingMask

Public Slots

void setAllowUserResize (bool b)
void setAllowUserMove (bool b)
void setAllowHeaderResize (bool b)
void setAutoHeaderNamingMask (QString mask)

Signals

void sizeChange (int idx, int old_size, int new_size, QicsHeaderType type)
void resizeInProgress (int idx, int position, QicsHeaderType type)
void gripDoubleClicked (int idx, int button, QicsHeaderType type)

Public Member Functions

 QicsHeader (QicsGridInfo *info, QObject *parent=0, bool forward_signals=false)
virtual QicsRowrowRef (int rownum) const
virtual QicsRowrow (int idx, bool follow_model=true) const
virtual QicsColumncolumnRef (int colnum) const
virtual QicsColumncolumn (int idx, bool follow_model=true) const
virtual QicsCellcellRef (int rownum, int colnum) const
virtual QicsCellcell (int row, int col, bool follow_model=true) const
bool allowUserResize (void) const
bool allowUserMove (void) const
bool allowHeaderResize (void) const
QString autoHeaderNamingMask (void) const

Protected Slots

void connectGrid (QicsScreenGrid *grid)

Protected Attributes

QicsCellmyCell
QicsRowmyRow
QicsColumnmyColumn


Detailed Description

A base class for header objects.

QicsHeader is a base class that allows setting and retrieval of common header attributes. It is not intended to be directly instantiated. Rather, one of its subclasses should be used.

New common header attributes should be added here so that all subclasses can use them.


Member Function Documentation

bool QicsHeader::allowHeaderResize ( void   )  const

Returns the header's current policy regarding row or column header resizing. If true, users may resize row or column headers(row header horizontally and column header vertically). If false, no resizing is allowed.

See also:
setAllowHeaderResize()

bool QicsHeader::allowUserMove ( void   )  const

Returns the header's current policy regarding user row or column movement. If true, users may move rows or columns (depending on the type of header). If false, no movement is allowed.

See also:
setAllowUserMove()

bool QicsHeader::allowUserResize ( void   )  const

Returns the header's current policy regarding user resizing. If true, users may resize rows or columns (depending on the type of header). If false, no resizing is allowed.

See also:
setAllowUserResize()

QString QicsHeader::autoHeaderNamingMask ( void   )  const [inline]

Returns the header's current auto naming mask.

See also:
setAutoHeaderNamingMask()

virtual QicsCell* QicsHeader::cell ( int  row,
int  col,
bool  follow_model = true 
) const [virtual]

Returns a newly allocated cell object for cell (row, col ) of the header. 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.

virtual QicsCell& QicsHeader::cellRef ( int  rownum,
int  colnum 
) const [virtual]

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

virtual QicsColumn* QicsHeader::column ( int  idx,
bool  follow_model = true 
) const [virtual]

Returns a newly allocated column object for column idx of the header. 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.

virtual QicsColumn& QicsHeader::columnRef ( int  colnum  )  const [virtual]

Returns a reference to an internal flyweight QicsColumn object that refers to row colnum of the header.

void QicsHeader::gripDoubleClicked ( int  idx,
int  button,
QicsHeaderType  type 
) [signal]

Signals when the user double clicks in the "grip" area between two cells.

Parameters:
idx the index of the row or column to the top/left of the grip that was double clicked in
button the button that was clicked
type row or column header

void QicsHeader::resizeInProgress ( int  idx,
int  position,
QicsHeaderType  type 
) [signal]

Signals when the user is in the process of interactively resizing a cell by dragging the mouse.

Parameters:
idx the index of the row or column that is being resized
position the X (if a column header) or Y (if a row header) location of the cursor in the grid
type row or column header

virtual QicsRow* QicsHeader::row ( int  idx,
bool  follow_model = true 
) const [virtual]

Returns a newly allocated row object for row idx of the header. 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.

virtual QicsRow& QicsHeader::rowRef ( int  rownum  )  const [virtual]

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

void QicsHeader::setAllowHeaderResize ( bool  b  )  [slot]

Sets the header's current policy regarding header resizing. If true, users may resize row or column headers (depending on the type of header). If false, no resizing is allowed.

See also:
allowHeaderResize()

void QicsHeader::setAllowUserMove ( bool  b  )  [slot]

Sets the header's current policy regarding user row or column movement. If true, user may move rows or columns (depending on the type of header).User move operations work like all drag&drop operations in QicsTable - with Middle button of mouse. If false, no movement is allowed.

See also:
allowUserMove()

void QicsHeader::setAllowUserResize ( bool  b  )  [slot]

Sets the header's current policy regarding user resizing. If true, users may resize rows or columns (depending on the type of header). If false, no resizing is allowed.

See also:
allowUserResize()

void QicsHeader::setAutoHeaderNamingMask ( QString  mask  )  [inline, slot]

Sets the header's current auto naming mask

See also:
autoHeaderNamingMask()

void QicsHeader::sizeChange ( int  idx,
int  old_size,
int  new_size,
QicsHeaderType  type 
) [signal]

Signals when the user has finished resizing a row or column.

Parameters:
idx the index of the row or column that was resized
old_size the old height/width of the row/column
new_size the new height/width of the row/column
type row or column header


Member Data Documentation

bool QicsHeader::allowHeaderResize

Specifies the header's current policy regarding header resizing. If true, users may resize row or column headers (depending on the type of header). If false, no resizing is allowed.

The default value of this property is true.

bool QicsHeader::allowUserMove

Specifies the header's current policy regarding user movement of rows or columns. User move operations work like all drag&drop operations in QicsTable - with Middle button of mouse. If true, user may move rows or columns (depending on the type of header). If false, no movement is allowed. The default value of this property is false.

bool QicsHeader::allowUserResize

Specifies the header's current policy regarding user resizing. If true, users may resize rows or columns (depending on the type of header). If false, no resizing is allowed.

The default value of this property is true.

QString QicsHeader::autoHeaderNamingMask

Specifies the header cells default appearance if the name isn't specified. The possible special values user might want to use is column%, row% - inserts column and row indexes respectively mcolumn%, mrow% - inserts model column and model row indexes respectively The default value of this property is column% for column header and row% for row header.


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.