Mercurial > hg > svcore
diff base/UnitDatabase.h @ 199:1d789d688f59
* When adding a layer, make it the selected layer on that pane
* More OSC support, including transforms
author | Chris Cannam |
---|---|
date | Fri, 10 Nov 2006 17:45:26 +0000 |
parents | a08718723b20 |
children | ad5f892c0c4d |
line wrap: on
line diff
--- a/base/UnitDatabase.h Fri Nov 10 13:27:57 2006 +0000 +++ b/base/UnitDatabase.h Fri Nov 10 17:45:26 2006 +0000 @@ -35,8 +35,14 @@ QStringList getKnownUnits() const; void registerUnit(QString unit); - - int getUnitId(QString unit); + + /** + * Return the reference id for a given unit name. If registerNew is + * true and the unit is not known, register it and return its new + * id. If register is false and the unit is not known, return -1. + */ + int getUnitId(QString unit, bool registerNew = true); + QString getUnitById(int id); signals: