#include <kis_color_input.h>
Definition at line 73 of file kis_color_input.h.
◆ KisFloatColorInput()
◆ createInput()
| QWidget * KisFloatColorInput::createInput |
( |
| ) |
|
|
overrideprotectedvirtual |
Implements KisColorInput.
Definition at line 234 of file kis_color_input.cpp.
235{
242 m_dblNumInput->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
245
248
250#ifdef HAVE_OPENEXR
252 value = *(
reinterpret_cast<half*
>(data));
253 break;
254#endif
256 value = *(
reinterpret_cast<float*
>(data));
257 break;
258 default:
259 Q_ASSERT(false);
260 }
262
264}
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
The KisDoubleParseSpinBox class is a cleverer doubleSpinBox, able to parse arithmetic expressions.
void setValue(double value, bool overwriteExpression=false)
Set the value of the spinbox.
@ FLOAT32
use this for a float 32bits channel
@ FLOAT16
use this for a float 16bits channel
enumChannelValueType channelValueType() const
References KoChannelInfo::channelValueType(), connect(), KoColor::data(), KoChannelInfo::FLOAT16, KoChannelInfo::FLOAT32, KisColorInput::m_channelInfo, KisColorInput::m_color, KisColorInput::m_colorSlider, m_dblNumInput, KoChannelInfo::pos(), KisDoubleParseSpinBox::setValue(), setValue(), sliderChanged(), and value().
◆ setValue
| void KisFloatColorInput::setValue |
( |
double | v | ) |
|
|
slot |
◆ sliderChanged
| void KisFloatColorInput::sliderChanged |
( |
int | i | ) |
|
|
slot |
◆ update
| void KisFloatColorInput::update |
( |
| ) |
|
|
slot |
Definition at line 272 of file kis_color_input.cpp.
273{
279
285
287#ifdef HAVE_OPENEXR
289 value = *(
reinterpret_cast<half*
>(data));
292 *(
reinterpret_cast<half*
>(dataMin)) =
m_minValue;
293 *(
reinterpret_cast<half*
>(dataMax)) =
m_maxValue;
294 break;
295#endif
297 value = *(
reinterpret_cast<float*
>(data));
300 *(
reinterpret_cast<float*
>(dataMin)) =
m_minValue;
301 *(
reinterpret_cast<float*
>(dataMax)) =
m_maxValue;
302 break;
303 default:
304 Q_ASSERT(false);
305 }
306
309 }
312 }
313
314
315 int newPrecision = 2 + qMax(qreal(0.0), std::ceil(-std::log10(
m_maxValue)));
319 }
321
323
328}
virtual qreal minVisibleFloatValue(const KoChannelInfo *chaninfo) const =0
virtual qreal maxVisibleFloatValue(const KoChannelInfo *chaninfo) const =0
constexpr std::enable_if< sizeof...(values)==0, size_t >::type max()
void setColors(const KoColor &minColor, const KoColor &maxColor)
References KoChannelInfo::channelValueType(), KoColor::data(), KoChannelInfo::FLOAT16, KoChannelInfo::FLOAT32, KisColorInput::m_channelInfo, KisColorInput::m_color, KisColorInput::m_colorSlider, m_dblNumInput, KisColorInput::m_displayRenderer, m_maxValue, m_minValue, KoColorDisplayRendererInterface::maxVisibleFloatValue(), KoColorDisplayRendererInterface::minVisibleFloatValue(), KoChannelInfo::pos(), KoColorSlider::setColors(), KisDoubleParseSpinBox::setValue(), and value().
◆ m_dblNumInput
◆ m_maxValue
| qreal KisFloatColorInput::m_maxValue {0.0} |
|
private |
◆ m_minValue
| qreal KisFloatColorInput::m_minValue {0.0} |
|
private |
The documentation for this class was generated from the following files: