97 const QVariant& value,
109 QString msg = QString(
"ZblDataModel::setData - exception: %1").arg(x.
message());
110 qDebug(
"%s", msg.toUtf8().constData());
132 QString msg = QString(
"ZblDataModel::getTableColumnRows - exception: %1").arg(x.
message());
133 qDebug(
"%s", msg.toUtf8().constData());
152 QString msg = QString(
"ZblDataModel::setData - exception: %1").arg(x.
message());
153 qDebug(
"%s", msg.toUtf8().constData());
175 QString msg = QString(
"ZblDataModel::appendRow - exception: %1").arg(x.
message());
176 qDebug(
"%s", msg.toUtf8().constData());
204 QString msg = QString(
"ZblDataModel::prependRow - exception: %1").arg(x.
message());
205 qDebug(
"%s", msg.toUtf8().constData());
238 const QByteArray& roleName,
360 void ZblDataModel::setRoleNames(
const QHash<int, QByteArray>
roleNames)
384 bool forwardDirection,
390 startRow, text, column, caseSensitive, forwardDirection, keySearch);
393 startRow, text, column, caseSensitive, forwardDirection, keySearch);
ZblTableCell * m_columnNames
The cell containing column names if column names have been set. TBD: do we need column names...
void prependRows(zRoleRowList data)
Prepends a list of rows of role values to the table data.
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 roleCount() const
Determines the current number of roles in the data table.
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.
void putTableColumnRows(QVariant rows, int startRow, int col)
Replaces the current value for a set of rows for a single model column.
QVariant getTableColumnRows(QList< int > roles, int startRow, int col, int rowCount) const
Obtain data values for a set of rows from a single model column.
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()
void dumpData() const
Prints diagnostic information about the state of the contained data to debug output.
zRoleNames * m_roleNames
A hash of role value/name pairs.
void prependRow(zRoleRow data)
Prepends a row of role values to the table data.
void clearData(ZblTableCell *cell=NULL)
Removes all data rows from the specified table cell.
QHash< int, QByteArray > zRoleNames
bool addRole(int role)
Adds the specified role to the data table. The table must not contain data rows when calling this met...
ZblTableCell & colNamesCell()
void removeRows(int row, int count)
Removes one or more rows from the table.
void setData(int role, int row, int col, const QVariant &value, ZblTableCell *cell=NULL)
int rowCount(const ZblTableCell *cell=NULL) const
const QString & message() const
void prependRow(QMap< int, QList< QVariant > > data, ZblTableCell *cell=NULL)
const ZblTableCell & constRootCell() const
int findNextItemRow(int startRow, const QString &text, int column=0, bool caseSensitive=true, bool forwardDirection=true, bool keySearch=false) const
int columnCount() const
Determines the number of columns in the data table.
bool hasRole(int role) const
Determines if a specified role already exists in the data table.
ZblTableHeaders * m_headers
This object contains row and column header values for the model.
void clearData()
Removes all rows from the data table.
QList< int > roles() const
Determines which roles are in the data set.
A table cell object contains the data for its child cells and maintains the cell's positional relatio...
bool copyColumn(int fromColumn, int toColumn)
QVariant getValue(int role, int row, int col) const
Obtains the value of the specified cell and role. This is a blocking call.
const ZblTableData & constData() const
void appendRow(zRoleRow data)
Appends a row of role values to the table data.
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.
void setColumnCount(int count)
Sets the number of columns in the data table. This method fails if the data table contains rows...
ZblTableCell & rootCell()
void appendRows(QList< QMap< int, QList< QVariant > > > data, ZblTableCell *cell=NULL)
void putValue(int role, int row, int col, const QVariant value)
Replaces the current value of a cell's role. This is a blocking call. with the specified value...
int roleCount(const ZblTableCell *cell=NULL) const
Obtains the number of roles contained by the specified cell.
Zuble's Qt Exception Object.
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.
void appendRows(zRoleRowList data)
Appends a list of rows of role values to the table data.
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
int rowCount() const
Determines the number of rows in the data table.
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