Mercurial > hg > svgui
comparison layer/SingleColourLayer.cpp @ 376:e1a9e478b7f2
* juggle some files around in order to free audioio, base, and system libraries
from dependency on QtGui
author | Chris Cannam |
---|---|
date | Wed, 12 Mar 2008 17:42:56 +0000 |
parents | 06360ed99cd1 |
children | f4960f8ce798 |
comparison
equal
deleted
inserted
replaced
375:daaf1c435d98 | 376:e1a9e478b7f2 |
---|---|
12 License, or (at your option) any later version. See the file | 12 License, or (at your option) any later version. See the file |
13 COPYING included with this distribution for more information. | 13 COPYING included with this distribution for more information. |
14 */ | 14 */ |
15 | 15 |
16 #include "SingleColourLayer.h" | 16 #include "SingleColourLayer.h" |
17 #include "base/ColourDatabase.h" | 17 #include "ColourDatabase.h" |
18 #include "view/View.h" | 18 #include "view/View.h" |
19 | 19 |
20 #include <iostream> | 20 #include <iostream> |
21 | 21 |
22 #include <QTextStream> | 22 #include <QTextStream> |
104 QString | 104 QString |
105 SingleColourLayer::getPropertyValueLabel(const PropertyName &name, | 105 SingleColourLayer::getPropertyValueLabel(const PropertyName &name, |
106 int value) const | 106 int value) const |
107 { | 107 { |
108 if (name == "Colour") { | 108 if (name == "Colour") { |
109 return Layer::getPropertyValueLabel(name, value); | 109 ColourDatabase *db = ColourDatabase::getInstance(); |
110 if (value >= 0 && size_t(value) < db->getColourCount()) { | |
111 return db->getColourName(value); | |
112 } | |
110 } | 113 } |
111 return tr("<unknown>"); | 114 return tr("<unknown>"); |
112 } | 115 } |
113 | 116 |
114 RangeMapper * | 117 RangeMapper * |