diff layer/TextLayer.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 19bf27e4fb29
children 05c41701dc6c
line wrap: on
line diff
--- a/layer/TextLayer.cpp	Wed May 03 14:26:26 2006 +0000
+++ b/layer/TextLayer.cpp	Wed May 03 16:48:03 2006 +0000
@@ -63,10 +63,16 @@
 TextLayer::getProperties() const
 {
     PropertyList list;
-    list.push_back(tr("Colour"));
+    list.push_back("Colour");
     return list;
 }
 
+QString
+TextLayer::getPropertyLabel(const PropertyName &name) const
+{
+    if (name == "Colour") return tr("Colour");
+}
+
 Layer::PropertyType
 TextLayer::getPropertyType(const PropertyName &name) const
 {
@@ -81,7 +87,7 @@
 
     int deft = 0;
 
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 
 	if (min) *min = 0;
 	if (max) *max = 5;
@@ -105,7 +111,7 @@
 TextLayer::getPropertyValueLabel(const PropertyName &name,
 				 int value) const
 {
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 	switch (value) {
 	default:
 	case 0: return tr("Black");
@@ -122,7 +128,7 @@
 void
 TextLayer::setProperty(const PropertyName &name, int value)
 {
-    if (name == tr("Colour")) {
+    if (name == "Colour") {
 	switch (value) {
 	default:
 	case 0:	setBaseColour(Qt::black); break;