28 #include <boost/foreach.hpp>
29 #include <boost/tuple/tuple.hpp>
30 #include <boost/math/special_functions/fpclassify.hpp>
39 : QWidget(parent), _palette(palette), _rectPal(0)
44 _rectPal =
new QRect(0, 0, width(), height());
68 const int bounds_width = 0.1 *
_rectPal->width();
69 const int width_but_bounds =
_rectPal->width() - 2 * bounds_width;
80 boost::math::isinf(value - prev_value)
98 QGridLayout* pPreviewLayout =
new QGridLayout();
99 parent->setLayout(pPreviewLayout);
107 p_minBound->setButtonSymbols(QAbstractSpinBox::NoButtons);
110 p_maxBound->setButtonSymbols(QAbstractSpinBox::NoButtons);
112 pPreviewLayout->addWidget(
p_scale, 1, 0, 1, 3);
113 pPreviewLayout->addWidget(
p_minBound, 0, 0, Qt::AlignLeft);
114 pPreviewLayout->addWidget(
p_maxBound, 0, 2, Qt::AlignRight);
123 assert(
p_scale->
_palette == palette &&
"Inconsistent use of the update slot");
Classe de definition d'une palette.
const color_map_type & getColorMap() const
Get de la lookup table.
size_t getNbColors() const
Getter for the number of colors.
values_type getValueMax() const
Get de la valeur max.
float values_type
The real number type used to store values (typically double or float)
values_type normalize(values_type value) const
Normalize a value, ie convert a value between min and max to a percentage.
values_type getValueMin() const
Get de la valeur min.