Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.cpp @ 1365:a1393b4384a5
Minor tidying
author | Chris Cannam |
---|---|
date | Tue, 30 Oct 2018 15:32:05 +0000 |
parents | d79e21855aef |
children | f08a3b8cdb9d |
comparison
equal
deleted
inserted
replaced
1364:7d28e7522dbd | 1365:a1393b4384a5 |
---|---|
301 QString | 301 QString |
302 Colour3DPlotLayer::getPropertyGroupName(const PropertyName &name) const | 302 Colour3DPlotLayer::getPropertyGroupName(const PropertyName &name) const |
303 { | 303 { |
304 if (name == "Normalization" || | 304 if (name == "Normalization" || |
305 name == "Colour Scale" || | 305 name == "Colour Scale" || |
306 name == "Gain") return tr("Scale"); | 306 name == "Gain") { |
307 return tr("Scale"); | |
308 } | |
307 if (name == "Bin Scale" || | 309 if (name == "Bin Scale" || |
308 name == "Invert Vertical Scale") return tr("Bins"); | 310 name == "Invert Vertical Scale") { |
311 return tr("Bins"); | |
312 } | |
309 if (name == "Opaque" || | 313 if (name == "Opaque" || |
310 name == "Smooth" || | 314 name == "Smooth" || |
311 name == "Colour") return tr("Colour"); | 315 name == "Colour") { |
316 return tr("Colour"); | |
317 } | |
312 return QString(); | 318 return QString(); |
313 } | 319 } |
314 | 320 |
315 int | 321 int |
316 Colour3DPlotLayer::getPropertyRangeAndValue(const PropertyName &name, | 322 Colour3DPlotLayer::getPropertyRangeAndValue(const PropertyName &name, |
360 *deflt = 0; | 366 *deflt = 0; |
361 | 367 |
362 val = convertFromColumnNorm(m_normalization, m_normalizeVisibleArea); | 368 val = convertFromColumnNorm(m_normalization, m_normalizeVisibleArea); |
363 | 369 |
364 } else if (name == "Invert Vertical Scale") { | 370 } else if (name == "Invert Vertical Scale") { |
365 | 371 |
372 *min = 0; | |
373 *max = 1; | |
366 *deflt = 0; | 374 *deflt = 0; |
367 val = (m_invertVertical ? 1 : 0); | 375 val = (m_invertVertical ? 1 : 0); |
368 | 376 |
369 } else if (name == "Bin Scale") { | 377 } else if (name == "Bin Scale") { |
370 | 378 |
373 *deflt = int(BinScale::Linear); | 381 *deflt = int(BinScale::Linear); |
374 val = (int)m_binScale; | 382 val = (int)m_binScale; |
375 | 383 |
376 } else if (name == "Opaque") { | 384 } else if (name == "Opaque") { |
377 | 385 |
386 *min = 0; | |
387 *max = 1; | |
378 *deflt = 0; | 388 *deflt = 0; |
379 val = (m_opaque ? 1 : 0); | 389 val = (m_opaque ? 1 : 0); |
380 | 390 |
381 } else if (name == "Smooth") { | 391 } else if (name == "Smooth") { |
382 | 392 |
393 *min = 0; | |
394 *max = 1; | |
383 *deflt = 0; | 395 *deflt = 0; |
384 val = (m_smooth ? 1 : 0); | 396 val = (m_smooth ? 1 : 0); |
385 | 397 |
386 } else { | 398 } else { |
387 val = Layer::getPropertyRangeAndValue(name, min, max, deflt); | 399 val = Layer::getPropertyRangeAndValue(name, min, max, deflt); |