void PovRay::readNextDeclaration(TextStream& textStream, Data::PovRay* povray) { // looks for '#declare TextureName = ' const QRegExp declare("^#declare\\s+(\\S+)\\s?="); QString line(textStream.nextLine()); if (!line.contains(declare)) line = textStream.seek(declare); if (!textStream.atEnd() && declare.indexIn(line) > -1) { QString name(declare.cap(1)); // remove the initial IQmol_Texture_ name.remove(0,14); name.replace("_", " "); line = textStream.nextBlock(); povray->addTexture(name,line); } }