7#ifndef KISSELECTIONPROPERTYSLIDER_H
8#define KISSELECTIONPROPERTYSLIDER_H
13#include <kritaui_export.h>
36 void setTextTemplates(
const QString &normalTemplate,
const QString &mixedTemplate);
51 void setSelectionValue(qreal commonValue,
bool mixed);
57 void slotCompressedUpdate();
61 const QScopedPointer<Private>
m_d;
89 m_valueGetter = getter;
96 m_selection = newSelection;
98 const qreal commonValue = getCommonValue();
100 setEnabled(!m_selection.isEmpty());
101 setSelectionValue(commonValue, commonValue < 0.0);
111 return !m_selection.isEmpty();
116 qreal commonValue = -1.0;
118 Q_FOREACH (T item, m_selection) {
119 const qreal itemValue = m_valueGetter(item);
121 if (commonValue < 0) {
122 commonValue = itemValue;
133 qreal (*m_valueGetter)(T) {
nullptr};
float value(const T *src, size_t ch)
This class is a spinbox in which you can click and drag to set the value. A slider like bar is displa...
virtual void setInternalValue(qreal newValue, bool newBlockUpdateSignal)
void setSuffix(const QString &)=delete
const QScopedPointer< Private > m_d
void setPrefix(const QString &)=delete
virtual bool hasSelection() const =0
virtual qreal getCommonValue() const =0
void setValueGetter(qreal(*getter)(T))
bool hasSelection() const override
KisSelectionPropertySlider(QWidget *parent=0)
QList< T > selection() const
void setSelection(QList< T > newSelection)
qreal getCommonValue() const override
static bool qFuzzyCompare(half p1, half p2)