ICS

QicsTable Documentation Set

QicsHeaderGrid Class Reference

Header object for the QicsTable. More...

#include <QicsHeaderGrid.h>

Inherits QicsScreenGrid.

List of all members.

Public Types

typedef QicsHeaderGrid *(* Foundry )(QWidget *w, QicsGridInfo &info, QicsHeaderType type)
typedef QicsHeaderGrid *(* FoundryWithKey )(QWidget *w, QicsGridInfo &info, QicsHeaderType type, void *key)
enum  QicsWideKeyAction {
  Del_DeleteSelected, CtrlA_SelectAll, CtrlC_Copy, CtrlV_Paste,
  CtrlX_Cut
}
enum  QicsBoxBorders {
  TopBorder = 1, BottomBorder = 2, LeftBorder = 4, RightBorder = 8,
  AllBorders = 1+2+4+8
}
enum  QicsCopyPolicy {
  CopyData = 1, CopyAttributes = 2, CopyDimensions = 4, CopySpans = 8,
  CopyAll = 1+2+4+8
}
enum  QicsClearPolicy { ClearData = 1, ClearAttributes = 2, ClearSpans = 4, ClearAll = 1+2+4 }
enum  QicsSortMode { QicsStableSort = 0, QicsQuickSort }
enum  QicsCellOverflowBehavior { Clip = 0, Overflow, ToolTip }
enum  QicsCurrentCellStyle { Spreadsheet = 0, NormalSelected }
enum  QicsSelectionStyle { Normal = 0, Exclusive }
enum  QicsSelectCurrentCellPolicy { Follow = 0, Static }
enum  QicsFillHandleEventType { FillHandlePressed = 0, FillHandleReleased, FillHandleDoubleClicked, FillHandleDragged }
enum  QicsGridCellClipping { AllowPartial = 0, NoDisplayOnPartial, UseClippedSymbol }
enum  QicsGridType { TableGrid = 0, RowHeaderGrid, ColumnHeaderGrid }
enum  QicsHeaderType { RowHeader = 0, ColumnHeader }
enum  QicsIndexType { NoIndex = 0, RowIndex, ColumnIndex, RowAndColumnIndex }
enum  QicsLineStyle { None = 0, Plain, Raised, Sunken }
enum  QicsRepaintBehavior { RepaintOff = 0, RepaintOn = 1, RepaintCalcOnly = 2 }
enum  QicsScrollBarMode { Auto = 0, AlwaysOff, AlwaysOn }
enum  QicsScrollDirection {
  ScrollNone = 0, ScrollUp = 1, ScrollDown = 2, ScrollLeft = 4,
  ScrollRight = 8, ScrollToRow = 16, ScrollToColumn = 32
}
enum  QicsSelectionPolicy {
  SelectNone = 0, SelectSingle, SelectMultiple, SelectSingleRow,
  SelectMultipleRow
}
enum  QicsSelectionType {
  SelectionNone = 0, SelectionBegin, SelectionDrag, SelectionEnd,
  SelectionExtend, SelectionAdd, SelectionReplace
}
enum  QicsSortOrder { Ascending = 0, Descending }
enum  QicsTableDisplayOption { DisplayNever = 0, DisplayAlways, DisplayFirstPage }
enum  QicsTraversalKeyEditBehavior { TraverseWithinCell = 0, TraverseBetweenCells }
enum  QicsCurrentCellDraggingPolicy { DragCurrent = 0, DragSelection }
enum  QicsCellWidthMode { NoChange = 0, ChangeOnlyHeight, ChangeHeightWidth }
enum  QicsCellDecorationStyle { Flat = 0, Styled = 1 }
enum  QicsHeaderDragStyle { SimpleDrag = 0, StyledDrag = 1 }
enum  QicsAutoFitMode { Native = 0, Excel }

Public Slots

virtual void handleGridPropertyChange (QicsGridStyle::QicsGridStyleProperty prop)
void setTopRow (int value)
void setLeftColumn (int value)
void setIsMainGrid (bool b)
virtual void recomputeAndDraw (Qics::QicsIndexType indexType=Qics::RowAndColumnIndex)
virtual void recomputeAndDraw (Qics::QicsIndexType indexType, int startIndex, int endIndex)
virtual void resetAndDraw (void)
virtual void resetAndDraw (int position, int num_items_added_removed, Qics::QicsIndexType row_or_col)
virtual void redraw (void)
virtual void redraw (QicsRegion region)
virtual void redraw (QicsSpan span)
void setVisibleRows (int num)
void setVisibleColumns (int num)
virtual void handleCellPropertyChange (QicsRegion region, QicsCellStyle::QicsCellStyleProperty prop, bool visual_coords)
void drawHeaderResizeBar (int idx, int pos, QicsHeaderType type)
void traverse (QicsScrollDirection dir)
virtual bool canTraverseToCell (int row, int col)
virtual bool traverseToBeginningOfTable (void)
virtual bool traverseToEndOfTable (void)
virtual bool traverseToBeginningOfRow (void)
virtual bool traverseToEndOfRow (void)
virtual bool traverseToEndOfColumn (void)
virtual bool traverseToBeginningOfColumn (void)
virtual bool traverseLeft (void)
virtual bool traverseRight (void)
virtual bool traverseUp (void)
virtual bool traverseDown (void)
virtual bool traversePageUp (void)
virtual bool traversePageDown (void)
bool editCell (int row, int col)
void uneditCurrentCell (void)
bool editable (void) const
void setEditable (bool b)

Signals

void sizeChange (int idx, int old_size, int new_size, QicsHeaderType type)
void resizeInProgress (int idx, int position, QicsHeaderType type)
void gripDoubleClicked (int idx, int button, QicsHeaderType type)
void doubleClicked (int idx, Qics::QicsHeaderType type)
void headerResized (int size, QicsHeaderType type)
void wideKeyPressed (QKeyEvent *event)
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 scrollRequest (QicsScrollDirection direction, int num)
void newBoundsInfo ()
void uneditRequest ()
void cellEditStarted (int row, int col)
void cellEditEnded (int row, int col)
void focusNextPrevGridRequest (const QicsScreenGrid *, bool next)
void hideResizeBarRequest ()

Public Member Functions

 QicsHeaderGrid (QWidget *w, QicsGridInfo &info, QicsHeaderType type)
virtual ~QicsHeaderGrid ()
QicsHeaderType type (void) const
virtual QicsRegion currentViewport (void) const
int gripThreshold (void) const
void setGripThreshold (int gt)
void setIsFrozenHeader (bool flag)
bool isMainGrid (void) const
void setViewport (const QicsRegion &reg)
virtual QSize minimumSizeHint () const
int lastPageStartRow (void)
int lastPageStartColumn (void)
int topRow (void) const
int bottomRow (void) const
int fullyVisibleBottomRow (void)
int leftColumn (void) const
int rightColumn (void) const
int fullyVisibleRightColumn (void)
QicsICell cellAt (int x, int y, bool nearest) const
int rowAt (int y, bool nearest) const
int columnAt (int x, bool nearest) const
void scrollLeft (int num)
void scrollRight (int num)
void scrollUp (int num)
void scrollDown (int num)
bool isHeightFixed (void) const
bool isWidthFixed (void) const
void fixHeightToViewport (bool set)
void fixWidthToViewport (bool set)
int visibleRows (void)
int visibleColumns (void)
virtual QicsICell currentCell (void) const
QString tooltipText (const QicsICell &cell) const
virtual void orderRowsBy (const QVector< int > &columns, QicsSortOrder order=Qics::Ascending, DataItemComparator func=0)
virtual void orderColumnsBy (const QVector< int > &rows, QicsSortOrder order=Qics::Ascending, DataItemComparator func=0)
virtual bool handleTraversalKeys (QKeyEvent *ke)
virtual bool isFrozen ()
bool focusNextWidget ()
bool focusPreviousWidget ()
bool selectOnTraverse ()
void setSelectOnTraverse (bool select)
QicsGridInfogridInfo (void) const
virtual QicsRegion viewport (void) const
QicsRegion screenViewport (void) const
bool isCellValid (int row, int col) const
QRect cellDimensions (int row, int col, bool with_spans) const
QRect cellDimensions (const QicsICell &cell, bool with_spans) const
int modelColumnIndex (int column) const
int modelRowIndex (int row) const

Static Public Member Functions

static QicsHeaderGridcreateGrid (QWidget *w, QicsGridInfo &info, QicsHeaderType type)

Static Public Attributes

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

Protected Slots

void handleRowsChanges (int num, int start_position)
void handleColumnsChanges (int num, int start_position)
void hideResizeBar ()
virtual void timerScrollingEvent ()

Protected Member Functions

virtual QSize sizeHint (void) const
virtual void handleMousePressEvent (const QicsICell &cell, QMouseEvent *m)
virtual void handleMouseReleaseEvent (const QicsICell &cell, QMouseEvent *m)
virtual void handleMouseMoveEvent (const QicsICell &cell, QMouseEvent *m)
virtual void handleMouseDoubleClickEvent (const QicsICell &, QMouseEvent *m)
virtual void emitMouseSignals (const QicsICell &, QMouseEvent *)
virtual void keyPressEvent (QKeyEvent *ke)
virtual bool editCurrentCell (void)
void reset ()
void dragMoveEvent (QDragMoveEvent *event)
void dropEvent (QDropEvent *event)
void dragEnterEvent (QDragEnterEvent *event)
virtual bool canDropAt (QDragMoveEvent *event, const QicsICell &cell) const
virtual void dropAt (QDropEvent *event, const QicsICell &cell)
void startDrag (Qt::DropAction mode)
bool isWithinResizeThreshold (int x, int y, int *in_cell, int *close_cell) const
bool setResizeCursor (QMouseEvent *m)
void handleCellResize (QMouseEvent *m)
void finishResize (void)
void beginSelection (int row, int col)
void endSelection (int row, int col)
void extendSelection (int row, int col)
void addSelection (int row, int col)
void clearSelection (void)
void dragSelection (QMouseEvent *m)
void reportSelection (int row, int col, QicsSelectionType stype)
virtual void selectCell (int row, int col)
virtual void doScrollTraverse ()
virtual bool traverseToCell (int row, int col, bool select_cell=true)
virtual bool event (QEvent *event)
void setCurrentCell (const QicsICell &cell)
virtual void layout (void)
virtual void computeCellPositions (Qics::QicsIndexType indexType=Qics::RowAndColumnIndex)
QicsICell computeCellPositions (const QRect &bounds, const QicsICell &start, Qics::QicsIndexType indexType=Qics::RowAndColumnIndex)
virtual void paintEvent (QPaintEvent *ev)
virtual void paintRegion (const QRect &rect, QPainter *painter)
virtual QRect paintRegion (const QicsRegion &region, QPainter *painter)
virtual QRect drawCell (int row, int col, int x, int y, bool look_for_overflower, QPainter *painter, bool drawBorderOnly)
virtual QRect drawCell (int row, int col, QRect rect, QPainter *painter, bool drawCellBordersOnly)
virtual bool prepareToDraw (int row, int col, const QRect &rect, QPainter *painter)
bool setRepaintAll (bool set)
virtual void computeLastPage (Qics::QicsIndexType indexType=Qics::RowAndColumnIndex)
virtual void resizeEvent (QResizeEvent *r)
virtual void mousePressEvent (QMouseEvent *m)
virtual void mouseReleaseEvent (QMouseEvent *m)
virtual void mouseDoubleClickEvent (QMouseEvent *m)
virtual void mouseMoveEvent (QMouseEvent *m)
virtual void keyReleaseEvent (QKeyEvent *ke)
virtual void handleKeyPressEvent (const QicsICell &cell, QKeyEvent *k)
virtual void handleKeyReleaseEvent (const QicsICell &cell, QKeyEvent *k)
bool isCellVisible (int row, int col) const
void makeCellFullyVisible (int row, int col)
void updateViewport (void)
void updateLineWidth (void)
void updateFrameStyle (void)
bool doTraverseHorizontal (bool leftwards)
bool doTraverseVertical (bool upwards)
bool doTraverseCellVertical (int row, bool upwards)
bool doTraverseCellHorizontal (int col, bool leftwards)
void placeEntryWidget (void)
virtual void prepareDrag (const QicsICell &cell, Qt::DropAction mode)
virtual void finishDrag (Qt::DropAction mode, bool remove, QWidget *target)
QMimeData * dragObject (Qt::DropAction mode)
bool doCheckScrollUp (QMouseEvent *m)
bool doCheckScrollDown (QMouseEvent *m)
bool doCheckScrollLeft (QMouseEvent *m)
bool doCheckScrollRight (QMouseEvent *m)
QicsDataModeldataModel (void) const
QicsStyleManager & styleManager (void) const
QicsDimensionManager & dimensionManager (void) const
QicsMappedDimensionManagermappedDM (void) const
QicsSelectionManagerselectionManager (void) const
virtual QRect drawRegion (const QicsRegion &region, QPainter *painter, bool drawCellBordersOnly)
virtual void drawGridLines (const QicsRegion &reg, QPainter *painter)
virtual const QicsDataItemcellValue (int row, int col) const
QicsCellDisplaycellDisplay (int row, int col) const
virtual const QRect boundRect () const

Protected Attributes

QicsHeaderType myType
int myGripThreshold
bool myMouseInGrip
bool myDoingResize
int myExpandingCell
int myExpandingCellSize
int myExpandingCellStartPosition
int myExpandingCellCurrentPosition
int myAnchorIndex
int mySelectionIndex
bool myIsFrozenHeader
bool myIsHeaderBeganResize
int myStartResizingPos
bool myHaveIdropAfter
QPoint myPressedCoords
QPoint mySpotDelta
QPixmap myDragPixmap
bool myDoubleClicked
int myReqVisibleRows
int myReqVisibleColumns
int myLastResizeLinePosition
Qics::QicsIndexType myNeedsRecomputeCellsFlag
Qics::QicsIndexType myNeedsRecomputeLastPageFlag
bool myNeedsRepaintFlag
int myLastPageStartRow
int myLastPageStartColumn
QicsICellV myCellsToNotify
bool myHeightFixed
bool myWidthFixed
QicsCellDisplaymyEditingCurrentCell
QicsICell myEditingCell
QicsICell myUneditCell
bool myEditable
bool myPlacingEntryWidgetFlag
QicsICell myPressedCell
QicsICell myDragCell
bool myIsMainGrid
QPixmap * imageBuffer
bool repaintAll
bool myGridInPaintEvent
bool initialRepaint
bool myForceSkipPaintEvent
bool myDoingSelectionFlag
Qt::DropAction myDropAction
QRubberBand * myResizeLine
int myLastPressedKey
bool mySelectOnTraverse
QTimer * timerScrolling
QicsICell cellToScroll
QicsICell lastFillCell
int scrollDirec
int speedOfScroll
QicsRegion myPaintRegion
QPixmap myImageBuffer
QicsGridInfomyInfo
QicsRegion myViewport
QicsPositionList myRowPositions
QicsPositionList myColumnPositions
QicsICellQVL myAlreadyDrawnCells
QicsMainGridmyMainGrid
QicsCellmyCell
QicsRowmyRow
QicsColumnmyColumn
int myTopRow
int myLeftColumn
int myBottomRow
int myFullyVisibleBottomRow
int myRightColumn
int myFullyVisibleRightColumn
int myExSelLeft
int myExSelRight
int myExSelTop
int myExSelBottom
int myTraversalRow
int myTraversalColumn


Detailed Description

Header object for the QicsTable.

QicsHeaderGrid is a widget used internally by the QicsTable widget. The headerGrid widget is responsible for laying out the header cells based on the size of the widget and based on various properties that are stored in the QicsStyleManager. The headerGrid does not actually draw anyting, rather it determines where each cell should be drawn and calls the appropriate cell display object for the actual display of the widget.

The headerGrid widget is also largely responsible for managing user interaction with the table. The headerGrid handles mouse and keyboard events on its window, and performs the appropriate action (selection and traversal, primarily).


Member Typedef Documentation

typedef QicsHeaderGrid*(* QicsHeaderGrid::Foundry)(QWidget *w, QicsGridInfo &info, QicsHeaderType type)

Foundry method to create new instances of QicsHeaderGrid (or a subclass of QicsHeaderGrid). Subclasses of QicsHeaderGrid should implement a similar method. Methods of this type can be passed to a QicsTable constructor in order to create custom grids.

typedef QicsHeaderGrid*(* QicsHeaderGrid::FoundryWithKey)(QWidget *w, QicsGridInfo &info, QicsHeaderType type, void *key)

Internal foundry method to create new instances of QicsHeaderGrid (or a subclass of QicsHeaderGrid). Methods of this type can be passed to a QicsTable constructor in order to create custom grids. A pointer to a previously provided "key" is passed as a parameter. This typedef is not exposed as part of the public API. It has been added because it's necessary for the Python bindings.


Member Enumeration Documentation

enum Qics::QicsWideKeyAction [inherited]

Denotes global key actions available for the table grid.

  • Del_DeleteSelected Pressing Delete removes data from the selected cells.
  • CtrlA_SelectAll Pressing Control+A selects all the cells in the grid.

enum Qics::QicsBoxBorders [inherited]

Denotes the box borders of cell region.

  • TopBorder Top border of the region.
  • BottomBorder Bottom border of the region.
  • LeftBorder Left border of the region.
  • RightBorder Right border of the region.

enum Qics::QicsCopyPolicy [inherited]

Denotes the copying policy during copy/paste and drag/drop operations.

  • CopyData Copy data from cells.
  • CopyAttributes Copy cell attributes.
  • CopyDimensions Copy cell dimensions (width/height).
  • CopySpans Copy spanned cells.

enum Qics::QicsClearPolicy [inherited]

Denotes the clearing policy during cut and delete operations.

  • ClearData Clear data from cells.
  • ClearAttributes Clear cell attributes.
  • ClearSpans Clear spanned cells.

enum Qics::QicsSortMode [inherited]

Denotes the sort algorithm which is used.

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

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

  • Clip Cell contents are clipped at the edges of the cell.
  • Overflow The grid will attempt to overflow into adjacent cells.
  • ToolTip The full contents of the cell will be displayed in a tooltip when the mouse pointer is hovered over the cell.

enum Qics::QicsCurrentCellStyle [inherited]

Denotes the visual style that the current cell of the table will be drawn with.

  • Spreadsheet The current cell will be drawn with a solid border and will always use the cell's background color.
  • NormalSelected The current cell will be drawn the same as all other selected cells. The border will be as specified in the cell's border properties, and the background will be the cell's selected color.

enum Qics::QicsSelectionStyle [inherited]

  • Normal The selection will be drawn by the normal way.
  • Exclusive The selection will be drawn with border like in MS Excel.

  • Follow The current cell will follow the selection (QicsTable style).
  • Static The current cell will stay on selection anchor (MS Excel style).
    Since:
    2.3

enum Qics::QicsGridCellClipping [inherited]

Denotes the policy for displaying text that is too long to fit in its cell.

  • AllowPartial Shows as much of the text as possible.
  • NoDisplayOnPartial Do not display text if it cannot fit in the cell.
  • UseClippedSymbol Display a clipped symbol at the end of the partial text.

enum Qics::QicsGridType [inherited]

Specifies a type of grid object.

  • TableGrid A grid used to display normal table data.
  • RowHeaderGrid A grid used to display row header data.
  • ColumnHeaderGrid A grid used to display column header data.

enum Qics::QicsHeaderType [inherited]

Specifies the type of table header.

  • HeaderRow A row header.
  • HeaderColumn A column header.

enum Qics::QicsIndexType [inherited]

Specifies the type of table index.

  • RowIndex A row index.
  • ColumnIndex A column index.

enum Qics::QicsLineStyle [inherited]

Denotes the style of lines and borders in the table widget.

  • None No line or border.
  • Plain A simple, plain line or border.
  • Raised A raised line (using shadows).
  • Sunken A sunken line (using shadows).

enum Qics::QicsRepaintBehavior [inherited]

Specifies the recalculation and repainting behavior of tables and grids.

  • RepaintOff Do not perform any drawing or dimension calculations.
  • RepaintOn Draw as needed, keep all dimensions up to date.
  • RepaintCalcOnly Do not draw, but keep all dimensions up to date.

enum Qics::QicsScrollBarMode [inherited]

Specifies the various modes of QicsTable's scroll bars.

  • Auto QicsTable shows a scroll bar when the content is too large to fit and not otherwise.
  • AlwaysOff QicsTable never shows a scroll bar.
  • AlwaysOn QicsTable always shows a scroll bar.

enum Qics::QicsScrollDirection [inherited]

Denotes a direction for scrolling operations, or that an absolute scroll should occur.

  • ScrollNone no scroll allowed.
  • ScrollUp scrolling up on a certain number of rows.
  • ScrollDown scrolling down on a certain number of rows.
  • ScrollLeft scrolling left on a certain number of columns.
  • ScrollRight scrolling right on a certain number of columns.
  • ScrollToRow scrolling up or down to a certain row.
  • ScrollToColumn scrolling left or right to a certain column.

enum Qics::QicsSelectionPolicy [inherited]

Denotes the selection policy for the table.

  • SelectNone no selection allowed.
  • SelectSingle single cell selection.
  • SelectMultiple multiple cell selection (including non-contiguous regions).
  • SelectSingleRow selecting a cell selects the entire row, only one row can be selected.
  • SelectMultipleRow selecting a cell selects the entire row, multiple rows can be selected.

enum Qics::QicsSortOrder [inherited]

Specifies whenever ordering should be ascending or descending.

  • Ascending Ascending order.
  • Descending Descending order.

enum Qics::QicsTableDisplayOption [inherited]

Specifies a printing display policy for elements of the table.

  • DisplayNever Do not display the element when printing.
  • DisplayAlways Always display the element when printing.
  • DisplayFirstPage Display the element only when printing the first page of the table.

Specifies the behavior of the traversal keys. (left, right, up, down, etc) while editing a cell.

  • TraverseWithinCell Traversal keys move the text cursor within the edited cell.
  • TraverseBetweenCells Traversal keys move the current cell highlight between cells in the table.

Specifies the behavior of drag&drop operations when it has began from current cell.

  • DragCurrent - only current cell is dragging.
  • DragSelection - whole selection is dragging.

enum Qics::QicsCellWidthMode [inherited]

Specifies the behavior of set cell font.

  • NoChange - does not change size of cells.
  • ChangeOnlyHeight - changing only height of the cell when new font is applies (cell width is not changed).
  • ChangeHeightWidth - changing height and width.

Specifies the cell decoration style for headers.

  • Flat Header cells are drawn flat, just like as ordinal cells.
  • Styled Header cells are drawn with different look.

enum Qics::QicsHeaderDragStyle [inherited]

Specifies row/column drag style for headers.

  • SimpleDrag Only drag cursor is used to indicate drag process.
  • StyledDrag Extended image is used to indicate drag process.

enum Qics::QicsAutoFitMode [inherited]

Specifies autofit modes.

  • Native It toggles between the user defined and minimal width (default).
  • Excel It is just setting the minimal width.


Constructor & Destructor Documentation

virtual QicsHeaderGrid::~QicsHeaderGrid (  )  [virtual]

The destructor (virtual, in case we subclass later).


Member Function Documentation

QicsHeaderType QicsHeaderGrid::type ( void   )  const [inline]

Returns the type of this headerGrid object.

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

Computes the intersection of the data model dimensions and the viewport dimensions. Because the current viewport can contain values that greater than the number of rows and columns in the data model, it is often necessary for the grid to determine the current viewport.

See also:
viewport(), screenViewport()

Reimplemented from QicsGrid.

int QicsHeaderGrid::gripThreshold ( void   )  const [inline]

Returns the maximum distance (in pixels) that the cursor can be away from a cell margin and still be able to resize a row/column.

void QicsHeaderGrid::setGripThreshold ( int  gt  )  [inline]

Sets the maximum distance (in pixels) that the cursor can be away from a cell margin and still be able to resize a row/column.

void QicsHeaderGrid::setIsFrozenHeader ( bool  flag  )  [inline]

Sets current header grid property myIsFrozenHeader to true if it belongs frozen part of table. See the "myIsFrozenHeader" property for details.

static QicsHeaderGrid* QicsHeaderGrid::createGrid ( QWidget *  w,
QicsGridInfo info,
QicsHeaderType  type 
) [static]

Foundry method to create new instances of QicsHeaderGrid. Subclasses of QicsHeaderGrid should implement a similar method. Methods of this type can be passed to a QicsTable constructor in order to create custom grids.

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

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

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

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

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

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

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

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

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

void QicsHeaderGrid::doubleClicked ( int  idx,
Qics::QicsHeaderType  type 
) [signal]

This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by idx.

Parameters:
idx the index of the row or column that was double-clicked in
type row or column header

void QicsHeaderGrid::headerResized ( int  size,
QicsHeaderType  type 
) [signal]

Signals when the user resizes row header horizontally or column header vertically.

Parameters:
size value of difference of new size and old size
type type of header(RowHeader or ColumnHeader)

void QicsHeaderGrid::wideKeyPressed ( QKeyEvent *  event  )  [signal]

Signals when table-wide control key was pressed.

Since:
2.2

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::handleGridPropertyChange ( QicsGridStyle::QicsGridStyleProperty  prop  )  [virtual, slot]

Slot for the QicsStyleManager object to use to signal a change of grid property prop in the table.

This method may cause both a layout computation and a redraw of the grid.

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::handleMousePressEvent ( const QicsICell cell,
QMouseEvent *  m 
) [protected, virtual]

Custom mouse press event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction. Note that cell may not be valid (i.e. the event may have taken place outside the grid).

See also:
mousePressEventHandler()

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::handleMouseReleaseEvent ( const QicsICell cell,
QMouseEvent *  m 
) [protected, virtual]

Custom mouse release event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction. Note that cell may not be valid (i.e. the event may have taken place outside the grid).

See also:
mouseReleaseEventHandler()

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::handleMouseMoveEvent ( const QicsICell cell,
QMouseEvent *  m 
) [protected, virtual]

Custom mouse movement event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction.

See also:
mouseMoveEventHandler()

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::handleMouseDoubleClickEvent ( const QicsICell cell,
QMouseEvent *  m 
) [protected, virtual]

Custom mouse double click event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction. Note that cell may not be valid (i.e. the event may have taken place outside the grid).

See also:
mouseDoubleClickEventHandler()

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::emitMouseSignals ( const QicsICell cell,
QMouseEvent *  event 
) [protected, virtual]

Emits grid signals pressed, clicked and doubleClicked after event is occured in cell.

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::keyPressEvent ( QKeyEvent *  ke  )  [protected, virtual]

The grid widget's key press event handler. If the grid has a current cell, this handler first trys to handle the key press as a traversal command. If the key pressed was not a traversal command, the cell display object of the current cell is called to let it handle the event. If the event is not handled, handleKeyPressEvent() is called.

Reimplemented from QicsScreenGrid.

virtual bool QicsHeaderGrid::editCurrentCell ( void   )  [inline, protected, virtual]

Slot for various QicsTable subwidgets to use to request that the grid should cause the current cell to be edited.

Reimplemented from QicsScreenGrid.

void QicsHeaderGrid::reset (  )  [protected, virtual]

Reset any internal state (selections, editing, etc) for the grid

Reimplemented from QicsScreenGrid.

void QicsHeaderGrid::dropEvent ( QDropEvent *  event  )  [protected, virtual]

Get the drop event, convert the position to a cell and call dropAt. Subclasses may override this if they want to do special processing

Reimplemented from QicsScreenGrid.

virtual bool QicsHeaderGrid::canDropAt ( QDragMoveEvent *  event,
const QicsICell cell 
) const [protected, virtual]

Returns true if the dragged object specified in event can be accepted by the grid in cell cell.

Reimplemented from QicsScreenGrid.

virtual void QicsHeaderGrid::dropAt ( QDropEvent *  event,
const QicsICell cell 
) [protected, virtual]

Called from dropEvent to actually do the drop processing. The default behavior is to ignore the drop. Subclasses should override this method if they want to accept drops.

Reimplemented from QicsScreenGrid.

void QicsHeaderGrid::startDrag ( Qt::DropAction  mode  )  [protected, virtual]

Start a drag operation with drag mode mode.

Reimplemented from QicsScreenGrid.

bool QicsHeaderGrid::isWithinResizeThreshold ( int  x,
int  y,
int *  in_cell,
int *  close_cell 
) const [protected]

Determines if the major axis position of the pointer (pos ) is within the grip threshold allowance.

bool QicsHeaderGrid::setResizeCursor ( QMouseEvent *  m  )  [protected]

Set or unset the headerGrid's resize cursor based on the position of the mouse cursor. Returns true if the resize cursor was set.

void QicsHeaderGrid::handleCellResize ( QMouseEvent *  m  )  [protected]

Handle the "middle" (drag) of a cell resize operation

void QicsHeaderGrid::finishResize ( void   )  [protected]

Handles the end of a cell resize operation

void QicsHeaderGrid::beginSelection ( int  row,
int  col 
) [protected]

Perform the beginning of a user-intiated selection.

void QicsHeaderGrid::endSelection ( int  row,
int  col 
) [protected]

Perform the end of a user-intiated selection.

void QicsHeaderGrid::extendSelection ( int  row,
int  col 
) [protected, virtual]

Extend a user-intiated selection.

Reimplemented from QicsScreenGrid.

void QicsHeaderGrid::addSelection ( int  row,
int  col 
) [protected]

Add a new cell to a user-intiated selection.

void QicsHeaderGrid::clearSelection ( void   )  [protected]

Clear a user-intiated selection.

void QicsHeaderGrid::dragSelection ( QMouseEvent *  m  )  [protected]

Handle an in-progress selection drag

void QicsHeaderGrid::reportSelection ( int  row,
int  col,
QicsSelectionType  stype 
) [protected]

Report an action of a user-intiated selection.

virtual void QicsHeaderGrid::selectCell ( int  ,
int   
) [protected, virtual]

Select cell (row, col ). In this class, this method is a no-op. It is intended that subclasses will reimplement this method based on the selection paradigm for the class.

Reimplemented from QicsScreenGrid.

virtual bool QicsHeaderGrid::traverseToCell ( int  row,
int  col,
bool  select_cell = true 
) [protected, virtual]

Traverse to cell (row, col ). This will cause the specified cell to become visible in the grid, if it is not already. If select_cell is true, the cell will become the sole contents of the selection list.

Reimplemented from QicsScreenGrid.

void QicsScreenGrid::setViewport ( const QicsRegion reg  )  [virtual, inherited]

Restricts the grid to show a subset of the data model values. reg specifies an area of the table that is allowed to be displayed.

Reimplemented from QicsGrid.

int QicsScreenGrid::lastPageStartRow ( void   )  [inherited]

Returns the index of the row that would be displayed at the top of the grid if the last displayable cell was placed at the bottom right of the grid. This value is used by the QicsTable to set the appropriate values on the table's scrollbars.

int QicsScreenGrid::lastPageStartColumn ( void   )  [inherited]

Returns the index of the column that would be displayed at the left of the grid if the last displayable cell was placed at the bottom right of the grid. This value is used by the QicsTable to set the appropriate values on the table's scrollbars.

int QicsScreenGrid::topRow ( void   )  const [inline, inherited]

Returns the index of the row that is currently displayed at the top of the grid widget.

int QicsScreenGrid::bottomRow ( void   )  const [inline, inherited]

Returns the index of the row that is currently displayed at the bottom of the grid widget.

int QicsScreenGrid::fullyVisibleBottomRow ( void   )  [inherited]

Returns the index of the row that is currently full displayed at the bottom of the grid widget.

int QicsScreenGrid::leftColumn ( void   )  const [inline, inherited]

Returns the index of the leftmost column that is currently displayed in the grid widget.

int QicsScreenGrid::rightColumn ( void   )  const [inline, inherited]

Returns the index of the rightmost column that is currently displayed in the grid widget.

int QicsScreenGrid::fullyVisibleRightColumn ( void   )  [inherited]

Returns the index of the rightmost column that is currently full displayed in the grid widget.

QicsICell QicsScreenGrid::cellAt ( int  x,
int  y,
bool  nearest 
) const [inherited]

Computes row and column values (given the current topRow and leftColumn) for the window coordinates (x, y ), and returns those values as a QicsICell. If the coordinates do not correspond to a cell, behavior is dependent on the value of nearest. If nearest is true, this method will return the nearest cell to the coordinates. If it is false, it will return an invalid cell.

See also:
rowAt()

columnAt()

int QicsScreenGrid::rowAt ( int  y,
bool  nearest 
) const [inherited]

Returns a row index (given the current topRow and leftColumn) for the window coordinate y. If the coordinate does not correspond to a cell, behavior is dependent on the value of nearest. If nearest is true, this method will return the nearest row to the coordinate. If it is false, it will return -1.

int QicsScreenGrid::columnAt ( int  x,
bool  nearest 
) const [inherited]

Returns a column index (given the current topRow and leftColumn) for the window coordinate x. If the coordinate does not correspond to a cell, behavior is dependent on the value of nearest. If nearest is true, this method will return the nearest row to the coordinate. If it is false, it will return -1.

void QicsScreenGrid::scrollLeft ( int  num  )  [inherited]

Request that the table scroll left num columns.

void QicsScreenGrid::scrollRight ( int  num  )  [inherited]

Request that the table scroll right num columns.

void QicsScreenGrid::scrollUp ( int  num  )  [inherited]

Request that the table scroll up num rows.

void QicsScreenGrid::scrollDown ( int  num  )  [inherited]

Request that the table scroll down num rows.

bool QicsScreenGrid::isHeightFixed ( void   )  const [inline, inherited]

Returns true if the grid has a fixed height corresponding to the height of the viewport (i.e. it cannot scroll vertically), false otherwise.

bool QicsScreenGrid::isWidthFixed ( void   )  const [inline, inherited]

Returns true if the grid has a fixed width corresponding to the width of the viewport (i.e. it cannot scroll horizontally), false otherwise.

void QicsScreenGrid::fixHeightToViewport ( bool  set  )  [inherited]

If set is true, fixes the height of the grid to the height of the viewport (i.e. it cannot scroll). If set is false, the grid is not fixed and may scroll vertically. This is commonly used when using a grid to show frozen rows.

void QicsScreenGrid::fixWidthToViewport ( bool  set  )  [inherited]

If set is true, fixes the width of the grid to the width of the viewport (i.e. it cannot scroll). If set is false, the grid is not fixed and may scroll horizontally. This is commonly used when using a grid to show frozen columns.

int QicsScreenGrid::visibleRows ( void   )  [inherited]

Returns the number of visible rows in the grid.

int QicsScreenGrid::visibleColumns ( void   )  [inherited]

Returns the number of visible columns in the grid.

virtual QicsICell QicsScreenGrid::currentCell ( void   )  const [inline, virtual, inherited]

Returns the current cell of the grid widget. Note that if there is no current cell (i.e. the user has not selected a cell), the returned cell will be invalid.

References QicsGridInfo::currentCell(), and QicsGrid::gridInfo().

QString QicsScreenGrid::tooltipText ( const QicsICell cell  )  const [inherited]

Returns the text that should be displayed in a tooltip when the user hovers the mouse pointer over this cell. This method will return an empty string if the grid property CellOverflowBehavior is not set to ToolTip.

virtual void QicsScreenGrid::orderRowsBy ( const QVector< int > &  columns,
QicsSortOrder  order = Qics::Ascending,
DataItemComparator  func = 0 
) [virtual, inherited]

Reorder the presentation of the rows of a data model based on a columns. Note that the data model itself is not changed, only the presentation order shown in this grid and its slaves.

Parameters:
columns the column to sort on
order sort direction
func user defined comparator function.

Reimplemented from QicsGrid.

virtual void QicsScreenGrid::orderColumnsBy ( const QVector< int > &  rows,
QicsSortOrder  order = Qics::Ascending,
DataItemComparator  func = 0 
) [virtual, inherited]

Reorder the presentation of the columns of the data model based on a rows. See orderRowsBy for usage description.

Reimplemented from QicsGrid.

virtual bool QicsScreenGrid::handleTraversalKeys ( QKeyEvent *  ke  )  [virtual, inherited]

If the key event in ke corresponds to a traversal action, this method performs the appropriate traversal action and returns true. If the key event does not correspond to a traversal action, this method returns false.

virtual bool QicsScreenGrid::isFrozen (  )  [inline, virtual, inherited]

Returns true is grid is frozen otherwise returns false;

bool QicsScreenGrid::focusNextWidget (  )  [inherited]

Focus next widget in focus chain.

bool QicsScreenGrid::focusPreviousWidget (  )  [inherited]

Focus previous widget in focus chain.

bool QicsScreenGrid::selectOnTraverse (  )  [inherited]

Should cell be selected on traversing

void QicsScreenGrid::setTopRow ( int  value  )  [slot, inherited]

Sets the top row that will be displayed in the grid.

This method causes a layout computation and a redraw.

void QicsScreenGrid::setLeftColumn ( int  value  )  [slot, inherited]

Sets the left column that will be displayed in the grid.

This method causes a layout computation and a redraw.

void QicsScreenGrid::setIsMainGrid ( bool  b  )  [inline, slot, inherited]

Sets whether this grid is the main grid of the table.

virtual void QicsScreenGrid::recomputeAndDraw ( Qics::QicsIndexType  indexType = Qics::RowAndColumnIndex  )  [virtual, slot, inherited]

Causes a layout computation and a redraw.

virtual void QicsScreenGrid::recomputeAndDraw ( Qics::QicsIndexType  indexType,
int  startIndex,
int  endIndex 
) [virtual, slot, inherited]

Causes a layout computation and a redraw.

virtual void QicsScreenGrid::resetAndDraw ( void   )  [virtual, slot, inherited]

Causes a complete reset of the grid wiget, a layout computation and a redraw.

virtual void QicsScreenGrid::resetAndDraw ( int  position,
int  num_items_added_removed,
Qics::QicsIndexType  row_or_col 
) [virtual, slot, inherited]

Causes a reset of the grid wiget, a layout computation and a redraw if it needed.

virtual void QicsScreenGrid::redraw ( void   )  [virtual, slot, inherited]

Causes a redraw of the grid, but not a layout computation.

This method will redraw the entire grid.

virtual void QicsScreenGrid::redraw ( QicsRegion  region  )  [virtual, slot, inherited]

Causes a redraw of the grid, but not a layout computation.

This method will redraw only the portion of the grid specified in region.

virtual void QicsScreenGrid::redraw ( QicsSpan  span  )  [virtual, slot, inherited]

Causes a redraw of the grid, but not a layout computation.

This method will redraw only the portion of the grid specified in span.

void QicsScreenGrid::setVisibleRows ( int  num  )  [slot, inherited]

Sets the number of visible rows in the grid. function sets value independently of scroll bar.

void QicsScreenGrid::setVisibleColumns ( int  num  )  [slot, inherited]

Sets the number of visible columns in the grid.

virtual void QicsScreenGrid::handleCellPropertyChange ( QicsRegion  region,
QicsCellStyle::QicsCellStyleProperty  prop,
bool  visual_coords 
) [virtual, slot, inherited]

Slot for the QicsStyleManager object to use to signal a change of cell property prop in the table. Cells in the specified region have been changed.

This method may cause both a layout computation and a redraw of the grid.

void QicsScreenGrid::drawHeaderResizeBar ( int  idx,
int  pos,
QicsHeaderType  type 
) [slot, inherited]

Draws a resizing bar for row/column idx of a header of type type. The resizing bar is drawn at x/y value pos.

void QicsScreenGrid::traverse ( QicsScrollDirection  dir  )  [slot, inherited]

Slot for various QicsTable subwidgets to use to request a traversal in a certain direction.

virtual bool QicsScreenGrid::canTraverseToCell ( int  row,
int  col 
) [virtual, slot, inherited]

Returns true is it is possible to move the cursor to cell (row, col ). Returns false if this cell is disabled, or coordinates are wrong.

virtual bool QicsScreenGrid::traverseToBeginningOfTable ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseToEndOfTable ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseToBeginningOfRow ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseToEndOfRow ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseToEndOfColumn ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseToBeginningOfColumn ( void   )  [virtual, slot, inherited]

Moves the current cell to the upmost cell of the current column in the grid's current viewport.

virtual bool QicsScreenGrid::traverseLeft ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseRight ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseUp ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traverseDown ( void   )  [virtual, slot, inherited]

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

virtual bool QicsScreenGrid::traversePageUp ( void   )  [virtual, slot, inherited]

Moves the current cell to one page up.

virtual bool QicsScreenGrid::traversePageDown ( void   )  [virtual, slot, inherited]

Moves the current cell to one page down.

bool QicsScreenGrid::editCell ( int  row,
int  col 
) [slot, inherited]

Slot for various QicsTable subwidgets to use to request that the grid should cause the cell (row, col ) to be edited.

void QicsScreenGrid::uneditCurrentCell ( void   )  [slot, inherited]

Slot for various QicsTable subwidgets to use to request that the grid should cause the current cell to not be able to be edited.

bool QicsScreenGrid::editable ( void   )  const [inline, slot, inherited]

Returns whether the grid allows editing.

void QicsScreenGrid::setEditable ( bool  b  )  [slot, inherited]

Sets whether the grid allows editing.

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

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

See also:
clicked(), doubleClicked()

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

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

See also:
pressed(), doubleClicked()

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

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

See also:
clicked()

void QicsScreenGrid::scrollRequest ( QicsScrollDirection  direction,
int  num 
) [signal, inherited]

This signal is emitted when the grid wishes to request a scroll in direction direction for num number of rows or columns.

void QicsScreenGrid::newBoundsInfo (  )  [signal, inherited]

This signal is emitted when the grid recomputes its last page information. The QicsTable widget receives this signal and should set the scrollbar min and max values appropriately.

void QicsScreenGrid::uneditRequest (  )  [signal, inherited]

This signal is emitted when traversed to other cell.

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

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

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

This signal is emitted when cell edit ended.

virtual bool QicsScreenGrid::event ( QEvent *  event  )  [protected, virtual, inherited]

Internal overload

Reimplemented in QicsTableGrid.

void QicsScreenGrid::setCurrentCell ( const QicsICell cell  )  [inline, protected, inherited]

Sets the grid's current cell

References QicsGrid::gridInfo(), and QicsGridInfo::setCurrentCell().

virtual void QicsScreenGrid::layout ( void   )  [protected, virtual, inherited]

Performs any needed layout operations (computing cell positions and/or last page information).

virtual void QicsScreenGrid::computeCellPositions ( Qics::QicsIndexType  indexType = Qics::RowAndColumnIndex  )  [protected, virtual, inherited]

Computes cell positions based on QFrame::contentsRect and the current top, left cell.

virtual void QicsScreenGrid::paintEvent ( QPaintEvent *  ev  )  [protected, virtual, inherited]

Draws the contents of the grid widget within the grid's frame border.

virtual void QicsScreenGrid::paintRegion ( const QRect &  rect,
QPainter *  painter 
) [protected, virtual, inherited]

Repaints the portion of the grid specified by rect that is currently visible. If painter is non-zero, it will be used to draw the grid.

virtual QRect QicsScreenGrid::paintRegion ( const QicsRegion region,
QPainter *  painter 
) [protected, virtual, inherited]

Repaints the portion of the grid specified by region that is currently visible. If painter is non-zero, it will be used to draw the grid.

virtual void QicsScreenGrid::computeLastPage ( Qics::QicsIndexType  indexType = Qics::RowAndColumnIndex  )  [protected, virtual, inherited]

Computes how many rows and columns would be displayed if the bottom-right cell was in the bottom-right spot on the grid. This information will be used by the table to set the correct values on the scrollbars.

virtual void QicsScreenGrid::resizeEvent ( QResizeEvent *  r  )  [protected, virtual, inherited]

The grid widget's resize event handler. It will cause a layout computation and a redraw of the entire grid.

virtual void QicsScreenGrid::mousePressEvent ( QMouseEvent *  m  )  [protected, virtual, inherited]

The grid widget's mouse press event handler. If the event took place in a valid cell, this handler first calls the cell display object of the appropriate cell to let it handle this event. If the event is not handled, handleMousePressEvent() is called. In all valid cases, the pressed() signal is emitted.

virtual void QicsScreenGrid::mouseReleaseEvent ( QMouseEvent *  m  )  [protected, virtual, inherited]

The grid widget's mouse release event handler. If the event took place in a valid cell, this handler first calls the cell display object of the appropriate cell to let it handle this event. If the event is not handled, handleMouseReleaseEvent() is called. In all valid cases, the clicked() signal is emitted if the button was released in the same cell in which it was originally pressed.

virtual void QicsScreenGrid::mouseDoubleClickEvent ( QMouseEvent *  m  )  [protected, virtual, inherited]

The grid widget's mouse double click event handler. If the event took place in a valid cell, this handler first calls the cell display object of the appropriate cell to let it handle this event. If the event is not handled, handleMousePressEvent() is called. In all valid cases, the doubleClicked() signal is emitted.

virtual void QicsScreenGrid::mouseMoveEvent ( QMouseEvent *  m  )  [protected, virtual, inherited]

The grid widget's mouse movement event handler. If the event took place in a valid cell, this handler first calls the cell display object of the appropriate cell to let it handle this event. If the event is not handled, handleMouseMoveEvent() is called.

virtual void QicsScreenGrid::keyReleaseEvent ( QKeyEvent *  ke  )  [protected, virtual, inherited]

The grid widget's key release event handler. If the grid has a current cell, handleKeyPressEvent() is called.

virtual void QicsScreenGrid::handleKeyPressEvent ( const QicsICell cell,
QKeyEvent *  k 
) [protected, virtual, inherited]

Custom key press event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction.

See also:
keyPressEventHandler()

virtual void QicsScreenGrid::handleKeyReleaseEvent ( const QicsICell cell,
QKeyEvent *  k 
) [protected, virtual, inherited]

Custom key release event handler. This method is intended to be reimplemented in subclasses to provide the desired user interaction.

See also:
keyReleaseEventHandler()

bool QicsScreenGrid::isCellVisible ( int  row,
int  col 
) const [protected, inherited]

Returns true if the cell (row, col ) is currently visible in the grid, false otherwise.

void QicsScreenGrid::makeCellFullyVisible ( int  row,
int  col 
) [protected, inherited]

Scrolls the grid (if necessary) so that cell (row, col ) is completely visible.

bool QicsScreenGrid::doTraverseHorizontal ( bool  leftwards  )  [protected, inherited]

Traverses in a manner indicated by orient, in the direction indicated by forward. For example, traverse(Qt::Vertical, true) traverses down, while traverse(Qt::Horizontal, false) traverses left.

void QicsScreenGrid::placeEntryWidget ( void   )  [protected, inherited]

Place the current entry widget in the correct position on the grid. Called after a grid layout has been performed.

virtual void QicsScreenGrid::prepareDrag ( const QicsICell cell,
Qt::DropAction  mode 
) [protected, virtual, inherited]

Prepare for a drag operation from cell cell.

virtual void QicsScreenGrid::finishDrag ( Qt::DropAction  mode,
bool  remove,
QWidget *  target 
) [protected, virtual, inherited]

Finish a drag operation begun with drag mode mode. If remove is true and target is a widget with the same parent as this grid, the dragged selection is cleared.

QMimeData* QicsScreenGrid::dragObject ( Qt::DropAction  mode  )  [protected, inherited]

Returns the drag object to be used in a drag operation with mode mode.

QicsGridInfo& QicsGrid::gridInfo ( void   )  const [inline, inherited]

Returns the grid info object associated with the grid.

Referenced by QicsScreenGrid::currentCell(), and QicsScreenGrid::setCurrentCell().

virtual QicsRegion QicsGrid::viewport ( void   )  const [virtual, inherited]

Returns the current viewport of the grid. The viewport specifies an area of the table that is allowed to be displayed.

See also:
currentViewport(), screenViewport()

QicsRegion QicsGrid::screenViewport ( void   )  const [inline, inherited]

Returns the visible part of the viewport.

See also:
viewport(), currentViewport()
Since:
2.3

bool QicsGrid::isCellValid ( int  row,
int  col 
) const [inherited]

Returns true if the cell (row, col ) is within the current viewport, false otherwise.

See also:
currentViewport

QRect QicsGrid::cellDimensions ( int  row,
int  col,
bool  with_spans 
) const [inherited]

Returns a rectangle specifying the current location and dimension of cell (row, col ). If with_spans is true, the cell dimension will include any cells that this cell spans. If the cell is not currently on the screen, the rectangle will be invalid.

QRect QicsGrid::cellDimensions ( const QicsICell cell,
bool  with_spans 
) const [inline, inherited]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

References QicsICell::column(), and QicsICell::row().

int QicsGrid::modelColumnIndex ( int  column  )  const [inherited]

This method should be called only by QicsCellDisplay objects when trying to draw a cell. If the contents of the cell are too large to fit in the cell, the cell display object may ask to overflow into the next cell.

Parameters:
cur_area the visual coordinates of the cell.
cur_rect the current screen coordinates of the region.
new_area the region we are allowed to draw into.
new_rect the screen coordinates of that region.
Returns:
true if the overflow is allowed (new_area and new_rect are filled in), or false if the overflow is not allowed.
This method should be called only by QicsCellDisplay objects when trying to draw a cell. If, after calling QicsGrid::requestCellOverflow, the cell display object wishes to accept the proposed overflow region, the cell display object should call this method.

Returns the physical column index into the data model for a given visual column

int QicsGrid::modelRowIndex ( int  row  )  const [inherited]

Returns the physical row index into the data model for a given visual row


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

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