WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
Public Types | Public Member Functions | Private Attributes | List of all members
Zbl::ZblTableCell Class Reference

A table cell object contains the data for its child cells and maintains the cell's positional relationship in the data model's N-dimensional table cell hierarchy. More...

#include <ZblTableCell.h>

Collaboration diagram for Zbl::ZblTableCell:
Collaboration graph
[legend]

Public Types

typedef QList< QList< ZblTableCell * > > zTableCells
 

Public Member Functions

 ZblTableCell ()
 Constructs a ZblTableCell object encapsulating a default constructed ZblTableData object. More...
 
 ZblTableCell (ZblTableData *data)
 Constructs a ZblTableCell object encapsulating the specified ZblTableData object. More...
 
 ~ZblTableCell ()
 Destroys encapsulated child data and cell objects if they exist. More...
 
ZblTableCellgetCell (int row, int col) const
 
void putCell (int row, int col, ZblTableCell *cell)
 
bool hasCell (int row, int col) const
 
bool hasChildCells () const
 
ZblTableDatadata ()
 
const ZblTableDataconstData () const
 
void setData (ZblTableData *data)
 

Private Attributes

ZblTableCellm_parent
 Parent cell of this cell. All cells have a parent except the top cell in the table cell hierarchy. NULL if this is the top cell. More...
 
zTableCellsm_childCells
 A two dimensional array of child cells. NULL if this cell has no grandchildren. More...
 
ZblTableDatam_childData
 A three dimensional array of child cell data. Dimensions of the array are role, row and column. More...
 

Detailed Description

A table cell object contains the data for its child cells and maintains the cell's positional relationship in the data model's N-dimensional table cell hierarchy.

A cell object contains an optional table of child cell objects only if its child cells have children.

Definition at line 47 of file ZblTableCell.h.

Member Typedef Documentation

◆ zTableCells

Definition at line 51 of file ZblTableCell.h.

Constructor & Destructor Documentation

◆ ZblTableCell() [1/2]

Zbl::ZblTableCell::ZblTableCell ( )

Constructs a ZblTableCell object encapsulating a default constructed ZblTableData object.

Definition at line 32 of file ZblTableCell.cpp.

◆ ZblTableCell() [2/2]

Zbl::ZblTableCell::ZblTableCell ( ZblTableData data)

Constructs a ZblTableCell object encapsulating the specified ZblTableData object.

This object takes ownership of the specified data object. It should not be deleted by the caller.

Parameters
datathe data object this table cell will encapsulate

Definition at line 40 of file ZblTableCell.cpp.

◆ ~ZblTableCell()

Zbl::ZblTableCell::~ZblTableCell ( )

Destroys encapsulated child data and cell objects if they exist.

Definition at line 48 of file ZblTableCell.cpp.

Member Function Documentation

◆ constData()

const ZblTableData & Zbl::ZblTableCell::constData ( ) const

◆ data()

ZblTableData & Zbl::ZblTableCell::data ( )

◆ getCell()

ZblTableCell * Zbl::ZblTableCell::getCell ( int  row,
int  col 
) const

Definition at line 82 of file ZblTableCell.cpp.

◆ hasCell()

bool Zbl::ZblTableCell::hasCell ( int  row,
int  col 
) const

Definition at line 100 of file ZblTableCell.cpp.

◆ hasChildCells()

bool Zbl::ZblTableCell::hasChildCells ( ) const

Definition at line 76 of file ZblTableCell.cpp.

Referenced by getCell(), hasCell(), and putCell().

◆ putCell()

void Zbl::ZblTableCell::putCell ( int  row,
int  col,
ZblTableCell cell 
)

Definition at line 90 of file ZblTableCell.cpp.

◆ setData()

void Zbl::ZblTableCell::setData ( ZblTableData data)

Definition at line 68 of file ZblTableCell.cpp.

Member Data Documentation

◆ m_childCells

zTableCells* Zbl::ZblTableCell::m_childCells
private

A two dimensional array of child cells. NULL if this cell has no grandchildren.

Definition at line 106 of file ZblTableCell.h.

Referenced by getCell(), hasChildCells(), putCell(), and ~ZblTableCell().

◆ m_childData

ZblTableData* Zbl::ZblTableCell::m_childData
private

A three dimensional array of child cell data. Dimensions of the array are role, row and column.

Data is arranged as a map of roles, each role consisting of a two dimensional array of variants.

Definition at line 116 of file ZblTableCell.h.

Referenced by constData(), data(), hasCell(), setData(), and ~ZblTableCell().

◆ m_parent

ZblTableCell* Zbl::ZblTableCell::m_parent
private

Parent cell of this cell. All cells have a parent except the top cell in the table cell hierarchy. NULL if this is the top cell.

Definition at line 99 of file ZblTableCell.h.


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