/** * Returns a HTML version of an Entry */ QString EntryEdict::toHTML() const { QString result = QString( "<div class=\"%1\">" ).arg( EDICT.toUpper() ); if( isCommon() ) { result += "<div class=\"Common\">"; } foreach( const QString &field, QSTRINGLISTCHECK( DictFileEdict::displayFields ) ) { if( field == "--NewLine--" ) result += "<br>"; else if( field == "Word/Kanji" ) result += HTMLWord()+' '; else if( field == "Meaning" ) result += HTMLMeanings()+' '; else if( field == "Reading" ) result += HTMLReadings()+' '; else qDebug() << "Unknown field: " << field; } if( isCommon() ) { result += "</div>"; } result += "</div>"; return result; }
void ContentModule::initializeTextures() const { String resourceGroup = isCommon() ? ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : getId(); StringVector texLocations = getTextureLocations(); for(StringVector::iterator iter = texLocations.begin(); iter != texLocations.end(); iter++) { String location = *iter; if (location.find(".zip") != String::npos) { ResourceGroupManager::getSingleton().addResourceLocation( getDirectory() + "/materials/" + location, "Zip", resourceGroup); } else { ResourceGroupManager::getSingleton().addResourceLocation( getDirectory() + "/materials/" + location, "FileSystem", resourceGroup); } } addSearchPath(getDirectory()+"/materials", resourceGroup); }
void ContentModule::initialize() const { String moduleDir = getDirectory(); String resourceGroup = isCommon() ? ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME : getId(); addSearchPath(moduleDir + "/conf", resourceGroup); addSearchPath(moduleDir + "/dsa", resourceGroup); addSearchPath(moduleDir + "/maps", resourceGroup); addSearchPath(moduleDir + "/models", resourceGroup); StringVector modelLoc = getModelLocations(); for (StringVector::iterator it = modelLoc.begin(); it != modelLoc.end(); ++it) { addSearchPath(moduleDir + "/models/"+*it, resourceGroup); } addSearchPath(moduleDir + "/sound", resourceGroup); //@todo ueber Verzeichnisnamen nachdenken StringVector soundLoc = getSoundLocations(); for (StringVector::iterator it = soundLoc.begin(); it != soundLoc.end(); ++it) { addSearchPath(moduleDir + "/sound/"+*it, resourceGroup); } addSearchPath(moduleDir + "/gui", resourceGroup); addSearchPath(moduleDir + "/gui/fonts", resourceGroup); addSearchPath(moduleDir + "/gui/imagesets", resourceGroup); addSearchPath(moduleDir + "/gui/schemes", resourceGroup); addSearchPath(moduleDir + "/gui/windows", resourceGroup); addSearchPath(moduleDir + "/gui/windows/buttons", resourceGroup); addSearchPath(moduleDir + "/dialogs", resourceGroup); SoundManager::getSingleton().addSounds( resourceGroup ); RubyInterpreter* interpreter = CoreSubsystem::getSingleton().getRubyInterpreter(); if (interpreter != NULL) { interpreter->addSearchPath(moduleDir + "/scripts"); interpreter->addSearchPath(moduleDir + "/scripts/maps"); } }
/** * Moves the iterator to the first position where both iterators * point to different actors. */ void SymDiffTieIterator::init() { if (lpIter1->valid() && lpIter2->valid() && isCommon()) { next(); } }
/** * Moves the iterator to the next position where both iterators * point to different actors. */ void SymDiffTieIterator::next() { do { UnionTieIterator::next(); } while (lpIter1->valid() && lpIter2->valid() && isCommon()); }