bool BytesInteger::setConfiguration(QHash<QString, QString> propertiesList) { bool res = TransformAbstract::setConfiguration(propertiesList); bool ok = true; int val = 0; val = propertiesList.value(PROP_ENDIAN).toInt(&ok); if (!ok || (val != 0 && val != 1)) { res = false; emit error(tr("Invalid value for %1").arg(PROP_ENDIAN),id); } else { setLittleEndian(val == 1); } val = propertiesList.value(PROP_INTEGERSIZE).toInt(&ok); if (!ok || (val != I8bits && val != I16bits && val != I32bits && val != I64bits)) { res = false; emit error(tr("Invalid value for %1").arg(PROP_INTEGERSIZE),id); } else { setIntegerSize((IntSize)val); } val = propertiesList.value(PROP_SIGNEDINTEGER).toInt(&ok); if (!ok || (val != 0 && val != 1)) { res = false; emit error(tr("Invalid value for %1").arg(PROP_SIGNEDINTEGER),id); } else { setSignedInteger(val == 1); } return res; }
rWAVAudio::rWAVAudio(const char *sName, EDtError &rc) : FileReader(sName, rc) { if (rc != DT_OK) return; readHeaders(); setBlockSize(2352); setLittleEndian(true); setType(Data_Audio); }