ICS

QicsTable Documentation Set

QicsTable Class Reference

A full-featured table widget supporting a Model-View-Controller architecture. More...

#include <QicsTable.h>

Inherits QFrame, and Qics.

List of all members.

Table Properties

int topRow
int defaultColumnWidthInChars
int defaultColumnWidthInPixels
int defaultRowHeightInChars
int defaultRowHeightInPixels
int bottomRow
int leftColumn
int rightColumn
int visibleRows
int visibleColumns
bool topHeaderVisible
bool bottomHeaderVisible
bool leftHeaderVisible
bool rightHeaderVisible
int tableMargin
int tableSpacing
int gridSpacing
QicsSelectionPolicy selectionPolicy
QicsSelectCurrentCellPolicy selectCurrentCellPolicy
bool columnHeaderUsesModel
bool rowHeaderUsesModel
QicsRepaintBehavior repaintBehavior
QicsScrollBarMode hScrollBarMode
QicsScrollBarMode vScrollBarMode

Common Grid Properties

int frameLineWidth
int frameStyle
bool horizontalGridLinesVisible
bool verticalGridLinesVisible
QPen horizontalGridLinePen
QPen verticalGridLinePen
int horizontalGridLineWidth
int verticalGridLineWidth
QicsLineStyle horizontalGridLineStyle
QicsLineStyle verticalGridLineStyle
QicsCellOverflowBehavior cellOverflowBehavior
int maxOverflowCells
bool drawPartialCells
QicsGridCellClipping gridCellClipping
QicsCurrentCellStyle currentCellStyle
QicsSelectionStyle selectionStyle
int currentCellBorderWidth
bool clickToEdit
bool autoSelectCellContents
QicsTraversalKeyEditBehavior traversalKeyEditBehavior
Qt::Orientation enterTraversalDirection
Qt::Orientation tabTraversalDirection
bool tabTraverseToBegin
bool enterTraverseToBegin
QPixmap moreTextPixmap
bool dragEnabled
Qt::LayoutDirection layoutDirection

Common Cell Properties

QString label
bool readOnly
QColor foregroundColor
QColor backgroundColor
QColor selectedForegroundColor
QColor selectedBackgroundColor
QColor editForegroundColor
QColor editBackgroundColor
QPixmap pixmap
int pixmapSpacing
int alignment
int textFlags
int maxLength
int margin
QPen topBorderPen
QPen leftBorderPen
QPen rightBorderPen
QPen bottomBorderPen
bool ignoreModelSizeChanges
bool allowPropagateChanges
QString globalXmlConfiguration
QicsIndexType fakeCellsDrawingIndex

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 Slots

void setMargin (int margin)
void setReadOnly (bool b)
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 setTextFlags (int flags)
void setValidator (QValidator *v)
void setPasteValidator (QicsPasteValidator *v)
void setLabel (const QString &label)
void setMaxLength (int len)
void setBorderPen (const QPen &pen)
void setTopBorderPen (const QPen &pen)
void setLeftBorderPen (const QPen &pen)
void setRightBorderPen (const QPen &pen)
void setBottomBorderPen (const QPen &pen)
virtual void setViewport (const QicsRegion &vp)
void removeCellSpan (int start_row, int start_col, bool visual=true)
void setHorizontalGridLinesVisible (bool b)
void setVerticalGridLinesVisible (bool b)
void setHorizontalGridLineWidth (int w)
void setVerticalGridLineWidth (int w)
void setHorizontalGridLineStyle (QicsLineStyle style)
void setVerticalGridLineStyle (QicsLineStyle style)
void setHorizontalGridLinePen (const QPen &pen)
void setVerticalGridLinePen (const QPen &pen)
void setDrawPartialCells (bool b)
void setGridCellClipping (QicsGridCellClipping c)
void setCellOverflowBehavior (QicsCellOverflowBehavior b)
void setMaxOverflowCells (int num)
void setFrameStyle (int style)
void setFrameLineWidth (int lw)
void setCurrentCellStyle (QicsCurrentCellStyle s)
void setSelectionStyle (QicsSelectionStyle s)
void setCurrentCellBorderWidth (int w)
void setClickToEdit (bool b)
void setAutoSelectCellContents (bool b)
void setTraversalKeyEditBehavior (QicsTraversalKeyEditBehavior beh)
void setEnterTraversalDirection (Qt::Orientation dir)
void setTabTraversalDirection (Qt::Orientation dir)
void setTabTraverseToBegin (bool traverse)
void setEnterTraverseToBegin (bool traverse)
void setMoreTextPixmap (const QPixmap &pix)
void setDragEnabled (bool b)
void setLayoutDirection (Qt::LayoutDirection layoutDirection)
void setTopHeaderVisible (bool)
void setBottomHeaderVisible (bool)
void setLeftHeaderVisible (bool)
void setRightHeaderVisible (bool)
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 setAllowPropagateChanges (bool b)
void setTopTitleWidget (QWidget *w)
void setBottomTitleWidget (QWidget *w)
void setLeftTitleWidget (QWidget *w)
void setRightTitleWidget (QWidget *w)
void setTopLeftCornerWidget (QWidget *w)
void setTopRightCornerWidget (QWidget *w)
void setBottomLeftCornerWidget (QWidget *w)
void setBottomRightCornerWidget (QWidget *w)
void setDefaultImagePath (const QString &path)
const QString & defaultImagePath () const
void setCurrentCell (int row, int col)
void scroll (QicsScrollDirection dir, int num)
void freezeTopRows (int num_rows)
void freezeBottomRows (int num_rows)
void unfreezeTopRows (void)
void unfreezeBottomRows (void)
void freezeLeftColumns (int num_cols)
void freezeRightColumns (int num_cols)
void unfreezeLeftColumns (void)
void unfreezeRightColumns (void)
int numFreezeTopRows (void) const
int numFreezeBottomRows (void) const
int numFreezeRightColumns (void) const
int numFreezeLeftColumns (void) const
void toggleRowHeightExpansion (int row)
void toggleColumnWidthExpansion (int col)
void setTopRow (int row)
void setLeftColumn (int col)
void setRepaintBehavior (QicsRepaintBehavior r)
void setVisibleRows (int num)
void setVisibleColumns (int num)
bool traverseToCell (int row, int col)
void traverseToBeginningOfTable (void)
void traverseToEndOfTable (void)
void traverseToBeginningOfRow (void)
void traverseToEndOfRow (void)
void traverseToBeginningOfColumn (void)
void traverseToEndOfColumn (void)
void traverseLeft (void)
void traverseRight (void)
void traverseUp (void)
void traverseDown (void)
void deleteColumn (int column)
void addColumns (int howMany)
void insertColumn (int column)
void deleteRow (int row)
void addRows (int rows)
void insertRow (int row)
virtual void print (QPrinter *printer)
virtual void print (QPrinter *printer, const QicsRegion &region)
void setClipboardDelegate (QicsAbstractClipboardDelegate *Delegate)
QicsAbstractClipboardDelegateclipboardDelegate ()
virtual void cut (void)
virtual void copy (void)
virtual void paste (void)
void setDefaultRowHeightInPixels (int height)
int defaultRowHeightInPixels () const
void setDefaultRowHeightInChars (int height)
int defaultRowHeightInChars () const
void setDefaultColumnWidthInPixels (int width)
int defaultColumnWidthInPixels () const
void setDefaultColumnWidthInChars (int width)
int defaultColumnWidthInChars () const
void setCellWidthMode (Qics::QicsCellWidthMode mode)
Qics::QicsCellWidthMode cellWidthMode () const
void setNavigatorAllowed (bool allow)
void repaint ()
void selectAll ()
void deleteSelected ()
void selectRow (int row, bool exclusive=true)
void selectColumn (int col, bool exclusive=true)

Signals

void pressed (int row, int col, int button, const QPoint &pos)
void clicked (int row, int col, int button, const QPoint &pos)
void doubleClicked (int row, int col, int button, const QPoint &pos)
void currentCellChanged (int new_row, int new_col)
void selectionListChanged (bool in_progress)
void valueChanged (int row, int col)
void rowSelected (int row, bool selected)
void columnSelected (int col, bool selected)
void rowResized (int row, int old_height, int new_height)
void columnResized (int col, int old_width, int new_width)
void rowHeaderResized (int old_width, int new_width)
void columnHeaderResized (int old_height, int new_height)
void cellEditStarted (int row, int col)
void cellEditEnded (int row, int col)
void rowsMoved (int target, const QVector< int > &rows)
void columnsMoved (int target, const QVector< int > &columns)
void fillHandlePressed (QMouseEvent *m, const QicsSelection *initialSel)
void fillHandleReleased (QMouseEvent *m, const QicsSelection *initialSel, const QicsSelection *currentSel)
void fillHandleDoubleClicked (QMouseEvent *m, const QicsSelection *initialSel)
void fillHandleDragged (QMouseEvent *m, const QicsSelection *initialSel, const QicsSelection *currentSel)
void layoutFailed (int orientation)

Public Member Functions

 QicsTable (QicsDataModel *model=0, QWidget *parent=0)
 QicsTable (QWidget *parent)
 QicsTable (QicsDataModel::Foundry rhdmf, QicsDataModel::Foundry chdmf, QicsTableGrid::Foundry tf, QicsHeaderGrid::Foundry hf, QicsDataModel *model=0, QWidget *parent=0)
 QicsTable (void *key, QicsDataModel::FoundryWithKey rhdmf_wk, QicsDataModel::FoundryWithKey chdmf_wk, QicsTableGrid::FoundryWithKey tf_wk, QicsHeaderGrid::FoundryWithKey hf_wk, QicsDataModel *model=0, QWidget *parent=0)
virtual ~QicsTable ()
virtual 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
void clearTable (void)
QicsSelectionListselectionList (bool nocopy=false) const
QicsSelectionListselectionActionList (void) const
void setSelectionList (QicsSelectionList &sel_list)
void clearSelectionList (void)
void addSelection (QicsSelection &selection)
int margin (void) const
bool readOnly (void) const
QColor foregroundColor (void) const
QColor backgroundColor (void) const
QColor selectedForegroundColor (void) const
QColor selectedBackgroundColor (void) const
QColor editForegroundColor (void) const
QColor editBackgroundColor (void) const
QPixmap pixmap (void) const
int pixmapSpacing (void) const
QicsCellDisplaydisplayer (void) const
QicsDataItemFormatterformatter (void) const
int alignment (void) const
int textFlags (void) const
QValidator * validator (void) const
QicsPasteValidatorpasteValidator (void) const
QString label (void) const
int maxLength (void) const
QPen topBorderPen (void) const
QPen leftBorderPen (void) const
QPen rightBorderPen (void) const
QPen bottomBorderPen (void) const
virtual QicsRegion viewport (void) const
virtual QicsRegion mainGridViewport (void) const
virtual QicsRegion currentViewport (void) const
bool addCellSpan (QicsSpan span, bool visual=true)
QicsSpanList * cellSpanList (void)
bool horizontalGridLinesVisible (void) const
bool verticalGridLinesVisible (void) const
int horizontalGridLineWidth (void) const
int verticalGridLineWidth (void) const
QicsLineStyle horizontalGridLineStyle (void) const
QicsLineStyle verticalGridLineStyle (void) const
QPen horizontalGridLinePen (void) const
QPen verticalGridLinePen (void) const
bool drawPartialCells () const
QicsGridCellClipping gridCellClipping () const
QicsCellOverflowBehavior cellOverflowBehavior (void) const
int maxOverflowCells (void) const
int frameLineWidth (void) const
int frameStyle (void) const
QicsCurrentCellStyle currentCellStyle (void) const
QicsSelectionStyle selectionStyle (void) const
int currentCellBorderWidth (void) const
bool clickToEdit (void) const
bool autoSelectCellContents (void) const
QicsTraversalKeyEditBehavior traversalKeyEditBehavior (void) const
Qt::Orientation enterTraversalDirection (void) const
Qt::Orientation tabTraversalDirection (void) const
QicsKeyboardManager::Action keyAction (const QicsKeyCombination &combo)
void setKeyAction (const QicsKeyCombination &combo, QicsKeyboardManager::Action action)
bool tabTraverseToBegin () const
bool enterTraverseToBegin () const
QPixmap moreTextPixmap (void) const
bool dragEnabled (void) const
Qt::LayoutDirection layoutDirection (void) const
bool topHeaderVisible (void) const
bool bottomHeaderVisible (void) const
bool leftHeaderVisible (void) const
bool rightHeaderVisible (void) const
int tableMargin (void) const
int tableSpacing (void) const
int gridSpacing (void) const
bool ignoreModelSizeChanges (void) const
bool allowPropagateChanges (void) const
QicsSelectionPolicy selectionPolicy (void) const
void setSelectionPolicy (QicsSelectionPolicy policy)
QicsSelectCurrentCellPolicy selectCurrentCellPolicy (void) const
void setSelectCurrentCellPolicy (QicsSelectCurrentCellPolicy policy)
int exclusiveSelectionBorderWidth () const
void setExclusiveSelectionBorderWidth (int w)
QColor exclusiveSelectionBorderColor () const
void setExclusiveSelectionBorderColor (const QColor &c)
QColor exclusiveSelectionHandleColor () const
void setExclusiveSelectionHandleColor (const QColor &c)
QColor exclusiveSelectionHandleBackColor () const
void setExclusiveSelectionHandleBackColor (const QColor &c)
QColor exclusiveSelectionDragBackColor () const
void setExclusiveSelectionDragBackColor (const QColor &c)
QPen exclusiveSelectionDragPen () const
void setExclusiveSelectionDragPen (const QPen &p)
float exclusiveSelectionDragOpacity () const
void setExclusiveSelectionDragOpacity (float op)
QicsRubberBand::DrawingMode exclusiveSelectionDragMode () const
void setExclusiveSelectionDragMode (QicsRubberBand::DrawingMode mode)
void setFakeCellsDrawingIndex (Qics::QicsIndexType type)
QicsRepaintBehavior repaintBehavior (void) const
QicsScrollBarMode hScrollBarMode (void) const
QicsScrollBarMode vScrollBarMode (void) const
void setHScrollBarMode (QicsScrollBarMode m)
void setVScrollBarMode (QicsScrollBarMode m)
void setAutoFitMode (Qics::QicsAutoFitMode mode)
Qics::QicsAutoFitMode autoFitMode () const
const QVector< int > & currentRowOrder () const
void setRowOrder (const QVector< int > &order)
const QVector< int > & currentColumnOrder () const
void setColumnOrder (const QVector< int > &order)
void sortRows (int column, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void sortColumns (int row, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void sortRows (const QVector< int > &columns, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void sortColumns (const QVector< int > &rows, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void setSortingSensitivity (Qt::CaseSensitivity cs)
void moveRows (int target_row, const QVector< int > &rows)
void moveColumns (int target_col, const QVector< int > &cols)
bool rowHeaderUsesModel (void) const
bool columnHeaderUsesModel (void) const
int topRow (void) const
int bottomRow (void) const
int leftColumn (void) const
int rightColumn (void) const
int visibleRows (void) const
int visibleColumns (void) const
int fullyVisibleBottomRow (void) const
int fullyVisibleRightColumn (void) const
QicsCellcurrentCell (void) const
bool editCurrentCell (void)
void uneditCurrentCell (void)
bool editCell (int row, int col)
int lastRowWithData () const
int lastColumnWithData () const
int firstRowWithData () const
int firstColumnWithData () const
QicsRegion dataRegion () const
QicsRegion selectedRegion () const
bool isNavigatorAllowed () const
QicsNavigator * navigator () const
void setWideKeyAction (QicsWideKeyAction action, bool on=true)
bool isWideKeyAction (QicsWideKeyAction action) const
void setWideKeyActions (bool on=true)
void setCopyPolicy (int policy)
int copyPolicy () const
void setClearPolicy (int policy)
int clearPolicy () const
void setHeaderDragStyle (const QicsHeaderDragStyle &style)
QicsHeaderDragStyle headerDragStyle () const
QAbstractSlider * horizontalScrollBar (void) const
void setHorizontalScrollBar (QicsScroller *newScroller)
void setVerticalScrollBar (QicsScroller *newScroller)
QAbstractSlider * verticalScrollBar (void) const
QWidget * topTitleWidget (void) const
QWidget * bottomTitleWidget (void) const
QWidget * leftTitleWidget (void) const
QWidget * rightTitleWidget (void) const
QWidget * topLeftCornerWidget (void) const
QWidget * topRightCornerWidget (void) const
QWidget * bottomLeftCornerWidget (void) const
QWidget * bottomRightCornerWidget (void) const
QicsGridGeometrygridGeometry ()
int rowHeaderHeight ()
int columnHeaderWidth ()
QicsAbstractFilterDelegaterowFilter (int column) const
void setRowFilter (int column, QicsAbstractFilterDelegate *filter, bool deleteOld=false)
void removeRowFilter (int column, bool deleteOld=false)
void removeAllRowFilters ()
bool isRowFiltered (int row) const
bool hasRowFilter (int column) const
QStringList uniqueKeysForColumn (int column, bool noEmpty=true) const
void setColumnsSortingMode (Qics::QicsSortMode mode)
Qics::QicsSortMode columnsSortingMode (void)
void setRowsSortingMode (Qics::QicsSortMode mode)
Qics::QicsSortMode rowsSortingMode (void)
bool setMouseButton (Qt::MouseButton, Qt::Modifier, Qt::MouseButton)
void registerDisplayFactory (const QString &name, QicsCellDisplayFactory *factory)
QStringList registeredCellDisplays ()
QicsCellDisplaycreateCellDisplay (const QString &name)
QicsCellDisplayConfigurationWidget * createCellDisplayConfigurationWidget (const QString &name)
Qics::QicsIndexType fakeCellsDrawingIndex (void) const
const QicsSelectioncurrentSelection ()
QicsCellRegioncellRegionRef (const QicsRegion &region)
QicsCellRegioncellRegionRef (int begin_row, int begin_col, int end_row, int end_col)
QicsCellRegioncellRegion (const QicsRegion &region)
QicsCellRegioncellRegion (int begin_row, int begin_col, int end_row, int end_col)
void setExternalAttributeController (QicsAbstractAttributeController &mac)
void setExternalAttributeControllers (QicsAbstractAttributeController *macGrid, QicsAbstractAttributeController *macRowHeader, QicsAbstractAttributeController *macColumnHeader)
QicsAbstractAttributeControllergridAttributeController () const
QicsAbstractAttributeControllerrowHeaderAttributeController () const
QicsAbstractAttributeControllercolumnHeaderAttributeController () const
void removeExternalAttributeController ()
void configureFromXml (const QString &xmlString)
bool configureFromXmlFile (const QString &fileName)
QString configurationToXml ()
void configureFromDomXml (const QDomElement &e)
QDomElement configurationToDomXml (QDomDocument *doc)
void setCursor (const QCursor &)

Static Public Attributes

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

Protected Slots

void revertRepaintBehavior (void)
void handleHeaderDoubleClick (int idx, int button, QicsHeaderType type)
void handleGridPress (int row, int col, int button, const QPoint &pos)
void handleGridClick (int row, int col, int button, const QPoint &pos)
void handleGridDoubleClick (int row, int col, int button, const QPoint &pos)
void modelToVisualValueChanged (int row, int col)
void handleCurrentCellChange (int row, int col)
void resizeHeader (int, QicsHeaderType)
void configureFrozen (void)
void checkFrozenRegCorner (int FrozenColumns, int FrozenRows, QicsTableGrid *&GRID, int GRID_IDX1, int GRID_IDX2, QicsGridGeometry::TableRegion region)
void checkFrozenRegMiddle_T (int FrozenRows, QicsHeaderGrid *&HEADER, bool HeaderVisible, Qics::QicsHeaderType hederType, int IDX1, int IDX2, int Align, QicsGridGeometry::HeaderPosition position)
void checkFrozenRegMiddle_M (int FrozenRows, QicsTableGrid *&GRID, int IDX1, int IDX2, QicsGridGeometry::TableRegion region, bool control)
void configResizeConnects (QicsHeaderGrid *&HEADER, QicsTableGrid *&GRID1, QicsTableGrid *&GRID2, QicsTableGrid *&GRID3)
void confConn (bool Visible, QicsHeaderGrid *&HEADER, Qics::QicsHeaderType hederType, int IDX1, int IDX2, int Align, QicsGridGeometry::HeaderPosition position, bool control)
void constrainFrozen (int FrozenRows, int IDX, bool vr, bool vr2)
void constrainFrozen_H (int FrozenRows, int IDX, bool vr, bool vr2)
void configureFrozen (Qics::QicsIndexType indexType, int startIndex, int endIndex)
void focusNextPrevGrid (const QicsScreenGrid *, bool next)
QDomElement propertiesToDomXml (QDomDocument *doc) const
void propertiesFromDomXml (const QDomElement &e, QicsTable *table)
void showNavigator ()
void navigate (const QRect &rect)
void handleWideKeyPressed (QKeyEvent *event)
void handleFillHandleEvent (QicsFillHandleEventType type, QMouseEvent *event, const QicsSelection *initialSel, const QicsSelection *currentSel)
void handleSelectionListChanged (bool progress)

Protected Member Functions

void init (QicsDataModel *model, QicsDataModel::Foundry rhdmf, QicsDataModel::Foundry chdmf, QicsDataModel::FoundryWithKey rhdmf_wk, QicsDataModel::FoundryWithKey chdmf_wk, QicsTableGrid::Foundry tf, QicsHeaderGrid::Foundry hf, QicsTableGrid::FoundryWithKey tf_wk, QicsHeaderGrid::FoundryWithKey hf_wk, void *key)
virtual void initDataModels (QicsDataModel *dm)
virtual void initObjects (void)
virtual void initGridInfoObjects (void)
QicsGridInfogridInfo (void) const
QicsGridInforhGridInfo (void) const
QicsGridInfochGridInfo (void) const
QicsStyleManager * styleManager (void) const
QicsStyleManager * rhStyleManager (void) const
QicsStyleManager * chStyleManager (void) const
void setStyleManager (QicsStyleManager *sm)
void setRHStyleManager (QicsStyleManager *sm)
void setCHStyleManager (QicsStyleManager *sm)
QicsDimensionManager * dimensionManager (void) const
QicsDimensionManager * rhDimensionManager (void) const
QicsDimensionManager * chDimensionManager (void) const
void setDimensionManager (QicsDimensionManager *sm)
void setRHDimensionManager (QicsDimensionManager *sm)
void setCHDimensionManager (QicsDimensionManager *sm)
virtual bool event (QEvent *event)
virtual bool eventFilter (QObject *, QEvent *)
void connectGrid (QicsTableGrid *grid, QicsHeaderGrid *header)
virtual void setMainGridViewport (const QicsRegion &vp)
void initDisplay (void)
QicsTableGridcreateGrid (int grid_row, int grid_col)
QicsHeaderGridcreateHeader (QicsHeaderType type, int grid_row, int grid_col, int alignment=0)
void registerBuiltInCellDisplays ()
void checkLayoutOverlap (void)

Protected Attributes

QPointer< QicsTableCommonmyTableCommon
QPointer< QicsSelectionManagermySelectionManager
QPointer< QicsGridLayout > myGridLayout
QPointer< QicsScrollManager > myScrollManager
QPointer< QicsScrollermyRowScroller
QicsNavigator * myNavButton
QPointer< QicsScrollermyColumnScroller
QicsHeaderGrid::Foundry myHeaderGridFoundry
QicsTableGrid::Foundry myTableGridFoundry
QicsHeaderGrid::FoundryWithKey myHeaderGridFoundryWK
QicsTableGrid::FoundryWithKey myTableGridFoundryWK
QicsDataModel::Foundry myRowHeaderDMFoundry
QicsDataModel::Foundry myColumnHeaderDMFoundry
QicsDataModel::FoundryWithKey myRowHeaderDMFoundryWK
QicsDataModel::FoundryWithKey myColumnHeaderDMFoundryWK
QicsTableGridmyGrids [3][3]
QicsHeaderGridmyHHeaders [2][3]
QicsHeaderGridmyVHeaders [3][2]
int myNumTopFrozenRows
int myNumBottomFrozenRows
int myNumLeftFrozenColumns
int myNumRightFrozenColumns
QWidget * myTopTitleWidget
QWidget * myBottomTitleWidget
QWidget * myLeftTitleWidget
QWidget * myRightTitleWidget
QWidget * myTopLeftCornerWidget
QWidget * myTopRightCornerWidget
QWidget * myBottomLeftCornerWidget
QWidget * myBottomRightCornerWidget
QicsRegion myFullViewport
QicsCellDisplaymyDefaultCellDisplayer
QMap< QString,
QicsCellDisplayFactory * > 
displayFactories
QList< QicsCellDisplay * > createdDisplays
void * myFoundryKey
QicsCellmyCurrentCell
bool myUnfreezingFlag
QicsGridGeometry myGridGeometry
QicsKeyboardManager myKeyboardManager
bool myNavAllowed
QicsCellRegionmyCellRegion
QSet< QicsWideKeyActionmyWideKeys
QicsAbstractClipboardDelegatemyClipboardDelegate
Qics::QicsAutoFitMode m_autoFitMode

Friends

class QicsCell
class QicsRow
class QicsColumn
class QicsRepeatingRow
class QicsRepeatingColumn
class QicsMainGrid
class QicsRowHeader
class QicsColumnHeader
class QicsTablePrint


Detailed Description

A full-featured table widget supporting a Model-View-Controller architecture.

QicsTable is a full-featured, high-performance table widget suited for use in industrial-strength applications. It incorporates a model-view-controller architecture, so that multiple table widgets can display the same data.

Please see QicsTable Architectural Overview for an overview of the table's design.

The table consists of a main grid, two optional row headers (left and right) and two optional column headers (top and bottom). There are spaces for four optional title widgets, one on each side of the table. Four "corner widgets" are also supported, one in each corner of the table. There are optional scrollbars on the right and bottom of the table to support table scrolling.

The table supports frozen rows and columns, where a programmer-specified number of rows and/or columns can be "frozen" at the top/bottom/left/right of the table. These frozen rows and columns do not move when the table is scrolled.

The table supports intra-table and inter-table drag and drop, as well as cut and paste. Also there are global keyboard actions available.

The table has three types of attributes:

Also, table provides high-performance and convenient methods for setting Region Attributes of a region of cells in the grid.

Cell attributes can be also controlled externally using External Attribute Controllers.

Content of the table can be sorted and filtered. Also, it can be grouped into tree-like structure; see QicsTreeTable class.

The QicsTable widget has extensive printing capabilities, including the ability to print the table with different visual characteristics than the on-screen table display. A powerful Print Preview Framework provides easy-to-use WYSIWYG printing . Also, the content of the table can be exported to the external file.

Data Model

QicsTable uses the data model interface that is defined in QicsDataModel. The programmer should begin by creating a data model by instantiating one of the subclasses of QicsDataModel, and then filling the data model with QicsDataItem objects.

QicsDataModel *data_model = new QicsDataModelDefault(100, 100);

for(int row = 0; row < 100; ++row)
{
    for(int col = 0; col < 100; ++col)
    {
        QString str("R%1C%2").arg(row)
                             .arg(col);
        data_model->setItem(row, col,  QicsDataString(str));
    }
}

QicsTable also supports native Qt models via corresponding wrappers.

Creating the Table Widget

The table widget is created by passing a data model pointer (and other optional arguments) to the QicsTable constructor.

QicsTable *table = new QicsTable(data_model, this);

If the data model argument is 0, no cells will be displayed.

An alternate QicsTable constructor allows you to use customized grids and/or row/column header data model objects in the table. Foundry methods are passed into the table's constructor, which uses the methods to create the grids and data models.

QicsTable *table = new QicsTable(MyCustomDataModel::create, // row header data model
                                 MyCustomDataModel::create, // column header data model
                                 MyCustomTableGrid::create,
                                 MyCustomHeaderGrid::create,
                                 data_model,
                                 parent);

For more information on creating custom data models, see Extending the QicsTable Data Model.

For more information on creating custom grids, see Customizing Grid Keyboard and Mouse Event Behavior.

Setting Table Attributes

The table widget has many attributes that control its behavior.

The table has a viewport(), which limits the displayable cells in the table to a subset of the data in the model. To specifiy the number of rows and columns that are displayed on the screen, use setVisibleRows() and setVisibleColumns(). These methods will cause the table to set a preferred size that will be large enough to display that many items. To control the part of the data model that is currently displayed, use setTopRow() and setLeftColumn().

You can temporarily stop the QicsTable and all of its grids and headers from resizing and/or redrawing by calling setRepaintBehavior(). This is especially useful if you are making a number of attribute changes at once.

Header visibility can be controlled by setTopHeaderVisible(), setBottomHeaderVisible(), setLeftHeaderVisible(), and setRightHeaderVisible().

Normally, the table displays row and column indices in the headers. If you wish to have the headers display data from the data model, use setRowHeaderUsesModel() and setColumnHeaderUsesModel().

The table has reserved areas that may be used to display arbitrary widgets. There are four title areas, one each at the top, bottom, left, and right edges of the table widget. Widgets can be placed in these areas by calling setTopTitleWidget(), setBottomTitleWidget(), setLeftTitleWidget(), and setRightTitleWidget(). In addition, there are four corner areas, at each corner of the table. Widgets can be placed in these areas by calling setTopLeftCornerWidget(), setTopRightCornerWidget(), setBottomLeftCornerWidget(), and setBottomRightCornerWidget().

QicsTable supports frozen rows and columns at all four edges of the table. These frozen rows and columns do not move when the table is scrolled. To freeze rows, first ensure that the rows you want to freeze are at the top (or bottom, if you want to freeze them at the bottom) of the table using moveRows(), then, call freezeTopRows() or freezeBottomRows(). To freeze columns, first ensure that the columns you want to freeze are at the left (or right, if you want to freeze them at the right) edge of the table using moveColumns(), then, call freezeLeftColumns(), or freezeRightColumns().

The table has optional scrollbars on the right (row scrolling) and the bottom (column scrolling) of the table. These scrollbars can be configured to always be shown, never be shown, or shown only when needed. See hScrollBarMode() and vScrollBarMode() for details.

Grid Attributes

There are a number of attributes that can be set on the main grid of the table, as well as the row and column header grids. It is important to remember that header grids and table grids are both derived from a common object, so they share many methods and attributes.

Some of the attributes that can be set on a grid are:

All grid types support cell spanning. Cell spanning is a way of specifying a region of the grid that should appear as one cell. The contents of the first (top and left) cell in the span is displayed in the entire spanned region. See addCellSpan() for details.

All grid types also support cell overflow. Cell overflow is a way of allowing cells that cannot fully display their contents in the cell's normal area. By default, the text is simply clipped and a symbol is displayed indicating that the text was clipped (see moreTextPixmap()). Using setCellOverflowBehavior(), cells may overflow into adjacent cells if those cells are empty. A maximum number of overflowed cells can be set using setMaxOverflowCells(). Also, using setCellOverflowBehavior(), cells can display a tooltip containing the full contents of the cell when the mouse pointer is hovered over the cell.

Cell Attributes

Cell attributes are retrieved and set by using the QicsCell class. This is a flyweight object that represents a single cell in the table. There are two different ways that a programmer can use a QicsCell object. If the programmer's intent is simply to call one or two cell methods, it is usually best to use the cellRef() method of QicsTable. This method returns a reference to a QicsCell that cannot be assigned to a variable. Rather, the programmer should call the method directly from the reference.

table->cellRef(5,4).setMargin(2);

This way of using QicsCell has the advantage of being very fast and convenient.

If the intent is to use the cell object many times, or if you intend to connect a signal to one of QicsCell's slots, you should create a new QicsCell object. This object is persistent, and will continue to be valid until it is destroyed or the table itself is destroyed.

// you can create a cell object this way...
QicsCell *cell = table->cell(5,4);

// ...or, you can do it this way
QicsCell *cell = new QicsCell(5,4, table);

When a new, persistent QicsCell object is created, the programmer must specify whether the cell object should always refer to the same visual location in the table (even if the data model has been modified or the table has been sorted), or whether the cell should always refer to the model cell that is currently in the location that the cell was created with. This is done by specifying the follow_model flag when creating the cell. The default for this flag is true, which means that the cell object will always follow the model.

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.

Data from the data model is displayed in table cells. Generally, one value in the model is displayed in a single cell in the table, although cell spanning and cell overflowing can change this. Each cell has associated with it a cell display object. A cell display object, whose interface is defined in the QicsCellDisplay class, handles all aspects of the display and editing of a cell. The default cell display object used in the table is QicsTextCellDisplay. This object displays text and/or pixmaps in cells. Other cell display objects currently available are QicsCheckCellDisplay (check boxes), QicsComboCellDisplay (combo boxes), and QicsWidgetCellDisplay (any widget). Cell display objects can be set on a cell, row, column, or grid-wide basis.

Some of the attributes that can be set on a cell are:

Region Attributes

Region attributes can be set by using the QicsCellRegion class. These is flyweight object that represents a rectangular region of cells in the table and headers. Its methods are optimized for high performance and convenience.

An older style to set, say, background color of cells in region (4,10)-(100,200) was to iterate over all the cells and explicitly call QicsCell::setBackgroundColor() every time, similar like:

table->setRepaintBehavior(Qics::RepaintOff);

QicsRegion r(4,10,100,200);
QColor color(Qt::yellow);

for(int i = r.startColumn(); i <= r.endColumn();i++)
    for(int j = r.startRow(); j <= r.endRow();j++)
        table->cellRef(j,i).setBackgroundColor(color);

table->setRepaintBehavior(Qics::RepaintOn);

A new approach is to obtain QicsCellRegion object from the table and use its QicsCellRegion::setBackgroundColor() method:

table->cellRegionRef(4,10,100,200).setBackgroundColor(Qt::yellow);

It is simpler, shorter and much more faster than iteration in previous example. Also, you do not need to control repaint behavior anymore as region methods do this automatically.

Another example is drawing of a visual box around a region of cells, like this done in popular spreadsheets. Older style forces you to obtain four regions from a desired one - top, bottom, left and right - and perform iterations on each of them to setup appropriate border pen. Now, QicsCellRegion introduces QicsCellRegion::setBoxPen() which allows to automatically performs all the necessary calculations and calls.

table->cellRegionRef(4,10,100,200).setBoxPen(QPen(Qt::black), QicsBoxBorders::All);

Here, all the four borders around the region will be set with given pen in one call.

Rows and Columns

Row and column attributes are retrieved and set by using the QicsRow and QicsColumn classes. These are flyweight objects that represent a single row or column in the table. There are two different ways that a programmer can use a QicsRow or QicsColumn object. If the programmer's intent is simply to call one or two row/column methods, it is usually best to use the rowRef() and columnRef() methods of QicsTable. These methods return a reference to a QicsRow or QicsColumn object that cannot be assigned to a variable. Rather, the programmer should call the method directly from the reference.

table->rowRef(5).setMargin(2);

This way of using QicsRow and QicsColumn has the advantage of being very fast and convenient.

If the intent is to use the row or column object many times, or if you intend to connect a signal to one of the object's slots, you should create a new QicsRow or QicsColumn object. This object is persistent, and will continue to be valid until it is destroyed or the table itself is destroyed.

// you can create a column object this way...
QicsColumn *col = table->column(4);

// ...or, you can do it this way
QicsColumn *col = new QicsColumn(4, table);

When a new, persistent QicsRow or QicsColumn object is created, the programmer must specify whether the object should always refer to the same visual location in the table (even if the data model has been modified or the table has been sorted), or whether the cell should always refer to the model row or column that is currently in the location that the object was created with. This is done by specifying the follow_model flag when creating the row or column. The default for this flag is true, which means that the row or column object will always follow the model.

Any attribute settings that are made while using a row or column object that follows the model are considered to be model attribute settings. These settings will always pertain to this model row or column, even if rows and columns are reordered. Attribute settings that are made while using a row or column object that does not follow the model are considered to be visual attribute settings. These settings will always pertain to the visual row or column, regardless of the current row and column ordering of the table.

It is important to note that any attribute that can be set on an individual cell can also be set on a row or a column. Setting the attribute on an entire row or column will override any previous settings to all cells in the row or column.

Row heights and column widths can be set in pixel dimensions or in character/font dimensions. See QicsRow and QicsColumn for details.

Because the table is a really a view of a data model, rows and columns can be moved, hidden, and sorted in the table without affecting the underlying data. See QicsRow and QicsColumn for details.

By default, when the table grows or shrinks in size, the table adjusts the number of visible rows and/or columns to fit the new size. If you would rather have the number of visible rows and columns remain fixed and instead adjust the size of some or all of the rows and columns to fit the new table size, you can set these rows and columns to be stretchable. When the table's width changes, the widths of any stretchable columns that are currently visible in the table are modified to account for the change in width. All stretchable and visible columns have the same "priority", so the extra (or lost) width is spread evenly among the stretchable columns. (This is also true of a change in height affecting all stretchable and visible rows.) See QicsRow and QicsColumn for more details.

Repeating Rows and Columns

QicsRepeatingRow and QicsRepeatingColumn are specialized flyweight objects that represent a repeating sequence of row and column settings. These objects are very similar to QicsRow and QicsColumn, except that they have a starting index and an interval, which specifies how often the settings should repeat. Attribute settings using repeating row and column objects are always considered visual attribute settings. These settings will always pertain to visual rows or columns, regardless of the current row and column ordering of the table.

There are two different ways that a programmer can use a QicsRepeatingRow or QicsRepeatingColumn object. If the programmer's intent is simply to call one or two row/column methods, it is usually best to use the repeatingRowRef() and repeatingColumnRef() methods of QicsTable. These methods return a reference to a QicsRepeatingRow or QicsRepeatingColumn object that cannot be assigned to a variable. Rather, the programmer should call the method directly from the reference.

// Sets every other row's background color to yellow.
table->repeatingRowRef(0, 2).setBackgroundColor(Qt::yellow);

This way of using QicsRepeatingRow and QicsRepeatingColumn has the advantage of being very fast and convenient.

If the intent is to use the repeating row or column object many times, or if you intend to connect a signal to one of the object's slots, you should create a new QicsRepeatingRow or QicsRepeatingColumn object. This object is persistent, and will continue to be valid until it is destroyed or the table itself is destroyed.

// you can create a repeating column object this way...
QicsRepeatingColumn *col = table->repeatingColumn(0, 5);

// ...or, you can do it this way
QicsRepeatingColumn *col = new QicsRepeatingColumn(0, 5, table);

Main Grid

Attributes from the main grid are retrieved and set by using the QicsMainGrid class. This is a flyweight object that represents the main grid of the table. There are two different ways that a programmer can use the QicsMainGrid object. If the programmer's intent is simply to call one or two grid methods, it is usually best to use the mainGridRef() method of QicsTable. This method returns a reference to a QicsMainGrid object that cannot be assigned to a variable. Rather, the programmer should call the method directly from the reference.

table->mainGridRef().setMargin(2);

This way of using QicsMainGrid has the advantage of being very fast and convenient.

If the intent is to use the grid object many times, or if you intend to connect a signal to one of the object's slots, you should create a new QicsMainGrid object. This object is persistent, and will continue to be valid until it is destroyed or the table itself is destroyed.

// you can create a main grid object object this way...
QicsMainGrid *mainGrid = table->mainGrid();

// ...or, you can do it this way
QicsMainGrid *mainGrid = new QicsMainGrid(table);

It is important to note that any attribute that can be set on a table cell, row, or column can also be set on the entire main grid.

Headers

Rows and column header attributes are retrieved and set by using the QicsRowHeader and QicsColumnHeader classes. These are flyweight objects that represent row and column headers in the table. There are two different ways that a programmer can use a QicsRowHeader or QicsColumnHeader object. If the programmer's intent is simply to call one or two header methods, it is usually best to use the rowHeaderRef() and columnHeaderRef() methods of QicsTable. These methods return a reference to a QicsRowHeader or QicsColumnHeader object that cannot be assigned to a variable. Rather, the programmer should call the method directly from the reference.

table->rowHeaderRef().setMargin(2);

This way of using QicsRowHeader and QicsColumnHeader has the advantage of being very fast and convenient.

If the intent is to use the header object many times, or if you intend to connect a signal to one of the object's slots, you should create a new QicsRowHeader or QicsColumnHeader object. This object is persistent, and will continue to be valid until it is destroyed or the table itself is destroyed.

// you can create a column header object this way...
QicsColumnHeader *colHdr = table->columnHeader();

// ...or, you can do it this way
QicsColumnHeader *colHdr = new QicsColumnHeader(table);

It is important to note that any attribute that can be set on a table cell, row, or column can also be set on a header cell, row, or column. Also, any attribute that can be set on the main table grid can also be set on a header.

By default, QicsTable displays row or column numbers in the cells of row and column headers. These numbers are generated "on-the-fly" and do not cause any memory to be allocated.

If you want to change what is displayed in the header cells, you may do one of the following:

Traversal and Cell Editing

QicsTable allows the programmer to have full control over cell traversal. The table has a current cell, which is the cell to which any keyboard input will be directed. This cell is drawn with a special border (see currentCellBorderWidth and setCurrentCellBorderWidth). Traversing to a cell causes the cell to become the current cell. Cells that are not enabled cannot be traversed to.

The following methods control cell traversal:

Once the user has traversed to a cell, s/he may edit the cell if the cell property readOnly is false.

If the clickToEdit property is false, simply typing a character will begin the editing process. If clickToEdit is true, the user must click in the cell with the mouse before the cell can be edited.

The autoSelectCellContents property controls the initial selection of the contents of the current cell when editing is initiated. If the property is true, the entire contents of the cell will be selected (so that any typing will cause the old contents to be replaced). If the property is false, the contents will not be selected.

The traversalKeyEditBehavior property controls the behavior of the traversal keys while the user is editing a cell. If the property is TraverseWithinCell, traversal keys will move the text cursor within the edited cell. If the property is TraverseBetweenCells, traversal keys move the current cell highlight between cells in the table.

To control the direction of traversal when the user presses Enter, use the enterTraversalDirection property. To control the direction of traversal when the user presses Tab, use the enterTraversalDirection property.

Selections

QicsTable supports several different selection policies. See Qics::QicsSelectionPolicy for details on the different choices. The default mouse/key bindings for selection are:

A copy of the current selection list can be obtained using selectionList(). The selection list may contain more than one QicsSelection object if the selection policy allows discontiguous selections. If some cells in a selection are unselected by the user, the original selection will split into as many as four new selections to describe the new selection state.

A copy of the current selection action list can be obtained using selectionActionList(). The selection action list logs the exact actions that were taken by the user to get to the current selection state. Cells that are unselected appear in the selection action list as selection objects whose selected() methods return false.

The programmer can set a new selection list by calling setSelectionList(). If the selection policy allows multiple, discontiguous selections, the programmmer may add a selection to the selection list using addSelection(). Selection objects that represent unselections are allowed in the list.

To modify the selection list, retrieve a copy of it using selectionList(), then add, remove, or modify individual QicsSelection objects in the list. When the new list is complete, call setSelectionList() to set it on the table. Selection objects that represent unselections are allowed in the list.

To clear the entire selection list, call clearSelectionList().

Drag and Drop

QicsTable supports intra-table drag and drop, inter-table drag and drop, and has limited support for dragging data from the table to other non-table drop sites. Drags between tables will move or copy data items in their original formats to the receiving cells. Dragging cells to non-QicsTable drop sites will cause only the text representations of the cells to be moved or copied.

Drag operations are performed using the middle mouse button. Clicking in a cell with the middle mouse button and then moving the mouse pointer while holding the button down initiates a drag. If the Control modifier key is held down when the drag is started, the operation is considered a "move". Otherwise, the operation is considered a "copy". If the starting drag cell is selected, the entire selection will be moved or copied to the drop location. If the starting drag cell is not selected, only the cell will be dragged.

Drag operations complete when the user releases the middle mouse button. Data items that were dragged are moved or copied are placed into the table, beginning at the cell containing the mouse pointer.

Cut and Paste

QicsTable supports cut and paste through the Qt Clipboard. Call cut() or copy() to place the contents of the cells in the selectionList on the clipboard. Call paste() to place the contents of the clipboard into the table. If the contents of the clipboard is data from a QicsTable, the items will be placed into the table beginning at the specified cell. If the contents of the clipboard is a string, that value will be placed into the table at the specified cell. No other Mime formats are supported at the present time.

Since 2.3, QicsTable supports reimplementation of standard clipboard operations via QicsAbstractClipboardDelegate. You can create your own delegate which will handle needed operations and install it with setClipboardDelegate() method.

Filtering

Since 2.4, QicsTable introduces a new approach for filtering its contents. A QicsAbstractFilterDelegate subclass which implements desired filtering functionality can be installed for a column. Once installed, it will hide all the rows which data do not match filter pattern.

Via setRowFilter() method, a filter delegate can be set to a column, and removed via removeRowFilter(). All filters can be removed via removeAllRowFilters(). To obtain a filter installed for a particular column, use rowFilter() method. hasRowFilter() method allows to know if any filter was installed for a column. isRowFiltered() is helper method which retrieves current state of a particular row.

Currently two basic filter delegates available: QicsListFilterDelegate which allows to specify a QStringList of valid items and QicsRegexpFilterDelegate which uses regular expressions based on QRegExp.

Installation of a filter delegate is pretty easy. First, you should create a filter delegate. Second, set up the filtering pattern for the delegate. And third, install the delegate for a column you wish to filter rows by.

There is an example how to use QicsListFilterDelegate.

    QStringList filters;                    
    filters << "John" << "Mary" << "Dan";   // Fill QStringList with items which should be visible.
                                            // The rest will be filtered off.

    table->setRowFilter(2, new QicsListFilterDelegate(filters));    // Create and install the delegate to column 2 of the table.

After executing this code, all the rows which data in column 2 do not match the given pattern (i.e. not "John", "Mary" or "Dan") will be hidden. So the table

N rowColumn 1Column 2
11John
22Jack
33Gabrielle
44Mary
55Warwick
66Dan

after setting the filter would result in

N rowColumn 1Column 2
11John
44Mary
66Dan

Grouping

Table's content can be organized into tree-like structure by representing a data from grouped columns as tree nodes, and rest of rows as leafs. This is provided by QicsTreeTable class, a subclass of QicsTable which uses different data representation.

To work with a table like with a tree, you should use QicsTreeTable as the base class, not QicsTable.

Printing

QicsTable supports high quality printed output. Programmers can use print() to print the entire table or only a region of the table. The printed version of the table will use the same attribute settings as the on-screen table. If you wish to change some of the settings before printing, create a QicsTablePrint object. The QicsTablePrint object is basically a copy of the current state of the attribute settings in the table object that was passed to the constructor. After creation, this table print object will contain the exact same attribute settings as the original QicsTable object. You can now make any attribute changes on the new QicsTablePrint object -- these changes will be refelcted only in the printed output, not the on-screen table. After the desired changes are made, you can print the new object by calling QicsTablePrint::print().

A powerful Print Preview Framework provides easy-to-use WYSIWYG printing. To make printing with preview easy, addons folder contains helper class QicsPrintPreviewDialog. It provides static method previewAndPrint(QicsTable *table) which invokes preview of the table.

See QicsTablePrint::setPreviewWidget() and QicsTablePrint::setPreviewRegion(), and Stocks2 example.

Export

QicsTable supports export of its content to several popular data formats.

Table content can be exported as the hypertext (html) file. QicsHTMLExport class provides powerful capabilities to export not only textual content, but also cell coloring, fonts, graphics and so on. Export is fully customizable, so you can specify which attributes to export and which not. QicsHTMLExport::exportToFile() method exports current table content to HTML file.

To make the customization easy, addons folder contains helper class QicsHTMLExportDialog. It provides static method exportTable(QicsTable *table, const QString &name) which invokes export of the table to a file with name.

Also, model data can be exported/imported to/from comma separated (CSV) text file. See methods QicsDataModel::readASCII() and QicsDataModel::writeASCII().

External Attribute Controllers

QicsTable allows to control cell attributes from outside, using special External Attribute Controllers. A programmer can implement his own attribute controller which will be responsible for setting, keeping and retrieving certain attributes of cells, rows and columns.

Class QicsAbstractAttributeController provides basic interface to implement own external controller. Currently there is QicsRegionalAttributeController available. It is very fast and consumes as few memory as possible.

To install own controller, use QicsTable::setExternalAttributeController() method. For example, installing QicsRegionalAttributeController would be

    QicsRegionalAttributeController control;
    table->setExternalAttributeController(control);

To remove contoller previously installed, use QicsTable::removeExternalAttributeController().

Global Key Actions

QicsTable introduces global (table-wide) keyboard actions used to perform most common tasks with the grid (such as select all cells by pressing Ctrl-A, or delete data from selected cells by pressing Delete).

Available actions are defined as Qics::QicsWideKeyAction enumeration and could be enabled/disabled using setWideKeyAction() and setWideKeyActions() methods.

By default, there are no global actions set. To enable all the defined actions, just use

    table->setWideKeyActions();

Support of Qt models

Native Qt models are supported by QicsTable via QicsDataModelQtModelAdapter and QicsQtModelAttributeController. These classes used for retrieve data and attributes from Qt item model.

To use data from Qt model, use QicsDataModelQtModelAdapter class:

    // create Qt table data model
    QAbstractItemModel *qtmodel = new QAbstractTableModel();

    // create an adapter to QicsDataModel
    QicsDataModelQtModelAdapter *model = new QicsDataModelQtModelAdapter();
    // set qtmodel for the adapter
    model->setModel(qtmodel);

    // create the table
    QicsTable *table = new QicsTable();
    // set adapted model for the table
    table->setDataModel(model);

To handle attributes stored in Qt model, install QicsQtModelAttributeController. QicsDataModelQtModelAdapter should be used as the model in order to make the controller work.

    QicsQtModelAttributeController controller;
    table->setExternalAttributeController(controller);

Support of KDChart charts

Since 2.4, QicsTable allows to integrate with KDChart 2.x via kdchart addon. This addon makes easy to bind KDChart charts with QicsTable tabular data, providing on-the-fly data synchronization between table and chart.

It consists of two classes, QicsKDChartDataModelAdapter and QicsKDChartTableObject. QicsKDChartDataModelAdapter is the wrapper of QicsDataModel which adapts it to the KDChart datamodel, and QicsKDChartTableObject is the special displayer which allows to place charts into the table's field.

The common way to use KDChart is:

    //create the table
    QicsTable *table = new QicsTable();

    // create KDChart bar diagram
    KDChart::BarDiagram *bars = new KDChart::BarDiagram;

    // install special displayer
    QicsKDChartTableObject *kdview = new QicsKDChartTableObject(
        table,                  // parent table
        bars,                   // diagram to integrate with
        QicsRegion(13,1,23,6),  // cell region where to put the chart itself
        QicsRegion(1,1,10,6)    // cell region where to read data from
        );

After this, a KDChart::BarDiagram will be inserted into QicsTable's region (13,1,23,6), taking data from cells in the region (1,1,10,6).

There are two demos, advanced_spreadsheet and kdchart, which show how to use KDChart within QicsTable.

Please note: in order to use kdchart addon, you should build QicsTable library with KDChart support; see INSTALL file for details.

Another note: please make sure that you added all the files from <QICSTABLE>/addons/kdchart to your project file (.h and .cpp). This is because QicsTable library does not integrate this addon. It is about to be changed in the future releases.


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.


Constructor & Destructor Documentation

QicsTable::QicsTable ( QicsDataModel model = 0,
QWidget *  parent = 0 
)

Constructs a QicsTable widget that will display data contained in model, or, an empty table if model is 0.

QicsTable::QicsTable ( QWidget *  parent  ) 

Constructs an empty table.

QicsTable::QicsTable ( QicsDataModel::Foundry  rhdmf,
QicsDataModel::Foundry  chdmf,
QicsTableGrid::Foundry  tf,
QicsHeaderGrid::Foundry  hf,
QicsDataModel model = 0,
QWidget *  parent = 0 
)

Constructs a QicsTable widget with one or more custom components. Any foundry method parameter that is 0 will be replaced by the appropriate builtin foundry method (QicsDataModelDefault::create(), QicsTableGrid::create(), or QicsHeaderGrid::create()).

Parameters:
rhdmf foundry method to create a custom row header data model
chdmf foundry method to create a custom column header data model
tf foundry method to create custom table grids
hf foundry method to create custom header grids
model data model to display
parent parent widget

virtual QicsTable::~QicsTable (  )  [virtual]

Destructor for the class


Member Function Documentation

virtual QicsDataModel* QicsTable::dataModel ( void   )  const [inline, virtual]

Returns the data model object that is being displayed by the table widget.

See also:
setDataModel()

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

Sets the data model object for the table widget to display.

See also:
dataModel()

QicsRow& QicsTable::rowRef ( int  rownum  ) 

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

See also:
row()

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

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

See also:
row()

QicsRow* QicsTable::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 QicsRow* QicsTable::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()

QicsColumn& QicsTable::columnRef ( int  colnum  ) 

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

See also:
column()

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

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

See also:
column()

QicsColumn* QicsTable::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 QicsColumn* QicsTable::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()

QicsRepeatingRow& QicsTable::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()

const QicsRepeatingRow& QicsTable::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* QicsTable::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* QicsTable::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()

QicsRepeatingColumn& QicsTable::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 QicsRepeatingColumn& QicsTable::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* QicsTable::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* QicsTable::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()

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

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

See also:
cell()

const QicsCell& QicsTable::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* QicsTable::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* QicsTable::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()

QicsMainGrid& QicsTable::mainGridRef ( void   ) 

Returns a reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

const QicsMainGrid& QicsTable::mainGridRef ( void   )  const

Returns a const reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

QicsMainGrid* QicsTable::mainGrid ( void   ) 

Returns a newly allocated main grid object.

See also:
mainGridRef()

const QicsMainGrid* QicsTable::mainGrid ( void   )  const

Returns a newly allocated const main grid object.

See also:
mainGridRef()

QicsRowHeader& QicsTable::rowHeaderRef ( void   ) 

Returns a reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

const QicsRowHeader& QicsTable::rowHeaderRef ( void   )  const

Returns a const reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

QicsRowHeader* QicsTable::rowHeader ( void   ) 

Returns a newly allocated row header object.

See also:
rowHeaderRef()

const QicsRowHeader* QicsTable::rowHeader ( void   )  const

Returns a newly allocated const row header object.

See also:
rowHeaderRef()

QicsColumnHeader& QicsTable::columnHeaderRef ( void   ) 

Returns a reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

const QicsColumnHeader& QicsTable::columnHeaderRef ( void   )  const

Returns a const reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

QicsColumnHeader* QicsTable::columnHeader ( void   ) 

Returns a newly allocated column header object.

See also:
columnHeaderRef()

const QicsColumnHeader* QicsTable::columnHeader ( void   )  const

Returns a newly allocated const column header object.

See also:
columnHeaderRef()

void QicsTable::clearTable ( void   ) 

Clears table deleting all displayers and styles

QicsSelectionList* QicsTable::selectionList ( bool  nocopy = false  )  const

If nocopy is true, returns pointer to internal selection list. Otherwise, returns a copy of the selection manager's current selection list. It is the programmer's responsibility to delete this list when it is no longer needed. Modifying the copy will not affect the selection list. You must call setSelectionList() with the modified list in order to change the selection.

See also:
setSelectionList() clearSelectionList()

QicsSelectionList* QicsTable::selectionActionList ( void   )  const

Returns a copy of the table's current selection action list. The selection action list is a direct log of the user's selection actions. (For more information on the selection action list, see the Selection section of this page.) It is the programmer's responsibility to delete this list when it is no longer needed. Modifying the copy will not affect the selection list. You must call setSelectionList() with the modified list in order to change the selection.

See also:
selectionList() setSelectionList() clearSelectionList()

void QicsTable::setSelectionList ( QicsSelectionList sel_list  ) 

Sets the selection list for the table to sel_list. The list will be inspected to assure that it conforms to the current selectionPolicy for the table.

See also:
selectionList() addSelection() clearSelectionList()

void QicsTable::clearSelectionList ( void   ) 

Clears the selection list for the table

See also:
setSelectionList()

void QicsTable::addSelection ( QicsSelection selection  ) 

Adds selection to the table's selection list. If the current selectionPolicy for the table does not allow multiple selection, this new selection will be ignored.

See also:
setSelectionList()

int QicsTable::margin ( void   )  const

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

See also:
setMargin()

bool QicsTable::readOnly ( void   )  const

Returns the default read-only attribute of cells in the table. See the "readOnly" property for details.

See also:
setReadOnly()

QColor QicsTable::foregroundColor ( void   )  const

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

See also:
setForegroundColor()

QColor QicsTable::backgroundColor ( void   )  const

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

See also:
setBackgroundColor()

QColor QicsTable::selectedForegroundColor ( void   )  const

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

See also:
setSelectedForegroundColor()

QColor QicsTable::selectedBackgroundColor ( void   )  const

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

See also:
setSelectedBackgroundColor()

QColor QicsTable::editForegroundColor ( void   )  const

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

See also:
setEditForegroundColor()

QColor QicsTable::editBackgroundColor ( void   )  const

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

See also:
setEditBackgroundColor()

QPixmap QicsTable::pixmap ( void   )  const

Returns the default cell pixmap. See the "pixmap" property for details.

See also:
setPixmap()

int QicsTable::pixmapSpacing ( void   )  const

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

See also:
setPixmap()

QicsCellDisplay* QicsTable::displayer ( void   )  const

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

See also:
setDisplayer()

QicsDataItemFormatter* QicsTable::formatter ( void   )  const

Returns the default QicsDataItemFormatter object. The formatter object controls the formatting of data values. See QicsDataItemFormatter and its subclasses for details.

See also:
setFormatter()

int QicsTable::alignment ( void   )  const

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

See also:
Qt::Alignment

setAlignment()

int QicsTable::textFlags ( void   )  const

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

See also:
Qt::TextFlags

setTextFlags()

QValidator* QicsTable::validator ( void   )  const

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

See also:
setValidator()

QicsPasteValidator* QicsTable::pasteValidator ( void   )  const

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

See also:
setPasteValidator()

QString QicsTable::label ( void   )  const

Returns the default cell label attribute. See the "label" property for details.

See also:
setLabel()

int QicsTable::maxLength ( void   )  const

Returns the default maximum cell value length. See the "maxLength" property for details.

See also:
setMaxLength()

QPen QicsTable::topBorderPen ( void   )  const

Returns the default cell top border pen. See the "borderPen" property for details.

See also:
setBorderPen()

QPen QicsTable::leftBorderPen ( void   )  const

Returns the default cell left border pen. See the "borderPen" property for details.

See also:
setBorderPen()

QPen QicsTable::rightBorderPen ( void   )  const

Returns the default cell right border pen. See the "topBorderPen" property for details.

See also:
setTopBorderPen()

QPen QicsTable::bottomBorderPen ( void   )  const

Returns the default cell bottom border pen. See the "borderPen" property for details.

See also:
setBorderPen()

virtual QicsRegion QicsTable::viewport ( void   )  const [virtual]

Returns the current viewport of the table. The viewport specifies an area of the data model that is allowed to be displayed. This viewport does not take into account any rows or columns that may be frozen. To get the viewport of the main grid (and thus excluding any frozen rows and columns), use mainGridViewport().

See also:
setViewport()

virtual QicsRegion QicsTable::mainGridViewport ( void   )  const [virtual]

Returns the current viewport of the main grid of the table. The viewport specifies an area of the data model that is allowed to be displayed, excluding any rows or columns that may be frozen.

virtual QicsRegion QicsTable::currentViewport ( void   )  const [virtual]

Returns the intersection of the table's viewport and the dimensions of the table's data model.

bool QicsTable::addCellSpan ( QicsSpan  span,
bool  visual = true 
)

Adds a cell spanning region to the grid. The contents of the cell at the top, left of span will be drawn across all cells in span. Two cell spanning regions 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. If visual is true (default), it is assumed that the span is given in visual coordinates, else model coordinates are used.

See also:
removeCellSpan()

cellSpanList()

QicsSpanList* QicsTable::cellSpanList ( void   ) 

Returns the grid's cell spanning list. The returned value is a copy of the grid's internal list, and it is the responsibility of the caller to delete it when it is no longer used. Modifications to this list will not affect the grid -- use addCellSpan() and removeCellSpan() instead.

See also:
removeCellSpan()

cellSpanList()

bool QicsTable::horizontalGridLinesVisible ( void   )  const

Returns true if horizontal grid lines are being drawn in the grid, false otherwise. These lines separate each row. See the "horizontalGridLinesVisible" property for details.

See also:
setHorizontalGridLinesVisible()

bool QicsTable::verticalGridLinesVisible ( void   )  const

Returns true if vertical grid lines are being drawn, false otherwise. See the "verticalGridLinesVisible" property for details.

See also:
setVerticalGridLinesVisible()

int QicsTable::horizontalGridLineWidth ( void   )  const

Returns the value of the width of the table's horizontal grid lines. See the "horizontalGridLineWidth" property for details.

See also:
setHorizontalGridLineWidth()

int QicsTable::verticalGridLineWidth ( void   )  const

Returns the value of the width of the table's vertical grid lines. See the "verticalGridLineWidth" property for details.

See also:
setVerticalGridLineWidth()

Returns the horizontal grid line style. See the "horizontalGridLineStyle" property for details.

See also:
setHorizontalGridLineStyle()

Returns the vertical grid line style. See the "verticalGridLineStyle" property for details.

See also:
setVerticalGridLineStyle()

QPen QicsTable::horizontalGridLinePen ( void   )  const

Returns the pen used to draw the table's horizontal grid lines. See the "horizontalGridLinePen" property for details.

See also:
setHorizontalGridLinePen()

QPen QicsTable::verticalGridLinePen ( void   )  const

Returns the pen used to draw the table's vertical grid lines. See the "verticalGridLinePen" property for details.

See also:
setVerticalGridLinePen()

bool QicsTable::drawPartialCells (  )  const

Returns the partial cell display policy. See the "drawPartialCells" property for details.

See also:
setDrawPartialCells()

Returns the cell clipping display policy. See the "gridCellClipping" property for details.

See also:
setGridCellClipping()

Returns the grid's cell overflow behavior. See the "cellOverflowBehavior" property for details.

See also:
setCellOverflowBehavior()

int QicsTable::maxOverflowCells ( void   )  const

Returns the maximum number of overflow cells for the grid. See the "maxOverflowCells" property for details.

See also:
setMaxOverflowCells()

int QicsTable::frameLineWidth ( void   )  const

Returns the frame line width of the table's main grid. See the "frameLineWidth" property for details.

See also:
setFrameLineWidth()

int QicsTable::frameStyle ( void   )  const

Returns the frame style of the table's main grid. See the "frameStyle" property for details.

See also:
setFrameStyle()

Returns the style of the current cell in the table. See the "currentCellStyle" property for details.

See also:
setCurrentCellStyle()

Returns current selection style of the table. See the "selectionStyle" property for details.

See also:
setSelectionStyle()

int QicsTable::currentCellBorderWidth ( void   )  const

Returns the width of the border that is drawn around the current cell in the table. See the "currentCellBorderWidth" property for details.

See also:
setCurrentCellBorderWidth()

bool QicsTable::clickToEdit ( void   )  const

Returns whether the user must first click in a cell before being able to edit the cell by typing. See the "clickToEdit" property for details

See also:
setClickToEdit()

bool QicsTable::autoSelectCellContents ( void   )  const

Returns whether the contents of a cell are automatically selected when the table begins a cell edit operation. See the "autoSelectCellContents" property for details

See also:
setAutoSelectCellContents()

Returns the behavior of traversal keys within an edited cell. See the "traversalKeyEditBehavior" property for details.

See also:
setTraversalKeyEditBehavior

Qt::Orientation QicsTable::enterTraversalDirection ( void   )  const

Returns the direction that the table will traverse when the user types Enter or Shift-Enter. See the "enterTraversalDirection" property for details

See also:
setEnterTraversalDirection()

Qt::Orientation QicsTable::tabTraversalDirection ( void   )  const

Returns the direction that the table will traverse when the user types Tab or Shift-Tab. See the "tabTraversalDirection" property for details

See also:
setTabTraversalDirection()

QicsKeyboardManager::Action QicsTable::keyAction ( const QicsKeyCombination combo  ) 

Returns key action defined for combo key combination.

void QicsTable::setKeyAction ( const QicsKeyCombination combo,
QicsKeyboardManager::Action  action 
)

Sets the key combination combo for action key action.

bool QicsTable::tabTraverseToBegin (  )  const

Returns traversal cell behavior (for Tab key) when it achieves the end of row/column. See the "tabTraverseToBegin" property for details.

See also:
setTabTraverseToBegin(bool)

bool QicsTable::enterTraverseToBegin (  )  const

Returns traversal cell behavior (for Enter key) when it achieves the end of row/column. See the "enterTraverseToBegin" property for details.

See also:
setEnterTraverseToBegin(bool)

QPixmap QicsTable::moreTextPixmap ( void   )  const

Returns the pixmap that is used in this grid to show that text in a cell has been clipped (i.e. it could not completely fit in the cell).

See also:
setMoreTextPixmap()

bool QicsTable::dragEnabled ( void   )  const

Returns whether the user is allowed to drag from this table. See the "dragEnabled" property for details.

See also:
setDragEnabled

Qt::LayoutDirection QicsTable::layoutDirection ( void   )  const

Returns layout direction of the grid. See the "layoutDirection" property for details.

See also:
setLayoutDirection

bool QicsTable::topHeaderVisible ( void   )  const

Returns true if the top header is visible, false otherwise. See the "topHeaderVisible" property for details.

bool QicsTable::bottomHeaderVisible ( void   )  const

Returns true if the bottom header is visible, false otherwise. See the "bottomHeaderVisible" property for details.

bool QicsTable::leftHeaderVisible ( void   )  const

Returns true if the left header is visible, false otherwise. See the "leftHeaderVisible" property for details.

bool QicsTable::rightHeaderVisible ( void   )  const

Returns true if the right header is visible, false otherwise. See the "rightHeaderVisible" property for details.

int QicsTable::tableMargin ( void   )  const

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

int QicsTable::tableSpacing ( void   )  const

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

int QicsTable::gridSpacing ( void   )  const

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

bool QicsTable::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()

bool QicsTable::allowPropagateChanges ( void   )  const

Returns whether the table should allow propagate changes from editing cell to whole selection. See the "allowPropagateChanges" property for details.

See also:
setAllowPropagateChanges()

Returns the table's current selection policy. See the "selectionPolicy" property for details.

void QicsTable::setSelectionPolicy ( QicsSelectionPolicy  policy  ) 

Sets the table's selection policy. Calling this method will also clear the table's current selection. See the "selectionPolicy" property for details.

Returns the table's current cell selection policy. See the "selectCurrentCellPolicy" property for details.

Since:
2.3

void QicsTable::setSelectCurrentCellPolicy ( QicsSelectCurrentCellPolicy  policy  ) 

Sets the table's current cell selection policy. See the "selectCurrentCellPolicy" property for details.

Since:
2.3

int QicsTable::exclusiveSelectionBorderWidth (  )  const

Returns border width of the exclusive selection frame. See the "exclusiveSelectionBorderWidth" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionBorderWidth ( int  w  ) 

Sets border width of the exclusive selection frame. See the "exclusiveSelectionBorderWidth" property for details.

Since:
2.3

QColor QicsTable::exclusiveSelectionBorderColor (  )  const

Returns color of the exclusive selection frame. See the "exclusiveSelectionBorderColor" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionBorderColor ( const QColor &  c  ) 

Sets color of the exclusive selection frame. See the "exclusiveSelectionBorderColor" property for details.

Since:
2.3

QColor QicsTable::exclusiveSelectionHandleColor (  )  const

Returns handle's color of the exclusive selection frame. See the "exclusiveSelectionHandleColor" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionHandleColor ( const QColor &  c  ) 

Sets handle's color of the exclusive selection frame. See the "exclusiveSelectionHandleColor" property for details.

Since:
2.3

QColor QicsTable::exclusiveSelectionHandleBackColor (  )  const

Returns handle's background color of the exclusive selection frame. See the "exclusiveSelectionHandleBackColor" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionHandleBackColor ( const QColor &  c  ) 

Sets handle's background color of the exclusive selection frame. See the "exclusiveSelectionHandleBackColor" property for details.

Since:
2.3

QColor QicsTable::exclusiveSelectionDragBackColor (  )  const

Returns background color of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragBackColor" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionDragBackColor ( const QColor &  c  ) 

Sets background color of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragBackColor" property for details.

Since:
2.3

QPen QicsTable::exclusiveSelectionDragPen (  )  const

Returns pen of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragPen" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionDragPen ( const QPen &  p  ) 

Sets pen of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragPen" property for details.

Since:
2.3

float QicsTable::exclusiveSelectionDragOpacity (  )  const

Returns opacity of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragOpacity" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionDragOpacity ( float  op  ) 

Sets opacity of the exclusive selection frame during dragging by fill handle. op must be in ranges 0.0 (full transparency) to 1.0 (full opacity). Default value is 0.5. See the "setExclusiveSelectionDragOpacity" property for details.

Since:
2.3

QicsRubberBand::DrawingMode QicsTable::exclusiveSelectionDragMode (  )  const

Returns drawing mode of the exclusive selection frame during dragging by fill handle. See the "setExclusiveSelectionDragMode" property for details.

Since:
2.3

void QicsTable::setExclusiveSelectionDragMode ( QicsRubberBand::DrawingMode  mode  ) 

Sets drawing mode of the exclusive selection frame during dragging by fill handle. Default value is QicsRubberBand::DM_CUSTOM. See the "setExclusiveSelectionDragMode" property for details.

Since:
2.3

void QicsTable::setFakeCellsDrawingIndex ( Qics::QicsIndexType  type  ) 

Sets the table's FakeCellsDrawingIndex for drawing fake cells See the "fakeCellsDrawingIndex" property for details.

Returns the repaint behavior of the table widget. See the "repaintBehavior" property for details

Returns the mode of the horizontal scrollbar. See the "hScrollBarMode" property for details

Returns the mode of the vertical scrollbar. See the "vScrollBarMode" property for details

void QicsTable::setHScrollBarMode ( QicsScrollBarMode  m  ) 

Sets the mode of the horizontal scrollbar. See the "hScrollBarMode" property for details

void QicsTable::setVScrollBarMode ( QicsScrollBarMode  m  ) 

Sets the mode of the vertical scrollbar. See the "vScrollBarMode" property for details

void QicsTable::setAutoFitMode ( Qics::QicsAutoFitMode  mode  )  [inline]

Sets the autofit mode.

Since:
2.4.1

Qics::QicsAutoFitMode QicsTable::autoFitMode (  )  const [inline]

Returns current autofit mode.

Since:
2.4.1

const QVector<int>& QicsTable::currentRowOrder (  )  const [inline]

Returns current row order as QVector<int>.

Since:
2.3.1

void QicsTable::setRowOrder ( const QVector< int > &  order  ) 

Sets current row order to order.

Since:
2.3.1

const QVector<int>& QicsTable::currentColumnOrder (  )  const [inline]

Returns current column order as QVector<int>.

Since:
2.3.1

void QicsTable::setColumnOrder ( const QVector< int > &  order  ) 

Sets current column order to order.

Since:
2.3.1

void QicsTable::sortRows ( int  column,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

Sort the rows

Parameters:
column the data model columns to sort on
order sort order (default: Qics::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:
multicolumn sort the rows

void QicsTable::sortColumns ( int  row,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

Sort the columns

Parameters:
row the data model rows to sort on
order sort order (default: Qics::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:
multirow sort

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

Multicolumn sort the rows

Parameters:
columns the data model columns to sort on
order sort order (default: Qics::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.

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

Multirow sort the columns

Parameters:
rows the data model rows to sort on
order sort order (default: Qics::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.

void QicsTable::setSortingSensitivity ( Qt::CaseSensitivity  cs  ) 

Sets case sensitivity while sorting to cs.

See also:
sortColumns(), sortRows()
Since:
2.3

void QicsTable::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

void QicsTable::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

bool QicsTable::rowHeaderUsesModel ( void   )  const

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.

bool QicsTable::columnHeaderUsesModel ( void   )  const

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.

int QicsTable::topRow ( void   )  const

Returns the index of the row that is currently displayed at the top of the table widget. See the "topRow" property for details.

See also:
setTopRow()

int QicsTable::bottomRow ( void   )  const

Returns the index of the row that is currently displayed at the bottom of the table widget. See the "bottomRow" property for details.

int QicsTable::leftColumn ( void   )  const

Returns the index of the leftmost column that is currently displayed in the table widget. See the "leftColumn" property for details.

See also:
setLeftColumn()

int QicsTable::rightColumn ( void   )  const

Returns the index of the rightmost column that is currently displayed in the table widget. See the "rightColumn" property for details.

int QicsTable::visibleRows ( void   )  const

Returns the number of currently visible rows in the main grid area of the table. See the "visibleRows" property for details.

See also:
setVisibleRows()

int QicsTable::visibleColumns ( void   )  const

Returns the number of currently visible columns in the main grid area of the table. See the "visibleColumns" property for details.

See also:
setVisibleColumns()

int QicsTable::fullyVisibleBottomRow ( void   )  const

Returns the index of bottom fully visible row in the main grid area of the table.

int QicsTable::fullyVisibleRightColumn ( void   )  const

Returns the index of right fully visible column in the main grid area of the table.

QicsCell* QicsTable::currentCell ( void   )  const

Returns the current cell of the table widget. Note that if there is no current cell (i.e. the user has not selected a cell) the returned cell will be invalid. Check a cell's validity with QicsCell::isValid().

See also:
setCurrentCell()

bool QicsTable::editCurrentCell ( void   ) 

Begins an edit of the current cell. Returns true if the cell successfully begins an edit operation, false otherwise.

void QicsTable::uneditCurrentCell ( void   ) 

Stops an edit operation on the current cell.

bool QicsTable::editCell ( int  row,
int  col 
)

Begins an edit of cell (row, col ). Returns true if the cell successfully begins an edit operation, false otherwise.

int QicsTable::lastRowWithData (  )  const

Returns index of last row with data, -1 if there are no data.

Since:
2.2

int QicsTable::lastColumnWithData (  )  const

Returns index of last column with data, -1 if there are no data.

Since:
2.2

int QicsTable::firstRowWithData (  )  const

Returns index of first row with data, -1 if there are no data.

Since:
2.2

int QicsTable::firstColumnWithData (  )  const

Returns index of first column with data, -1 if there are no data.

Since:
2.2

QicsRegion QicsTable::dataRegion (  )  const

Returns region covering all the data cells, or invalid region if there are no data.

Since:
2.2

QicsRegion QicsTable::selectedRegion (  )  const

Returns region covering all the selections, or invalid region if there are no selections.

Since:
2.2

bool QicsTable::isNavigatorAllowed (  )  const [inline]

Returns true if the navigator is allowed, else returns false.

See also:
setNavigatorAllowed(), navigator()

QicsNavigator* QicsTable::navigator (  )  const [inline]

Returns pointer to the navigator (to modify its properties etc.)

Since:
2.2
See also:
setNavigatorAllowed(), isNavigatorAllowed()

void QicsTable::setWideKeyAction ( QicsWideKeyAction  action,
bool  on = true 
) [inline]

Sets enable state of the global key action to on.

Since:
2.2
See also:
isWideKeyAction(), setWideKeyActions()

bool QicsTable::isWideKeyAction ( QicsWideKeyAction  action  )  const [inline]

Returns enable state of the global key action.

Since:
2.2
See also:
setWideKeyAction(), setWideKeyActions()

void QicsTable::setWideKeyActions ( bool  on = true  ) 

Sets all the global key actions to on.

Since:
2.2
See also:
setWideKeyAction(), isWideKeyAction()

void QicsTable::setCopyPolicy ( int  policy  )  [inline]

Sets copying policy during copy/paste and drag/drop operations to policy. policy should be bitwise 'or' of QicsCopyPolicy values.

Since:
2.2
See also:
copyPolicy()

int QicsTable::copyPolicy (  )  const [inline]

Returns current copying policy during copy/paste and drag/drop operations as bitwise 'or' of QicsCopyPolicy values.

Since:
2.2
See also:
setCopyPolicy()

void QicsTable::setClearPolicy ( int  policy  )  [inline]

Sets clearing policy during cut and delete operations to policy. policy should be bitwise 'or' of QicsClearPolicy values.

Since:
2.2
See also:
clearPolicy()

int QicsTable::clearPolicy (  )  const [inline]

Returns current clearing policy during cut and delete operations as bitwise 'or' of QicsClearPolicy values.

Since:
2.2
See also:
setClearPolicy()

void QicsTable::setHeaderDragStyle ( const QicsHeaderDragStyle style  ) 

Sets header drag style to style

Since:
2.4
See also:
headerDragStyle()

QicsHeaderDragStyle QicsTable::headerDragStyle (  )  const

Returns current header drag style

Since:
2.4
See also:
setHeaderDragStyle()

QAbstractSlider* QicsTable::horizontalScrollBar ( void   )  const

Returns the horizontal scrollbar for the table. The table's behavior is undefined if the programmer changes the scrollbar's minValue or maxValue properties. Use QTable::setViewport instead.

void QicsTable::setHorizontalScrollBar ( QicsScroller newScroller  ) 

Sets new horizontal scroll bar. New scroll bar class must be implementation of QicsScroller or QicsScrollBarScroller. For example if you want create custom scroll bar by deriving QicsScrollBarScroller reimplement constructor like that:

        myScroller::myScroller(Qics::QicsIndexType type,
        QWidget *parent) : QicsScrollBarScroller(type,parent)
        {
            Qt::Orientation orientation = (type == RowIndex ? Qt::Vertical :
                                                            Qt::Horizontal);
            QSlider *slider = new QSlider(orientation, parent);
            slider->setCursor(Qt::PointingHandCursor);
            slider->setToolTip("Custom ScrollBar");
            setWidget(slider);
        }

QicsScrollBarScroller::setWidget method removes if it does need old widget and sets new widget. In case of deriving custom scroll bar from QicsScroller class you must reimplement all virtual methods by yourself.

void QicsTable::setVerticalScrollBar ( QicsScroller newScroller  ) 

Sets new vertical scroll bar. New scroll bar class must be implementation of QicsScroller or QicsScrollBarScroller.

QAbstractSlider* QicsTable::verticalScrollBar ( void   )  const

Returns the vertical scrollbar for the table. The table's behavior is undefined if the programmer changes the scrollbar's minValue or maxValue properties. Use QTable::setViewport instead.

QWidget* QicsTable::topTitleWidget ( void   )  const [inline]

Returns the title widget placed at the top of the table.

See also:
setTopTitleWidget

QWidget* QicsTable::bottomTitleWidget ( void   )  const [inline]

Returns the title widget placed at the bottom of the table.

See also:
setBottomTitleWidget

QWidget* QicsTable::leftTitleWidget ( void   )  const [inline]

Returns the title widget placed at the left of the table.

See also:
setLeftTitleWidget

QWidget* QicsTable::rightTitleWidget ( void   )  const [inline]

Returns the title widget placed at the right of the table.

See also:
setRightTitleWidget

QWidget* QicsTable::topLeftCornerWidget ( void   )  const [inline]

Returns the widget placed in the top left corner of the table, above the left header and to the left of the top header.

See also:
setTopLeftCornerWidget()

QWidget* QicsTable::topRightCornerWidget ( void   )  const [inline]

Returns the widget placed in the top right corner of the table, above the right header and to the right of the top header.

See also:
setTopRightCornerWidget()

QWidget* QicsTable::bottomLeftCornerWidget ( void   )  const [inline]

Returns the widget placed in the bottom left corner of the table, below the left header and to the left of the bottom header.

See also:
setBottomLeftCornerWidget()

QWidget* QicsTable::bottomRightCornerWidget ( void   )  const [inline]

Returns the widget placed in the bottom right corner of the table, below the right header and to the right of the bottom header.

See also:
setBottomRightCornerWidget()

QicsGridGeometry& QicsTable::gridGeometry (  )  [inline]

Returns the grid geometry object of the table.

Since:
2.3.1

int QicsTable::rowHeaderHeight (  ) 

Returns the height of the row header.

Since:
2.3.1

int QicsTable::columnHeaderWidth (  ) 

Returns the width of the column header.

Since:
2.3.1

QicsAbstractFilterDelegate* QicsTable::rowFilter ( int  column  )  const [inline]

Returns filter installed for column column, or 0 if none.

See also:
setRowFilter(), removeRowFilter(), removeAllRowFilters()

void QicsTable::setRowFilter ( int  column,
QicsAbstractFilterDelegate filter,
bool  deleteOld = false 
)

Sets filter to column column. Rows that don't match filter in column column will be hidden. If deleteOld is true, previous filter will be destroyed.

See also:
rowFilter(), removeRowFilter(), removeAllRowFilters()

void QicsTable::removeRowFilter ( int  column,
bool  deleteOld = false 
)

Removes filter from column column. If deleteOld is true, previous filter will be destroyed.

See also:
rowFilter(), setRowFilter(), removeAllRowFilters()

void QicsTable::removeAllRowFilters (  ) 

Removes all row filters from all columns.

See also:
rowFilter(), setRowFilter(), removeRowFilter()

bool QicsTable::isRowFiltered ( int  row  )  const [inline]

Returns true if row with index row is filtered off (i.e. not visible), false otherwise.

Since:
2.4

bool QicsTable::hasRowFilter ( int  column  )  const [inline]

Returns true if column has any filter installed.

Since:
2.4

QStringList QicsTable::uniqueKeysForColumn ( int  column,
bool  noEmpty = true 
) const

Returns list of unique keys for column (model coords). If noEmpty is set (default), then list will not include emtpy items.

Since:
2.4

void QicsTable::setColumnsSortingMode ( Qics::QicsSortMode  mode  )  [inline]

Sets the sorting algorithm for columns.

Parameters:
mode sort mode sets to.

Qics::QicsSortMode QicsTable::columnsSortingMode ( void   )  [inline]

Gets current columns sorting mode.

Returns:
current sorting mode.

void QicsTable::setRowsSortingMode ( Qics::QicsSortMode  mode  )  [inline]

Sets the sorting algorithm for rows.

Parameters:
mode sort mode sets to.

Qics::QicsSortMode QicsTable::rowsSortingMode ( void   )  [inline]

Gets current rows sorting mode.

Returns:
current sorting mode.

bool QicsTable::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).

Returns the FakeCellsDrawingIndex for drawing fake cells. See the "fakeCellsDrawingIndex" property for details.

const QicsSelection* QicsTable::currentSelection (  ) 

Returns current selection or 0 if nothing selected. This selection is NOT included into selection list while it is in progress (i.e. being performed with mouse etc.). Hovewer, sometimes it is usable to get unfinished selection.

See also:
selectionList()
Since:
2.2

QicsCellRegion& QicsTable::cellRegionRef ( const QicsRegion region  )  [inline]

Returns a reference to an internal flyweight QicsCellRegion object that refers to cells in region of the grid.

QicsCellRegion& QicsTable::cellRegionRef ( int  begin_row,
int  begin_col,
int  end_row,
int  end_col 
) [inline]

Returns a reference to an internal flyweight QicsCellRegion object that refers to cells in region begin_row, begin_col, end_row, end_col of the grid.

QicsCellRegion* QicsTable::cellRegion ( const QicsRegion region  ) 

Returns a pointer to an internal flyweight QicsCellRegion object that refers to cells in region of the grid.

QicsCellRegion* QicsTable::cellRegion ( int  begin_row,
int  begin_col,
int  end_row,
int  end_col 
) [inline]

Returns a pointer to an internal flyweight QicsCellRegion object that refers to cells in region begin_row, begin_col, end_row, end_col of the grid.

void QicsTable::setExternalAttributeController ( QicsAbstractAttributeController mac  ) 

Sets external attribute controller to mac (only controlling of model attributes is supported at this moment). Really, this method makes a copy of the controller - so it can be safely deleted after the method is called:

See also:
removeExternalAttributeController()
Please keep in mind that installing of a new controller will result in full wipe-out of all attributes previously set.
Since:
2.2
See also:
removeExternalAttributeController(), setExternalAttributeControllers()

void QicsTable::setExternalAttributeControllers ( QicsAbstractAttributeController macGrid,
QicsAbstractAttributeController macRowHeader,
QicsAbstractAttributeController macColumnHeader 
)

Sets external attribute controller of main grid, row and column headers respectively to macGrid, macRowHeader and macColumnHeader.

Since:
2.3
See also:
setExternalAttributeController()

QicsAbstractAttributeController* QicsTable::gridAttributeController (  )  const

Returns external attribute controller for main grid.

Since:
2.3
See also:
setExternalAttributeController(), setExternalAttributeControllers()

QicsAbstractAttributeController* QicsTable::rowHeaderAttributeController (  )  const

Returns external attribute controller for row header.

Since:
2.3
See also:
setExternalAttributeController(), setExternalAttributeControllers()

QicsAbstractAttributeController* QicsTable::columnHeaderAttributeController (  )  const

Returns external attribute controller for column header.

Since:
2.3
See also:
setExternalAttributeController(), setExternalAttributeControllers()

void QicsTable::removeExternalAttributeController (  ) 

Removes external attribute controller.

Since:
2.2
See also:
setExternalAttributeController()

void QicsTable::setMargin ( int  margin  )  [slot]

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

See also:
margin()

void QicsTable::setReadOnly ( bool  b  )  [slot]

Sets the default read-only attribute of cells in the table. See the "readOnly" property for details.

See also:
readOnly()

void QicsTable::setForegroundColor ( const QColor &  p  )  [slot]

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

See also:
foregroundColor()

void QicsTable::setBackgroundColor ( const QColor &  p  )  [slot]

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

See also:
backgroundColor()

void QicsTable::setSelectedForegroundColor ( const QColor &  p  )  [slot]

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

See also:
selectedForegroundColor()

void QicsTable::setSelectedBackgroundColor ( const QColor &  p  )  [slot]

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

See also:
selectedBackgroundColor()

void QicsTable::setEditForegroundColor ( const QColor &  p  )  [slot]

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

See also:
editForegroundColor()

void QicsTable::setEditBackgroundColor ( const QColor &  p  )  [slot]

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

See also:
editBackgroundColor()

void QicsTable::setPixmap ( const QPixmap &  p  )  [slot]

Sets the default cell pixmap. See the "pixmap" property for details.

See also:
pixmap()

void QicsTable::setPixmap ( const QString &  file_name  )  [slot]

Sets the default cell pixmap from a file. See the "pixmap" property for details.

See also:
pixmap()

void QicsTable::setPixmapSpacing ( int  sp  )  [slot]

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

See also:
pixmap()

void QicsTable::setDisplayer ( QicsCellDisplay d  )  [slot]

Sets the default QicsCellDisplay object. The cell display object controls aspects of displaying and editing of cells. See QicsCellDisplay and its subclasses for details.

See also:
displayer()

void QicsTable::setFormatter ( QicsDataItemFormatter d  )  [slot]

Sets the default QicsDataItemFormatter object. The formatter object controls the formatting of data values. See QicsDataItemFormatter and its subclasses for details.

See also:
formatter()

void QicsTable::setAlignment ( int  flags  )  [slot]

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

See also:
Qt::Alignment

alignment()

void QicsTable::setTextFlags ( int  flags  )  [slot]

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

See also:
Qt::TextFlags

textFlags()

void QicsTable::setValidator ( QValidator *  v  )  [slot]

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 QicsTable::setPasteValidator ( QicsPasteValidator v  )  [slot]

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

See also:
pasteValidator()

void QicsTable::setLabel ( const QString &  label  )  [slot]

Sets the default cell label attribute. See the "label" property for details.

See also:
label()

void QicsTable::setMaxLength ( int  len  )  [slot]

Sets the default maximum cell value length. See the "maxLength" property for details.

See also:
maxLength()

void QicsTable::setBorderPen ( const QPen &  pen  )  [slot]

Sets the default cell border pen. See the "topBorderPen" property for details.

See also:
topBorderPen()

void QicsTable::setTopBorderPen ( const QPen &  pen  )  [slot]

Sets the default cell top border pen. See the "borderPen" property for details.

See also:
topBorderPen()

void QicsTable::setLeftBorderPen ( const QPen &  pen  )  [slot]

Sets the default cell left border pen. See the "topBorderPen" property for details.

See also:
topBorderPen()

void QicsTable::setRightBorderPen ( const QPen &  pen  )  [slot]

Sets the default cell right border pen. See the "topBorderPen" property for details.

See also:
topBorderPen()

void QicsTable::setBottomBorderPen ( const QPen &  pen  )  [slot]

Sets the default cell bottom border pen. See the "borderPen" property for details.

See also:
bottomBorderPen()

virtual void QicsTable::setViewport ( const QicsRegion vp  )  [virtual, slot]

Sets the viewport for the table. Setting a viewport allows the programmer to limit the table to showing a particular region of the table. For example, to only display rows 5-10 and columns 2-7, do the following:

setViewport(QicsRegion(5, 2, 10, 7));

The constants QicsLAST_ROW and QicsLAST_COLUMN can be used when specifying the region. For example, to only display rows 5-10, do the following:

setViewport(QicsRegion(5, 0, 10, QicsLAST_COLUMN));

Parameters:
vp the area of the data model that is allowed to be displayed. /sa viewport()

void QicsTable::removeCellSpan ( int  start_row,
int  start_col,
bool  visual = true 
) [slot]

Removes a cell spanning region from the grid. Because cell spanning regions cannot overlap, it is sufficient to specify the existing span by giving its starting cell. If visual is true (default), it is assumed that the span is given in visual coordinates, else model coordinates are used.

See also:
addCellSpan()

cellSpanList()

void QicsTable::setHorizontalGridLinesVisible ( bool  b  )  [slot]

Controls the display of horizontal grid lines. See the "horizontalGridLinesVisible" property for details.

See also:
horizontalGridLinesVisible()

void QicsTable::setVerticalGridLinesVisible ( bool  b  )  [slot]

Controls the display of vertical grid lines. See the "verticalGridLinesVisible" property for details.

See also:
verticalGridLinesVisible()

void QicsTable::setHorizontalGridLineWidth ( int  w  )  [slot]

Sets the value of the width of the table's horizontal grid lines. See the "horizontalGridLineWidth" property for details.

See also:
horizontalGridLineWidth()

void QicsTable::setVerticalGridLineWidth ( int  w  )  [slot]

Sets the value of the width of the table's vertical grid lines. See the "verticalGridLineWidth" property for details.

See also:
verticalGridLineWidth()

void QicsTable::setHorizontalGridLineStyle ( QicsLineStyle  style  )  [slot]

Sets the horizontal grid line style. See the "horizontalGridLineStyle" property for details.

See also:
horizontalGridLineStyle()

void QicsTable::setVerticalGridLineStyle ( QicsLineStyle  style  )  [slot]

Sets the vertical grid line style. See the "verticalGridLineStyle" property for details.

See also:
verticalGridLineStyle()

void QicsTable::setHorizontalGridLinePen ( const QPen &  pen  )  [slot]

Sets the pen used to draw the table's horizontal grid lines. See the "horizontalGridLinePen" property for details.

See also:
horizontalGridLinePen()

void QicsTable::setVerticalGridLinePen ( const QPen &  pen  )  [slot]

Sets the pen used to draw the table's vertical grid lines. See the "verticalGridLinePen" property for details.

See also:
verticalGridLinePen()

void QicsTable::setDrawPartialCells ( bool  b  )  [slot]

Sets the partial cell display policy. See the "drawPartialCells" property for details.

See also:
drawPartialCells()

void QicsTable::setGridCellClipping ( QicsGridCellClipping  c  )  [slot]

Sets the cell clipping display policy. See the "gridCellClipping" property for details.

See also:
gridCellClipping()

void QicsTable::setCellOverflowBehavior ( QicsCellOverflowBehavior  b  )  [slot]

Sets the grid's cell overflow behavior. See the "cellOverflowBehavior" property for details.

See also:
cellOverflowBehavior()

void QicsTable::setMaxOverflowCells ( int  num  )  [slot]

Sets the maximum number of overflow cells for the grid. See the "maxOverflowCells" property for details.

See also:
maxOverflowCells()

void QicsTable::setFrameStyle ( int  style  )  [slot]

Sets the frame style of the table's main grid. See the "frameStyle" property for details.

See also:
frameStyle()

void QicsTable::setFrameLineWidth ( int  lw  )  [slot]

Sets the frame line width of the table's main grid. See the "frameLineWidth" property for details.

See also:
frameLineWidth()

void QicsTable::setCurrentCellStyle ( QicsCurrentCellStyle  s  )  [slot]

Sets the style of the current cell in the table. See the "currentCellStyle" property for details.

See also:
currentCellStyle()

void QicsTable::setSelectionStyle ( QicsSelectionStyle  s  )  [slot]

Sets selection style of the table. See the "selectionStyle" property for details.

See also:
selectionStyle()

void QicsTable::setCurrentCellBorderWidth ( int  w  )  [slot]

Sets the width of the border that is drawn around the current cell in the table. See the "currentCellBorderWidth" property for details.

See also:
currentCellBorderWidth()

void QicsTable::setClickToEdit ( bool  b  )  [slot]

Sets whether the user must first click in a cell before being able to edit the cell by typing. See the "clickToEdit" property for details

See also:
clickToEdit()

void QicsTable::setAutoSelectCellContents ( bool  b  )  [slot]

Sets whether the contents of a cell are automatically selected when the table begins a cell edit operation. See the "autoSelectCellContents" property for details

See also:
autoSelectCellContents()

void QicsTable::setTraversalKeyEditBehavior ( QicsTraversalKeyEditBehavior  beh  )  [slot]

Sets the behavior of traversal keys within an edited cell. See the "traversalKeyEditBehavior" property for details.

See also:
traversalKeyEditBehavior

void QicsTable::setEnterTraversalDirection ( Qt::Orientation  dir  )  [slot]

Sets the direction that the table will traverse when the user types Enter or Shift-Enter. See the "enterTraversalDirection" property for details

See also:
enterTraversalDirection()

void QicsTable::setTabTraversalDirection ( Qt::Orientation  dir  )  [slot]

Sets the direction that the table will traverse when the user types Tab or Shift-Tab. See the "tabTraversalDirection" property for details

See also:
tabTraversalDirection()

void QicsTable::setTabTraverseToBegin ( bool  traverse  )  [slot]

Sets traversal cell behavior (for Tab key) when it achieves the end of row/column. See the "tabTraverseToBegin" property for details.

See also:
tabTraverseToBegin()

void QicsTable::setEnterTraverseToBegin ( bool  traverse  )  [slot]

Sets traversal cell behavior (for Enter key) when it achieves the end of row/column. See the "enterTraverseToBegin" property for details.

See also:
enterTraverseToBegin()

void QicsTable::setMoreTextPixmap ( const QPixmap &  pix  )  [slot]

Sets the pixmap that is used in this grid to show that text in a cell has been clipped (i.e. it could not completely fit in the cell).

See also:
moreTextPixmap()

void QicsTable::setDragEnabled ( bool  b  )  [slot]

Sets whether the user is allowed to drag from this table. See the "dragEnabled" property for details.

See also:
setDragEnabled

void QicsTable::setLayoutDirection ( Qt::LayoutDirection  layoutDirection  )  [slot]

Set the layout direction for a grid See the "layoutDirection" property for details.

See also:
setLayoutDirection

void QicsTable::setTopHeaderVisible ( bool   )  [slot]

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

See also:
topHeaderVisible()

void QicsTable::setBottomHeaderVisible ( bool   )  [slot]

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

See also:
bottomHeaderVisible()

void QicsTable::setLeftHeaderVisible ( bool   )  [slot]

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

See also:
leftHeaderVisible()

void QicsTable::setRightHeaderVisible ( bool   )  [slot]

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

See also:
rightHeaderVisible()

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

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

See also:
tableMargin()

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

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

See also:
tableSpacing()

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

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

See also:
gridSpacing()

void QicsTable::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 QicsTable::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()

void QicsTable::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 QicsTable::setAllowPropagateChanges ( bool  b  )  [slot]

Controls whether the table should allow propagating changes from editing cell to whole selection. See the "allowPropagateChanges" property for details.

See also:
allowPropagateChanges()

void QicsTable::setTopTitleWidget ( QWidget *  w  )  [slot]

Sets the title widget placed at the top of the table.

See also:
topTitleWidget()

void QicsTable::setBottomTitleWidget ( QWidget *  w  )  [slot]

Sets the title widget placed at the bottom of the table.

See also:
bottomTitleWidget()

void QicsTable::setLeftTitleWidget ( QWidget *  w  )  [slot]

Sets the title widget placed at the left of the table.

See also:
leftTitleWidget()

void QicsTable::setRightTitleWidget ( QWidget *  w  )  [slot]

Sets the title widget placed at the right of the table.

See also:
rightTitleWidget()

void QicsTable::setTopLeftCornerWidget ( QWidget *  w  )  [slot]

Sets the widget placed in the top left corner of the table (above the left header and to the left of the top header) to w. The widget must be a child of the table, and the table will take control of w when this method is called. If a widget was previously being displayed in this spot, it will be destroyed.

See also:
topLeftCornerWidget()

void QicsTable::setTopRightCornerWidget ( QWidget *  w  )  [slot]

Sets the widget placed in the top right corner of the table (above the right header and to the right of the top header) to w. The widget must be a child of the table, and the table will take control of w when this method is called. If a widget was previously being displayed in this spot, it will be destroyed.

See also:
topRightCornerWidget()

void QicsTable::setBottomLeftCornerWidget ( QWidget *  w  )  [slot]

Sets the widget placed in the bottom left corner of the table (below the left header and to the left of the bottom header) to w. The widget must be a child of the table, and the table will take control of w when this method is called. If a widget was previously being displayed in this spot, it will be destroyed.

See also:
bottomLeftCornerWidget()

void QicsTable::setBottomRightCornerWidget ( QWidget *  w  )  [slot]

Sets the widget placed in the bottom right corner of the table (below the right header and to the right of the bottom header) to w. The widget must be a child of the table, and the table will take control of w when this method is called. If a widget was previously being displayed in this spot, it will be destroyed.

See also:
bottomRightCornerWidget()

void QicsTable::setDefaultImagePath ( const QString &  path  )  [slot]

Sets default path for pixmaps to path. Pixmaps will be searched at this path on load.

See also:
defaultImagePath();
Since:
2.3

const QString& QicsTable::defaultImagePath (  )  const [inline, slot]

Returns default path for pixmaps to path.

See also:
setDefaultImagePath();
Since:
2.3

void QicsTable::setCurrentCell ( int  row,
int  col 
) [slot]

Sets the current cell of the table. This method will modify the table's selection list to contain only the specified cell.

See also:
currentCell()

void QicsTable::scroll ( QicsScrollDirection  dir,
int  num 
) [slot]

Scrolls the table num number of rows or columns in direction dir.

void QicsTable::freezeTopRows ( int  num_rows  )  [slot]

Freezes the first num_rows rows in the table's current viewport. These rows will be displayed "frozen" at the top of the table. If num_rows is 0, any frozen top rows will be unfrozen.

See also:
unfreezeTopRows()

void QicsTable::freezeBottomRows ( int  num_rows  )  [slot]

Freezes the last num_rows rows in the table's current viewport. These rows will be displayed "frozen" at the bottom of the table. If num_rows is 0, any frozen bottom rows will be unfrozen.

See also:
unfreezeBottomRows()

void QicsTable::unfreezeTopRows ( void   )  [slot]

Unfreezes any rows that have been frozen at the top of the table.

See also:
freezeTopRows()

void QicsTable::unfreezeBottomRows ( void   )  [slot]

void any rows that have been frozen at the bottom of the table.

See also:
freezeBottomRows()

void QicsTable::freezeLeftColumns ( int  num_cols  )  [slot]

Freezes the first num_cols columns in the table's current viewport. These rows will be displayed "frozen" on the left side of the table. If num_rows is 0, any frozen left columns will be unfrozen.

See also:
unfreezeLeftColumns()

void QicsTable::freezeRightColumns ( int  num_cols  )  [slot]

Freezes the last num_cols columns in the table's current viewport. These rows will be displayed "frozen" on the right side of the table. If num_rows is 0, any frozen right columns will be unfrozen.

See also:
unfreezeRightColumns()

void QicsTable::unfreezeLeftColumns ( void   )  [slot]

Unfreezes any columns that have been frozen on the left side of the table.

See also:
freezeLeftColumns()

void QicsTable::unfreezeRightColumns ( void   )  [slot]

Unfreezes any columns that have been frozen on the right side of the table.

See also:
freezeRightColumns()

int QicsTable::numFreezeTopRows ( void   )  const [slot]

Returns number of top frozen rows.

Since:
2.3

int QicsTable::numFreezeBottomRows ( void   )  const [slot]

Returns number of bottom frozen rows.

Since:
2.3

int QicsTable::numFreezeRightColumns ( void   )  const [slot]

Returns number of right frozen columns.

Since:
2.3

int QicsTable::numFreezeLeftColumns ( void   )  const [slot]

Returns number of left frozen columns.

Since:
2.3

void QicsTable::toggleRowHeightExpansion ( int  row  )  [slot]

Expands the height of row row to the number of pixels necessary to completely display all items in the row. Calling this method a second time will cause the row to revert to its previous height.

void QicsTable::toggleColumnWidthExpansion ( int  col  )  [slot]

Expands the width of column col to the number of pixels necessary to completely display all items in the column. Calling this method a second time will cause the column to revert to its previous width.

void QicsTable::setTopRow ( int  row  )  [slot]

Scrolls the table so that the top displayed row is row. If visible area contains all rows, function do nothing See the "topRow" property for details.

See also:
topRow()

void QicsTable::setLeftColumn ( int  col  )  [slot]

Scrolls the table so that the leftmost displayed column is col. If visible area contains all columns, function do nothing See the "leftColumn" property for details.

See also:
leftColumn()

void QicsTable::setRepaintBehavior ( QicsRepaintBehavior  r  )  [slot]

Sets the repaint behavior of the table widget. See the "repaintBehavior" property for details.

See also:
repaintBehavior()

void QicsTable::setVisibleRows ( int  num  )  [slot]

Sets the number of visible rows in the main grid area of the table. This value does not include any frozen rows that may be visible. See the "visibleRows" property for details.

See also:
visibleRows()

void QicsTable::setVisibleColumns ( int  num  )  [slot]

Sets the number of visible columns in the main grid area of the table. This value does not include any frozen columns that may be visible. See the "visibleColumns" property for details.

See also:
visibleColumns()

bool QicsTable::traverseToCell ( int  row,
int  col 
) [slot]

Traverse to cell (row, col ). This will cause the specified cell to become visible in the main grid, if it is not already.

void QicsTable::traverseToBeginningOfTable ( void   )  [slot]

Moves the current cell to the top-left cell in the table's current viewport.

void QicsTable::traverseToEndOfTable ( void   )  [slot]

Moves the current cell to the bottom-right cell in the table's current viewport.

void QicsTable::traverseToBeginningOfRow ( void   )  [slot]

Moves the current cell to the leftmost cell of the current row in the table's current viewport.

void QicsTable::traverseToEndOfRow ( void   )  [slot]

Moves the current cell to the rightmost cell of the current row in the table's current viewport.

void QicsTable::traverseToBeginningOfColumn ( void   )  [slot]

Moves the current cell to the topmost cell of the current column in the table's current viewport.

void QicsTable::traverseToEndOfColumn ( void   )  [slot]

Moves the current cell to the bottommost cell of the current column in the table's current viewport.

void QicsTable::traverseLeft ( void   )  [slot]

Moves the current cell to the nearest cell to the left of the current cell that is enabled.

void QicsTable::traverseRight ( void   )  [slot]

Moves the current cell to the nearest cell to the right of the current cell that is enabled.

void QicsTable::traverseUp ( void   )  [slot]

Moves the current cell to the nearest cell above the current cell that is enabled.

void QicsTable::traverseDown ( void   )  [slot]

Moves the current cell to the nearest cell below the current cell that is enabled.

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

Delete a column from the table

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

Append a column or more to the table

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

Insert a column into the table before column

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

Delete a row from the table

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

Append a row or more to the table

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

Insert a row into the table before row

virtual void QicsTable::print ( QPrinter *  printer  )  [virtual, slot]

Prints the table to the specified printer device.

virtual void QicsTable::print ( QPrinter *  printer,
const QicsRegion region 
) [virtual, slot]

Prints the region of the table specified in region to the specified printer device.

void QicsTable::setClipboardDelegate ( QicsAbstractClipboardDelegate Delegate  )  [slot]

Sets clipboard delegate to Delegate. Passing 0 will remove the delegate.

See also:
clipboardDelegate()
Since:
2.3

QicsAbstractClipboardDelegate* QicsTable::clipboardDelegate (  )  [slot]

Returns pointer to the current clipboard delegate, or 0 if no delegate installed.

See also:
setClipboardDelegate()
Since:
2.3

virtual void QicsTable::cut ( void   )  [virtual, slot]

Performs a cut operation. The data in the current selection list is placed in the application's clipboard, and the cells in the current selection list are cleared.

virtual void QicsTable::copy ( void   )  [virtual, slot]

Performs a copy operation. The data in the current selection list is placed in the application's clipboard.

virtual void QicsTable::paste ( void   )  [virtual, slot]

Performs a paste operation. This method attempts to place data from the application's clipboard in the data model specified in this object.

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

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

int QicsTable::defaultRowHeightInPixels (  )  const [inline, slot]

Returns default height (in pixels) for the the entire table.

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

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

int QicsTable::defaultRowHeightInChars (  )  const [inline, slot]

Returns default height (in character unit) for the the entire table.

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

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

int QicsTable::defaultColumnWidthInPixels (  )  const [inline, slot]

Returns default column width in pixels.

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

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

int QicsTable::defaultColumnWidthInChars (  )  const [inline, slot]

Returns default column width in chars.

void QicsTable::setCellWidthMode ( Qics::QicsCellWidthMode  mode  )  [slot]

Sets the behavior of auto fitting cell width to mode.

  • ChangeOnlyHeight - fit only Height
  • ChangeHeightWidth - fit Height and Widhth
    Since:
    2.3.1
    See also:
    QicsCellWidthMode

Qics::QicsCellWidthMode QicsTable::cellWidthMode (  )  const [inline, slot]

Returns current cell width mode.

Since:
2.3.1

void QicsTable::setNavigatorAllowed ( bool  allow  )  [slot]

Enables (allow = true) or disables (allow = false) table navigator .

See also:
isNavigatorAllowed()

void QicsTable::repaint (  )  [slot]

Repaints whole table.

void QicsTable::selectAll (  )  [slot]

Selects all the cells in the main grid.

Since:
2.2

void QicsTable::deleteSelected (  )  [slot]

Deletes data from selected cells.

Since:
2.2

void QicsTable::selectRow ( int  row,
bool  exclusive = true 
) [slot]

Selects entire row row. If exclusive is true, then previous selection is cleared.

Since:
2.3

void QicsTable::selectColumn ( int  col,
bool  exclusive = true 
) [slot]

Selects entire column col. If exclusive is true, then previous selection is cleared.

Since:
2.3

void QicsTable::configureFromXml ( const QString &  xmlString  ) 

Loads table attributes from xmlString.

See also:
configureFromXmlFile(), configureFromXmlFile()

bool QicsTable::configureFromXmlFile ( const QString &  fileName  ) 

Loads table attributes from xml file fileName. Returns true if configuration was successful, false otherwise.

See also:
configureFromXml(), configurationToXml()
Since:
2.3

QString QicsTable::configurationToXml (  ) 

Stores table attributes to xmlString.

See also:
configureFromXml(), configureFromXmlFile()

void QicsTable::setCursor ( const QCursor &   ) 

Sets cursor for entire table

void QicsTable::pressed ( int  row,
int  col,
int  button,
const QPoint &  pos 
) [signal]

This signal is emitted when the user presses a mouse button in the main grid of the table. The indices of the cell, the button that was pressed, and the position of the mouse pointer in the table are passed as parameters.

See also:
clicked(), doubleClicked()

void QicsTable::clicked ( int  row,
int  col,
int  button,
const QPoint &  pos 
) [signal]

This signal is emitted when the user clicks (presses and releases in the same cell) a mouse button in the main grid of the table. The indices of the cell, the button that was pressed, and the position of the mouse pointer in the table are passed as parameters.

See also:
pressed(), doubleClicked()

void QicsTable::doubleClicked ( int  row,
int  col,
int  button,
const QPoint &  pos 
) [signal]

This signal is emitted when the user double clicks a mouse button in the main grid of the table. The indices of the cell, the button that was pressed, and the position of the mouse pointer in the table are passed as parameters.

See also:
clicked()

void QicsTable::currentCellChanged ( int  new_row,
int  new_col 
) [signal]

This signal is emitted when the current cell of the table changes. The cell (new_row, new_col ) is the new current cell (in visual coordinates ).

See also:
currentCell()

void QicsTable::selectionListChanged ( bool  in_progress  )  [signal]

This signal is emitted when the selection list of the table changes. The parameter in_progress signifies if the selection action that caused the change is still in progress.

See also:
selectionList()

void QicsTable::valueChanged ( int  row,
int  col 
) [signal]

This signal is emitted when the value of a cell in the main grid changes. The cell (row, col ) is expressed in visual coordinates.

void QicsTable::rowSelected ( int  row,
bool  selected 
) [signal]

Signal emitted when the row selection changes. The row parameter is row index, selected is true when row was selected and false when row was deselected.

void QicsTable::columnSelected ( int  col,
bool  selected 
) [signal]

Signal emitted when the column selection changes. The col parameter is column index, selected is true when column was selected and false when column was deselected.

void QicsTable::rowResized ( int  row,
int  old_height,
int  new_height 
) [signal]

This signal is emitted whenever a row dimension has changed in the dimension manager.

void QicsTable::columnResized ( int  col,
int  old_width,
int  new_width 
) [signal]

This signal is emitted whenever a column dimension has changed in the dimension manager.

void QicsTable::rowHeaderResized ( int  old_width,
int  new_width 
) [signal]

This signal is emitted whenever a row header width has changed. If header has several rows then old_width and new_width are only valid for the top row.

void QicsTable::columnHeaderResized ( int  old_height,
int  new_height 
) [signal]

This signal is emitted whenever a column header height has changed. If header has several columns then old_height and new_height are only valid for the left column.

void QicsTable::cellEditStarted ( int  row,
int  col 
) [signal]

This signal is emitted when cell edit just've been started.

void QicsTable::cellEditEnded ( int  row,
int  col 
) [signal]

This signal is emitted when cell edit ended.

void QicsTable::rowsMoved ( int  target,
const QVector< int > &  rows 
) [signal]

This signal is emitted when rows moved. See moveRows() for more information.

void QicsTable::columnsMoved ( int  target,
const QVector< int > &  columns 
) [signal]

This signal is emitted when columns moved. See moveColumns() method for more information.

void QicsTable::fillHandlePressed ( QMouseEvent *  m,
const QicsSelection initialSel 
) [signal]

This signal is emitted when the table is in exclusive selection mode, and fill handle was pressed by mouse.

Parameters:
m Mouse event object.
initialSel A pointer to initial selection.
Since:
2.3

void QicsTable::fillHandleReleased ( QMouseEvent *  m,
const QicsSelection initialSel,
const QicsSelection currentSel 
) [signal]

This signal is emitted when the table is in exclusive selection mode, and fill handle was released (after drag operation).

Parameters:
m Mouse event object.
initialSel A pointer to initial selection.
currentSel A pointer to current selection (expanded while dragging).
Since:
2.3

void QicsTable::fillHandleDoubleClicked ( QMouseEvent *  m,
const QicsSelection initialSel 
) [signal]

This signal is emitted when the table is in exclusive selection mode, and fill handle was double-clicked.

Parameters:
m Mouse event object.
initialSel A pointer to initial selection.
Since:
2.3

void QicsTable::fillHandleDragged ( QMouseEvent *  m,
const QicsSelection initialSel,
const QicsSelection currentSel 
) [signal]

This signal is emitted when the table is in exclusive selection mode, and fill handle dragging is in progress.

Parameters:
m Mouse event object.
initialSel A pointer to initial selection.
currentSel A pointer to current selection (expanded while dragging).
Since:
2.3

void QicsTable::layoutFailed ( int  orientation  )  [signal]

This signal is emitted when widget layout became deformed. It is happens often when table has fixed size and columns or rows are freezen. In this case summ of inner widgets sizes can be more then size of QicsTable. orientation is Qt::Vertical when layout deformed in vertical direction(rows are freezen), and Qt::Horizontal when layout deformed in horizontal direction(columns are freezen).


Member Data Documentation

Specifies the topmost visible row in the table. The default value of this property is 0.

Returns/sets default column width in character units.

Returns/sets default column width in pixels.

Returns/sets default row height in chars.

Returns/sets default row height in pixels.

Specifies the bottommost visible row in the table. This value cannot be set directly by the programmer (use setVisibleRows() and setViewport()). The default value of this property is QicsLAST_ROW.

Specifies the leftmost visible column in the table. The default value of this property is 0.

Specifies the rightmost visible column in the table. This value cannot be set directly by the programmer (use setVisibleColumns() and setViewport()). The default value of this property is QicsLAST_COLUMN.

Specifies the current number of visible rows in the table. This value does not include any frozen rows that may be visible. The default value of this property is 10.

Specifies the current number of visible columns in the table. This value does not include any frozen columns that may be visible. The default value of this property is 10.

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

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

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

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

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.

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.

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.

Specifies the selection policy for the table.

The default value of this property is QicsSelectMultiple.

Specifies the policy of changing active cell during selection for the table.

The default value of this property is Follow.

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.

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.

Specifies the drawing and dimension calculation behavior of the table widget.

The default value of this property is RepaintOn.

Specifies the mode for the table's horizontal scrollbar.

The default value of this property is Auto.

Specifies the mode for the table's vertical scrollbar.

The default value of this property is Auto.

Specifies the line width of the frame bordering the table grid and all headers in the table.

The default value of this property is 2.

Specifies the style of the frame bordering the table grid. This value has the same possible values as QFrame::frameStyle().

The default value of this property is (QFrame::StyledPanel | QFrame::Sunken for table grids, and (QFrame::NoFrame | QFrame::Plain) for header grids.

Specifies whether horizontal separator lines between cells are drawn

The default value of this property is true.

Specifies whether vertical separator lines between cells are drawn

The default value of this property is true.

Specifies the pen of the horizontal grid lines in the grid.

The default value of property is transparent solid pen.

Specifies the pen of the horizontal grid lines in the grid. Default value is transparent solid pen.

The default value of property is transparent solid pen.

Specifies the width of the grid's horizontal grid lines.

The default value of this property is 1.

Specifies the width of the grid's vertical grid lines.

The default value of this property is 1.

Specifies the style of the horizontal grid lines in the grid. See QicsLineStyle for details on the available styles.

The default value of this property is Plain.

Specifies the style of the vertical grid lines in the grid. See QicsLineStyle for details on the available styles.

The default value of this property is Plain.

Specifies the overflow behavior of the grid. See Qics::QicsCellOverflowBehavior for details.

The default value of this property is Clip.

Specifies the maximum number of cells that a given cell can overflow into (when the cellOverflowBehavior property is set to Overflow ).

The default value of this property is 10.

Specifies whether cells that would only partially be shown at the right or bottom edge of the grid should be drawn. If this value is false, a cell will only be drawn if it can be completely shown.

The default value of this property is true.

Specifies the policy for text that is too large to fit into a cell. If the value is AllowPartial, as much of the text as possible will be displayed. If the value is NoDisplayOnPartial, none of the text will be displayed. If the value is UseClippedSymbol, some text will be displayed, and a clipped symbol will then be displayed, signifying that not all of the text could be displayed.

The default value of this property is AllowPartial.

Specifies the style of the current cell in the grid. See QicsCurrentCellStyle for details.

The default value of this property is Spreadsheet.

Specifies the selection style of the table. See QicsSelectionStyle for details.

The default value of this property is Normal.

Specifies the width of the border that is drawn around the current cell in the grid.

The default value of this property is 3.

Specifies whether the user must first click in a cell before being able to edit the cell by typing. If true, the user must left click in the cell before keystrokes will be accepted. If false, keystrokes will immediately be accepted.

The default value of this property is false.

Specifies whether the contents of a cell are automatically selected when the table begins a cell edit operation. If true, the contents of each cell will be selected when beginning an edit (and thus typing any character will erase the previous contents). If false, the contents of each sell will not be selected (and thus typing any character will append to the previous contents).

The default value of this property is true.

Specifies the behavior of traversal keys (Left, Right, Up, Down, etc) within an edited cell (using QicsTextCellDisplay). If TraverseWithinCell, traversal keys will move the text cursor within the edited cell. If TraverseBetweenCells, traversal keys move the current cell highlight between cells in the table.

The default value of this property is TraverseWithinCell.

Specifies the direction that the grid will traverse when the user types Enter or Shift-Enter. If the property is Vertical, Enter will traverse down one cell, and Shift-Enter will traverse up one cell. If the property is Horizontal, Enter will traverse right one cell, and Shift-Enter will traverse left one cell.

The default value of this property is Vertical.

Specifies the direction that the grid will traverse when the user types Tab or Shift-Tab. If the property is Vertical, Tab will traverse down one cell, and Shift-Tab will traverse up one cell. If the property is Horizontal, Tab will traverse right one cell, and Shift-Tab will traverse left one cell.

The default value of this property is Horizontal.

Specifies traversal cell behavior (for Tab key) when it achieves the end of row/column. If true it jumps to the first cell of next row/column, else does nothing.

Specifies traversal cell behavior (for Enter key) when it achieves the end of row/column. If true it jumps to the first cell of next row/column, else does nothing.

Specifies the pixmap that is used in this grid to show that text in a cell has been clipped (i.e. it could not completely fit in the cell).

The default value of this property is a "right arrow" pixmap.

Specifies whether the user is allowed to drag cell contents to other cells, tables, and/or other applications.

The default value of this property is true.

Qt::LayoutDirection QicsTable::layoutDirection

Specifies property set the layout direction for a grid

The default value of this property is Qt::LeftToRight

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.

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

The default value of this property is false.

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 when the cell is not selected or being edited.

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

This is convenience property which specifies the background 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 not selected or being edited.

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

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 but not being edited.

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

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 but not being edited.

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

Specifies the edit foreground color of the cell(s). This color will be used when editing text in the cell.

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

Specifies the edit background color of the cell(s). This color will be used when editing text in the cell.

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

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.

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

The default value of this property is 6.

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

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

See also:
Qt::Alignment

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

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

The default value of this property is 32767.

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.

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.

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.

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.

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.

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.

Specifies whether the table should allow propagating changes from editing cell to whole selection. You can do this by selecting cells you want to change to same value and double click with CTRL key on any cell within selection and entering value you want - after that all selected cells will also change their value to same value.

Note: The selection policy shouldn't be SelectSingleRow or SelectMultipleRow to allow this feature.

Attention: To use this feature for changing value of the comboboxes you will need to select them using CTRL key, release CTRL and click on last selected combobox holding SHIFT key.

Setting FakeCellsDrawingIndex forcing table to draw empty not editable cells witch are using default style default value of this property is Qics::NoIndex


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.