void SliderSettingsDialog::updateInternalValues()
{
  switch (mChanged)
    {
      case VALUE:
        objectValueChanged();
        break;
      case ORIGVAL:
        originalValueChanged();
        break;
      case MIN:
        minValueChanged();
        break;
      case MAX:
        maxValueChanged();
        break;
      case TICKFACTOR:
        minorMajorFactorChanged();
        break;
      case TICKSIZE:
        minorTickSizeChanged();
        break;
      case NUMTICKS:
        numMinorTicksChanged();
        break;
      default:
        break;
    }
}
/**
* Set a new max value and update the widget.
* @param value :: The new value
*/
void ColorMapWidget::setMaxValue(double value) {
  setMaxValueText(value);
  updateScale();
  if (!m_maxValueBox->signalsBlocked()) {
    maxValueChanged();
  }
}
Exemple #3
0
void Normalization::setMaxValue(double max)
{
	if(maxValue != max){
		maxValue = max;

		emit maxValueChanged(max);
	}
}
void MgGaugeController::setMaxValue(float arg)
{
    if (m_maxValue != arg) {
        m_maxValue = arg;
        Q_EMIT maxValueChanged(arg);
        calculateProjectedAngle();
    }
}
Exemple #5
0
/**
  * Constructor.
  * @param type The scale type, e.g. "Linear" or "Log10"
  * @param parent A parent widget
  * @param minPositiveValue A minimum positive value for the Log10 scale
  */
ColorMapWidget::ColorMapWidget(int type,QWidget* parent,const double& minPositiveValue):
  QFrame(parent), m_minPositiveValue(minPositiveValue), m_dragging(false), m_y(0), m_dtype(), m_nth_power(2.0)
{
  m_scaleWidget = new QwtScaleWidget(QwtScaleDraw::RightScale);
  m_scaleWidget->setColorBarEnabled(true);
  m_scaleWidget->setColorBarWidth(20);
  m_scaleWidget->setAlignment(QwtScaleDraw::RightScale);
  m_scaleWidget->setLabelAlignment( Qt::AlignRight | Qt::AlignVCenter);
  m_scaleWidget->setCursor(Qt::OpenHandCursor);

  m_minValueBox = new QLineEdit();
  m_maxValueBox = new QLineEdit();
  m_minValueBox->setMinimumWidth(40);
  m_maxValueBox->setMinimumWidth(40);
  m_minValueBox->setMaximumWidth(60);
  m_maxValueBox->setMaximumWidth(60);
  m_minValueBox->setValidator(new QDoubleValidator(m_minValueBox));
  m_maxValueBox->setValidator(new QDoubleValidator(m_maxValueBox));
  //Ensure the boxes start empty, this is important for checking if values have been set from the scripting side
  m_minValueBox->setText("");
  m_maxValueBox->setText("");
  connect(m_minValueBox,SIGNAL(editingFinished()),this,SLOT(minValueChanged()));
  connect(m_maxValueBox,SIGNAL(editingFinished()),this,SLOT(maxValueChanged()));

  QVBoxLayout* lColormapLayout = new QVBoxLayout;
  lColormapLayout->addWidget(m_maxValueBox);
  lColormapLayout->addWidget(m_scaleWidget);
  lColormapLayout->addWidget(m_minValueBox);

  m_scaleOptions = new QComboBox;
  m_scaleOptions->addItem("Log10", QVariant(GraphOptions::Log10));
  m_scaleOptions->addItem("Linear", QVariant(GraphOptions::Linear));
  m_scaleOptions->addItem("Power", QVariant(GraphOptions::Power));
  m_scaleOptions->setCurrentIndex(m_scaleOptions->findData(type));
  connect(m_scaleOptions, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleOptionsChanged(int)));

  // Controls for exponent for power scale type
  m_lblN = new QLabel(tr("n ="));
  m_lblN->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
  m_dspnN = new DoubleSpinBox();
  m_dspnN->setValue(m_nth_power);
  connect(m_dspnN, SIGNAL(valueChanged(double)), this, SLOT(nPowerChanged(double)));

  QGridLayout* options_layout = new QGridLayout;
  options_layout->addWidget(m_scaleOptions, 1, 0, 1, 2);
  options_layout->addWidget(m_lblN, 2, 0);
  options_layout->addWidget(m_dspnN, 2, 1);
  options_layout->setRowStretch(0, 4);
  options_layout->setRowStretch(1, 1);
  options_layout->setRowStretch(2, 1);

  QHBoxLayout *colourmap_layout = new QHBoxLayout;
  colourmap_layout->addLayout(lColormapLayout);
  colourmap_layout->addLayout(options_layout);
  this->setLayout(colourmap_layout);

}
void ArcStyle::setMaxValue(double arg)
{
    if (m_maxValue == arg)
        return;

    m_maxValue = arg;
    m_factor = (360.0/(m_maxValue - m_minValue)) * 16.0;
    m_scale = 16.0 / m_factor;
    emit maxValueChanged(arg);
}
/**
* Respond to a mouse release event. Finish all dragging.
*/
void ColorMapWidget::mouseReleaseEvent(QMouseEvent * /*e*/) {
  if (!m_dragging)
    return;
  if (m_dtype == Bottom) {
    minValueChanged();
  } else {
    maxValueChanged();
  }
  QApplication::restoreOverrideCursor();
  m_dragging = false;
}
		/// Send the maxValueChanged signal
		void ColorMapWidget::maxValueChanged()
		{
			emit maxValueChanged(m_maxValueBox->text().toDouble());
		}
void IntegerStyleRange1Out::setMaxValue(const KSimBaseInt & max)
{
    m_max = max;
    emit maxValueChanged(m_max.value());
}
Exemple #10
0
void Sensor::setMaxValue(const int &max){
    if(m_max=max)
        return;
    m_max=max;
    emit maxValueChanged();
}