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 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
bool columnHeaderUsesModel
bool rowHeaderUsesModel
QicsRepaintBehavior repaintBehavior
QicsScrollBarMode hScrollBarMode
QicsScrollBarMode vScrollBarMode

Common Grid Properties

int frameLineWidth
int frameStyle
bool horizontalGridLinesVisible
bool verticalGridLinesVisible
int horizontalGridLineWidth
int verticalGridLineWidth
QicsLineStyle horizontalGridLineStyle
QicsLineStyle verticalGridLineStyle
QicsCellOverflowBehavior cellOverflowBehavior
int maxOverflowCells
bool drawPartialCells
QicsGridCellClipping gridCellClipping
QicsCurrentCellStyle currentCellStyle
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
QicsPasteValidator pasteValidator
QValidator validator

Public Types

enum  QicsSortMode { QicsStableSort = 0, QicsQuickSort }
enum  QicsCellOverflowBehavior { Clip = 0, Overflow, ToolTip }
enum  QicsCurrentCellStyle { Spreadsheet = 0, NormalSelected }
enum  QicsGridCellClipping { AllowPartial = 0, NoDisplayOnPartial, UseClippedSymbol }
enum  QicsGridType { TableGrid = 0, RowHeaderGrid, ColumnHeaderGrid }
enum  QicsHeaderType { RowHeader = 0, ColumnHeader }
enum  QicsIndexType { RowIndex, ColumnIndex }
enum  QicsLineStyle { None = 0, Plain, Raised, Sunken }
enum  QicsRepaintBehavior { RepaintOff = 0, RepaintOn = 1, RepaintCalcOnly = 2 }
enum  QicsScrollBarMode { Auto = 0, AlwaysOff, AlwaysOn }
enum  QicsScrollDirection {
  ScrollNone = 0, ScrollUp, ScrollDown, ScrollLeft,
  ScrollRight, ScrollToRow, ScrollToColumn
}
enum  QicsSelectionPolicy {
  SelectNone = 0, SelectSingle, SelectMultiple, SelectSingleRow,
  SelectMultipleRow
}
enum  QicsSelectionType {
  SelectionNone = 0, SelectionBegin, SelectionDrag, SelectionEnd,
  SelectionExtend, SelectionAdd
}
enum  QicsSortOrder { Ascending = 0, Descending }
enum  QicsTableDisplayOption { DisplayNever = 0, DisplayAlways, DisplayFirstPage }
enum  QicsTraversalKeyEditBehavior { TraverseWithinCell = 0, TraverseBetweenCells }

Public Slots

void 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)
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 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 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)
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)
virtual void cut (void)
virtual void copy (void)
virtual void paste (void)
void setDefaultRowHeightInPixels (int height)
void setDefaultRowHeightInChars (int height)
void setDefaultColumnWidthInPixels (int width)
void setDefaultColumnWidthInChars (int width)
void repaint ()

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 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 layoutFailed (int orientation)

Public Member Functions

 QicsTable (QicsDataModel *table=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 ()
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 (void) 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)
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
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
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)
QicsRepaintBehavior repaintBehavior (void) const
QicsScrollBarMode hScrollBarMode (void) const
QicsScrollBarMode vScrollBarMode (void) const
void setHScrollBarMode (QicsScrollBarMode m)
void setVScrollBarMode (QicsScrollBarMode m)
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 (QVector< int > columns, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void sortColumns (QVector< int > rows, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void moveRows (int target_row, const QVector< int > &rows)
void moveColumns (int target_col, const QVector< int > &cols)
bool 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
QicsCellcurrentCell (void)
const QicsCellcurrentCell (void) const
bool editCurrentCell (void)
void uneditCurrentCell (void)
bool editCell (int row, int col)
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
void setColumnsSortingMode (Qics::QicsSortMode mode)
Qics::QicsSortMode columnsSortingMode (void)
void setRowsSortingMode (Qics::QicsSortMode mode)
Qics::QicsSortMode rowsSortingMode (void)
void setCursor (const QCursor &)
 Sets cursor for entire table.

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 resizeHeader (int, QicsHeaderType)
void focusNextPrevGrid (const QicsScreenGrid *, bool next)

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 *)
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 configureFrozen (void)

Protected Attributes

QPointer< QicsTableCommonmyTableCommon
QPointer< QicsSelectionManagermySelectionManager
QPointer< QicsGridLayout > myGridLayout
QPointer< QicsScrollManager > myScrollManager
QPointer< QicsScrollermyRowScroller
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
void * myFoundryKey
bool myUnfreezingFlag

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. The QicsTable widget has extensive printing capabilities, including the ability to print the table with different visual characteristics than the on-screen table display.

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.

The table has three types of attributes:

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, str);
    }
}

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.

Cells

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:

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

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.


Member Enumeration Documentation

enum Qics::QicsCellOverflowBehavior [inherited]
 

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

  • 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::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
  • SelectionMultiple 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::QicsSortMode [inherited]
 

Denotes the sort algorithm which is used

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

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

enum Qics::QicsTraversalKeyEditBehavior [inherited]
 

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.


Constructor & Destructor Documentation

QicsTable::QicsTable QicsDataModel table = 0,
QWidget *  parent = 0
 

Constructs a QicsTable widget that will display data contained in table, or, an empty table if table 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

bool QicsTable::addCellSpan QicsSpan  span  ) 
 

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.

See also:
removeCellSpan()

cellSpanList()

void QicsTable::addColumns int  howMany  )  [slot]
 

Append a column or more to the table

void QicsTable::addRows int  rows  )  [slot]
 

Append a row or more to the table

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::alignment void   )  const
 

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

See also:
Qt::Alignment

setAlignment()

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

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

QColor QicsTable::backgroundColor void   )  const
 

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

See also:
setBackgroundColor()

QPen QicsTable::bottomBorderPen void   )  const
 

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

See also:
setBorderPen()

bool QicsTable::bottomHeaderVisible void   )  const
 

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

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

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.

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

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

See also:
setBottomTitleWidget

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

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

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

This signal is emitted when cell edit ended.

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

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

QicsCellOverflowBehavior QicsTable::cellOverflowBehavior void   )  const
 

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

See also:
setCellOverflowBehavior()

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::cellRef int  rownum,
int  colnum
 

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

See also:
cell()

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

void QicsTable::clearSelectionList void   ) 
 

Clears the selection list for the table

See also:
setSelectionList()

void QicsTable::clearTable void   ) 
 

Clears table deleting all displayers and styles

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

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

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

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 QicsColumnHeader* QicsTable::columnHeader void   )  const
 

Returns a newly allocated const column header object.

See also:
columnHeaderRef()

QicsColumnHeader* QicsTable::columnHeader void   ) 
 

Returns a newly allocated column header object.

See also:
columnHeaderRef()

const QicsColumnHeader& QicsTable::columnHeaderRef void   )  const
 

Returns a const reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

QicsColumnHeader& QicsTable::columnHeaderRef void   ) 
 

Returns a reference to an internal flyweight QicsColumnHeader object.

See also:
columnHeader()

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.

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::columnRef int  colnum  ) 
 

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

See also:
column()

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::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::columnsMoved int  target,
const QVector< int > &  columns
[signal]
 

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

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

Gets current columns sorting mode.

Returns:
current sorting mode.

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.

const 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()

QicsCell* QicsTable::currentCell void   ) 
 

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

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

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

QicsCurrentCellStyle QicsTable::currentCellStyle void   )  const
 

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

See also:
setCurrentCellStyle()

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

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

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.

QicsDataModel* QicsTable::dataModel void   )  const [inline]
 

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

See also:
setDataModel()

void QicsTable::deleteColumn int  column  )  [slot]
 

Delete a column from the table

void QicsTable::deleteRow int  row  )  [slot]
 

Delete a row from the table

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

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

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

bool QicsTable::drawPartialCells  )  const
 

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

See also:
setDrawPartialCells()

QColor QicsTable::editBackgroundColor void   )  const
 

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

See also:
setEditBackgroundColor()

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.

bool QicsTable::editCurrentCell void   ) 
 

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

QColor QicsTable::editForegroundColor void   )  const
 

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

See also:
setEditForegroundColor()

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

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)

QColor QicsTable::foregroundColor void   )  const
 

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

See also:
setForegroundColor()

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

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

QicsGridCellClipping QicsTable::gridCellClipping  )  const
 

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

See also:
setGridCellClipping()

int QicsTable::gridSpacing void   )  const
 

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

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

QicsLineStyle QicsTable::horizontalGridLineStyle void   )  const
 

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

See also:
setHorizontalGridLineStyle()

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

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

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.

QicsScrollBarMode QicsTable::hScrollBarMode void   )  const
 

Returns the mode of the horizontal scrollbar. See the "hScrollBarMode" 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()

void QicsTable::insertColumn int  column  )  [slot]
 

Insert a column into the table before column

void QicsTable::insertRow int  row  )  [slot]
 

Insert a row into the table before row

QString QicsTable::label void   )  const
 

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

See also:
setLabel()

Qt::LayoutDirection QicsTable::layoutDirection void   )  const
 

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

See also:
setLayoutDirection

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

QPen QicsTable::leftBorderPen void   )  const
 

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

See also:
setBorderPen()

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

bool QicsTable::leftHeaderVisible void   )  const
 

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

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

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

See also:
setLeftTitleWidget

const QicsMainGrid* QicsTable::mainGrid void   )  const
 

Returns a newly allocated const main grid object.

See also:
mainGridRef()

QicsMainGrid* QicsTable::mainGrid void   ) 
 

Returns a newly allocated main grid object.

See also:
mainGridRef()

const QicsMainGrid& QicsTable::mainGridRef void   )  const
 

Returns a const reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

QicsMainGrid& QicsTable::mainGridRef void   ) 
 

Returns a reference to an internal flyweight QicsMainGrid object.

See also:
mainGrid()

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.

int QicsTable::margin void   )  const
 

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

See also:
setMargin()

int QicsTable::maxLength void   )  const
 

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

See also:
setMaxLength()

int QicsTable::maxOverflowCells void   )  const
 

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

See also:
setMaxOverflowCells()

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

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

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

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.

QicsPasteValidator* QicsTable::pasteValidator void   )  const
 

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

See also:
setPasteValidator()

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

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

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.

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

Prints the table to the specified printer device.

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

void QicsTable::removeCellSpan int  start_row,
int  start_col
[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.

See also:
addCellSpan()

cellSpanList()

void QicsTable::repaint  )  [slot]
 

Repaints whole table.

QicsRepaintBehavior QicsTable::repaintBehavior void   )  const
 

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

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

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::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::repeatingColumnRef int  start_col,
unsigned int  interval
 

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

See also:
repeatingColumn()

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

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

QPen QicsTable::rightBorderPen void   )  const
 

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

See also:
setTopBorderPen()

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.

bool QicsTable::rightHeaderVisible void   )  const
 

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

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

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

See also:
setRightTitleWidget

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

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 QicsRowHeader* QicsTable::rowHeader void   )  const
 

Returns a newly allocated const row header object.

See also:
rowHeaderRef()

QicsRowHeader* QicsTable::rowHeader void   ) 
 

Returns a newly allocated row header object.

See also:
rowHeaderRef()

const QicsRowHeader& QicsTable::rowHeaderRef void   )  const
 

Returns a const reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

QicsRowHeader& QicsTable::rowHeaderRef void   ) 
 

Returns a reference to an internal flyweight QicsRowHeader object.

See also:
rowHeader()

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.

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::rowRef int  rownum  ) 
 

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

See also:
row()

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::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::rowsMoved int  target,
const QVector< int > &  rows
[signal]
 

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

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

Gets current rows sorting mode.

Returns:
current sorting mode.

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

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

QColor QicsTable::selectedBackgroundColor void   )  const
 

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

See also:
setSelectedBackgroundColor()

QColor QicsTable::selectedForegroundColor void   )  const
 

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

See also:
setSelectedForegroundColor()

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

QicsSelectionList* QicsTable::selectionList void   )  const
 

Returns a copy of the table'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()

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

QicsSelectionPolicy QicsTable::selectionPolicy void   )  const
 

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

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::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::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::setBackgroundColor const QColor &  p  )  [slot]
 

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

See also:
backgroundColor()

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

Sets the default cell 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()

void QicsTable::setBottomHeaderVisible bool   )  [slot]
 

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

See also:
bottomHeaderVisible()

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::setBottomTitleWidget QWidget *  w  )  [slot]
 

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

See also:
bottomTitleWidget()

void QicsTable::setCellOverflowBehavior QicsCellOverflowBehavior  b  )  [slot]
 

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

See also:
cellOverflowBehavior()

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::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::setColumnsSortingMode Qics::QicsSortMode  mode  )  [inline]
 

Sets the sorting algorithm for columns.

Parameters:
mode sort mode sets to.

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::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::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::setCursor const QCursor &   ) 
 

Sets cursor for entire table.

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

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

See also:
dataModel()

void QicsTable::setDefaultColumnWidthInChars int  width  )  [slot]
 

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

void QicsTable::setDefaultColumnWidthInPixels int  width  )  [slot]
 

Sets the default column width to width 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.

void QicsTable::setDefaultRowHeightInPixels int  height  )  [slot]
 

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

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::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::setDrawPartialCells bool  b  )  [slot]
 

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

See also:
drawPartialCells()

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::setEditForegroundColor const QColor &  p  )  [slot]
 

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

See also:
editForegroundColor()

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::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::setForegroundColor const QColor &  p  )  [slot]
 

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

See also:
foregroundColor()

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::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::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::setGridCellClipping QicsGridCellClipping  c  )  [slot]
 

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

See also:
gridCellClipping()

void QicsTable::setGridSpacing int  spacing  )  [slot]
 

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

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::setHorizontalGridLineStyle QicsLineStyle  style  )  [slot]
 

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

See also:
horizontalGridLineStyle()

void QicsTable::setHorizontalGridLinesVisible bool  b  )  [slot]
 

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

See also:
horizontalGridLinesVisible()

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::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(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::setHScrollBarMode QicsScrollBarMode  m  ) 
 

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

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::setLabel const QString &  label  )  [slot]
 

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

See also:
label()

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::setLeftBorderPen const QPen &  pen  )  [slot]
 

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

See also:
topBorderPen()

void QicsTable::setLeftColumn int  col  )  [slot]
 

Scrolls the table so that the leftmost displayed column is col. See the "leftColumn" property for details.

See also:
leftColumn()

void QicsTable::setLeftHeaderVisible bool   )  [slot]
 

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

See also:
leftHeaderVisible()

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

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

See also:
leftTitleWidget()

void QicsTable::setMargin int  margin  )  [slot]
 

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

See also:
margin()

void QicsTable::setMaxLength int  len  )  [slot]
 

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

See also:
maxLength()

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

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

See also:
pasteValidator()

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::setPixmap const QPixmap &  p  )  [slot]
 

Sets the default cell pixmap. 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::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::setRepaintBehavior QicsRepaintBehavior  r  )  [slot]
 

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

See also:
repaintBehavior()

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::setRightHeaderVisible bool   )  [slot]
 

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

See also:
rightHeaderVisible()

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

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

See also:
rightTitleWidget()

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::setRowsSortingMode Qics::QicsSortMode  mode  )  [inline]
 

Sets the sorting algorithm for rows.

Parameters:
mode sort mode sets to.

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::setSelectedForegroundColor const QColor &  p  )  [slot]
 

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

See also:
selectedForegroundColor()

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

void QicsTable::setTableMargin int  margin  )  [slot]
 

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

void QicsTable::setTableSpacing int  spacing  )  [slot]
 

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

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::setTextFlags int  flags  )  [slot]
 

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

See also:
Qt::TextFlags

textFlags()

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::setTopHeaderVisible bool   )  [slot]
 

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

See also:
topHeaderVisible()

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::setTopRow int  row  )  [slot]
 

Scrolls the table so that the top displayed row is row. See the "topRow" property for details.

See also:
topRow()

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

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

See also:
topTitleWidget()

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::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::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::setVerticalGridLineStyle QicsLineStyle  style  )  [slot]
 

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

See also:
verticalGridLineStyle()

void QicsTable::setVerticalGridLinesVisible bool  b  )  [slot]
 

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

See also:
verticalGridLinesVisible()

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::setVerticalScrollBar QicsScroller newScroller  ) 
 

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

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

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::setVScrollBarMode QicsScrollBarMode  m  ) 
 

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

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

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.

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

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)

int QicsTable::textFlags void   )  const
 

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

See also:
Qt::TextFlags

setTextFlags()

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

QPen QicsTable::topBorderPen void   )  const
 

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

See also:
setBorderPen()

bool QicsTable::topHeaderVisible void   )  const
 

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

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

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

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

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

See also:
setTopTitleWidget

QicsTraversalKeyEditBehavior QicsTable::traversalKeyEditBehavior void   )  const
 

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

See also:
setTraversalKeyEditBehavior

void QicsTable::traverseDown void   )  [slot]
 

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

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::traverseToBeginningOfColumn void   )  [slot]
 

Moves the current cell to the topmost cell of the current column 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::traverseToBeginningOfTable void   )  [slot]
 

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

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::traverseToEndOfColumn void   )  [slot]
 

Moves the current cell to the bottommost cell of the current column 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::traverseToEndOfTable void   )  [slot]
 

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

void QicsTable::traverseUp void   )  [slot]
 

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

void QicsTable::uneditCurrentCell void   ) 
 

Stops an edit operation on the current cell.

void QicsTable::unfreezeBottomRows void   )  [slot]
 

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

See also:
freezeBottomRows()

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

void QicsTable::unfreezeTopRows void   )  [slot]
 

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

See also:
freezeTopRows()

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

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

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

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

QicsLineStyle QicsTable::verticalGridLineStyle void   )  const
 

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

See also:
setVerticalGridLineStyle()

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

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.

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

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

QicsScrollBarMode QicsTable::vScrollBarMode void   )  const
 

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


Member Data Documentation

int QicsTable::alignment
 

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

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

See also:
Qt::Alignment

bool QicsTable::allowPropagateChanges
 

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.

bool QicsTable::autoSelectCellContents
 

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.

QColor QicsTable::backgroundColor
 

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

QPen QicsTable::bottomBorderPen
 

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.

bool QicsTable::bottomHeaderVisible
 

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

int QicsTable::bottomRow
 

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.

QicsCellOverflowBehavior QicsTable::cellOverflowBehavior
 

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

The default value of this property is Clip.

bool QicsTable::clickToEdit
 

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.

bool QicsTable::columnHeaderUsesModel
 

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

The default value of this property is false.

int QicsTable::currentCellBorderWidth
 

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

The default value of this property is 3.

QicsCurrentCellStyle QicsTable::currentCellStyle
 

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

The default value of this property is Spreadsheet.

bool QicsTable::dragEnabled
 

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.

bool QicsTable::drawPartialCells
 

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.

QColor QicsTable::editBackgroundColor
 

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.

QColor QicsTable::editForegroundColor
 

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.

Qt::Orientation QicsTable::enterTraversalDirection
 

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.

bool QicsTable::enterTraverseToBegin
 

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.

QColor QicsTable::foregroundColor
 

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

int QicsTable::frameLineWidth
 

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.

int QicsTable::frameStyle
 

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.

QicsGridCellClipping QicsTable::gridCellClipping
 

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.

int QicsTable::gridSpacing
 

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

QicsLineStyle QicsTable::horizontalGridLineStyle
 

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.

bool QicsTable::horizontalGridLinesVisible
 

Specifies whether horizontal separator lines between cells are drawn

The default value of this property is true.

int QicsTable::horizontalGridLineWidth
 

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

The default value of this property is 1.

QicsScrollBarMode QicsTable::hScrollBarMode
 

Specifies the mode for the table's horizontal scrollbar.

The default value of this property is Auto.

bool QicsTable::ignoreModelSizeChanges
 

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

QString QicsTable::label
 

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.

Qt::LayoutDirection QicsTable::layoutDirection
 

Specifies property set the layout direction for a grid

The default value of this property is Qt::LeftToRight

QPen QicsTable::leftBorderPen
 

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

The default value of this property is the default QPen.

int QicsTable::leftColumn
 

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

bool QicsTable::leftHeaderVisible
 

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

int QicsTable::margin
 

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

The default value of this property is 1.

int QicsTable::maxLength
 

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

The default value of this property is 32767.

int QicsTable::maxOverflowCells
 

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.

QPixmap QicsTable::moreTextPixmap
 

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.

QPixmap QicsTable::pixmap
 

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

The default value of this property is the null pixmap.

int QicsTable::pixmapSpacing
 

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

The default value of this property is 6.

bool QicsTable::readOnly
 

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

The default value of this property is false.

QicsRepaintBehavior QicsTable::repaintBehavior
 

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

The default value of this property is RepaintOn.

QPen QicsTable::rightBorderPen
 

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

The default value of this property is the default QPen.

int QicsTable::rightColumn
 

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.

bool QicsTable::rightHeaderVisible
 

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

bool QicsTable::rowHeaderUsesModel
 

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

The default value of this property is false.

QColor QicsTable::selectedBackgroundColor
 

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

QColor QicsTable::selectedForegroundColor
 

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

QicsSelectionPolicy QicsTable::selectionPolicy
 

Specifies the selection policy for the table.

The default value of this property is QicsSelectMultiple.

int QicsTable::tableMargin
 

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

int QicsTable::tableSpacing
 

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

Qt::Orientation QicsTable::tabTraversalDirection
 

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.

bool QicsTable::tabTraverseToBegin
 

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.

int QicsTable::textFlags
 

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

QPen QicsTable::topBorderPen
 

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.

bool QicsTable::topHeaderVisible
 

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

int QicsTable::topRow
 

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

QicsTraversalKeyEditBehavior QicsTable::traversalKeyEditBehavior
 

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.

QicsLineStyle QicsTable::verticalGridLineStyle
 

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.

bool QicsTable::verticalGridLinesVisible
 

Specifies whether vertical separator lines between cells are drawn

The default value of this property is true.

int QicsTable::verticalGridLineWidth
 

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

The default value of this property is 1.

int QicsTable::visibleColumns
 

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.

int QicsTable::visibleRows
 

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.

QicsScrollBarMode QicsTable::vScrollBarMode
 

Specifies the mode for the table's vertical scrollbar.

The default value of this property is Auto.


Property Documentation

QicsPasteValidator QicsTable::pasteValidator [read, write]
 

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

QValidator QicsTable::validator [read, write]
 

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


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

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