ICS

QicsTable Documentation Set

QicsCell Class Reference

A lightweight object permitting access to an indvidual cell's attributes. More...

#include <QicsCell.h>

Inherits QicsCellCommon.

List of all members.

Cell Properties

int rowIndex
int modelRowIndex
int columnIndex
int modelColumnIndex
int widthInPixels
int widthInChars
int minWidthInPixels
int minWidthInChars
int maxWidthInPixels
int maxWidthInChars
int maxHeightInPixels
int maxHeightInChars
int heightInPixels
int heightInChars
int minHeightInPixels
int minHeightInChars

Public Types

 QicsStableSort = 0
 QicsQuickSort
 Clip = 0
 Overflow
 ToolTip
 Spreadsheet = 0
 NormalSelected
 Normal = 0
 Exclusive
 AllowPartial = 0
 NoDisplayOnPartial
 UseClippedSymbol
 TableGrid = 0
 RowHeaderGrid
 ColumnHeaderGrid
 RowHeader = 0
 ColumnHeader
 NoIndex = 0
 RowIndex
 ColumnIndex
 RowAndColumnIndex
 None = 0
 Plain
 Raised
 Sunken
 RepaintOff = 0
 RepaintOn = 1
 RepaintCalcOnly = 2
 Auto = 0
 AlwaysOff
 AlwaysOn
 ScrollNone = 0
 ScrollUp
 ScrollDown
 ScrollLeft
 ScrollRight
 ScrollToRow
 ScrollToColumn
 SelectNone = 0
 SelectSingle
 SelectMultiple
 SelectSingleRow
 SelectMultipleRow
 SelectionNone = 0
 SelectionBegin
 SelectionDrag
 SelectionEnd
 SelectionExtend
 SelectionAdd
 Ascending = 0
 Descending
 DisplayNever = 0
 DisplayAlways
 DisplayFirstPage
 TraverseWithinCell = 0
 TraverseBetweenCells
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, ScrollDown, ScrollLeft,
  ScrollRight, ScrollToRow, ScrollToColumn
}
enum  QicsSelectionPolicy {
  SelectNone = 0, SelectSingle, SelectMultiple, SelectSingleRow,
  SelectMultipleRow
}
enum  QicsSelectionType {
  SelectionNone = 0, SelectionBegin, SelectionDrag, SelectionEnd,
  SelectionExtend, SelectionAdd
}
enum  QicsSortOrder { Ascending = 0, Descending }
enum  QicsTableDisplayOption { DisplayNever = 0, DisplayAlways, DisplayFirstPage }
enum  QicsTraversalKeyEditBehavior { TraverseWithinCell = 0, TraverseBetweenCells }

Public Slots

void setRowIndex (int idx)
void setColumnIndex (int idx)
void setDataValue (const QicsDataItem &val)
void clearDataValue (void)
bool addSpan (int height, int width)
QicsRegion spannedRegion (void)
void removeSpan (void)
void setWidthInPixels (int width)
void setWidthInChars (int width)
void setMaxWidthInPixels (int width)
void setMaxWidthInChars (int width)
void setMinWidthInPixels (int width)
void setMinWidthInChars (int width)
void setHeightInPixels (int height)
void setHeightInChars (int height)
void setMinHeightInPixels (int height)
void setMinHeightInChars (int height)
void setMaxHeightInPixels (int height)
void setMaxHeightInChars (int height)
bool canAcceptDrops (void) const
void setMargin (int margin)
void setReadOnly (bool b)
void setFont (const QFont &font)
void setPalette (const QPalette &pal)
void setForegroundColor (const QColor &p)
void setBackgroundColor (const QColor &p)
void setSelectedForegroundColor (const QColor &p)
void setSelectedBackgroundColor (const QColor &p)
void setEditForegroundColor (const QColor &p)
void setEditBackgroundColor (const QColor &p)
void setPixmap (const QPixmap &p)
void setPixmap (const QString &file_name)
void setPixmapSpacing (int sp)
void setDisplayer (QicsCellDisplay *d)
void setFormatter (QicsDataItemFormatter *d)
void setAlignment (int flags)
void setEnabled (bool b)
void setTextFlags (int flags)
void setValidator (QValidator *v)
void setPasteValidator (QicsPasteValidator *v)
void setLabel (const QString &label)
void setMaxLength (int len)
void setCursor (const QCursor &c)
void unsetCursor (void)
void setBorderWidth (int bw)
void setTopBorderPen (const QPen &pen)
void setLeftBorderPen (const QPen &pen)
void setRightBorderPen (const QPen &pen)
void setBottomBorderPen (const QPen &pen)
void setUserData (void *data)
void setToolTipText (const QString &txt)
void setAutoRecognition (bool)
void setCanAcceptDrops (const bool)
QicsGridInfogridInfo ()

Public Member Functions

 QicsCell (int row, int col, QicsTable *table, bool follow_model=true)
 QicsCell (int row, int column, QicsGridInfo *info, bool follow_model=true, QObject *parent=0)
virtual void setInfo (QicsGridInfo *info)
int rowIndex (void) const
int columnIndex (void) const
int modelRowIndex (void) const
int modelColumnIndex (void) const
bool isValid (void) const
const QicsDataItemdataValue (void) const
bool isCurrent (void) const
int widthInPixels (void) const
int widthInChars (void) const
int minWidthInPixels (void) const
int minWidthInChars (void) const
int maxWidthInPixels (void) const
int maxWidthInChars (void) const
int heightInPixels (void) const
int heightInChars (void) const
int maxHeightInPixels (void) const
int maxHeightInChars (void) const
int minHeightInPixels (void) const
int minHeightInChars (void) const
bool isHidden (void) const
QString label (void) const
bool enabled (void) const
bool readOnly (void) const
bool selected (void) const
QFont font (void) const
QPalette palette (void) const
QColor foregroundColor (void) const
QColor backgroundColor (void) const
QColor selectedForegroundColor (void) const
QColor selectedBackgroundColor (void) const
QPixmap pixmap (void) const
int pixmapSpacing (void) const
const QCursor & cursor (void) const
int alignment (void) const
int textFlags (void) const
int maxLength (void) const
int margin (void) const
int borderWidth (void) const
QPen topBorderPen (void) const
QPen leftBorderPen (void) const
QPen rightBorderPen (void) const
QPen bottomBorderPen (void) const
QString toolTipText (void) const
QColor editForegroundColor (void) const
QColor editBackgroundColor (void) const
bool autoRecognition (void)
QicsPasteValidatorpasteValidator (void) const
QValidator * validator (void) const
QicsDataModeldataModel (void) const
QicsCellDisplaydisplayer (void) const
QicsDataItemFormatterformatter (void) const
void * userData (void) const

Public Attributes

QString label
bool enabled
bool readOnly
bool selected
QFont font
QPalette palette
QColor foregroundColor
QColor backgroundColor
QColor selectedForegroundColor
QColor selectedBackgroundColor
QPixmap pixmap
int pixmapSpacing
QCursor cursor
int alignment
int textFlags
int maxLength
int margin
int borderWidth
QPen topBorderPen
QPen leftBorderPen
QPen rightBorderPen
QPen bottomBorderPen
QString toolTipText
QColor editForegroundColor
QColor editBackgroundColor
bool autoRecognition

Protected Slots

void handleModelRowInsert (int nrows, int pos)
void handleModelColumnInsert (int ncols, int pos)
void handleModelRowDelete (int nrows, int pos)
void handleModelColumnDelete (int ncols, int pos)
void handleOrderChanged (QicsIndexType type, QVector< int > &visChange)
void changeDataModel (QicsDataModel *old_dt, QicsDataModel *new_dt)
void gridDeleted ()

Protected Member Functions

void init (void)
virtual void setAttr (QicsCellStyle::QicsCellStyleProperty attr, const void *val)
virtual void * getAttr (QicsCellStyle::QicsCellStyleProperty attr) const
virtual void clearAttr (QicsCellStyle::QicsCellStyleProperty attr)
virtual void setDMMargin (int margin)
virtual void setDMFont (const QFont &font)
virtual void setDMBorderWidth (int bw)
int modelOrVisualRowIndex (void) const
int modelOrVisualColumnIndex (void) const
QicsStyleManager & styleManager (void) const
QicsDimensionManager & dimensionManager (void) const

Protected Attributes

int myRow
int myColumn
QPointer< QicsGridInfomyInfo
bool myFollowModel

Properties

QicsPasteValidator pasteValidator []
QValidator validator []
bool canAcceptDrops []

Private Member Functions

void commonInit (QicsGridInfo *info)


Detailed Description

A lightweight object permitting access to an indvidual cell's attributes.

QicsCell is the programmer's access point for all attributes of individual cells. All attributes of individual cells can be set using this class.

QicsCell is a flyweight class representing a single cell in the table. Instances of this object are created only when necessary -- there is no large array of cell objects contained in the table. Rather, they are created directly (via the public constructor) or indirectly (via QicsTable::cell(), QicsTable::cellRef(), QicsHeader::cell(), or QicsHeader::cellRef()) by the programmer when needed.

Persistent objects, created by the public constructor, by QicsTable::cell() and by QicsHeader::cell(), are valid until they are explicitly destroyed, or until the table itself is destroyed. This brings up the possibility that rows and/or columns in the table may be inserted, deleted, or reordered while QicsCell objects persist. Because of this possibility, QicsCell objects can be created so that they always refer to the same cell in the data model, or so that they always refer to the same cell in the view (i.e. the table widget).

Any attribute settings that are made while using a cell object that follows the model are considered to be model attribute settings. These settings will always pertain to this model cell, even if rows and columns are reordered. Attribute settings that are made while using a cell object that does not follow the model are considered to be visual attribute settings. These settings will always pertain to the visual cell, regardless of what model cell is being displayed in that cell.


Member Enumeration Documentation

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::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]

Specifies the various modes of QicsTable's scroll bars.

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::QicsSelectionStyle [inherited]

enum Qics::QicsSortMode [inherited]

Denotes the sort algorithm which is used

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.


Constructor & Destructor Documentation

QicsCell::QicsCell ( int  row,
int  col,
QicsTable table,
bool  follow_model = true 
)

Constructor for the class.

Parameters:
row row index
col column index
table the cell's table
follow_model indices follow model?
Note:
The macro CREATE_OBJS_WITH_QICSTABLE must be defined in order to use this constructor. If you are using qmake, you can add "DEFINES=CREATE_OBJS_WITH_QICSTABLE" to your application's .pro file.


Member Function Documentation

bool QicsCell::addSpan ( int  height,
int  width 
) [slot]

Makes this cell span multiple rows and columns. The contents of the cell at the top, left of span will be drawn across all cells in span. Two cell spanning regions within a single grid cannot overlap. If addCellSpan is called with a spanning region that overlaps an existing spanning region, the method will return false. If the new spanning region is accepted, the method will return true.

See also:
removeSpan()

spannedRegion()

int QicsCellCommon::alignment ( void   )  const [inherited]

Returns the alignment options for this cell. See the "alignment" property for details.

See also:
Qt::Alignment

setAlignment()

bool QicsCellCommon::autoRecognition ( void   )  [inherited]

Returns auto recognition flag for cell. See the "autoRecognition" property for details.

See also:
setAutoRecognition()

QColor QicsCellCommon::backgroundColor ( void   )  const [inherited]

Returns the cell's background color. See the "backgroundColor" property for details.

See also:
setBackgroundColor()

int QicsCellCommon::borderWidth ( void   )  const [inherited]

Returns the border width of this cell. See the "borderWidth" property for details.

See also:
setBorderWidth()

QPen QicsCellCommon::bottomBorderPen ( void   )  const [inherited]

Returns the pen used to draw the bottom border of this cell. See the "bottomBorderPen" property for details.

See also:
setBottomBorderPen()

bool QicsCellCommon::canAcceptDrops ( void   )  const [slot, inherited]

This method returns true is cell can recive any drag data, othervise returns false. Se also "setCanAcceptDrops" function.

void QicsCell::clearDataValue ( void   )  [slot]

Clears the data value for this cell.

int QicsCell::columnIndex ( void   )  const

Returns the visual column index of this cell. See the "columnIndex" property for details.

See also:
setColumnIndex() modelColumnIndex()

const QCursor& QicsCellCommon::cursor ( void   )  const [inherited]

Returns the cursor for this cell. See the "cursor" property for details.

See also:
setCursor()

unsetCursor()

QicsDataModel* QicsCellCommon::dataModel ( void   )  const [inline, inherited]

Returns the data model associated with this object.

const QicsDataItem* QicsCell::dataValue ( void   )  const

Returns the data value for this cell.

See also:
setDataValue()

QicsCellDisplay* QicsCellCommon::displayer ( void   )  const [inherited]

Returns the QicsCellDisplay object for this cell. The cell display object controls aspects of displaying and editing the cell. See QicsCellDisplay and its subclasses for details.

See also:
setDisplayer()

QColor QicsCellCommon::editBackgroundColor ( void   )  const [inherited]

Returns the cell's edit background color. See the "editBackgroundColor" property for details.

See also:
setEditBackgroundColor()

QColor QicsCellCommon::editForegroundColor ( void   )  const [inherited]

Returns the cell's edit foreground color. See the "editForegroundColor" property for details.

See also:
setEditForegroundColor()

bool QicsCellCommon::enabled ( void   )  const [inherited]

Returns the enabled attribute of the cell. See the "enabled" property for details.

See also:
setEnabled()

QFont QicsCellCommon::font ( void   )  const [inherited]

Returns the font attribute of the cell. See the "font" property for details.

See also:
setFont()

QColor QicsCellCommon::foregroundColor ( void   )  const [inherited]

Returns the cell's foreground color. See the "foregroundColor" property for details.

See also:
setForegroundColor()

QicsDataItemFormatter* QicsCellCommon::formatter ( void   )  const [inherited]

Returns the QicsDataItemFormatter object for this cell. The formatter object controls the formatting of data values that are displayed in this cell. See QicsDataItemFormatter and its subclasses for details.

See also:
setFormatter()

int QicsCell::heightInChars ( void   )  const

Returns the height of this cell's row in character units (i.e. lines). See the "heightInChars" property for details.

See also:
setHeightInChars()

int QicsCell::heightInPixels ( void   )  const

Returns the height of this cell's row in pixels. See the "heightInPixels" property for details.

See also:
setHeightInPixels()

bool QicsCell::isCurrent ( void   )  const

Returns true if this cell is the current cell, false otherwise.

bool QicsCell::isHidden ( void   )  const

Returns whether this cell is hidden or not. Cells cannot be hidden individually -- only entire rows or columns may be hidden.

bool QicsCell::isValid ( void   )  const

Returns true if the cell indices are valid, false if they are not. Cell indices may become invalid if rows or columns in the data model are deleted.

QString QicsCellCommon::label ( void   )  const [inherited]

Returns the label attribute of this cell. This string may be used by the cell displayer when rendering the contents of this cell. See the "label" property for details.

See also:
setLabel()

QPen QicsCellCommon::leftBorderPen ( void   )  const [inherited]

Returns the pen used to draw the left border of this cell. See the "leftBorderPen" property for details.

See also:
setLeftBorderPen()

int QicsCellCommon::margin ( void   )  const [inherited]

Returns the margin of the cell (in pixels). See the "margin" property for details.

See also:
setMargin()

int QicsCell::maxHeightInChars ( void   )  const

Returns the maximum height of this cell's row in character units (i.e. lines). See the "maxHeightInChars" property for details.

See also:
setMaxHeightInChars()

int QicsCell::maxHeightInPixels ( void   )  const

Returns the maximum height of this cell's row in pixels. See the "maxHeightInPixels" property for details.

See also:
setMaxHeightInPixels()

int QicsCellCommon::maxLength ( void   )  const [inherited]

Returns the maximum length of the value in this cell. See the "maxLength" property for details.

See also:
setMaxLength()

int QicsCell::maxWidthInChars ( void   )  const

Returns the maximum width of this cell's column in character units. See the "maxWidthInChars" property for details.

See also:
setMaxWidthInChars()

int QicsCell::maxWidthInPixels ( void   )  const

Returns the maximum width of this cell's column in pixels. See the "maxWidthInPixels" property for details.

See also:
setMaxWidthInPixels()

int QicsCell::minHeightInChars ( void   )  const

Returns the minimum height of this cell's row in character units (i.e. lines). See the "minHeightInChars" property for details.

See also:
setMinHeightInChars()

int QicsCell::minHeightInPixels ( void   )  const

Returns the minimum height of this cell's row in pixels. See the "minHeightInPixels" property for details.

See also:
setMinHeightInPixels()

int QicsCell::minWidthInChars ( void   )  const

Returns the minimum width of this cell's column in character units. See the "minWidthInChars" property for details.

See also:
setMinWidthInChars()

int QicsCell::minWidthInPixels ( void   )  const

Returns the minimum width of this cell's column in pixels. See the "minWidthInPixels" property for details.

See also:
setMinWidthInPixels()

int QicsCell::modelColumnIndex ( void   )  const

Returns the model column index of this cell. See the "modelColumnIndex" property for details.

See also:
columnIndex()

int QicsCell::modelRowIndex ( void   )  const

Returns the model row index of this cell. See the "modelRowIndex" property for details.

See also:
rowIndex()

QPalette QicsCellCommon::palette ( void   )  const [inherited]

Returns the palette attribute of the cell. See the "palette" property for details.

See also:
setPalette()

QicsPasteValidator* QicsCellCommon::pasteValidator ( void   )  const [inherited]

Returns the paste validator object for this cell. See the "pasteValidator" property for details.

See also:
setPasteValidator()

QPixmap QicsCellCommon::pixmap ( void   )  const [inherited]

Returns the cell's pixmap. See the "pixmap" property for details.

See also:
setPixmap()

int QicsCellCommon::pixmapSpacing ( void   )  const [inherited]

Returns the cell's pixmap spacing See the "pixmapSpacing" property for details.

See also:
setPixmap()

bool QicsCellCommon::readOnly ( void   )  const [inherited]

Returns the read-only attribute of the cell. See the "readOnly" property for details.

See also:
setReadOnly()

void QicsCell::removeSpan ( void   )  [slot]

Removes the span that contains this cell.

See also:
addSpan()

spannedRegion()

QPen QicsCellCommon::rightBorderPen ( void   )  const [inherited]

Returns the pen used to draw the right border of this cell. See the "rightBorderPen" property for details.

See also:
setRightBorderPen()

int QicsCell::rowIndex ( void   )  const

Returns the visual row index of this cell. See the "rowIndex" property for details.

See also:
setRowIndex() modelRowIndex()

bool QicsCellCommon::selected ( void   )  const [inherited]

Returns the selected attribute of the cell. See the "selected" property for details.

QColor QicsCellCommon::selectedBackgroundColor ( void   )  const [inherited]

Returns the cell's selected background color. See the "selectedBackgroundColor" property for details.

See also:
setSelectedBackgroundColor()

QColor QicsCellCommon::selectedForegroundColor ( void   )  const [inherited]

Returns the cell's selected foreground color. See the "selectedForegroundColor" property for details.

See also:
setSelectedForegroundColor()

void QicsCellCommon::setAlignment ( int  flags  )  [slot, inherited]

Sets the alignment options for this cell. See the "alignment" property for details.

See also:
Qt::Alignment

alignment()

void QicsCellCommon::setAutoRecognition ( bool   )  [slot, inherited]

Sets automatical recognition for cell. See the "autoRecognition" property for details.

See also:
autoRecognition()

void QicsCellCommon::setBackgroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's background color. See the "backgroundColor" property for details.

See also:
backgroundColor()

void QicsCellCommon::setBorderWidth ( int  bw  )  [slot, inherited]

Sets the border width of this cell. See the "borderWidth" property for details.

See also:
borderWidth()

void QicsCellCommon::setBottomBorderPen ( const QPen &  pen  )  [slot, inherited]

Sets the pen used to draw the bottom border of this cell. See the "bottomBorderPen" property for details.

See also:
bottomBorderPen()

void QicsCellCommon::setCanAcceptDrops ( const   bool  )  [slot, inherited]

Sets allowing cell to recive drag and drop data. If you sets to false, cell will not recive and cannot send any drag data. By default all cells can recive and send/move they dataItems. Se get method "canAcceptDrops"

void QicsCell::setColumnIndex ( int  idx  )  [slot]

Sets the the column index of this object to idx. See the "columnIndex" property for details.

See also:
columnIndex()

void QicsCellCommon::setCursor ( const QCursor &  c  )  [slot, inherited]

Sets the cursor for this cell. See the "cursor" property for details.

See also:
cursor()

unsetCursor()

void QicsCell::setDataValue ( const QicsDataItem val  )  [slot]

Sets the data value for this cell.

See also:
dataValue()

void QicsCellCommon::setDisplayer ( QicsCellDisplay d  )  [slot, inherited]

Sets the QicsCellDisplay object for this cell. The cell display object controls aspects of displaying and editing the cell. See QicsCellDisplay and its subclasses for details. Setting this value to 0 will cause the table to use the default cell display object for this cell.

See also:
displayer()

void QicsCellCommon::setEditBackgroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's edit background color. See the "editBackgroundColor" property for details.

See also:
editBackgroundColor()

void QicsCellCommon::setEditForegroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's edit foreground color. See the "editForegroundColor" property for details.

See also:
editForegroundColor()

void QicsCellCommon::setEnabled ( bool  b  )  [slot, inherited]

Sets the enabled attribute of the cell. See the "enabled" property for details.

See also:
enabled()

void QicsCellCommon::setFont ( const QFont &  font  )  [slot, inherited]

Sets the font attribute of the cell. See the "font" property for details.

See also:
font()

void QicsCellCommon::setForegroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's foreground color. See the "foregroundColor" property for details.

See also:
foregroundColor()

void QicsCellCommon::setFormatter ( QicsDataItemFormatter d  )  [slot, inherited]

Sets the QicsDataItemFormatter object for this cell. The formatter object controls the formatting of data values that are displayed in this cell. See QicsDataItemFormatter and its subclasses for details.

See also:
formatter()

void QicsCell::setHeightInChars ( int  height  )  [slot]

Sets the height of this cell's row in character units (i.e. lines). See the "heightInChars" property for details.

See also:
heightInChars()

void QicsCell::setHeightInPixels ( int  height  )  [slot]

Sets the height of this cell's row in pixels. See the "heightInPixels" property for details.

See also:
heightInPixels()

void QicsCellCommon::setLabel ( const QString &  label  )  [slot, inherited]

Sets the label attribute of this cell. This string may be used by the cell displayer when rendering the contents of this cell. See the "label" property for details.

See also:
label()

void QicsCellCommon::setLeftBorderPen ( const QPen &  pen  )  [slot, inherited]

Sets the pen used to draw the left border of this cell. See the "leftBorderPen" property for details.

See also:
leftBorderPen()

void QicsCellCommon::setMargin ( int  margin  )  [slot, inherited]

Sets the margin of the cell (in pixels). See the "margin" property for details.

See also:
margin()

void QicsCell::setMaxHeightInChars ( int  height  )  [slot]

Sets the maximum height of this cell's row in character units (i.e. lines). See the "maxHeightInChars" property for details.

See also:
maxHeightInChars()

void QicsCell::setMaxHeightInPixels ( int  height  )  [slot]

Sets the maximum height of this cell's row in pixels. See the "maxHeightInPixels" property for details.

See also:
maxHeightInPixels()

void QicsCellCommon::setMaxLength ( int  len  )  [slot, inherited]

Sets the maximum length of the value in this cell. See the "maxLength" property for details.

See also:
maxLength()

void QicsCell::setMaxWidthInChars ( int  width  )  [slot]

Sets the maximum width of this cell's column in character units. See the "maxWidthInChars" property for details.

See also:
maxWidthInChars()

void QicsCell::setMaxWidthInPixels ( int  width  )  [slot]

Sets the maximum width of this cell's column in pixels. See the "maxWidthInPixels" property for details.

See also:
maxWidthInPixels()

void QicsCell::setMinHeightInChars ( int  height  )  [slot]

Sets the minimum height of this cell's row in character units (i.e. lines). See the "minHeightInChars" property for details.

See also:
minHeightInChars()

void QicsCell::setMinHeightInPixels ( int  height  )  [slot]

Sets the minimum height of this cell's row in pixels. See the "minHeightInPixels" property for details.

See also:
minHeightInPixels()

void QicsCell::setMinWidthInChars ( int  width  )  [slot]

Sets the minimum width of this cell's column in character units. See the "minWidthInChars" property for details.

See also:
minWidthInChars()

void QicsCell::setMinWidthInPixels ( int  width  )  [slot]

Sets the minimum width of this cell's column in pixels. See the "minWidthInPixels" property for details.

See also:
minWidthInPixels()

void QicsCellCommon::setPalette ( const QPalette &  pal  )  [slot, inherited]

Sets the palette attribute of the cell. See the "palette" property for details.

See also:
palette()

void QicsCellCommon::setPasteValidator ( QicsPasteValidator v  )  [slot, inherited]

Sets the paste validator object for this cell. See the "pasteValidator" property for details.

See also:
pasteValidator()

void QicsCellCommon::setPixmap ( const QString &  file_name  )  [slot, inherited]

Sets the cell's pixmap attribute from a file. See the "pixmap" property for details.

See also:
pixmap()

void QicsCellCommon::setPixmap ( const QPixmap &  p  )  [slot, inherited]

Sets the cell's pixmap attribute. See the "pixmap" property for details.

See also:
pixmap()

void QicsCellCommon::setPixmapSpacing ( int  sp  )  [slot, inherited]

Sets the cell's pixmap spacing. See the "pixmapSpacing" property for details.

See also:
pixmap()

void QicsCellCommon::setReadOnly ( bool  b  )  [slot, inherited]

Sets the read-only attribute of the cell. See the "readOnly" property for details.

See also:
readOnly()

void QicsCellCommon::setRightBorderPen ( const QPen &  pen  )  [slot, inherited]

Sets the pen used to draw the right border of this cell. See the "rightBorderPen" property for details.

See also:
rightBorderPen()

void QicsCell::setRowIndex ( int  idx  )  [slot]

Sets the the row index of this object to idx. See the "rowIndex" property for details.

See also:
rowIndex()

void QicsCellCommon::setSelectedBackgroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's selected background color. See the "selectedBackgroundColor" property for details.

See also:
selectedBackgroundColor()

void QicsCellCommon::setSelectedForegroundColor ( const QColor &  p  )  [slot, inherited]

Sets the cell's selected foreground color. See the "selectedForegroundColor" property for details.

See also:
selectedForegroundColor()

void QicsCellCommon::setTextFlags ( int  flags  )  [slot, inherited]

Sets the text flags attribute of the cell. See the "textFlags" property for details.

See also:
Qt::TextFlags

textFlags()

void QicsCellCommon::setToolTipText ( const QString &  txt  )  [slot, inherited]

Sets the tool tip attribute of this cell. This string will be displayed in a tooltip when the mouse is hovered over the cell. See the "toolTipText" property for details.

See also:
toolTip()

void QicsCellCommon::setTopBorderPen ( const QPen &  pen  )  [slot, inherited]

Sets the pen used to draw the top border of this cell. See the "topBorderPen" property for details.

See also:
topBorderPen()

void QicsCellCommon::setUserData ( void *  data  )  [slot, inherited]

Sets a user-supplied pointer for this cell. The table will not use or delete this pointer. It remains under the programmer's control.

void QicsCellCommon::setValidator ( QValidator *  v  )  [slot, inherited]

Sets the default cell validator object. This validator will be used when cells are edited. See the "validator" property for details.

See also:
validator()

void QicsCell::setWidthInChars ( int  width  )  [slot]

Sets the width of this cell's column in character units. See the "widthInChars" property for details.

See also:
widthInChars()

void QicsCell::setWidthInPixels ( int  width  )  [slot]

Sets the width of this cell's column in pixels. See the "widthInPixels" property for details.

See also:
widthInPixels()

QicsRegion QicsCell::spannedRegion ( void   )  [slot]

Returns spanned region.

See also:
addSpan()

removeSpan()

int QicsCellCommon::textFlags ( void   )  const [inherited]

Returns the text flags attribute of the cell. See the "textFlags" property for details.

See also:
Qt::TextFlags

setTextFlags()

QString QicsCellCommon::toolTipText ( void   )  const [inherited]

Returns the tool tip attribute of this cell. This string will be displayed in a tooltip when the mouse is hovered over the cell. See the "toolTipText" property for details.

See also:
setToolTipText()

QPen QicsCellCommon::topBorderPen ( void   )  const [inherited]

Returns the pen used to draw the top border of this cell. See the "topBorderPen" property for details.

See also:
setTopBorderPen()

void QicsCellCommon::unsetCursor ( void   )  [slot, inherited]

Unsets the cursor for this cell. See the "cursor" property for details.

See also:
cursor()

setCursor()

void* QicsCellCommon::userData ( void   )  const [inherited]

Returns a user-supplied pointer for this cell.

QValidator* QicsCellCommon::validator ( void   )  const [inherited]

Returns the default cell validator object. This validator will be used when cells are edited. See the "validator" property for details.

See also:
setValidator()

int QicsCell::widthInChars ( void   )  const

Returns the width of this cell's column in character units. See the "widthInChars" property for details.

See also:
setWidthInChars()

int QicsCell::widthInPixels ( void   )  const

Returns the width of this cell's column in pixels. See the "widthInPixels" property for details.

See also:
setWidthInPixels()


Member Data Documentation

int QicsCellCommon::alignment [inherited]

Specifies the alignment setting used when drawing the cell(s).

The default value of this property is Qt::AlignLeft.

See also:
Qt::Alignment

bool QicsCellCommon::autoRecognition [inherited]

Specifies the style of input data in cell. If set's true the QicsTable do recognizing of input data into cell (QicsDataInt, QicsDataString, QicsDataDate, QicsDataDateTime, QicsDataTime).

QColor QicsCellCommon::backgroundColor [inherited]

This is convenience property which specifies the background color of the cell(s) by changing palette property. This color will be used when the cell is not selected.

The default value of this property is the default background color of the QicsTable widget.

Note: Since setting property on row/column overrides cells property as well as setting table's property overrides rows/columns property, and background color is really part of palette property, setting background color on row/column will override any other color settings of cells in that row/column. For example, if you set the foreground on a cell, and then set the background on a row, the foreground of the cell will also be changed to default palette. To obtain desired behavior user should set colors in next sequence: 1. Set the table colors 2. Set the row/column colors 3. Set the cell colors

int QicsCellCommon::borderWidth [inherited]

Specifies the border width of the cell(s).

The default value of this property is 1.

QPen QicsCellCommon::bottomBorderPen [inherited]

Specifies the pen that will be used to draw the bottom border of the cell(s).

The default value of this property is the default QPen.

int QicsCell::columnIndex

Specifies the visual column index of this object. The visual index is the index of this object as it appears in the associated table. This value is not necessarily the correct index into the associated data model (columns may have been reordered). Use the "modelColumnIndex" property for the correct model index.

QCursor QicsCellCommon::cursor [inherited]

Specifies the cursor for the cell(s). This cursor will be displayed whenever the mouse pointer is within the cell.

The default value of this property is the null cursor, which means that the default cursor for the table widget will be displayed.

QColor QicsCellCommon::editBackgroundColor [inherited]

Specifies the edit background color of the cell(s). This color will be used when the cell is being edited.

The default value of this property is the default base color of the QicsTable widget.

QColor QicsCellCommon::editForegroundColor [inherited]

Specifies the edit foreground color of the cell(s). This color will be used when the cell is being edited.

The default value of this property is the default text color of the QicsTable widget.

bool QicsCellCommon::enabled [inherited]

Specifies the enabled attribute of the cell(s). If the value of this property is false, the cell cannot be traversed to.

The default value of this property is true.

QFont QicsCellCommon::font [inherited]

Specifies the font that will be used to draw text in the cell(s).

The default value of this property is the default font of the QicsTable widget.

QColor QicsCellCommon::foregroundColor [inherited]

This is convenience property which specifies the foreground color of the cell(s) by changing palette property. This color will be used when drawing any text in the cell(s) when it is not selected.

The default value of this property is the default foreground color of the QicsTable widget.

Note: Since setting property on row/column overrides cells property as well as setting table's property overrides rows/columns property, and foreground color is really part of palette property, setting foreground color on row/column will override any other color settings of cells in that row/column. For example, if you set the foreground on a cell, and then set the background on a row, the foreground of the cell will also be changed to default palette. To obtain desired behavior user should set colors in next sequence: 1. Set the table colors 2. Set the row/column colors 3. Set the cell colors

int QicsCell::heightInChars

Specifies the height of this cell's row in character units. This means that setting this value to 1 will change the height of this cell's row to be just large enough to display one line of text (plus the margin size and border width). If the height of this cell's row has been set in pixels, retrieving this property will return the equivalent height in character units based on the current font.

The default value of this property is dependent on the height of the default font.

int QicsCell::heightInPixels

Specifies the height of this cell's row in pixels. If the height of this cell's row has been set in character units, retrieving this property will return the equivalent height in pixels.

The default value of this property is dependent on the height of the default font.

QString QicsCellCommon::label [inherited]

Specifies the label of the cell(s). This string may be used by the cell displayer when rendering the contents of the cell(s).

The default value of this property is the null string.

QPen QicsCellCommon::leftBorderPen [inherited]

Specifies the pen that will be used to draw the left border of the cell(s).

The default value of this property is the default QPen.

int QicsCellCommon::margin [inherited]

Specifies the cell margin (in pixels). The margin is the area between the cell border and the body of the cell that is not used for information display. It will always be filled with the background color of the cell(s).

The default value of this property is 1.

int QicsCell::maxHeightInChars

Specifies the maximum height of this cell's row in character units.

int QicsCell::maxHeightInPixels

Specifies the maximum height of this cell's row in pixels. If the maximum height of this cell's row has been set in character units, retrieving this property will return the equivalent height in pixels.

The default value of this property is QicsLAST_ROW

int QicsCellCommon::maxLength [inherited]

Specifies the maximum length of the value in the cell(s).

The default value of this property is 32767.

int QicsCell::maxWidthInChars

Specifies the maximum width of this cell's column in character units.

int QicsCell::maxWidthInPixels

Specifies the maximum width of this cell's column in pixels. If the maximum width of this cell's column has been set in character units, retrieving this property will return the equivalent width in pixels.

The default value of this property is QicsLAST_COLUMN

int QicsCell::minHeightInChars

Specifies the minimum height of this cell's row in character units. This means that setting this value to 1 will change the minimum height of this cell's row to be just large enough to display one line of text (plus the margin size and border width). If the minimum height of this row has been set in pixels, retrieving this property will return the equivalent height in character units based on the current font.

The default value of this property is dependent on the height of the default font.

int QicsCell::minHeightInPixels

Specifies the minimum height of this cell's row in pixels. If the minimum height of this cell's row has been set in character units, retrieving this property will return the equivalent height in pixels.

The default value of this property is dependent on the height of the default font.

int QicsCell::minWidthInChars

Specifies the minimum width of this cell's column in character units. This means that setting this value to 10 will change the minimum width of this cell's column to be just large enough to display 10 characters of text (plus the margin size and border width). If the minimum width of this cell's column has been set in pixels, retrieving this property will return the equivalent width in character units based on the current font.

The default value of this property is dependent on the width of the default font.

int QicsCell::minWidthInPixels

Specifies the minimum width of this cell's column in pixels. If the minimum width of this cell's column has been set in character units, retrieving this property will return the equivalent width in pixels.

The default value of this property is dependent on the width of the default font.

int QicsCell::modelColumnIndex

Specifies the model column index of this object. The model index is the index of this object in the associated data model. This value is not necessarily the correct index into the current visual presentation of the table (columns may have been reordered). Use the "columnIndex" property for the correct visual index.

int QicsCell::modelRowIndex

Specifies the model row index of this object. The model index is the index of this object in the associated data model. This value is not necessarily the correct index into the current visual presentation of the table (rows may have been reordered). Use the "rowIndex" property for the correct visual index.

QPalette QicsCellCommon::palette [inherited]

Specifies the palette that will be used when drawing in the cell(s).

The default value of this property is the default palette of the QicsTable widget.

QPixmap QicsCellCommon::pixmap [inherited]

Specifies the pixmap to use when drawing the cell(s). If set, the pixmap is drawn in the cell. If the cell also has a value in the QicsDataModel, the pixmap will be drawn at the left of the cell, and the value will be drawn to the right of the pixmap. If the pixmap is a null pixmap, no pixmap will be shown.

The default value of this property is the null pixmap.

int QicsCellCommon::pixmapSpacing [inherited]

Specifies the number of pixels between the pixmap and the text in the cell(s).

The default value of this property is 6.

bool QicsCellCommon::readOnly [inherited]

Specifies if the cell(s) is/are not allowed to be modified.

The default value of this property is false.

QPen QicsCellCommon::rightBorderPen [inherited]

Specifies the pen that will be used to draw the right border of the cell(s).

The default value of this property is the default QPen.

int QicsCell::rowIndex

Specifies the visual row index of this object. The visual index is the index of this object as it appears in the associated table. This value is not necessarily the correct index into the associated data model (rows may have been reordered). Use the "modelRowIndex" property for the correct model index.

bool QicsCellCommon::selected [inherited]

Specifies the current selection state of this cell/row/column.

The default value of this property is false.

QColor QicsCellCommon::selectedBackgroundColor [inherited]

This is convenience property which specifies the selected background color of the cell(s) by changing palette property. This color will be used when the cell is selected.

The default value of this property is the default selectedBackground color of the QicsTable widget.

Note: Since setting property on row/column overrides cells property as well as setting table's property overrides rows/columns property, and selected background color is really part of palette property, setting selected background color on row/column will override any other color settings of cells in that row/column. For example, if you set the foreground on a cell, and then set the background on a row, the foreground of the cell will also be changed to default palette. To obtain desired behavior user should set colors in next sequence: 1. Set the table colors 2. Set the row/column colors 3. Set the cell colors

QColor QicsCellCommon::selectedForegroundColor [inherited]

This is convenience property which specifies the selected foreground color of the cell(s) by changing palette property. This color will be used when drawing any text in the cell when the cell is selected.

The default value of this property is the default selectedForeground color of the QicsTable widget.

Note: Since setting property on row/column overrides cells property as well as setting table's property overrides rows/columns property, and selected foreground color is really part of palette property, setting selected foreground color on row/column will override any other color settings of cells in that row/column. For example, if you set the foreground on a cell, and then set the background on a row, the foreground of the cell will also be changed to default palette. To obtain desired behavior user should set colors in next sequence: 1. Set the table colors 2. Set the row/column colors 3. Set the cell colors

int QicsCellCommon::textFlags [inherited]

Specifies the text flag setting used when drawing the cell(s). The Qt::DontClip modifier will be ignored. The default value of this property is 0.

See also:
Qt::TextFlags

QString QicsCellCommon::toolTipText [inherited]

Specifies text to be shown as a tool tip when the mouse pointer is hovered over the cell(s).

The default value of this property is the null string, which will cause no tool tip to be displayed.

QPen QicsCellCommon::topBorderPen [inherited]

Specifies the pen that will be used to draw the top border of the cell(s).

The default value of this property is the default QPen.

int QicsCell::widthInChars

Specifies the width of this cell's column in character units. This means that setting this value to 10 will change the width of this cell's column to be just large enough to display 10 characters of text (plus the margin size and border width). If the width of this cell's column has been set in pixels , retrieving this property will return the equivalent width in character units based on the current font.

The default value of this property is dependent on the width of the default font.

int QicsCell::widthInPixels

Specifies the width of this cell's column in pixels. If the width of this cell's column has been set in character units, retrieving this property will return the equivalent width in pixels.

The default value of this property is dependent on the width of the default font.


Property Documentation

bool QicsCellCommon::canAcceptDrops [inherited]

Specifies how cell object react on reciving drag-data. By default all cell's of QicsTable hase allow to use Drag'n'Drop feature.

QicsPasteValidator QicsCellCommon::pasteValidator [read, write, inherited]

Specifies validator object that will be used for cell input validation. This validator will be used when data pasted in cell/cells(through drag&drop or QicsTable::paste() method).

QValidator QicsCellCommon::validator [read, write, inherited]

Specifies validator object that will be used for cell input validation This validator will be used when this cell is edited.


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.