Allow OSC message addressing of paints and mappings by names through regular expressions.

This commit is contained in:
Tats
2016-05-13 01:31:53 +00:00
parent 7ac70e7cf7
commit f9633b0065
3 changed files with 97 additions and 11 deletions

View File

@@ -42,6 +42,27 @@ QMap<uid, Mapping::ptr> MappingManager::getPaintMappings(const Paint::ptr paint)
return paintMappings;
}
Paint::ptr MappingManager::getPaintByName(QString name)
{
return _getElementByName(paintVector, name);
}
QVector<Paint::ptr> MappingManager::getPaintsByNameRegExp(QString namePattern)
{
return _getElementsByNameRegExp(paintVector, namePattern);
}
Mapping::ptr MappingManager::getMappingByName(QString name)
{
return _getElementByName(mappingVector, name);
}
QVector<Mapping::ptr> MappingManager::getMappingsByNameRegExp(QString namePattern)
{
return _getElementsByNameRegExp(mappingVector, namePattern);
}
QMap<uid, Mapping::ptr> MappingManager::getPaintMappingsById(uid paintId) const
{
return getPaintMappings(paintMap[paintId]);