25 #ifndef ZBLDATAMODEL_H 26 #define ZBLDATAMODEL_H 40 class ZblTableHeaders;
83 QVariant
data(
int role,
int row,
int col,
86 void setData(
int role,
int row,
int col,
const QVariant& value,
225 bool caseSensitive =
true,
226 bool forwardDirection =
true,
227 bool keySearch =
false,
288 #endif // ZBLDATAMODEL_H ZblTableCell * m_columnNames
The cell containing column names if column names have been set. TBD: do we need column names...
void dumpModelData(const ZblTableCell *cell=NULL) const
Prints diagnostic information about the state of the contained data to debug output.
bool copyColumn(int fromColumn, int toColumn, ZblTableCell *cell=NULL)
Copies data between data model columns for all rows and roles in the model.
int findNextItemRow(int startRow, const QString &text, int column=0, bool caseSensitive=true, bool forwardDirection=true, bool keySearch=false, const ZblTableCell *cell=NULL) const
Searches for the specified text from startIndex.
bool hasRole(int role, const ZblTableCell *cell=NULL) const
Determines if a specified role already exists in the data table.
void setColumnCount(int count, ZblTableCell *cell=NULL)
Sets the number of columns in the data table. This method fails if the data table contains rows...
void prependRows(QList< QMap< int, QList< QVariant > > > data, ZblTableCell *cell=NULL)
ZblTableHeaders & headers()
zRoleNames * m_roleNames
A hash of role value/name pairs.
void clearData(ZblTableCell *cell=NULL)
Removes all data rows from the specified table cell.
QHash< int, QByteArray > zRoleNames
ZblTableCell & colNamesCell()
void setData(int role, int row, int col, const QVariant &value, ZblTableCell *cell=NULL)
int rowCount(const ZblTableCell *cell=NULL) const
void prependRow(QMap< int, QList< QVariant > > data, ZblTableCell *cell=NULL)
const ZblTableCell & constRootCell() const
ZblTableHeaders * m_headers
This object contains row and column header values for the model.
A table cell object contains the data for its child cells and maintains the cell's positional relatio...
void putTableColumnRows(QVariant rows, int startRow, int col, ZblTableCell *cell=NULL)
void clearRoles()
Removes all information from the model and returns the model to it's uninitialized state...
ZblTableCell * m_rootCell
The model's root cell contains the top level items. The root cell has no parent.
ZblTableCell & rootCell()
void appendRows(QList< QMap< int, QList< QVariant > > > data, ZblTableCell *cell=NULL)
int roleCount(const ZblTableCell *cell=NULL) const
Obtains the number of roles contained by the specified cell.
bool addRole(int roleNumber, ZblTableCell *cell=NULL)
Adds the specified role to the data table.
QList< int > roles(const ZblTableCell *cell=NULL) const
Determines which roles are in the data set.
This class is an implementation of an N+1 dimensional data store suitable for use as a generic QAbstr...
void appendRow(QMap< int, QList< QVariant > > data, ZblTableCell *cell=NULL)
zRoleNames roleNames() const
Obtains a hash that maps role numbers to role names.
void removeRows(int row, int count, ZblTableCell *cell=NULL)
Removes the specified data rows from the model.
int columnCount(const ZblTableCell *cell=NULL) const
QVariant getTableColumnRows(QList< int > roles, int startRow, int col, int rowCount, ZblTableCell *cell=NULL) const
QVariant data(int role, int row, int col, const ZblTableCell *cell=NULL) const