Example #1
0
void ColorPicker::setGam(int g)
{
  if (g==m_gam) return;
  m_gam = qMax(40,qMin(g,240));
  delete m_pix; m_pix=0;
  repaint();
  emit newHsv(m_hue,m_sat,m_gam);
}
Example #2
0
void ColorPicker::setSat(int s)
{
  if (s==m_sat) return;
  m_sat = qMax(0,qMin(s,255));
  delete m_pix; m_pix=0;
  repaint();
  emit newHsv(m_hue,m_sat,m_gam);
}
Example #3
0
void ColorPicker::setHue(int h)
{
  if (h==m_hue) return;
  m_hue = qMax(0,qMin(h,359));
  delete m_pix; m_pix=0;
  repaint();
  emit newHsv(m_hue,m_sat,m_gam);
}
void YviColorLuminancePicker::setVal(int v)
{
    if (val == v)
        return;
    val = qMax(0, qMin(v,255));
    delete pix; pix=0;
    repaint();
    emit newHsv(hue, sat, val);
}
Example #5
0
void TupLuminancePicker::setValue(int v)
{
    if (k->value == v)
        return;

    k->value = qMax(0, qMin(v,255));
    delete k->pix; k->pix=0;
    repaint();

    emit newHsv(k->hue, k->sat, k->value);
}
Example #6
0
void ColorLuminancePicker::setVal(int v) {
    if (val_ == v)
        return;

    val_ = qMax(0, qMin(v,255));

    delete pix_;
    pix_ = 0;

    repaint();

    emit newHsv(hue_, sat_, val_);
}
Example #7
0
//receives from a k->hue,k->sat chooser and relays.
void TupLuminancePicker::setColor(int h, int s)
{
    setColor(h, s, k->value);
    emit newHsv(h, s, k->value);
}
Example #8
0
void ColorLuminancePicker::setCol(int h, int s) {
    setCol(h, s, val_);
    emit newHsv(h, s, val_);
}