Exemple #1
0
/*!
  Sets the content stored in the database in this row in the Column with the
  name \a column to \a data.
  Does nothing if no such column exists in the table of the row.
  */
void Row::setData(const QString &column, const QVariant &data)
{
    Q_D(const Row);

    Column *c = d->table->column(column);
    if(!c)
        return;

    setData(c->index(), data);
}
Exemple #2
0
/*!
  Returns the data stored in the row in the column named \a column or an invalid
  QVariant if this column does not exist in the table of the row.
  */
QVariant Row::data(const QString &column) const
{
    Q_D(const Row);

    Column *c = d->table->column(column);
    if(!c)
        return QVariant();

    return data(c->index());
}