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

void MReportEngine::setFieldAttributes ( MFieldObject field,
QDomNamedNodeMap *  attr 
) [protected]

Sets a field's layout attributes

Definition at line 880 of file mreportengine.cpp.

References MFieldObject::setCommaSeparator(), MFieldObject::setCurrency(), MFieldObject::setDataType(), MFieldObject::setDateFormat(), MFieldObject::setFieldName(), setLabelAttributes(), MFieldObject::setNegValueColor(), and MFieldObject::setPrecision().

Referenced by setCalculatedFieldAttributes(), and setDetailAttributes().

{
  field->setFieldName (attr->namedItem ("Field").nodeValue ());
  field->setDataType (attr->namedItem ("DataType").nodeValue ().toInt ());
  field->setDateFormat (attr->namedItem ("DateFormat").nodeValue ().toInt ());
  field->setPrecision (attr->namedItem ("Precision").nodeValue ().toInt ());
  field->setCurrency (attr->namedItem ("Currency").nodeValue ().toInt ());
  field->setCommaSeparator (attr->namedItem ("CommaSeparator").nodeValue ().toInt ());

  QString tmp = attr->namedItem ("NegValueColor").nodeValue ();

  field->setNegValueColor (tmp.left (tmp.find (",")).toInt (),
                                       tmp.mid (tmp.find (",") + 1,
                                                      (tmp.findRev (",") - tmp.find (",")) - 1).toInt (), tmp.right (tmp.length () - tmp.findRev (",") - 1).toInt ());

  setLabelAttributes ((MLabelObject *) field, attr);
}


Generated by  Doxygen 1.6.0   Back to index