Logo Search packages:      
Sourcecode: facturalux version File versions  Download package

void FLFieldDB::updateValue ( const QString &  t  )  [protected, slot]

Actualiza el valor del campo con una cadena de texto.

Parameters:
t Cadena de texto para actualizar el campo

Definition at line 136 of file FLFieldDB.cpp.

References cursor_, FLTableMetaData::field(), fieldName_, FLSqlCursor::metadata(), FLFieldMetaData::partDecimal(), FLSqlCursor::setValueBuffer(), and FLFieldMetaData::type().

{
  if (!cursor_)
      return;

  FLTableMetaData *tMD = cursor_->metadata ();

  if (!tMD)
      return;

  FLFieldMetaData * field = tMD->field(fieldName_);

  if (!field)
    return;

  int type = field->type ();
  
  if (type == QVariant::Double)
      {
        QString s;
        s.setNum (t.toDouble (), 'f', field->partDecimal());
      }

  cursor_->setValueBuffer (fieldName_, t);
}


Generated by  Doxygen 1.6.0   Back to index