ICS

QicsTable Documentation Set

QicsGridInfo Class Reference

Information for QicsGrids. More...

#include <QicsGridInfo.h>

Inherits Qics.

List of all members.

Public Types

typedef QValueVector< QicsScreenGrid * > QicsScreenGridPV
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 deleteRows (int how_many, int starting_position)
void insertRow (int where)
void moveRows (int target, const QMemArray< int > &rows)
void moveColumns (int target, const QMemArray< int > &cols)
void deleteColumns (int how_many, int starting_position)
void insertColumn (int where)
void redrawAllGrids ()
virtual void redrawModel (QicsRegion r)
virtual void setCellValue (int row, int col, const QicsDataItem &itm)
virtual void setCurrentCellValue (const QicsDataItem &itm)
void setIgnoreModelSizeChanges (bool b)
void setAllowPropagateChanges (bool b)

Signals

void dataModelChanged (QicsDataModel *old_dm, QicsDataModel *new_dm)
void styleManagerChanged (QicsStyleManager *old_sm, QicsStyleManager *new_sm)
void dimensionManagerChanged (QicsDimensionManager *old_dm, QicsDimensionManager *new_dm)
void selectionManagerChanged (QicsSelectionManager *old_sm, QicsSelectionManager *new_sm)
void gridAdded (QicsScreenGrid *grid)
void gridRemoved (QicsScreenGrid *grid)
void globalSetRepaintBehaviorRequest (QicsRepaintBehavior behavior)
void globalRevertRepaintBehaviorRequest (void)
void modelReordered (QicsIndexType)
void currentCellChanged (int new_row, int new_col)
void cellValueChanged (int row, int col)
void uneditRequest ()

Public Member Functions

 QicsGridInfo (QicsGridType type)
virtual ~QicsGridInfo ()
QicsGridType gridType (void) const
QicsDataModeldataModel (void) const
void setDataModel (QicsDataModel *dm)
QicsStyleManagerstyleManager (void) const
void setStyleManager (QicsStyleManager *sm)
QicsMappedDimensionManagermappedDM (void) const
QicsDimensionManagerdimensionManager (void) const
void setDimensionManager (QicsDimensionManager *dm)
QicsSelectionManagerselectionManager (void) const
void setSelectionManager (QicsSelectionManager *sel_m)
QicsScreenGridPV grids (void) const
void connectGrid (QicsScreenGrid *grid)
void disconnectGrid (QicsScreenGrid *grid)
virtual const QicsDataItemcellValue (int row, int col) const
Qics::QicsRepaintBehavior gridRepaintBehavior (void) const
void setGlobalRepaintBehavior (QicsRepaintBehavior behavior)
void revertGlobalRepaintBehavior (void)
void setGridRepaintBehavior (QicsRepaintBehavior behavior)
void revertGridRepaintBehavior (void)
virtual void controlColumnsOf (QicsGridInfo *grid)
virtual void controlRowsOf (QicsGridInfo *grid)
int modelColumnIndex (int column) const
int modelRowIndex (int row) const
int visualColumnIndex (int column) const
int visualRowIndex (int row) const
QicsRegion modelRegion (QicsRegion vis_region) const
QicsRegion visualRegion (QicsRegion model_region) const
void orderRowsBy (QValueVector< int > column, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
void orderColumnsBy (QValueVector< int > row, QicsSortOrder order=Qics::Ascending, int from=0, int to=-1, DataItemComparator func=0)
QicsSorterrowOrdering () const
QicsSortercolumnOrdering () const
virtual QDragObject * cutCopyData (QWidget *drag_widget=0, QicsICell *ref_cell=0)
virtual void finishCut (bool removeData)
void paste (QMimeSource *ms, const QicsICell &cell)
void overlay (const QicsDataModel &dm, const QicsICell &start_cell, bool expand_model=false, bool clear_if_empty=true)
QicsICell currentCell (void) const
virtual void setCurrentCell (const QicsICell &cell)
int firstNonHiddenRow (int startRow, int endRow) const
int lastNonHiddenRow (int startRow, int endRow) const
int firstNonHiddenColumn (int startColumn, int endColumn) const
int lastNonHiddenColumn (int startColumn, int endColumn) const
bool ignoreModelSizeChanges (void) const
bool allowPropagateChanges (void) const
virtual void reportSelection (QicsSelectionType stype, int anchor_row, int anchor_col, int cur_row, int cur_col)

Protected Slots

void removeGrid (QObject *obj)
void handleSelectionChange (bool in_progress)
void propagateChangesFromCell (int row, int col)

Protected Member Functions

void connectDTtoSM (void)
void connectDTtoDM (void)
void connectDTtoGrid (QicsScreenGrid *grid)
void connectSMtoGrid (QicsScreenGrid *grid)
void connectDMtoGrid (QicsScreenGrid *grid)
void connectSelMtoGrid (QicsScreenGrid *grid)
virtual QicsSelectionListcutCopySelection (QicsICell *ref_cell)

Protected Attributes

QicsGridType myType
QicsDataModelmyDT
QicsStyleManagermySM
QicsDimensionManagermyDM
QicsMappedDimensionManagermyMappedDM
QicsSelectionManagermySelM
QicsScreenGridPV myGrids
QicsDataInt myCellValue
QicsRepaintBehavior myPrevGridRepaintBehavior
QicsSelectionListmyCutCopySelection
QicsICell myCurrentCell
bool myDoingSelectionFlag

Private Attributes

QicsSortermyRowOrdering
QicsSortermyColumnOrdering
QicsGridInfomyRowOrderOwner
QicsGridInfomyColumnOrderOwner
bool myIgnoreModelSizeChanges
bool myAllowPropagateChanges


Detailed Description

Information for QicsGrids.

QicsGridInfo is a grouping of objects relating to a QicsGrid. QicsGridInfo automates the connections that are necesary between a grid and its associated objects. These objects include a QicsDataModel (used to help determine the size of the grid, as well as to retrieve the data to draw in the grid), a QicsStyleManager (used to retrieve visual and interactive information about the cells in the grid), and a QicsDimensionManager (used to determine the dimensions of the cells in the grid).

QicsGridInfo connects individual grid widgets to each of the above objects, and notifies the grids if any of the objects have changed.

Most QicsTable users should never need to use a QicsGridInfo object. These objects are automatically created by QicsTable and are used internally by the table components. If you are subclassing a grid or a cell display object, you may need to use this class.


Member Typedef Documentation

typedef QValueVector<QicsScreenGrid *> QicsGridInfo::QicsScreenGridPV

A vector of pointers to QicsScreenGrid objects.


Member Enumeration Documentation

enum Qics::QicsSortMode [inherited]

Denotes the sort algorithm wich used

Enumerator:
QicsStableSort 
QicsQuickSort 

enum Qics::QicsCellOverflowBehavior [inherited]

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

Enumerator:
Clip 
Overflow 
ToolTip 

enum Qics::QicsCurrentCellStyle [inherited]

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

Enumerator:
Spreadsheet 
NormalSelected 

enum Qics::QicsGridCellClipping [inherited]

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

Enumerator:
AllowPartial 
NoDisplayOnPartial 
UseClippedSymbol 

enum Qics::QicsGridType [inherited]

Specifies a type of grid object.

Enumerator:
TableGrid 
RowHeaderGrid 
ColumnHeaderGrid 

enum Qics::QicsHeaderType [inherited]

Specifies the type of table header.

Enumerator:
RowHeader 
ColumnHeader 

enum Qics::QicsIndexType [inherited]

Specifies the type of table index.

Enumerator:
RowIndex 
ColumnIndex 

enum Qics::QicsLineStyle [inherited]

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

Enumerator:
None 
Plain 
Raised 
Sunken 

enum Qics::QicsRepaintBehavior [inherited]

Specifies the recalculation and repainting behavior of tables and grids.

Enumerator:
RepaintOff 
RepaintOn 
RepaintCalcOnly 

enum Qics::QicsScrollBarMode [inherited]

Specifies the various modes of QicsTable's scroll bars.

Enumerator:
Auto 
AlwaysOff 
AlwaysOn 

enum Qics::QicsScrollDirection [inherited]

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

Enumerator:
ScrollNone 
ScrollUp 
ScrollDown 
ScrollLeft 
ScrollRight 
ScrollToRow 
ScrollToColumn 

enum Qics::QicsSelectionPolicy [inherited]

Denotes the selection policy for the table.

Enumerator:
SelectNone 
SelectSingle 
SelectMultiple 
SelectSingleRow 
SelectMultipleRow 

enum Qics::QicsSelectionType [inherited]

Enumerator:
SelectionNone 
SelectionBegin 
SelectionDrag 
SelectionEnd 
SelectionExtend 
SelectionAdd 

enum Qics::QicsSortOrder [inherited]

Specifies if ordering should be ascending or descending.

Enumerator:
Ascending 
Descending 

enum Qics::QicsTableDisplayOption [inherited]

Specifies a printing display policy for elements of the table

Enumerator:
DisplayNever 
DisplayAlways 
DisplayFirstPage 

enum Qics::QicsTraversalKeyEditBehavior [inherited]

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

Enumerator:
TraverseWithinCell 
TraverseBetweenCells 


Constructor & Destructor Documentation

QicsGridInfo::QicsGridInfo ( QicsGridType  type  ) 

virtual QicsGridInfo::~QicsGridInfo (  )  [virtual]


Member Function Documentation

QicsGridType QicsGridInfo::gridType ( void   )  const [inline]

Returns the type of this object.

QicsDataModel* QicsGridInfo::dataModel ( void   )  const

Returns the current data model object that has been assigned to this object.

void QicsGridInfo::setDataModel ( QicsDataModel dm  ) 

QicsStyleManager* QicsGridInfo::styleManager ( void   )  const

void QicsGridInfo::setStyleManager ( QicsStyleManager sm  ) 

QicsMappedDimensionManager* QicsGridInfo::mappedDM ( void   )  const

QicsDimensionManager* QicsGridInfo::dimensionManager ( void   )  const

void QicsGridInfo::setDimensionManager ( QicsDimensionManager dm  ) 

QicsSelectionManager* QicsGridInfo::selectionManager ( void   )  const

void QicsGridInfo::setSelectionManager ( QicsSelectionManager sel_m  ) 

QicsScreenGridPV QicsGridInfo::grids ( void   )  const [inline]

Returns a copy of the list of grid widgets that are currently connected to this grid info object.

void QicsGridInfo::connectGrid ( QicsScreenGrid grid  ) 

void QicsGridInfo::disconnectGrid ( QicsScreenGrid grid  ) 

virtual const QicsDataItem* QicsGridInfo::cellValue ( int  row,
int  col 
) const [virtual]

Returns the value of cell (row, col ) [visual coordinates] in the data model object contained in this object, after mapping to model coordinates. If the grid info object is RowHeader and there is no value returned from the data model, returns a QicsDataInt object containing row. If the grid info object is ColumnHeader and there is no value returned from the data model, returns a QicsDataInt object containing col.

Qics::QicsRepaintBehavior QicsGridInfo::gridRepaintBehavior ( void   )  const

Returns the current repaint behavior of all grids in this table.

void QicsGridInfo::setGlobalRepaintBehavior ( QicsRepaintBehavior  behavior  ) 

Set the repaint behavior of all grids in this table. Emits a signal that requests a change in global repaint behavior.

void QicsGridInfo::revertGlobalRepaintBehavior ( void   ) 

Revert to the previous repaint behavior for all grids in this table. Emits a signal that requests a revert of global repaint behavior.

void QicsGridInfo::setGridRepaintBehavior ( QicsRepaintBehavior  behavior  ) 

Set the repaint behavior of all grids using this object. Also, stores the previous repaint behavior value for use in revertGridRepaintBehavior.

void QicsGridInfo::revertGridRepaintBehavior ( void   ) 

Revert to the previous repaint behavior for all grids using this object.

virtual void QicsGridInfo::controlColumnsOf ( QicsGridInfo grid  )  [virtual]

virtual void QicsGridInfo::controlRowsOf ( QicsGridInfo grid  )  [virtual]

int QicsGridInfo::modelColumnIndex ( int  column  )  const [inline]

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

int QicsGridInfo::modelRowIndex ( int  row  )  const [inline]

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

int QicsGridInfo::visualColumnIndex ( int  column  )  const [inline]

Returns the visual column index for a given model index

int QicsGridInfo::visualRowIndex ( int  row  )  const [inline]

Returns visual row index for a given model index

QicsRegion QicsGridInfo::modelRegion ( QicsRegion  vis_region  )  const

Returns a region that contains model row and column indices based on the visual region vis_region.

QicsRegion QicsGridInfo::visualRegion ( QicsRegion  model_region  )  const

Returns a region that contains visual row and column indices based on the model coordinate region vis_region.

void QicsGridInfo::orderRowsBy ( QValueVector< int >  column,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

void QicsGridInfo::orderColumnsBy ( QValueVector< int >  row,
QicsSortOrder  order = Qics::Ascending,
int  from = 0,
int  to = -1,
DataItemComparator  func = 0 
)

QicsSorter* QicsGridInfo::rowOrdering (  )  const [inline]

QicsSorter* QicsGridInfo::columnOrdering (  )  const [inline]

virtual QDragObject* QicsGridInfo::cutCopyData ( QWidget *  drag_widget = 0,
QicsICell ref_cell = 0 
) [virtual]

Returns a drag object/mime source that represents data that is to be cut or copied from the table. The current selection list is used as the data to be cut or copied. If ref_cell is non-zero, it is used to find a contiguous selection from the selection list that contains ref_cell. If no such selection exists, the contents of ref_cell will be used as the data. If ref_cell is zero, the entire selection list is cut or copied.

If non-zero, drag_widget will be set as the drag object's source widget. If specified, ref_cell will be used to determine which part

virtual void QicsGridInfo::finishCut ( bool  removeData  )  [virtual]

Finishes a cut operation. Option deletes data from the data model and then cleans up any cruft from the cudCopyData operation.

Parameters:
removeData Remove the data from the model. This would be done only after a successful dragMove operation.

void QicsGridInfo::paste ( QMimeSource *  ms,
const QicsICell cell 
)

Pastes data from ms into the table, starting at cell.

void QicsGridInfo::overlay ( const QicsDataModel dm,
const QicsICell start_cell,
bool  expand_model = false,
bool  clear_if_empty = true 
)

Overlays data model dm onto the data model contained in this object. The overlay will start at cell start_cell in the main data model. If expand_model is true, the main data model will be expanded if necessary. If clear_if_empty is true, empty cells in dm will be "copied" to the main data model. If clear_if_empty is false, those cells will not be "copied" and the existing values in the main data model will be retained.

QicsICell QicsGridInfo::currentCell ( void   )  const

Returns the current cell of the grids associated with this object. Note that if there is no current cell (i.e. the user has not selected a cell) this method will return an invalid cell.

virtual void QicsGridInfo::setCurrentCell ( const QicsICell cell  )  [virtual]

Sets the current cell of the grids associated with this object.

int QicsGridInfo::firstNonHiddenRow ( int  startRow,
int  endRow 
) const

Returns the visual index of the first non hidden row in the region from startRow to endRow.

int QicsGridInfo::lastNonHiddenRow ( int  startRow,
int  endRow 
) const

Returns the visual index of the last non hidden row in the region from startRow to endRow.

int QicsGridInfo::firstNonHiddenColumn ( int  startColumn,
int  endColumn 
) const

Returns the visual index of the first non hidden column in the region from startColumn to endColumn.

int QicsGridInfo::lastNonHiddenColumn ( int  startColumn,
int  endColumn 
) const

Returns the visual index of the last non hidden column in the region from startColumn to endColumn.

bool QicsGridInfo::ignoreModelSizeChanges ( void   )  const

bool QicsGridInfo::allowPropagateChanges ( void   )  const

virtual void QicsGridInfo::reportSelection ( QicsSelectionType  stype,
int  anchor_row,
int  anchor_col,
int  cur_row,
int  cur_col 
) [virtual]

void QicsGridInfo::dataModelChanged ( QicsDataModel old_dm,
QicsDataModel new_dm 
) [signal]

void QicsGridInfo::styleManagerChanged ( QicsStyleManager old_sm,
QicsStyleManager new_sm 
) [signal]

void QicsGridInfo::dimensionManagerChanged ( QicsDimensionManager old_dm,
QicsDimensionManager new_dm 
) [signal]

void QicsGridInfo::selectionManagerChanged ( QicsSelectionManager old_sm,
QicsSelectionManager new_sm 
) [signal]

void QicsGridInfo::gridAdded ( QicsScreenGrid grid  )  [signal]

Signaled when a grid is added to the grid collection for this object.

void QicsGridInfo::gridRemoved ( QicsScreenGrid grid  )  [signal]

Signaled when a grid is added from the grid collection for this object.

void QicsGridInfo::globalSetRepaintBehaviorRequest ( QicsRepaintBehavior  behavior  )  [signal]

Signaled as a request to the table widget to change the repaint behavior for all grids in the table. This is commonly used by QicsRow, QicsColumn and QicsCell objects when they are performing complex changes that would otherwise result in many grid recalculations and redraws.

void QicsGridInfo::globalRevertRepaintBehaviorRequest ( void   )  [signal]

Signaled as a request to the table widget to revert the repaint behavior all grids in the table to the value they had previous to the last repaint behavior change request. This is commonly used by QicsRow, QicsColumn and QicsCell objects when they are performing complex changes that would otherwise result in many grid recalculations and redraws.

void QicsGridInfo::modelReordered ( QicsIndexType   )  [signal]

Signaled when the model is reordered in some way. Most grids should recompute things at that point

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

This signal is emitted when the current cell of the grids associated with this object changes. The cell (new_row, new_col ) is the new current cell (in visual coordinates ).

void QicsGridInfo::cellValueChanged ( int  row,
int  col 
) [signal]

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

void QicsGridInfo::uneditRequest (  )  [signal]

This signal is emitted when traversed to other cell.

void QicsGridInfo::deleteRows ( int  how_many,
int  starting_position 
) [slot]

void QicsGridInfo::insertRow ( int  where  )  [slot]

void QicsGridInfo::moveRows ( int  target,
const QMemArray< int > &  rows 
) [slot]

void QicsGridInfo::moveColumns ( int  target,
const QMemArray< int > &  cols 
) [slot]

void QicsGridInfo::deleteColumns ( int  how_many,
int  starting_position 
) [slot]

void QicsGridInfo::insertColumn ( int  where  )  [slot]

void QicsGridInfo::redrawAllGrids (  )  [slot]

virtual void QicsGridInfo::redrawModel ( QicsRegion  r  )  [virtual, slot]

virtual void QicsGridInfo::setCellValue ( int  row,
int  col,
const QicsDataItem itm 
) [virtual, slot]

virtual void QicsGridInfo::setCurrentCellValue ( const QicsDataItem itm  )  [virtual, slot]

void QicsGridInfo::setIgnoreModelSizeChanges ( bool  b  )  [slot]

void QicsGridInfo::setAllowPropagateChanges ( bool  b  )  [slot]

void QicsGridInfo::removeGrid ( QObject *  obj  )  [protected, slot]

void QicsGridInfo::handleSelectionChange ( bool  in_progress  )  [protected, slot]

void QicsGridInfo::propagateChangesFromCell ( int  row,
int  col 
) [protected, slot]

void QicsGridInfo::connectDTtoSM ( void   )  [protected]

void QicsGridInfo::connectDTtoDM ( void   )  [protected]

void QicsGridInfo::connectDTtoGrid ( QicsScreenGrid grid  )  [protected]

void QicsGridInfo::connectSMtoGrid ( QicsScreenGrid grid  )  [protected]

void QicsGridInfo::connectDMtoGrid ( QicsScreenGrid grid  )  [protected]

void QicsGridInfo::connectSelMtoGrid ( QicsScreenGrid grid  )  [protected]

virtual QicsSelectionList* QicsGridInfo::cutCopySelection ( QicsICell ref_cell  )  [protected, virtual]


Member Data Documentation

QicsGridType QicsGridInfo::myType [protected]

QicsDataModel* QicsGridInfo::myDT [protected]

QicsStyleManager* QicsGridInfo::mySM [protected]

QicsDimensionManager* QicsGridInfo::myDM [protected]

QicsMappedDimensionManager* QicsGridInfo::myMappedDM [protected]

QicsSelectionManager* QicsGridInfo::mySelM [protected]

QicsScreenGridPV QicsGridInfo::myGrids [protected]

QicsDataInt QicsGridInfo::myCellValue [protected]

QicsRepaintBehavior QicsGridInfo::myPrevGridRepaintBehavior [protected]

QicsSelectionList* QicsGridInfo::myCutCopySelection [protected]

QicsICell QicsGridInfo::myCurrentCell [protected]

bool QicsGridInfo::myDoingSelectionFlag [protected]

QicsSorter* QicsGridInfo::myRowOrdering [private]

QicsSorter* QicsGridInfo::myColumnOrdering [private]

QicsGridInfo* QicsGridInfo::myRowOrderOwner [private]

QicsGridInfo* QicsGridInfo::myColumnOrderOwner [private]

bool QicsGridInfo::myIgnoreModelSizeChanges [private]

bool QicsGridInfo::myAllowPropagateChanges [private]


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.