diff layer/TimeRulerLayer.cpp @ 87:4b98bda7e94d

* Add property labels to property containers (so i18n() won't affect file format)
author Chris Cannam
date Wed, 03 May 2006 16:48:03 +0000
parents bf306158803d
children 33929e0c3c6b
line wrap: on
line diff
--- a/layer/TimeRulerLayer.cpp	Wed May 03 14:26:26 2006 +0000
+++ b/layer/TimeRulerLayer.cpp	Wed May 03 16:48:03 2006 +0000
@@ -55,10 +55,17 @@
 TimeRulerLayer::getProperties() const
 {
     PropertyList list;
-    list.push_back(tr("Colour"));
+    list.push_back("Colour");
     return list;
 }
 
+QString
+TimeRulerLayer::getPropertyLabel(const PropertyName &name) const
+{
+    if (name == "Colour") return tr("Colour");
+    return "";
+}
+
 Layer::PropertyType
 TimeRulerLayer::getPropertyType(const PropertyName &name) const
 {
@@ -71,7 +78,7 @@
 {
     int deft = 0;
 
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 
 	if (min) *min = 0;
 	if (max) *max = 5;
@@ -95,7 +102,7 @@
 TimeRulerLayer::getPropertyValueLabel(const PropertyName &name,
 				    int value) const
 {
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 	switch (value) {
 	default:
 	case 0: return tr("Black");
@@ -112,7 +119,7 @@
 void
 TimeRulerLayer::setProperty(const PropertyName &name, int value)
 {
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 	switch (value) {
 	default:
 	case 0:	setBaseColour(Qt::black); break;