Mercurial > hg > svgui
comparison layer/SingleColourLayer.cpp @ 1266:a34a2a25907c
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | a5488775f880 |
children | c8a6fd3f9dff |
comparison
equal
deleted
inserted
replaced
1265:6e724c81f18f | 1266:a34a2a25907c |
---|---|
101 *deflt = 0; //!!! | 101 *deflt = 0; //!!! |
102 | 102 |
103 val = m_colour; | 103 val = m_colour; |
104 | 104 |
105 } else { | 105 } else { |
106 val = Layer::getPropertyRangeAndValue(name, min, max, deflt); | 106 val = Layer::getPropertyRangeAndValue(name, min, max, deflt); |
107 } | 107 } |
108 | 108 |
109 return val; | 109 return val; |
110 } | 110 } |
111 | 111 |
112 QString | 112 QString |
113 SingleColourLayer::getPropertyValueLabel(const PropertyName &name, | 113 SingleColourLayer::getPropertyValueLabel(const PropertyName &name, |
114 int value) const | 114 int value) const |
115 { | 115 { |
116 if (name == "Colour") { | 116 if (name == "Colour") { |
117 ColourDatabase *db = ColourDatabase::getInstance(); | 117 ColourDatabase *db = ColourDatabase::getInstance(); |
118 if (value >= 0 && value < db->getColourCount()) { | 118 if (value >= 0 && value < db->getColourCount()) { |
119 return db->getColourName(value); | 119 return db->getColourName(value); |
281 (m_colour, colourName, colourSpec, darkbg); | 281 (m_colour, colourName, colourSpec, darkbg); |
282 | 282 |
283 s += QString("colourName=\"%1\" " | 283 s += QString("colourName=\"%1\" " |
284 "colour=\"%2\" " | 284 "colour=\"%2\" " |
285 "darkBackground=\"%3\" ") | 285 "darkBackground=\"%3\" ") |
286 .arg(colourName) | 286 .arg(colourName) |
287 .arg(colourSpec) | 287 .arg(colourSpec) |
288 .arg(darkbg); | 288 .arg(darkbg); |
289 | 289 |
290 Layer::toXml(stream, indent, extraAttributes + " " + s); | 290 Layer::toXml(stream, indent, extraAttributes + " " + s); |
291 } | 291 } |